public class NTRUSigningKeyPairGenerator extends java.lang.Object implements AsymmetricCipherKeyPairGenerator
Modifier and Type | Class and Description |
---|---|
private class |
NTRUSigningKeyPairGenerator.BasisGenerationTask |
class |
NTRUSigningKeyPairGenerator.FGBasis
A subclass of Basis that additionally contains the polynomials
F and G . |
Modifier and Type | Field and Description |
---|---|
private NTRUSigningKeyGenerationParameters |
params |
Constructor and Description |
---|
NTRUSigningKeyPairGenerator() |
Modifier and Type | Method and Description |
---|---|
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. |
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.
|
private void |
minimizeFG(IntegerPolynomial f,
IntegerPolynomial g,
IntegerPolynomial F,
IntegerPolynomial G,
int N)
Implementation of the optional steps 20 through 26 in EESS1v2.pdf, section 3.5.1.1.
|
private NTRUSigningKeyGenerationParameters params
public void init(KeyGenerationParameters param)
AsymmetricCipherKeyPairGenerator
init
in interface AsymmetricCipherKeyPairGenerator
param
- the parameters the key pair is to be initialised with.public AsymmetricCipherKeyPair generateKeyPair()
B+1
threads.generateKeyPair
in interface AsymmetricCipherKeyPairGenerator
public AsymmetricCipherKeyPair generateKeyPairSingleThread()
private void minimizeFG(IntegerPolynomial f, IntegerPolynomial g, IntegerPolynomial F, IntegerPolynomial G, int N)
F
and g
but leaves f
and
g
unchanged.f
- g
- F
- G
- N
- private NTRUSigningKeyPairGenerator.FGBasis generateBasis()
f, g, F, G, h
.KeyGenAlg=FLOAT
, the basis may not be valid and this method must be rerun if that is the case.generateBoundedBasis()
public NTRUSigningPrivateKeyParameters.Basis generateBoundedBasis()
|F| < keyNormBound
and |G| < keyNormBound