|
Oracle Fusion Middleware Crypto FIPS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10696-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.crypto.core.KeyAgreement
oracle.security.crypto.core.DHKeyAgreement
public class DHKeyAgreement
Implements the Diffie-Hellman algorithm for static shared secret generation, as specified in ANSI X9.42.
To generate a secret key value, the local party private key and the other party public key must be present. If parameters are missing from any of the keys, they should be known from the application envrionment and must be set before using this class.
DHKey
, DHPublicKey
, DHPrivateKey
Constructor Summary | |
---|---|
DHKeyAgreement() Create a new uninitialized instance of DHKeyAgreement . |
|
DHKeyAgreement(DHPrivateKey privKey) Create a new instance of DHKeyAgreement with the specified local party private key. |
|
DHKeyAgreement(DHPrivateKey privKey, DHPublicKey pubKey) Create a new instance of DHKeyAgreement with the specified local party private key and the other party public key. |
|
DHKeyAgreement(DHPublicKey pubKey) Create a new instance of DHKeyAgreement with the specified other party public key. |
Method Summary | |
---|---|
java.lang.String |
algName() Returns the name of the key agreement algorithm. |
byte[] |
generateSecret() Generate the shared secret value from the local party private key and the other party public key. |
AlgorithmIdentifier |
getAlgID() Gets the algorithm identifier of this key agreeement. |
PublicKey |
getPublicKey() Returns the public (other party's) key. |
void |
setAlgID(AlgorithmIdentifier algID) Sets the algorith identifier of the key agreement object. |
void |
setPrivateKey(PrivateKey privKey) Sets the local party private key for generating secret value. |
void |
setPublicKey(PublicKey pubKey) Sets the other party public key for generating secret value. |
Methods inherited from class oracle.security.crypto.core.KeyAgreement |
---|
getInstance, getInstance, getInstance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DHKeyAgreement()
DHKeyAgreement
.public DHKeyAgreement(DHPrivateKey privKey) throws InvalidKeyException
DHKeyAgreement
with the specified local party private key.
privKey
- The private key for the local party.InvalidKeyException
public DHKeyAgreement(DHPublicKey pubKey) throws InvalidKeyException
DHKeyAgreement
with the specified other party public key.
pubKey
- The public key for the other party.InvalidKeyException
public DHKeyAgreement(DHPrivateKey privKey, DHPublicKey pubKey) throws InvalidKeyException
DHKeyAgreement
with the specified local party private key and the other party public key.
privKey
- The private key for the local party.pubKey
- The public key for the other party.InvalidKeyException
Method Detail |
---|
public void setAlgID(AlgorithmIdentifier algID) throws AlgorithmIdentifierException
KeyAgreement
setAlgID
in class KeyAgreement
algID
- The AlgorithmIdentifier
to use for this KeyAgreement.AlgorithmIdentifierException
public AlgorithmIdentifier getAlgID()
KeyAgreement
getAlgID
in class KeyAgreement
AlgorithmIdentifier
representing the algorithm used in this key agreement.public void setPrivateKey(PrivateKey privKey) throws InvalidKeyException
setPrivateKey
in class KeyAgreement
privKey
- The private key for the local party.InvalidKeyException
public void setPublicKey(PublicKey pubKey) throws InvalidKeyException
setPublicKey
in class KeyAgreement
pubKey
- The public key of the other party.InvalidKeyException
public PublicKey getPublicKey()
getPublicKey
in class KeyAgreement
public java.lang.String algName()
algName
in class KeyAgreement
public byte[] generateSecret() throws KeyAgreementException
KeyAgreement
generateSecret
in class KeyAgreement
KeyAgreementException
|
Oracle Fusion Middleware Crypto FIPS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10696-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |