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

public Class ECIESKEMExtractor

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.ECDomainParameters, .ECPrivateKeyParameters, org.bouncycastle.math.ec.ECCurve, .ECPoint

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

Field Summary

Modifier and TypeField and Description
private boolean
private final ECPrivateKeyParameters
private DerivationFunction
private int
private boolean
private boolean

Constructor Summary

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

Set up the ECIES-KEM.

public
ECIESKEMExtractor(ECPrivateKeyParameters
the decryption key.
decKey
,
int
length in bytes of key to generate.
keyLen
,
DerivationFunction
the key derivation function to be used.
kdf
,
boolean
if true use the new cofactor ECDH.
cofactorMode
,
boolean
if true use the old cofactor ECDH.
oldCofactorMode
,
boolean
if true use single hash mode.
singleHashMode
)

Set up the ECIES-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

CofactorModeback to summary
private boolean CofactorMode
decKeyback to summary
private final ECPrivateKeyParameters decKey
kdfback to summary
private DerivationFunction kdf
keyLenback to summary
private int keyLen
OldCofactorModeback to summary
private boolean OldCofactorMode
SingleHashModeback to summary
private boolean SingleHashMode

Constructor Detail

ECIESKEMExtractorback to summary
public ECIESKEMExtractor(ECPrivateKeyParameters decKey, int keyLen, DerivationFunction kdf)

Set up the ECIES-KEM.

Parameters
decKey:ECPrivateKeyParameters

the decryption key.

keyLen:int

length in bytes of key to generate.

kdf:DerivationFunction

the key derivation function to be used.

ECIESKEMExtractorback to summary
public ECIESKEMExtractor(ECPrivateKeyParameters decKey, int keyLen, DerivationFunction kdf, boolean cofactorMode, boolean oldCofactorMode, boolean singleHashMode)

Set up the ECIES-KEM.

Parameters
decKey:ECPrivateKeyParameters

the decryption key.

keyLen:int

length in bytes of key to generate.

kdf:DerivationFunction

the key derivation function to be used.

cofactorMode:boolean

if true use the new cofactor ECDH.

oldCofactorMode:boolean

if true use the old cofactor ECDH.

singleHashMode:boolean

if true use single hash mode.

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.