org.logi.crypto.keys
Class ElGamalKey
java.lang.Object
org.logi.crypto.Crypto
org.logi.crypto.keys.K
org.logi.crypto.keys.DHKey
org.logi.crypto.keys.ElGamalKey
- All Implemented Interfaces:
- CipherKey, Key, SignatureKey
Deprecated. All functionality moved to the DHKey class.
- public class ElGamalKey
- extends DHKey
This class is only here to provide backward compatibility.
Fields inherited from class org.logi.crypto.Crypto |
BIT, cdsPath, EMPTY_ARRAY, FOUR, keySource, NIBBLE, ONE, primeCertainty, random, TWO, ZERO |
Constructor Summary |
ElGamalKey(java.math.BigInteger x,
java.math.BigInteger g,
java.math.BigInteger m,
boolean pri)
Deprecated. Create a new ElGamal key object. |
ElGamalKey(int n)
Deprecated. Create a random private ElGamalKey with an n
bit modulus. |
Method Summary |
static DHKey |
parseCDS(java.lang.String key)
Deprecated. If "ElGamalKey( key )" is a valid CDS for a ElGamalKey, then
ElGamalKey.parseCDS(key) will return the described DHKey object. |
Methods inherited from class org.logi.crypto.keys.DHKey |
calcFingerprint, cipherBlockSize, createKeys, decrypt, encrypt, equals, getAlgorithm, getG, getGenerator, getKey, getM, getModulus, getPublic, getSize, isPrivate, matches, plainBlockSize, sign, signatureSize, signBlockSize, toString, verify |
Methods inherited from class org.logi.crypto.Crypto |
binString, binString, equal, equalRelaxed, equalSub, fromHexNibble, fromHexString, fromString, fromString, hexString, hexString, hexString, hexString, hexString, initRandom, initRandom, makeClass, makeInt, makeLong, makeSessionKey, pastSpace, pickBits, pickBits, readBlock, readInt, writeBytes, writeBytes, writeInt |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
ElGamalKey
public ElGamalKey(java.math.BigInteger x,
java.math.BigInteger g,
java.math.BigInteger m,
boolean pri)
- Deprecated.
- Create a new ElGamal key object. An object is created for
x
in the group modulo m
with
generator g
. It is a private key iff pri
is true
.
ElGamalKey
public ElGamalKey(int n)
- Deprecated.
- Create a random private ElGamalKey with an
n
bit modulus.
Pre-calcualted modula exist for bit lengths 256, 512, 1024 and 2048.
Using these values saves a lot of time and does not weaken the keys.
parseCDS
public static DHKey parseCDS(java.lang.String key)
throws InvalidCDSException
- Deprecated.
- If "ElGamalKey( key )" is a valid CDS for a ElGamalKey, then
ElGamalKey.parseCDS(key) will return the described DHKey object.
Note that this method returns an instance of the DHKey class which
has succeeded the ElGamal class.
- Throws:
InvalidCDSException
- if the CDS is malformed.- See Also:
Crypto.fromString(String)