public class SRP6Util
extends java.lang.Object
Constructor and Description |
---|
SRP6Util() |
Modifier and Type | Method and Description |
---|---|
static java.math.BigInteger |
calculateK(Digest digest,
java.math.BigInteger N,
java.math.BigInteger g) |
static java.math.BigInteger |
calculateKey(Digest digest,
java.math.BigInteger N,
java.math.BigInteger S)
Computes the final Key according to the standard routine: Key = H(S)
|
static java.math.BigInteger |
calculateM1(Digest digest,
java.math.BigInteger N,
java.math.BigInteger A,
java.math.BigInteger B,
java.math.BigInteger S)
Computes the client evidence message (M1) according to the standard routine:
M1 = H( A | B | S )
|
static java.math.BigInteger |
calculateM2(Digest digest,
java.math.BigInteger N,
java.math.BigInteger A,
java.math.BigInteger M1,
java.math.BigInteger S)
Computes the server evidence message (M2) according to the standard routine:
M2 = H( A | M1 | S )
|
static java.math.BigInteger |
calculateU(Digest digest,
java.math.BigInteger N,
java.math.BigInteger A,
java.math.BigInteger B) |
static java.math.BigInteger |
calculateX(Digest digest,
java.math.BigInteger N,
byte[] salt,
byte[] identity,
byte[] password) |
static java.math.BigInteger |
generatePrivateValue(Digest digest,
java.math.BigInteger N,
java.math.BigInteger g,
java.security.SecureRandom random) |
static java.math.BigInteger |
validatePublicValue(java.math.BigInteger N,
java.math.BigInteger val) |
public static java.math.BigInteger calculateK(Digest digest, java.math.BigInteger N, java.math.BigInteger g)
public static java.math.BigInteger calculateU(Digest digest, java.math.BigInteger N, java.math.BigInteger A, java.math.BigInteger B)
public static java.math.BigInteger calculateX(Digest digest, java.math.BigInteger N, byte[] salt, byte[] identity, byte[] password)
public static java.math.BigInteger generatePrivateValue(Digest digest, java.math.BigInteger N, java.math.BigInteger g, java.security.SecureRandom random)
public static java.math.BigInteger validatePublicValue(java.math.BigInteger N, java.math.BigInteger val) throws CryptoException
CryptoException
public static java.math.BigInteger calculateM1(Digest digest, java.math.BigInteger N, java.math.BigInteger A, java.math.BigInteger B, java.math.BigInteger S)
digest
- The Digest used as the hashing function HN
- Modulus used to get the pad lengthA
- The public client valueB
- The public server valueS
- The secret calculated by both sidespublic static java.math.BigInteger calculateM2(Digest digest, java.math.BigInteger N, java.math.BigInteger A, java.math.BigInteger M1, java.math.BigInteger S)
digest
- The Digest used as the hashing function HN
- Modulus used to get the pad lengthA
- The public client valueM1
- The client evidence messageS
- The secret calculated by both sidespublic static java.math.BigInteger calculateKey(Digest digest, java.math.BigInteger N, java.math.BigInteger S)
digest
- The Digest used as the hashing function HN
- Modulus used to get the pad lengthS
- The secret calculated by both sides