Package org.bouncycastle.crypto.kems
Class RSAKEMGenerator
- java.lang.Object
-
- org.bouncycastle.crypto.kems.RSAKEMGenerator
-
- All Implemented Interfaces:
EncapsulatedSecretGenerator
public class RSAKEMGenerator extends java.lang.Object implements EncapsulatedSecretGenerator
The RSA Key Encapsulation Mechanism (RSA-KEM) from ISO 18033-2.
-
-
Constructor Summary
Constructors Constructor Description RSAKEMGenerator(int keyLen, DerivationFunction kdf, java.security.SecureRandom rnd)
Set up the RSA-KEM.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SecretWithEncapsulation
generateEncapsulated(AsymmetricKeyParameter recipientKey)
Generate secret/encapsulation based on the recipient public key.
-
-
-
Constructor Detail
-
RSAKEMGenerator
public RSAKEMGenerator(int keyLen, DerivationFunction kdf, java.security.SecureRandom rnd)
Set up the RSA-KEM.- Parameters:
kdf
- the key derivation function to be used.rnd
- the random source for the session key.
-
-
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 interfaceEncapsulatedSecretGenerator
- Returns:
- An SecretWithEncapsulation derived from the recipient public key.
-
-