cryptix.provider.elgamal
public class BaseElGamalPublicKey extends Object implements ElGamalPublicKey
References:
Copyright © 1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.2 $
Since: Cryptix 2.2.2
See Also: ElGamalParams java.security.Key java.security.Cipher java.security.Signature
Field Summary | |
---|---|
protected BigInteger | g |
protected BigInteger | p |
protected BigInteger | y |
Constructor Summary | |
---|---|
BaseElGamalPublicKey(BigInteger p, BigInteger g, BigInteger y)
Constructs a BaseElGamalPublicKey with the specified prime p,
base g, and public value y = g | |
BaseElGamalPublicKey(ElGamalParams params, BigInteger y)
Constructs a BaseElGamalPublicKey with a prime and base taken
from an object implementing java.security.interfaces.ElGamalParams,
and the specified public value y = g |
Method Summary | |
---|---|
String | getAlgorithm()
Returns the name of the algorithm this key is intended for
("ElGamal"). |
byte[] | getEncoded()
Returns an encoding of this key as a byte array. |
String | getFormat()
Returns the encoding format name for this key. |
BigInteger | getG()
Returns the base, g.
|
BigInteger | getP()
Returns the prime, p.
|
BigInteger | getY()
Returns the value of y = g |
Throws: NullPointerException if p == null || g == null || y == null
Throws: NullPointerException if params == null || y == null
Returns: the base as a java.math.BigInteger
Returns: the prime as a java.math.BigInteger
Returns: y as a java.math.BigInteger