Class NTRUSigningParameters
java.lang.Object
org.bouncycastle.pqc.legacy.crypto.ntru.NTRUSigningParameters
- All Implemented Interfaces:
Cloneable
A set of parameters for NtruSign. Several predefined parameter sets are available and new ones can be created as well.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionNTRUSigningParameters
(int N, int q, int d, int B, double beta, double normBound, Digest hashAlg) Constructs a parameter set that uses ternary private keys (i.e.NTRUSigningParameters
(int N, int q, int d1, int d2, int d3, int B, double beta, double normBound, double keyNormBound, Digest hashAlg) Constructs a parameter set that uses product-form private keys (i.e.Reads a parameter set from an input stream. -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
int
hashCode()
toString()
void
writeTo
(OutputStream os) Writes the parameter set to an output stream
-
Field Details
-
N
public int N -
q
public int q -
d
public int d -
d1
public int d1 -
d2
public int d2 -
d3
public int d3 -
B
public int B -
betaSq
public double betaSq -
normBoundSq
public double normBoundSq -
signFailTolerance
public int signFailTolerance -
hashAlg
-
-
Constructor Details
-
NTRUSigningParameters
public NTRUSigningParameters(int N, int q, int d, int B, double beta, double normBound, Digest hashAlg) Constructs a parameter set that uses ternary private keys (i.e.polyType=SIMPLE
).- Parameters:
N
- number of polynomial coefficientsq
- modulusd
- number of -1's in the private polynomialsf
andg
B
- number of perturbationsbeta
- balancing factor for the transpose latticenormBound
- maximum norm for valid signatureshashAlg
- a valid identifier for ajava.security.MessageDigest
instance such asSHA-256
. TheMessageDigest
must support thegetDigestLength()
method.
-
NTRUSigningParameters
public NTRUSigningParameters(int N, int q, int d1, int d2, int d3, int B, double beta, double normBound, double keyNormBound, Digest hashAlg) Constructs a parameter set that uses product-form private keys (i.e.polyType=PRODUCT
).- Parameters:
N
- number of polynomial coefficientsq
- modulusd1
- number of -1's in the private polynomialsf
andg
d2
- number of -1's in the private polynomialsf
andg
d3
- number of -1's in the private polynomialsf
andg
B
- number of perturbationsbeta
- balancing factor for the transpose latticenormBound
- maximum norm for valid signatureskeyNormBound
- maximum norm for the ploynomialsF
andG
hashAlg
- a valid identifier for ajava.security.MessageDigest
instance such asSHA-256
. TheMessageDigest
must support thegetDigestLength()
method.
-
NTRUSigningParameters
Reads a parameter set from an input stream.- Parameters:
is
- an input stream- Throws:
IOException
-
-
Method Details