SQRL Protocol

An implementation of the SQRL protocol. This library helps to parse, validate and create SQRL messages.

License

License

Categories

Categories

Net
GroupId

GroupId

net.vrallev.sqrl
ArtifactId

ArtifactId

sqrl-protocol
Last Version

Last Version

0.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

SQRL Protocol
An implementation of the SQRL protocol. This library helps to parse, validate and create SQRL messages.
Project URL

Project URL

https://github.com/vRallev/SQRL-Protocol
Source Code Management

Source Code Management

https://github.com/vRallev/SQRL-Protocol

Download sqrl-protocol

How to add to project

<!-- https://jarcasting.com/artifacts/net.vrallev.sqrl/sqrl-protocol/ -->
<dependency>
    <groupId>net.vrallev.sqrl</groupId>
    <artifactId>sqrl-protocol</artifactId>
    <version>0.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/net.vrallev.sqrl/sqrl-protocol/
implementation 'net.vrallev.sqrl:sqrl-protocol:0.0.2'
// https://jarcasting.com/artifacts/net.vrallev.sqrl/sqrl-protocol/
implementation ("net.vrallev.sqrl:sqrl-protocol:0.0.2")
'net.vrallev.sqrl:sqrl-protocol:jar:0.0.2'
<dependency org="net.vrallev.sqrl" name="sqrl-protocol" rev="0.0.2">
  <artifact name="sqrl-protocol" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.vrallev.sqrl', module='sqrl-protocol', version='0.0.2')
)
libraryDependencies += "net.vrallev.sqrl" % "sqrl-protocol" % "0.0.2"
[net.vrallev.sqrl/sqrl-protocol "0.0.2"]

Dependencies

compile (1)

Group / Artifact Type Version
com.madgag.spongycastle : core jar 1.50.0.0

provided (2)

Group / Artifact Type Version
net.vrallev.ecc : ecc-25519-java jar 1.0.0
net.vrallev.ecc : ecc-25519-android-facade jar 1.0.0

test (3)

Group / Artifact Type Version
org.easytesting : fest-assert jar 1.4
org.hamcrest : hamcrest-library jar 1.3
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

Deprecated

This project is not maintained anymore.

SQRL-Protocol

An implementation of the SQRL protocol. This library helps to parse, validate and create SQRL messages.

Download

Download the latest JAR or grab via Gradle or Maven:

dependencies {
    compile 'net.vrallev.sqrl:sqrl-protocol:0.0.2'
}
<dependency>
    <groupId>net.vrallev.sqrl</groupId>
    <artifactId>sqrl-protocol</artifactId>
    <version>0.0.2</version>
</dependency>

Advanced

The library requires to implement the EccProvider25519 interface. You can either implement this interface or use one of my other libraries. The libraries are automatically found in the classpath and you don't need to setup anything else.

Both libraries depend on other code. Please respect the author's licenses!

dependencies {
    compile 'net.vrallev.ecc:ecc-25519-android:1.0.0'   // Android
    compile 'net.vrallev.ecc:ecc-25519-java:1.0.0'      // JVM
}

Usage

The class SqrlProtocol serves as entry point. You may want to take a look at the unit tests.

SqrlClientBody bodyOriginal = SqrlProtocol.instance()
		.authenticate(identity.getMasterKey(), mSiteKey)
        .buildRequest(mSignatureUri);

SqrlClientBody bodyParsed = SqrlProtocol.instance()
        .readSqrlClientBody()
        .from(bodyOriginal.getBodyEncoded())
        .verified();

SqrlServerBody bodyOriginal = SqrlProtocol.instance()
		.answerClient(body, ServerParameter.SQRL_ACCOUNT_CREATION_ALLOWED)
		.withServerFriendlyName("Unit Test")
        .withStoredKeys(user.getServerUnlockKey(), user.getVerifyUnlockKey())
		.create()
		.asSqrlServerBody();

SqrlServerBody bodyParsed = SqrlProtocol.instance()
		.readSqrlServerBody()
		.from(bodyOriginal.getBodyEncoded())
		.parsed();

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Versions

Version
0.0.2
0.0.1