public final class ElGamalParameterGenerator
extends java.security.AlgorithmParameterGeneratorSpi
Note that parameter generation is fairly slow but this should not be a problem as this is a hardly performed activity anyway. Typically they will be generated once per user group by the CA and then the users will generate their keys using the parameters provided.
Applications shall use
AlgorithmParameterGenerator.getInstance("ElGamal") for obtaining
an AlgorithmParamterGenerator for generating ElGamal parameters in opaque
representation. Once the generator has been created, it shall be properly
initialized by one of the several init methods. If none explicit
initialization is done, per default the length of the prime modulus is set to
1024 bits and the length of the exponent (private value) is chosen to be 300
bits. After initializing the generator (or relying on default settings), the
reguired parameters actually are created by calling the
generateParameters method.
| Constructor and Description |
|---|
ElGamalParameterGenerator() |
| Modifier and Type | Method and Description |
|---|---|
protected java.security.AlgorithmParameters |
engineGenerateParameters() |
protected void |
engineInit(java.security.spec.AlgorithmParameterSpec genParamSpec,
java.security.SecureRandom random) |
protected void |
engineInit(int strength,
java.security.SecureRandom random) |
protected void engineInit(int strength,
java.security.SecureRandom random)
engineInit in class java.security.AlgorithmParameterGeneratorSpiprotected void engineInit(java.security.spec.AlgorithmParameterSpec genParamSpec,
java.security.SecureRandom random)
throws java.security.InvalidAlgorithmParameterException
engineInit in class java.security.AlgorithmParameterGeneratorSpijava.security.InvalidAlgorithmParameterExceptionprotected java.security.AlgorithmParameters engineGenerateParameters()
engineGenerateParameters in class java.security.AlgorithmParameterGeneratorSpi