|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcryptix.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 Form| Field 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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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)
java.lang.NullPointerException - if p == null || g == null || y == null
public BaseElGamalPublicKey(ElGamalParams params,
java.math.BigInteger y)
java.lang.NullPointerException - if params == null || y == null| Method Detail |
public java.math.BigInteger getP()
getP in interface ElGamalKeypublic java.math.BigInteger getG()
getG in interface ElGamalKeypublic java.math.BigInteger getY()
getY in interface ElGamalKeypublic java.lang.String getAlgorithm()
getAlgorithm in interface java.security.Keypublic java.lang.String getFormat()
getFormat in interface java.security.Keypublic byte[] getEncoded()
getEncoded in interface java.security.Key
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||