|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cryptix.provider.elgamal.BaseElGamalPublicKey
A class representing an ElGamal public key. This is also a superclass for ElGamal private keys. It is called BaseElGamalPublicKey to distinguish it from the interface ElGamalPublicKey, without having to use fully-qualified names.
References:
Copyright © 1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.2 $
ElGamalParams
,
Key
,
java.security.Cipher
,
Signature
, Serialized FormField Summary | |
protected java.math.BigInteger |
g
|
protected java.math.BigInteger |
p
|
protected java.math.BigInteger |
y
|
Fields inherited from interface java.security.PublicKey |
serialVersionUID |
Constructor Summary | |
BaseElGamalPublicKey(java.math.BigInteger p,
java.math.BigInteger g,
java.math.BigInteger y)
Constructs a BaseElGamalPublicKey with the specified prime p, base g, and public value y = g |
|
BaseElGamalPublicKey(ElGamalParams params,
java.math.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 | |
java.lang.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. |
java.lang.String |
getFormat()
Returns the encoding format name for this key. |
java.math.BigInteger |
getG()
Returns the base, g. |
java.math.BigInteger |
getP()
Returns the prime, p. |
java.math.BigInteger |
getY()
Returns the value of y = g |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.math.BigInteger p
protected java.math.BigInteger g
protected java.math.BigInteger y
Constructor Detail |
public BaseElGamalPublicKey(java.math.BigInteger p, java.math.BigInteger g, java.math.BigInteger y)
NullPointerException
- if p == null || g == null || y == nullpublic BaseElGamalPublicKey(ElGamalParams params, java.math.BigInteger y)
NullPointerException
- if params == null || y == nullMethod Detail |
public java.math.BigInteger getP()
getP
in interface ElGamalKey
public java.math.BigInteger getG()
getG
in interface ElGamalKey
public java.math.BigInteger getY()
getY
in interface ElGamalKey
public java.lang.String getAlgorithm()
getAlgorithm
in interface java.security.Key
public java.lang.String getFormat()
getFormat
in interface java.security.Key
public byte[] getEncoded()
getEncoded
in interface java.security.Key
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |