Skip navigation links

Oracle Fusion Middleware Crypto Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10668-05


oracle.security.crypto.core
Class DHKeyPairGenerator

java.lang.Object
  extended by oracle.security.crypto.core.KeyPairGenerator
      extended by oracle.security.crypto.core.DHKeyPairGenerator


public class DHKeyPairGenerator
extends KeyPairGenerator

Generates private/public keypairs, using the given domain parameters and RandomBitsSource, as specified in X9.42.

See Also:
DHParams, DHPublicKey, DHPrivateKey, DHKeyAgreement

Field Summary

 

Fields inherited from class oracle.security.crypto.core.KeyPairGenerator
rbs

 

Constructor Summary
DHKeyPairGenerator()
          Constructs a new, uninitialized instance of DHKeyPairGenerator.

 

Method Summary
 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.

 

Methods inherited from class oracle.security.crypto.core.KeyPairGenerator
getInstance, setRandomBitsSource

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

DHKeyPairGenerator

public DHKeyPairGenerator()
Constructs a new, uninitialized instance of DHKeyPairGenerator.

Method Detail

initialize

public void initialize(DHParams params,
                       RandomBitsSource rbs)
Initializes the key pair generator with the given parameters and source of randomness.
Parameters:
params - The DHParams object to be used to generate key pair.
rbs - A secure random bits source.

initialize

public void initialize(int L,
                       int m,
                       RandomBitsSource rbs)
Initializes the key pair generator with the given source of randomness. New domain parameters of the specified size are generated.
Parameters:
L - The size in bits for p.
m - The size in bits for q.
rbs - A secure random bits source.

initialize

public void initialize(int L,
                       RandomBitsSource rbs)
Initializes the key pair generator with the given source of randomness. New domain parameters of the specified size for p and 160-bit q are generated.
Specified by:
initialize in class KeyPairGenerator
Parameters:
L - The size in bits for p.
rbs - A secure random bits source.

getAlgorithm

public java.lang.String getAlgorithm()
Returns the string "Diffie-Hellman".
Specified by:
getAlgorithm in class KeyPairGenerator
Returns:
"Diffie-Hellman"

setAlgID

public void setAlgID(AlgorithmIdentifier algID)
              throws AlgorithmIdentifierException
Seta the domain parameters contained in the given AlgorithmIdentifier for this KeyPairGenerator.
Specified by:
setAlgID in class KeyPairGenerator
Parameters:
algID - An AlgorithmIdentifier containing valid domain parameters for this KeyPairGenerator.
Throws:
AlgorithmIdentifierException

generateKeyPair

public KeyPair generateKeyPair()
Description copied from class: KeyPairGenerator
Generates a public/private key pair.
Specified by:
generateKeyPair in class KeyPairGenerator

Skip navigation links

Oracle Fusion Middleware Crypto Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10668-05


Copyright © 2005, 2013, Oracle. All rights reserved.