org.jboss.security.srp
Class SRPParameters

java.lang.Object
  extended byorg.jboss.security.srp.SRPParameters
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class SRPParameters
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

The RFC2945 algorithm session parameters that the client and server agree to use. In addition to the base RFC2945 parameters, one can choose an alternate hash algorithm for the private session key.

See Also:
Serialized Form

Field Summary
 java.lang.String cipherAlgorithm
          The algorithm to use for any encryption of data.
 byte[] cipherIV
          The cipher intialization vector bytes
 byte[] g
          The algorithm primitive generator
 java.lang.String hashAlgorithm
          The algorithm to hash the session key to produce K.
 byte[] N
          The algorithm safe-prime modulus
 byte[] s
          The random password salt originally used to verify the password
 
Constructor Summary
SRPParameters(byte[] N, byte[] g, byte[] s)
          Creates a new instance of SRPParameters
SRPParameters(byte[] N, byte[] g, byte[] s, java.lang.String hashAlgorithm)
           
SRPParameters(byte[] N, byte[] g, byte[] s, java.lang.String hashAlgorithm, java.lang.String cipherAlgorithm)
           
SRPParameters(byte[] N, byte[] g, byte[] s, java.lang.String hashAlgorithm, java.lang.String cipherAlgorithm, byte[] cipherIV)
           
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

N

public final byte[] N
The algorithm safe-prime modulus


g

public final byte[] g
The algorithm primitive generator


s

public final byte[] s
The random password salt originally used to verify the password


hashAlgorithm

public final java.lang.String hashAlgorithm
The algorithm to hash the session key to produce K. To be consistent with the RFC2945 description this must be SHA_Interleave as implemented by the JBossSX security provider. For compatibility with earlier JBossSX SRP releases the algorithm must be SHA_ReverseInterleave. This name is passed to java.security.MessageDigest.getInstance().


cipherAlgorithm

public final java.lang.String cipherAlgorithm
The algorithm to use for any encryption of data.


cipherIV

public byte[] cipherIV
The cipher intialization vector bytes

Constructor Detail

SRPParameters

public SRPParameters(byte[] N,
                     byte[] g,
                     byte[] s)
Creates a new instance of SRPParameters


SRPParameters

public SRPParameters(byte[] N,
                     byte[] g,
                     byte[] s,
                     java.lang.String hashAlgorithm)

SRPParameters

public SRPParameters(byte[] N,
                     byte[] g,
                     byte[] s,
                     java.lang.String hashAlgorithm,
                     java.lang.String cipherAlgorithm)

SRPParameters

public SRPParameters(byte[] N,
                     byte[] g,
                     byte[] s,
                     java.lang.String hashAlgorithm,
                     java.lang.String cipherAlgorithm,
                     byte[] cipherIV)
Method Detail

clone

public java.lang.Object clone()

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object obj)

toString

public java.lang.String toString()