Top Description Fields Constructors Methods
org.bouncycastle.crypto.kems

public Class RSAKEMExtractor

extends Object
implements EncapsulatedSecretExtractor
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.EncapsulatedSecretExtractor
Imports
java.math.BigInteger, org.bouncycastle.crypto.CryptoServicePurpose, .CryptoServicesRegistrar, .DerivationFunction, .EncapsulatedSecretExtractor, org.bouncycastle.crypto.constraints.ConstraintUtils, .DefaultServiceProperties, org.bouncycastle.crypto.params.RSAKeyParameters

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

Field Summary

Modifier and TypeField and Description
private DerivationFunction
private final int
private final RSAKeyParameters

Constructor Summary

AccessConstructor and Description
public
RSAKEMExtractor(RSAKeyParameters
the decryption key.
privKey
,
int
length in bytes of key to generate.
keyLen
,
DerivationFunction
the key derivation function to be used.
kdf
)

Set up the RSA-KEM.

Method Summary

Modifier and TypeMethod and Description
public byte[]
extractSecret(byte[]
the encapsulated secret.
encapsulation
)

Implements org.bouncycastle.crypto.EncapsulatedSecretExtractor.extractSecret.

Extract the secret based on the recipient private key.

public int
getEncapsulationLength()

Implements org.bouncycastle.crypto.EncapsulatedSecretExtractor.getEncapsulationLength.

Return the length in bytes of the encapsulation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

kdfback to summary
private DerivationFunction kdf
keyLenback to summary
private final int keyLen
privKeyback to summary
private final RSAKeyParameters privKey

Constructor Detail

RSAKEMExtractorback to summary
public RSAKEMExtractor(RSAKeyParameters privKey, int keyLen, DerivationFunction kdf)

Set up the RSA-KEM.

Parameters
privKey:RSAKeyParameters

the decryption key.

keyLen:int

length in bytes of key to generate.

kdf:DerivationFunction

the key derivation function to be used.

Method Detail

extractSecretback to summary
public byte[] extractSecret(byte[] encapsulation)

Implements org.bouncycastle.crypto.EncapsulatedSecretExtractor.extractSecret.

Doc from org.bouncycastle.crypto.EncapsulatedSecretExtractor.extractSecret.

Extract the secret based on the recipient private key.

Parameters
encapsulation:byte[]

the encapsulated secret.

getEncapsulationLengthback to summary
public int getEncapsulationLength()

Implements org.bouncycastle.crypto.EncapsulatedSecretExtractor.getEncapsulationLength.

Doc from org.bouncycastle.crypto.EncapsulatedSecretExtractor.getEncapsulationLength.

Return the length in bytes of the encapsulation.

Returns:int

length in bytes of an encapsulation for this parameter set.