Bouncy Castle Cryptography Library 1.77.0

org.bouncycastle.crypto.kems
Class ECIESKEMGenerator

java.lang.Object
  |
  +--org.bouncycastle.crypto.kems.ECIESKEMGenerator
All Implemented Interfaces:
EncapsulatedSecretGenerator

public class ECIESKEMGenerator
extends java.lang.Object
implements EncapsulatedSecretGenerator

The ECIES Key Encapsulation Mechanism (ECIES-KEM) from ISO 18033-2.


Constructor Summary
ECIESKEMGenerator(int keySize, DerivationFunction kdf, java.security.SecureRandom rnd)
          Set up the ECIES-KEM.
ECIESKEMGenerator(int keyLen, DerivationFunction kdf, java.security.SecureRandom rnd, boolean cofactorMode, boolean oldCofactorMode, boolean singleHashMode)
          Set up the ECIES-KEM.
 
Method Summary
 SecretWithEncapsulation generateEncapsulated(AsymmetricKeyParameter recipientKey)
          Generate secret/encapsulation based on the recipient public key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ECIESKEMGenerator

public ECIESKEMGenerator(int keySize,
                         DerivationFunction kdf,
                         java.security.SecureRandom rnd)
Set up the ECIES-KEM.
Parameters:
keySize - size of the key to be generated (in bytes).
kdf - the key derivation function to be used.
rnd - the random source for the session key.

ECIESKEMGenerator

public ECIESKEMGenerator(int keyLen,
                         DerivationFunction kdf,
                         java.security.SecureRandom rnd,
                         boolean cofactorMode,
                         boolean oldCofactorMode,
                         boolean singleHashMode)
Set up the ECIES-KEM.
Parameters:
keyLen - length in bytes of key to generate
kdf - the key derivation function to be used.
rnd - the random source for the session key.
cofactorMode - if true use the new cofactor ECDH.
oldCofactorMode - if true use the old cofactor ECDH.
singleHashMode - if true use single hash mode.
Method Detail

generateEncapsulated

public SecretWithEncapsulation generateEncapsulated(AsymmetricKeyParameter recipientKey)
Description copied from interface: EncapsulatedSecretGenerator
Generate secret/encapsulation based on the recipient public key.
Specified by:
generateEncapsulated in interface EncapsulatedSecretGenerator
Following copied from interface: org.bouncycastle.crypto.EncapsulatedSecretGenerator
Returns:
An SecretWithEncapsulation derived from the recipient public key.

Bouncy Castle Cryptography Library 1.77.0