public class SRP6VerifierGenerator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected TlsHash |
digest |
protected java.math.BigInteger |
g |
protected java.math.BigInteger |
N |
Constructor and Description |
---|
SRP6VerifierGenerator() |
Modifier and Type | Method and Description |
---|---|
java.math.BigInteger |
generateVerifier(byte[] salt,
byte[] identity,
byte[] password)
Creates a new SRP verifier
|
void |
init(java.math.BigInteger N,
java.math.BigInteger g,
TlsHash digest)
Initialises generator to create new verifiers
|
void |
init(SRP6Group group,
TlsHash digest) |
protected java.math.BigInteger N
protected java.math.BigInteger g
protected TlsHash digest
public void init(java.math.BigInteger N, java.math.BigInteger g, TlsHash digest)
N
- The safe prime to use (see DHParametersGenerator)g
- The group parameter to use (see DHParametersGenerator)digest
- The digest to use. The same digest type will need to be used later for the actual authentication
attempt. Also note that the final session key size is dependent on the chosen digest.public java.math.BigInteger generateVerifier(byte[] salt, byte[] identity, byte[] password)
salt
- The salt to use, generally should be large and randomidentity
- The user's identifying information (eg. username)password
- The user's password