Top Inners Fields Constructors Methods
org.bouncycastle.pqc.legacy.crypto.ntru

public Class NTRUSigningKeyPairGenerator

extends Object
implements AsymmetricCipherKeyPairGenerator
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator
Imports
java.math.BigDecimal, .BigInteger, java.util.ArrayList, .List, java.util.concurrent.Callable, .ExecutorService, .Executors, .Future, org.bouncycastle.crypto.AsymmetricCipherKeyPair, .AsymmetricCipherKeyPairGenerator, .CryptoServicesRegistrar, .KeyGenerationParameters, org.bouncycastle.pqc.legacy.math.ntru.euclid.BigIntEuclidean, org.bouncycastle.pqc.legacy.math.ntru.polynomial.BigDecimalPolynomial, .BigIntPolynomial, .DenseTernaryPolynomial, .IntegerPolynomial, .Polynomial, .ProductFormPolynomial, .Resultant

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
public static class
NTRUSigningKeyPairGenerator.FGBasis

A subclass of Basis that additionally contains the polynomials F and G.

Field Summary

Modifier and TypeField and Description
private NTRUSigningKeyGenerationParameters

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private NTRUSigningKeyPairGenerator.FGBasis
generateBasis()

Creates a NTRUSigner basis consisting of polynomials f, g, F, G, h.

public NTRUSigningPrivateKeyParameters.Basis

Returns:

a NTRUSigner basis
generateBoundedBasis
()

Creates a basis such that |F| < keyNormBound and |G| < keyNormBound

public AsymmetricCipherKeyPair

Returns:

a key pair
generateKeyPair
()

Implements org.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator.generateKeyPair.

Generates a new signature key pair.
public AsymmetricCipherKeyPair

Returns:

a key pair
generateKeyPairSingleThread
()

Generates a new signature key pair.

public void
init(KeyGenerationParameters
the parameters the key pair is to be initialised with.
param
)

Implements org.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator.init.

intialise the key pair generator.
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

paramsback to summary
private NTRUSigningKeyGenerationParameters params

Constructor Detail

NTRUSigningKeyPairGeneratorback to summary
public NTRUSigningKeyPairGenerator()

Method Detail

generateBasisback to summary
private NTRUSigningKeyPairGenerator.FGBasis generateBasis()

Creates a NTRUSigner basis consisting of polynomials f, g, F, G, h.
If KeyGenAlg=FLOAT, the basis may not be valid and this method must be rerun if that is the case.

See Also
generateBoundedBasis()
generateBoundedBasisback to summary
public NTRUSigningPrivateKeyParameters.Basis generateBoundedBasis()

Creates a basis such that |F| < keyNormBound and |G| < keyNormBound

Returns:NTRUSigningPrivateKeyParameters.Basis

a NTRUSigner basis

generateKeyPairback to summary
public AsymmetricCipherKeyPair generateKeyPair()

Implements org.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator.generateKeyPair.

Generates a new signature key pair. Starts B+1 threads.

Returns:AsymmetricCipherKeyPair

a key pair

generateKeyPairSingleThreadback to summary
public AsymmetricCipherKeyPair generateKeyPairSingleThread()

Generates a new signature key pair. Runs in a single thread.

Returns:AsymmetricCipherKeyPair

a key pair

initback to summary
public void init(KeyGenerationParameters param)

Implements org.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator.init.

Doc from org.bouncycastle.crypto.AsymmetricCipherKeyPairGenerator.init.

intialise the key pair generator.

Parameters
param:KeyGenerationParameters

the parameters the key pair is to be initialised with.

minimizeFGback to summary
private void minimizeFG(IntegerPolynomial f, IntegerPolynomial g, IntegerPolynomial F, IntegerPolynomial G, int N)
org.bouncycastle.pqc.legacy.crypto.ntru back to summary

private Class NTRUSigningKeyPairGenerator.BasisGenerationTask

extends Object
implements Callable<NTRUSigningPrivateKeyParameters.Basis>
Class Inheritance
  • java.lang.Object
  • org.bouncycastle.pqc.legacy.crypto.ntru.NTRUSigningKeyPairGenerator.BasisGenerationTask
All Implemented Interfaces
java.util.concurrent.Callable

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public NTRUSigningPrivateKeyParameters.Basis
call()

Implements java.util.concurrent.Callable.call.

Computes a result, or throws an exception if unable to do so.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BasisGenerationTaskback to summary
private BasisGenerationTask()

Method Detail

callback to summary
public NTRUSigningPrivateKeyParameters.Basis call() throws Exception

Implements java.util.concurrent.Callable.call.

Doc from java.util.concurrent.Callable.call.

Computes a result, or throws an exception if unable to do so.

Returns:NTRUSigningPrivateKeyParameters.Basis

computed result

Exceptions
Exception:
if unable to compute a result
org.bouncycastle.pqc.legacy.crypto.ntru back to summary

public Class NTRUSigningKeyPairGenerator.FGBasis

extends Basis
Class Inheritance

A subclass of Basis that additionally contains the polynomials F and G.

Field Summary

Modifier and TypeField and Description
public IntegerPolynomial
F

public IntegerPolynomial
G

Inherited from org.bouncycastle.pqc.legacy.crypto.ntru.NTRUSigningPrivateKeyParameters.Basis:
ffPrimehparams

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
Inherited from org.bouncycastle.pqc.legacy.crypto.ntru.NTRUSigningPrivateKeyParameters.Basis:
encodeequalshashCode

Field Detail

Fback to summary
public IntegerPolynomial F
Gback to summary
public IntegerPolynomial G

Constructor Detail

FGBasisback to summary
pack-priv FGBasis(Polynomial f, Polynomial fPrime, IntegerPolynomial h, IntegerPolynomial F, IntegerPolynomial G, NTRUSigningKeyGenerationParameters params)

Method Detail

isNormOkback to summary
pack-priv boolean isNormOk()