public class NTRUEncryptionKeyGenerationParameters extends KeyGenerationParameters implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static NTRUEncryptionKeyGenerationParameters |
APR2011_439
A parameter set that gives 128 bits of security and uses simple ternary polynomials.
|
static NTRUEncryptionKeyGenerationParameters |
APR2011_439_FAST
Like
APR2011_439 , this parameter set gives 128 bits of security but uses product-form polynomials and f=1+pF . |
static NTRUEncryptionKeyGenerationParameters |
APR2011_743
A parameter set that gives 256 bits of security and uses simple ternary polynomials.
|
static NTRUEncryptionKeyGenerationParameters |
APR2011_743_FAST
Like
APR2011_743 , this parameter set gives 256 bits of security but uses product-form polynomials and f=1+pF . |
int |
bufferLenBits |
int |
c |
int |
db |
int |
df |
int |
df1 |
int |
df2 |
int |
df3 |
int |
dg |
int |
dm0 |
int |
dr |
int |
dr1 |
int |
dr2 |
int |
dr3 |
static NTRUEncryptionKeyGenerationParameters |
EES1087EP2
A conservative (in terms of security) parameter set that gives 256 bits of security and is optimized for key size.
|
static NTRUEncryptionKeyGenerationParameters |
EES1171EP1
A conservative (in terms of security) parameter set that gives 256 bits of security and is a tradeoff between key size and encryption/decryption speed.
|
static NTRUEncryptionKeyGenerationParameters |
EES1499EP1
A conservative (in terms of security) parameter set that gives 256 bits of security and is optimized for encryption/decryption speed.
|
boolean |
fastFp |
Digest |
hashAlg |
boolean |
hashSeed |
int |
maxMsgLenBytes |
int |
minCallsMask |
int |
minCallsR |
int |
N |
byte[] |
oid |
int |
pkLen |
int |
polyType |
int |
q |
boolean |
sparse |
Constructor and Description |
---|
NTRUEncryptionKeyGenerationParameters(java.io.InputStream is)
Reads a parameter set from an input stream.
|
NTRUEncryptionKeyGenerationParameters(int N,
int q,
int df,
int dm0,
int db,
int c,
int minCallsR,
int minCallsMask,
boolean hashSeed,
byte[] oid,
boolean sparse,
boolean fastFp,
Digest hashAlg)
Constructs a parameter set that uses ternary private keys (i.e.
|
NTRUEncryptionKeyGenerationParameters(int N,
int q,
int df1,
int df2,
int df3,
int dm0,
int db,
int c,
int minCallsR,
int minCallsMask,
boolean hashSeed,
byte[] oid,
boolean sparse,
boolean fastFp,
Digest hashAlg)
Constructs a parameter set that uses product-form private keys (i.e.
|
Modifier and Type | Method and Description |
---|---|
NTRUEncryptionKeyGenerationParameters |
clone() |
boolean |
equals(java.lang.Object obj) |
NTRUEncryptionParameters |
getEncryptionParameters() |
int |
getMaxMessageLength()
Returns the maximum length a plaintext message can be with this parameter set.
|
int |
hashCode() |
java.lang.String |
toString() |
void |
writeTo(java.io.OutputStream os)
Writes the parameter set to an output stream
|
getRandom, getStrength
public static final NTRUEncryptionKeyGenerationParameters EES1087EP2
public static final NTRUEncryptionKeyGenerationParameters EES1171EP1
public static final NTRUEncryptionKeyGenerationParameters EES1499EP1
public static final NTRUEncryptionKeyGenerationParameters APR2011_439
public static final NTRUEncryptionKeyGenerationParameters APR2011_439_FAST
APR2011_439
, this parameter set gives 128 bits of security but uses product-form polynomials and f=1+pF
.public static final NTRUEncryptionKeyGenerationParameters APR2011_743
public static final NTRUEncryptionKeyGenerationParameters APR2011_743_FAST
APR2011_743
, this parameter set gives 256 bits of security but uses product-form polynomials and f=1+pF
.public int N
public int q
public int df
public int df1
public int df2
public int df3
public int dr
public int dr1
public int dr2
public int dr3
public int dg
public int maxMsgLenBytes
public int db
public int bufferLenBits
public int dm0
public int pkLen
public int c
public int minCallsR
public int minCallsMask
public boolean hashSeed
public byte[] oid
public boolean sparse
public boolean fastFp
public int polyType
public Digest hashAlg
public NTRUEncryptionKeyGenerationParameters(int N, int q, int df, int dm0, int db, int c, int minCallsR, int minCallsMask, boolean hashSeed, byte[] oid, boolean sparse, boolean fastFp, Digest hashAlg)
polyType=SIMPLE
).N
- number of polynomial coefficientsq
- modulusdf
- number of ones in the private polynomial f
dm0
- minimum acceptable number of -1's, 0's, and 1's in the polynomial m'
in the last encryption stepdb
- number of random bits to prepend to the messagec
- a parameter for the Index Generation Function (IndexGenerator
)minCallsR
- minimum number of hash calls for the IGF to makeminCallsMask
- minimum number of calls to generate the masking polynomialhashSeed
- whether to hash the seed in the MGF first (true) or use the seed directly (false)oid
- three bytes that uniquely identify the parameter setsparse
- whether to treat ternary polynomials as sparsely populated (SparseTernaryPolynomial
vs DenseTernaryPolynomial
)fastFp
- whether f=1+p*F
for a ternary F
(true) or f
is ternary (false)hashAlg
- a valid identifier for a java.security.MessageDigest
instance such as SHA-256
. The MessageDigest
must support the getDigestLength()
method.public NTRUEncryptionKeyGenerationParameters(int N, int q, int df1, int df2, int df3, int dm0, int db, int c, int minCallsR, int minCallsMask, boolean hashSeed, byte[] oid, boolean sparse, boolean fastFp, Digest hashAlg)
polyType=PRODUCT
).N
- number of polynomial coefficientsq
- modulusdf1
- number of ones in the private polynomial f1
df2
- number of ones in the private polynomial f2
df3
- number of ones in the private polynomial f3
dm0
- minimum acceptable number of -1's, 0's, and 1's in the polynomial m'
in the last encryption stepdb
- number of random bits to prepend to the messagec
- a parameter for the Index Generation Function (IndexGenerator
)minCallsR
- minimum number of hash calls for the IGF to makeminCallsMask
- minimum number of calls to generate the masking polynomialhashSeed
- whether to hash the seed in the MGF first (true) or use the seed directly (false)oid
- three bytes that uniquely identify the parameter setsparse
- whether to treat ternary polynomials as sparsely populated (SparseTernaryPolynomial
vs DenseTernaryPolynomial
)fastFp
- whether f=1+p*F
for a ternary F
(true) or f
is ternary (false)hashAlg
- a valid identifier for a java.security.MessageDigest
instance such as SHA-256
public NTRUEncryptionKeyGenerationParameters(java.io.InputStream is) throws java.io.IOException
is
- an input streamjava.io.IOException
public NTRUEncryptionParameters getEncryptionParameters()
public NTRUEncryptionKeyGenerationParameters clone()
clone
in class java.lang.Object
public int getMaxMessageLength()
public void writeTo(java.io.OutputStream os) throws java.io.IOException
os
- an output streamjava.io.IOException
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object