org.gudy.bouncycastle.crypto.agreement.srp
Class SRP6VerifierGenerator

java.lang.Object
  extended by org.gudy.bouncycastle.crypto.agreement.srp.SRP6VerifierGenerator

public class SRP6VerifierGenerator
extends Object

Generates new SRP verifier for user


Field Summary
protected  Digest digest
           
protected  BigInteger g
           
protected  BigInteger N
           
 
Constructor Summary
SRP6VerifierGenerator()
           
 
Method Summary
 BigInteger generateVerifier(byte[] salt, byte[] identity, byte[] password)
          Creates a new SRP verifier
 void init(BigInteger N, BigInteger g, Digest digest)
          Initialises generator to create new verifiers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

N

protected BigInteger N

g

protected BigInteger g

digest

protected Digest digest
Constructor Detail

SRP6VerifierGenerator

public SRP6VerifierGenerator()
Method Detail

init

public void init(BigInteger N,
                 BigInteger g,
                 Digest digest)
Initialises generator to create new verifiers

Parameters:
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.

generateVerifier

public BigInteger generateVerifier(byte[] salt,
                                   byte[] identity,
                                   byte[] password)
Creates a new SRP verifier

Parameters:
salt - The salt to use, generally should be large and random
identity - The user's identifying information (eg. username)
password - The user's password
Returns:
A new verifier for use in future SRP authentication