public class SRP6Client extends Object
| Modifier and Type | Field and Description |
|---|---|
protected BigInteger |
a |
protected BigInteger |
A |
protected BigInteger |
B |
protected Digest |
digest |
protected BigInteger |
g |
protected BigInteger |
N |
protected SecureRandom |
random |
protected BigInteger |
S |
protected BigInteger |
u |
protected BigInteger |
x |
| Constructor and Description |
|---|
SRP6Client() |
| Modifier and Type | Method and Description |
|---|---|
BigInteger |
calculateSecret(BigInteger serverB)
Generates client's verification message given the server's credentials
|
BigInteger |
generateClientCredentials(byte[] salt,
byte[] identity,
byte[] password)
Generates client's credentials given the client's salt, identity and password
|
void |
init(BigInteger N,
BigInteger g,
Digest digest,
SecureRandom random)
Initialises the client to begin new authentication attempt
|
protected BigInteger |
selectPrivateValue() |
protected BigInteger N
protected BigInteger g
protected BigInteger a
protected BigInteger A
protected BigInteger B
protected BigInteger x
protected BigInteger u
protected BigInteger S
protected Digest digest
protected SecureRandom random
public void init(BigInteger N, BigInteger g, Digest digest, SecureRandom random)
N - The safe prime associated with the client's verifierg - The group parameter associated with the client's verifierdigest - The digest algorithm associated with the client's verifierrandom - For key generationpublic BigInteger generateClientCredentials(byte[] salt, byte[] identity, byte[] password)
salt - The salt used in the client's verifier.identity - The user's identity (eg. username)password - The user's passwordpublic BigInteger calculateSecret(BigInteger serverB) throws CryptoException
serverB - The server's credentialsCryptoException - If server's credentials are invalidprotected BigInteger selectPrivateValue()
Copyright © 2015. All rights reserved.