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 KeyAgreement

java.lang.Object
  extended by oracle.security.crypto.core.KeyAgreement

Direct Known Subclasses:
DHKeyAgreement

public abstract class KeyAgreement
extends java.lang.Object

An abstract class for public key agreement scheme.

Status: Provisional (may be changed in future releases.)


Constructor Summary
protected KeyAgreement()
          Empty constructor.

 

Method Summary
abstract  java.lang.String algName()
          Returns the name of the key agreement algorithm.
abstract  byte[] generateSecret()
          Generate the shared secret value from the local party private key and the other party public key.
abstract  AlgorithmIdentifier getAlgID()
          Gets the algorithm identifier of this key agreeement.
static KeyAgreement getInstance(AlgorithmIdentifier algID)
          Create a new instance of the KeyAgreement subclass for the specified algorithm identifier.
static KeyAgreement getInstance(PrivateKey privKey)
          Create a new instance of the KeyAgreement subclass for the specified key's algorithm and the local party PrivateKey.
static KeyAgreement getInstance(PublicKey pubKey)
          Create a new instance of the KeyAgreement subclass for the specified key's algorithm and the other party public key.
abstract  PublicKey getPublicKey()
          Gets the public key of the other party.
abstract  void setAlgID(AlgorithmIdentifier algID)
          Sets the algorith identifier of the key agreement object.
abstract  void setPrivateKey(PrivateKey key)
          Sets the private key of the local party for generating secret value.
abstract  void setPublicKey(PublicKey key)
          Sets the public key of the other party for generating secret value.

 

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

 

Constructor Detail

KeyAgreement

protected KeyAgreement()
Empty constructor.

Method Detail

getInstance

public static KeyAgreement getInstance(AlgorithmIdentifier algID)
                                throws AlgorithmIdentifierException
Create a new instance of the KeyAgreement subclass for the specified algorithm identifier.
Parameters:
algID - One of the key agreement algorithm identifiers defined in AlgID.
Throws:
AlgorithmIdentifierException

getInstance

public static KeyAgreement getInstance(PrivateKey privKey)
                                throws KeyAgreementException
Create a new instance of the KeyAgreement subclass for the specified key's algorithm and the local party PrivateKey.
Parameters:
privKey - The private key for the local party.
Throws:
KeyAgreementException

getInstance

public static KeyAgreement getInstance(PublicKey pubKey)
                                throws KeyAgreementException
Create a new instance of the KeyAgreement subclass for the specified key's algorithm and the other party public key.
Parameters:
pubKey - The public key for the other party.
Throws:
KeyAgreementException

setAlgID

public abstract void setAlgID(AlgorithmIdentifier algID)
                       throws AlgorithmIdentifierException
Sets the algorith identifier of the key agreement object.
Parameters:
algID - The AlgorithmIdentifier to use for this KeyAgreement.
Throws:
AlgorithmIdentifierException

getAlgID

public abstract AlgorithmIdentifier getAlgID()
Gets the algorithm identifier of this key agreeement.
Returns:
An AlgorithmIdentifier representing the algorithm used in this key agreement.

setPrivateKey

public abstract void setPrivateKey(PrivateKey key)
                            throws InvalidKeyException
Sets the private key of the local party for generating secret value.
Throws:
InvalidKeyException

generateSecret

public abstract byte[] generateSecret()
                               throws KeyAgreementException
Generate the shared secret value from the local party private key and the other party public key.
Throws:
KeyAgreementException

setPublicKey

public abstract void setPublicKey(PublicKey key)
                           throws InvalidKeyException
Sets the public key of the other party for generating secret value.
Throws:
InvalidKeyException

getPublicKey

public abstract PublicKey getPublicKey()
Gets the public key of the other party.

algName

public abstract java.lang.String algName()
Returns the name of the key agreement algorithm.
Returns:
a string which identifies the key agreement algorithm

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.