de.flexiprovider.core.elgamal
Class ElGamalKeyGenParameterSpec

java.lang.Object
  |
  +--de.flexiprovider.core.elgamal.ElGamalKeyGenParameterSpec
All Implemented Interfaces:
AlgorithmParameterSpec, java.security.spec.AlgorithmParameterSpec

public class ElGamalKeyGenParameterSpec
extends java.lang.Object
implements AlgorithmParameterSpec

This class specifies parameters used for initializing the ElGamalKeyPairGenerator. The parameters consist of the bit length of the prime p. The default bit length is 1024 bits.

Author:
Martin Döring

Field Summary
static int DEFAULT_KEY_SIZE
          The default bit length of the prime p (1024 bits)
 
Constructor Summary
ElGamalKeyGenParameterSpec()
          Construct the default parameters.
ElGamalKeyGenParameterSpec(int keySize)
          Construct new parameters from the given bit length of the prime p.
 
Method Summary
 int getKeySize()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_KEY_SIZE

public static final int DEFAULT_KEY_SIZE
The default bit length of the prime p (1024 bits)
Constructor Detail

ElGamalKeyGenParameterSpec

public ElGamalKeyGenParameterSpec()
Construct the default parameters. Choose the bit length of the prime p as DEFAULT_KEY_SIZE.

ElGamalKeyGenParameterSpec

public ElGamalKeyGenParameterSpec(int keySize)
                           throws InvalidParameterException
Construct new parameters from the given bit length of the prime p. If the length is invalid, the default length is chosen.
Parameters:
keySize - the bit length of the prime p (>= 512 bits)
Throws:
InvalidParameterException - if the key size is less than 512 bits.
Method Detail

getKeySize

public int getKeySize()
Returns:
the bit length of the prime p