public class SRP6Util
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.math.BigInteger |
ONE |
private static java.math.BigInteger |
ZERO |
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 |
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) |
private static byte[] |
getPadded(java.math.BigInteger n,
int length) |
private static java.math.BigInteger |
hashPaddedPair(Digest digest,
java.math.BigInteger N,
java.math.BigInteger n1,
java.math.BigInteger n2) |
static java.math.BigInteger |
validatePublicValue(java.math.BigInteger N,
java.math.BigInteger val) |
private static java.math.BigInteger ZERO
private static java.math.BigInteger ONE
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
private static java.math.BigInteger hashPaddedPair(Digest digest, java.math.BigInteger N, java.math.BigInteger n1, java.math.BigInteger n2)
private static byte[] getPadded(java.math.BigInteger n, int length)