public class DHKeyPairGenerator extends KeyPairGenerator
RandomBitsSource, as specified in X9.42.DHParams, DHPublicKey, DHPrivateKey, DHKeyAgreementrbs| Constructor and Description |
|---|
DHKeyPairGenerator()
Constructs a new, uninitialized instance of
DHKeyPairGenerator. |
| Modifier and Type | Method and Description |
|---|---|
KeyPair |
generateKeyPair()
Generates a public/private key pair.
|
java.lang.String |
getAlgorithm()
Returns the string "Diffie-Hellman".
|
void |
initialize(DHParams params, RandomBitsSource rbs)
Initializes the key pair generator with the given parameters and source of randomness.
|
void |
initialize(int L, int m, RandomBitsSource rbs)
Initializes the key pair generator with the given source of randomness.
|
void |
initialize(int L, RandomBitsSource rbs)
Initializes the key pair generator with the given source of randomness.
|
void |
setAlgID(AlgorithmIdentifier algID)
Seta the domain parameters contained in the given
AlgorithmIdentifier for this KeyPairGenerator. |
getInstance, setRandomBitsSourcepublic DHKeyPairGenerator()
DHKeyPairGenerator.public void initialize(DHParams params, RandomBitsSource rbs)
params - The DHParams object to be used to generate key pair.rbs - A secure random bits source.
public void initialize(int L,
int m,
RandomBitsSource rbs)
L - The size in bits for p.m - The size in bits for q.rbs - A secure random bits source.
public void initialize(int L,
RandomBitsSource rbs)
initialize in class KeyPairGeneratorL - The size in bits for p.rbs - A secure random bits source.public java.lang.String getAlgorithm()
getAlgorithm in class KeyPairGeneratorpublic void setAlgID(AlgorithmIdentifier algID) throws AlgorithmIdentifierException
AlgorithmIdentifier for this KeyPairGenerator.setAlgID in class KeyPairGeneratoralgID - An AlgorithmIdentifier containing valid domain parameters for this KeyPairGenerator.AlgorithmIdentifierExceptionpublic KeyPair generateKeyPair()
KeyPairGeneratorgenerateKeyPair in class KeyPairGenerator