Skip to content

Latest commit

 

History

History
61 lines (39 loc) · 1.13 KB

File metadata and controls

61 lines (39 loc) · 1.13 KB

JSRP

SRP for java that compatible with jsrp(node-srp) and sirp(ruby)

Only support 4096 Primes with G equals to 5 and use SHA-256 for message digest

Code Example

Login with SRP

String identifier = "username";
String password = "password";

// Create client
Client mClient = new Client(identifier,password);

// Get A
String A = mClient.getPublicKey();

// Send A to server, server will returns B and salt
// User B and salt for creating M1

String M1 = mClient.getProof(B,salt);

// Send M1 to server to verify your identity

Create Verifier and Salt with SRP

String identifier = "username";
String password = "password";

// Create client
Client mClient = new Client(identifier,password);

// Call createVerifier
Verifier result = mClient.createVerifier();

// Salt
result.getSalt();
// Verifier
result.getVerifier();

Tests

Soon ...

Todo

Implement Server
Write integration test between Client and Server
Add other primes and hash digest

License

MIT License

Copyright (c) 2016 Taskulu