public class SRP6Server extends Object
| Modifier and Type | Field and Description |
|---|---|
protected BigInteger |
A |
protected BigInteger |
b |
protected BigInteger |
B |
protected Digest |
digest |
protected BigInteger |
g |
protected BigInteger |
Key |
protected BigInteger |
M1 |
protected BigInteger |
M2 |
protected BigInteger |
N |
protected SecureRandom |
random |
protected BigInteger |
S |
protected BigInteger |
u |
protected BigInteger |
v |
| Constructor and Description |
|---|
SRP6Server() |
| Modifier and Type | Method and Description |
|---|---|
BigInteger |
calculateSecret(BigInteger clientA)
Processes the client's credentials.
|
BigInteger |
calculateServerEvidenceMessage()
Computes the server evidence message M2 using the previously verified values.
|
BigInteger |
calculateSessionKey()
Computes the final session key as a result of the SRP successful mutual authentication
To be called after calculating the server evidence message M2.
|
BigInteger |
generateServerCredentials()
Generates the server's credentials that are to be sent to the client.
|
void |
init(BigInteger N,
BigInteger g,
BigInteger v,
Digest digest,
SecureRandom random)
Initialises the server to accept a new client authentication attempt
|
void |
init(SRP6GroupParameters group,
BigInteger v,
Digest digest,
SecureRandom random) |
protected BigInteger |
selectPrivateValue() |
boolean |
verifyClientEvidenceMessage(BigInteger clientM1)
Authenticates the received client evidence message M1 and saves it only if correct.
|
protected BigInteger N
protected BigInteger g
protected BigInteger v
protected SecureRandom random
protected Digest digest
protected BigInteger A
protected BigInteger b
protected BigInteger B
protected BigInteger u
protected BigInteger S
protected BigInteger M1
protected BigInteger M2
protected BigInteger Key
public void init(BigInteger N, BigInteger g, BigInteger v, Digest digest, 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 void init(SRP6GroupParameters group, BigInteger v, Digest digest, SecureRandom random)
public BigInteger generateServerCredentials()
public BigInteger calculateSecret(BigInteger clientA) throws CryptoException
clientA - The client's credentialsCryptoException - If client's credentials are invalidprotected BigInteger selectPrivateValue()
public boolean verifyClientEvidenceMessage(BigInteger clientM1) throws CryptoException
clientM1 - the client side generated evidence messageCryptoExceptionpublic BigInteger calculateServerEvidenceMessage() throws CryptoException
CryptoExceptionpublic BigInteger calculateSessionKey() throws CryptoException
CryptoExceptionCopyright © 2015–2020 The veraPDF Consortium. All rights reserved.