public class SRP6Server
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.math.BigInteger |
A |
protected java.math.BigInteger |
b |
protected java.math.BigInteger |
B |
protected Digest |
digest |
protected java.math.BigInteger |
g |
protected java.math.BigInteger |
N |
protected java.security.SecureRandom |
random |
protected java.math.BigInteger |
S |
protected java.math.BigInteger |
u |
protected java.math.BigInteger |
v |
Constructor and Description |
---|
SRP6Server() |
Modifier and Type | Method and Description |
---|---|
java.math.BigInteger |
calculateSecret(java.math.BigInteger clientA)
Processes the client's credentials.
|
java.math.BigInteger |
generateServerCredentials()
Generates the server's credentials that are to be sent to the client.
|
void |
init(java.math.BigInteger N,
java.math.BigInteger g,
java.math.BigInteger v,
Digest digest,
java.security.SecureRandom random)
Initialises the server to accept a new client authentication attempt
|
protected java.math.BigInteger |
selectPrivateValue() |
protected java.math.BigInteger N
protected java.math.BigInteger g
protected java.math.BigInteger v
protected java.security.SecureRandom random
protected Digest digest
protected java.math.BigInteger A
protected java.math.BigInteger b
protected java.math.BigInteger B
protected java.math.BigInteger u
protected java.math.BigInteger S
public void init(java.math.BigInteger N, java.math.BigInteger g, java.math.BigInteger v, Digest digest, java.security.SecureRandom random)
N
- The safe prime associated with the client's verifierg
- The group parameter associated with the client's verifierv
- The client's verifierdigest
- The digest algorithm associated with the client's verifierrandom
- For key generationpublic java.math.BigInteger generateServerCredentials()
public java.math.BigInteger calculateSecret(java.math.BigInteger clientA) throws CryptoException
clientA
- The client's credentialsCryptoException
- If client's credentials are invalidprotected java.math.BigInteger selectPrivateValue()