public class ECIESKEMGenerator extends java.lang.Object implements EncapsulatedSecretGenerator
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
SecretWithEncapsulation |
generateEncapsulated(AsymmetricKeyParameter recipientKey)
Generate secret/encapsulation based on the recipient public key.
|
public ECIESKEMGenerator(int keySize, DerivationFunction kdf, java.security.SecureRandom rnd)
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.public ECIESKEMGenerator(int keyLen, DerivationFunction kdf, java.security.SecureRandom rnd, boolean cofactorMode, boolean oldCofactorMode, boolean singleHashMode)
keyLen
- length in bytes of key to generatekdf
- 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.public SecretWithEncapsulation generateEncapsulated(AsymmetricKeyParameter recipientKey)
EncapsulatedSecretGenerator
generateEncapsulated
in interface EncapsulatedSecretGenerator