Top Description Fields Constructors Methods
org.bouncycastle.pqc.math.ntru.parameters

public abstract Class NTRUParameterSet

extends Object
Class Inheritance
Known Direct Subclasses
org.bouncycastle.pqc.math.ntru.parameters.NTRUHPSParameterSet, org.bouncycastle.pqc.math.ntru.parameters.NTRUHRSSParameterSet
Imports
org.bouncycastle.pqc.math.ntru.Polynomial

Abstract class for all NTRU parameter sets.
See Also
NTRUHPSParameterSet, NTRUHRSSParameterSet, NTRU specification document

Field Summary

Modifier and TypeField and Description
private final int
private final int
n

private final int
private final int
private final int

Constructor Summary

AccessConstructor and Description
public
NTRUParameterSet(int n, int logQ, int seedBytes, int prfKeyBytes, int sharedKeyBytes)

Method Summary

Modifier and TypeMethod and Description
public abstract Polynomial

Returns:

an instance of Polynomial
createPolynomial
()

Creates a polynomial based on this parameter set.

public int

Returns:

log2(q)
logQ
()

logq

public int

Returns:

n is a prime and both 2 and 3 are of order n − 1 in (Z/n)×
n
()

n

public int

Returns:

kem_ciphertext_bytes
ntruCiphertextBytes
()

The number of bytes in a ciphertext for the KEM.

public int

Returns:

kem_public_key_bytes
ntruPublicKeyBytes
()

The number of bytes in a public key for the KEM.

public int

Returns:

kem_private_key_bytes
ntruSecretKeyBytes
()

The number of bytes in a private key for the KEM.

public int

Returns:

dpke_ciphertext_bytes
owcpaBytes
()

The number of bytes in a ciphertext for the DPKE.

public int

Returns:

dpke_plaintext_bytes
owcpaMsgBytes
()

The number of bytes in a plaintext for the DPKE.

public int

Returns:

dpke_public_key_bytes
owcpaPublicKeyBytes
()

The number of bytes in a public key for the DPKE.

public int

Returns:

dpke_private_key_bytes
owcpaSecretKeyBytes
()

The number of bytes in a private key for the DPKE.

public int
public int

Returns:

packed_s3_bytes
packTrinaryBytes
()

public int

Returns:

prf_key_bits/8
prfKeyBytes
()

The number of bytes used to key the implicit rejection mechanism.

public int

Returns:

q is a power of two
q
()

q

public abstract int

Returns:

sample_key_bits/8
sampleFgBytes
()

public int

Returns:

sample_ xed_type_bits
sampleFixedTypeBytes
()

public int

Returns:

sample_iid_bits/8
sampleIidBytes
()

public abstract int

Returns:

sample_plaintext_bits/8
sampleRmBytes
()

public int

Returns:

key_seed_bits/8
seedBytes
()

The number of random bytes consumed by keygen.

public int

Returns:

kem_shared_key_bits/8
sharedKeyBytes
()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

logQback to summary
private final int logQ
nback to summary
private final int n
prfKeyBytesback to summary
private final int prfKeyBytes
seedBytesback to summary
private final int seedBytes
sharedKeyBytesback to summary
private final int sharedKeyBytes

Constructor Detail

NTRUParameterSetback to summary
public NTRUParameterSet(int n, int logQ, int seedBytes, int prfKeyBytes, int sharedKeyBytes)

Method Detail

createPolynomialback to summary
public abstract Polynomial createPolynomial()

Creates a polynomial based on this parameter set.

Returns:Polynomial

an instance of Polynomial

logQback to summary
public int logQ()

logq

Returns:int

log2(q)

nback to summary
public int n()

n

Returns:int

n is a prime and both 2 and 3 are of order n − 1 in (Z/n)×

ntruCiphertextBytesback to summary
public int ntruCiphertextBytes()

The number of bytes in a ciphertext for the KEM.

Returns:int

kem_ciphertext_bytes

ntruPublicKeyBytesback to summary
public int ntruPublicKeyBytes()

The number of bytes in a public key for the KEM.

Returns:int

kem_public_key_bytes

ntruSecretKeyBytesback to summary
public int ntruSecretKeyBytes()

The number of bytes in a private key for the KEM.

Returns:int

kem_private_key_bytes

owcpaBytesback to summary
public int owcpaBytes()

The number of bytes in a ciphertext for the DPKE.

Returns:int

dpke_ciphertext_bytes

owcpaMsgBytesback to summary
public int owcpaMsgBytes()

The number of bytes in a plaintext for the DPKE.

Returns:int

dpke_plaintext_bytes

owcpaPublicKeyBytesback to summary
public int owcpaPublicKeyBytes()

The number of bytes in a public key for the DPKE.

Returns:int

dpke_public_key_bytes

owcpaSecretKeyBytesback to summary
public int owcpaSecretKeyBytes()

The number of bytes in a private key for the DPKE.

Returns:int

dpke_private_key_bytes

packDegreeback to summary
public int packDegree()
packTrinaryBytesback to summary
public int packTrinaryBytes()
Returns:int

packed_s3_bytes

prfKeyBytesback to summary
public int prfKeyBytes()

The number of bytes used to key the implicit rejection mechanism.

Returns:int

prf_key_bits/8

qback to summary
public int q()

q

Returns:int

q is a power of two

sampleFgBytesback to summary
public abstract int sampleFgBytes()
Returns:int

sample_key_bits/8

sampleFixedTypeBytesback to summary
public int sampleFixedTypeBytes()
Returns:int

sample_ xed_type_bits

sampleIidBytesback to summary
public int sampleIidBytes()
Returns:int

sample_iid_bits/8

sampleRmBytesback to summary
public abstract int sampleRmBytes()
Returns:int

sample_plaintext_bits/8

seedBytesback to summary
public int seedBytes()

The number of random bytes consumed by keygen.

Returns:int

key_seed_bits/8

sharedKeyBytesback to summary
public int sharedKeyBytes()
Returns:int

kem_shared_key_bits/8