Top Description Fields Constructors Methods
org.bouncycastle.pqc.crypto.ntru

public Class NTRUKEMExtractor

extends Object
implements EncapsulatedSecretExtractor
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.EncapsulatedSecretExtractor
Imports
org.bouncycastle.crypto.EncapsulatedSecretExtractor, org.bouncycastle.crypto.digests.SHA3Digest, org.bouncycastle.pqc.math.ntru.parameters.NTRUParameterSet, org.bouncycastle.util.Arrays

NTRU secret encapsulation extractor.

Field Summary

Modifier and TypeField and Description
private final NTRUPrivateKeyParameters
private final NTRUParameters

Constructor Summary

AccessConstructor and Description
public
NTRUKEMExtractor(NTRUPrivateKeyParameters
private key used to encapsulate the secret
ntruPrivateKey
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
private void
cmov(byte[] r, byte[] x, byte b)

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

ntruPrivateKeyback to summary
private final NTRUPrivateKeyParameters ntruPrivateKey
paramsback to summary
private final NTRUParameters params

Constructor Detail

NTRUKEMExtractorback to summary
public NTRUKEMExtractor(NTRUPrivateKeyParameters ntruPrivateKey)

Constructor. an NTRU parameter

Parameters
ntruPrivateKey:NTRUPrivateKeyParameters

private key used to encapsulate the secret

Method Detail

cmovback to summary
private void cmov(byte[] r, byte[] x, byte b)
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.

Annotations
@Override
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.