Package org.bouncycastle.pqc.crypto.ntru
Class NTRUSigningKeyPairGenerator
- java.lang.Object
-
- org.bouncycastle.pqc.crypto.ntru.NTRUSigningKeyPairGenerator
-
- All Implemented Interfaces:
AsymmetricCipherKeyPairGenerator
public class NTRUSigningKeyPairGenerator extends java.lang.Object implements AsymmetricCipherKeyPairGenerator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
NTRUSigningKeyPairGenerator.FGBasis
A subclass of Basis that additionally contains the polynomialsF
andG
.
-
Constructor Summary
Constructors Constructor Description NTRUSigningKeyPairGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NTRUSigningPrivateKeyParameters.Basis
generateBoundedBasis()
Creates a basis such that|F| < keyNormBound
and|G| < keyNormBound
AsymmetricCipherKeyPair
generateKeyPair()
Generates a new signature key pair.AsymmetricCipherKeyPair
generateKeyPairSingleThread()
Generates a new signature key pair.void
init(KeyGenerationParameters param)
intialise the key pair generator.
-
-
-
Method Detail
-
init
public void init(KeyGenerationParameters param)
Description copied from interface:AsymmetricCipherKeyPairGenerator
intialise the key pair generator.- Specified by:
init
in interfaceAsymmetricCipherKeyPairGenerator
- Parameters:
param
- the parameters the key pair is to be initialised with.
-
generateKeyPair
public AsymmetricCipherKeyPair generateKeyPair()
Generates a new signature key pair. StartsB+1
threads.- Specified by:
generateKeyPair
in interfaceAsymmetricCipherKeyPairGenerator
- Returns:
- a key pair
-
generateKeyPairSingleThread
public AsymmetricCipherKeyPair generateKeyPairSingleThread()
Generates a new signature key pair. Runs in a single thread.- Returns:
- a key pair
-
generateBoundedBasis
public NTRUSigningPrivateKeyParameters.Basis generateBoundedBasis()
Creates a basis such that|F| < keyNormBound
and|G| < keyNormBound
- Returns:
- a NTRUSigner basis
-
-