gnu.crypto.key.srp6
Class SRPKey
java.lang.Object
gnu.crypto.key.srp6.SRPKey
- Key, Serializable
public abstract class SRPKey
extends java.lang.Object
implements Key, Serializable
An abstract representation of a base SRP ephemeral key.
This object encapsulates the two numbers:
- N: A large safe prime (N = 2q+1, where q is prime).
- g: A generator modulo N.
Note that in SRP, all arithmetic is done modulo N.
Reference:
- SRP Protocol Design
Thomas J. Wu.
Version:
protected BigInteger | N - The public, Germaine prime, shared modulus.
|
protected BigInteger | g - The generator.
|
SRPKey(BigInteger N, BigInteger g)
|
boolean | equals(Object obj) - Returns
true if the designated object is an instance of
SRPKey and has the same SRP parameter values as this one.
|
String | getAlgorithm() - Returns the standard algorithm name for this key.
|
byte[] | getEncoded() - see getEncoded(int).
|
byte[] | getEncoded(int format)
|
String | getFormat() - Returns
null since this implementation does not encode SRP
keys.
|
BigInteger | getG() - Returns the generator.
|
BigInteger | getN() - Returns the public shared modulus.
|
N
protected final BigInteger N
The public, Germaine prime, shared modulus.
g
protected final BigInteger g
The generator.
SRPKey
protected SRPKey(BigInteger N,
BigInteger g)
equals
public boolean equals(Object obj)
Returns true
if the designated object is an instance of
SRPKey
and has the same SRP parameter values as this one.
obj
- the other non-null SRP key to compare to.
true
if the designated object is of the same type and
value as this one.
getAlgorithm
public String getAlgorithm()
Returns the standard algorithm name for this key.
- the standard algorithm name for this key.
getEncoded
public byte[] getEncoded()
see getEncoded(int).
getEncoded
public byte[] getEncoded(int format)
getFormat
public String getFormat()
Returns null
since this implementation does not encode SRP
keys.
- null since this implementation does not encode SRP keys.
getG
public BigInteger getG()
Returns the generator.
g
.
getN
public BigInteger getN()
Returns the public shared modulus.
N
.
Copyright © 2001, 2002, 2003
Free Software Foundation,
Inc. All Rights Reserved.