Package | Description |
---|---|
org.spongycastle.crypto.engines |
Basic cipher classes.
|
org.spongycastle.crypto.generators |
Generators for keys, key pairs and password based encryption algorithms.
|
org.spongycastle.crypto.params |
Classes for parameter objects for ciphers and generators.
|
org.spongycastle.crypto.signers |
Basic signers.
|
org.spongycastle.math.ntru.polynomial |
Modifier and Type | Method and Description |
---|---|
protected IntegerPolynomial |
NTRUEngine.decrypt(IntegerPolynomial e,
Polynomial priv_t,
IntegerPolynomial priv_fp) |
protected IntegerPolynomial |
NTRUEngine.encrypt(IntegerPolynomial m,
TernaryPolynomial r,
IntegerPolynomial pubKey) |
private IntegerPolynomial |
NTRUEngine.MGF(byte[] seed,
int N,
int minCallsR,
boolean hashSeed)
An implementation of MGF-TP-1 from P1363.1 section 8.4.1.1.
|
Modifier and Type | Method and Description |
---|---|
protected IntegerPolynomial |
NTRUEngine.decrypt(IntegerPolynomial e,
Polynomial priv_t,
IntegerPolynomial priv_fp) |
protected IntegerPolynomial |
NTRUEngine.encrypt(IntegerPolynomial m,
TernaryPolynomial r,
IntegerPolynomial pubKey) |
Modifier and Type | Field and Description |
---|---|
IntegerPolynomial |
NTRUSigningKeyPairGenerator.FGBasis.F |
IntegerPolynomial |
NTRUSigningKeyPairGenerator.FGBasis.G |
Modifier and Type | Method and Description |
---|---|
private void |
NTRUSigningKeyPairGenerator.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.
|
Constructor and Description |
---|
NTRUSigningKeyPairGenerator.FGBasis(Polynomial f,
Polynomial fPrime,
IntegerPolynomial h,
IntegerPolynomial F,
IntegerPolynomial G,
NTRUSigningKeyGenerationParameters params) |
Modifier and Type | Field and Description |
---|---|
IntegerPolynomial |
NTRUEncryptionPrivateKeyParameters.fp |
IntegerPolynomial |
NTRUEncryptionPublicKeyParameters.h |
IntegerPolynomial |
NTRUSigningPrivateKeyParameters.Basis.h |
IntegerPolynomial |
NTRUEncryptionPrivateKeyParameters.h |
IntegerPolynomial |
NTRUSigningPublicKeyParameters.h |
Constructor and Description |
---|
NTRUEncryptionPrivateKeyParameters(IntegerPolynomial h,
Polynomial t,
IntegerPolynomial fp,
NTRUEncryptionParameters params)
Constructs a new private key from a polynomial
|
NTRUEncryptionPublicKeyParameters(IntegerPolynomial h,
NTRUEncryptionParameters params)
Constructs a new public key from a polynomial
|
NTRUSigningPrivateKeyParameters.Basis(Polynomial f,
Polynomial fPrime,
IntegerPolynomial h,
NTRUSigningKeyGenerationParameters params)
Constructs a new basis from polynomials
f, f', h . |
NTRUSigningPublicKeyParameters(IntegerPolynomial h,
NTRUSigningParameters params)
Constructs a new public key from a polynomial
|
Modifier and Type | Method and Description |
---|---|
protected IntegerPolynomial |
NTRUSigner.createMsgRep(byte[] msgHash,
int r) |
private IntegerPolynomial |
NTRUSigner.sign(IntegerPolynomial i,
NTRUSigningPrivateKeyParameters kp) |
Modifier and Type | Method and Description |
---|---|
private IntegerPolynomial |
NTRUSigner.sign(IntegerPolynomial i,
NTRUSigningPrivateKeyParameters kp) |
private boolean |
NTRUSigner.verify(IntegerPolynomial i,
IntegerPolynomial s,
IntegerPolynomial h) |
Modifier and Type | Class and Description |
---|---|
class |
DenseTernaryPolynomial
A
TernaryPolynomial with a "high" number of nonzero coefficients. |
Modifier and Type | Method and Description |
---|---|
static IntegerPolynomial |
IntegerPolynomial.fromBinary(byte[] data,
int N,
int q)
Returns a polynomial with N coefficients between
0 and q-1 .q must be a power of 2.Ignores any excess bytes. |
static IntegerPolynomial |
IntegerPolynomial.fromBinary(java.io.InputStream is,
int N,
int q)
Returns a polynomial with N coefficients between
0 and q-1 .q must be a power of 2.Ignores any excess bytes. |
static IntegerPolynomial |
IntegerPolynomial.fromBinary3Sves(byte[] data,
int N)
Decodes a byte array to a polynomial with
N ternary coefficientsIgnores any excess bytes. |
static IntegerPolynomial |
IntegerPolynomial.fromBinary3Tight(byte[] b,
int N)
Converts a byte array produced by
toBinary3Tight() to a polynomial. |
static IntegerPolynomial |
IntegerPolynomial.fromBinary3Tight(java.io.InputStream is,
int N)
Reads data produced by
toBinary3Tight() from an input stream and converts it to a polynomial. |
IntegerPolynomial |
IntegerPolynomial.invertF3()
Computes the inverse mod 3.
|
IntegerPolynomial |
IntegerPolynomial.invertFq(int q)
Computes the inverse mod
q; q must be a power of 2.Returns null if the polynomial is not invertible. |
private IntegerPolynomial |
IntegerPolynomial.mod2ToModq(IntegerPolynomial Fq,
int q)
Computes the inverse mod q from the inverse mod 2
|
IntegerPolynomial |
TernaryPolynomial.mult(IntegerPolynomial poly2)
Multiplies the polynomial by an
IntegerPolynomial , taking the indices mod N |
IntegerPolynomial |
IntegerPolynomial.mult(IntegerPolynomial poly2)
Multiplies the polynomial with another, taking the indices mod N
|
IntegerPolynomial |
SparseTernaryPolynomial.mult(IntegerPolynomial poly2) |
IntegerPolynomial |
ProductFormPolynomial.mult(IntegerPolynomial b) |
IntegerPolynomial |
Polynomial.mult(IntegerPolynomial poly2)
Multiplies the polynomial by an
IntegerPolynomial ,
taking the indices mod N . |
IntegerPolynomial |
DenseTernaryPolynomial.mult(IntegerPolynomial poly2,
int modulus) |
IntegerPolynomial |
IntegerPolynomial.mult(IntegerPolynomial poly2,
int modulus)
Multiplies the polynomial with another, taking the values mod modulus and the indices mod N
|
IntegerPolynomial |
SparseTernaryPolynomial.mult(IntegerPolynomial poly2,
int modulus) |
IntegerPolynomial |
ProductFormPolynomial.mult(IntegerPolynomial poly2,
int modulus) |
IntegerPolynomial |
Polynomial.mult(IntegerPolynomial poly2,
int modulus)
Multiplies the polynomial by an
IntegerPolynomial ,
taking the coefficient values mod modulus and the indices mod N . |
private IntegerPolynomial |
IntegerPolynomial.multRecursive(IntegerPolynomial poly2)
Karazuba multiplication
|
IntegerPolynomial |
IntegerPolynomial.toIntegerPolynomial() |
IntegerPolynomial |
LongPolynomial5.toIntegerPolynomial() |
IntegerPolynomial |
LongPolynomial2.toIntegerPolynomial() |
IntegerPolynomial |
SparseTernaryPolynomial.toIntegerPolynomial() |
IntegerPolynomial |
ProductFormPolynomial.toIntegerPolynomial() |
IntegerPolynomial |
Polynomial.toIntegerPolynomial()
Returns a polynomial that is equal to this polynomial (in the sense that
Polynomial.mult(IntegerPolynomial, int)
returns equal IntegerPolynomial s). |
Modifier and Type | Method and Description |
---|---|
void |
IntegerPolynomial.add(IntegerPolynomial b)
Adds another polynomial which can have a different number of coefficients.
|
void |
IntegerPolynomial.add(IntegerPolynomial b,
int modulus)
Adds another polynomial which can have a different number of coefficients,
and takes the coefficient values mod
modulus . |
private IntegerPolynomial |
IntegerPolynomial.mod2ToModq(IntegerPolynomial Fq,
int q)
Computes the inverse mod q from the inverse mod 2
|
IntegerPolynomial |
TernaryPolynomial.mult(IntegerPolynomial poly2)
Multiplies the polynomial by an
IntegerPolynomial , taking the indices mod N |
IntegerPolynomial |
IntegerPolynomial.mult(IntegerPolynomial poly2)
Multiplies the polynomial with another, taking the indices mod N
|
IntegerPolynomial |
SparseTernaryPolynomial.mult(IntegerPolynomial poly2) |
IntegerPolynomial |
ProductFormPolynomial.mult(IntegerPolynomial b) |
IntegerPolynomial |
Polynomial.mult(IntegerPolynomial poly2)
Multiplies the polynomial by an
IntegerPolynomial ,
taking the indices mod N . |
IntegerPolynomial |
DenseTernaryPolynomial.mult(IntegerPolynomial poly2,
int modulus) |
IntegerPolynomial |
IntegerPolynomial.mult(IntegerPolynomial poly2,
int modulus)
Multiplies the polynomial with another, taking the values mod modulus and the indices mod N
|
IntegerPolynomial |
SparseTernaryPolynomial.mult(IntegerPolynomial poly2,
int modulus) |
IntegerPolynomial |
ProductFormPolynomial.mult(IntegerPolynomial poly2,
int modulus) |
IntegerPolynomial |
Polynomial.mult(IntegerPolynomial poly2,
int modulus)
Multiplies the polynomial by an
IntegerPolynomial ,
taking the coefficient values mod modulus and the indices mod N . |
private IntegerPolynomial |
IntegerPolynomial.multRecursive(IntegerPolynomial poly2)
Karazuba multiplication
|
private void |
IntegerPolynomial.multShiftSub(IntegerPolynomial b,
int c,
int k,
int p)
Computes
this-b*c*(x^k) mod p and stores the result in this polynomial.See steps 4a,4b in EESS algorithm 2.2.7.1. |
void |
IntegerPolynomial.sub(IntegerPolynomial b)
Subtracts another polynomial which can have a different number of coefficients.
|
void |
IntegerPolynomial.sub(IntegerPolynomial b,
int modulus)
Subtracts another polynomial which can have a different number of coefficients,
and takes the coefficient values mod
modulus . |
Constructor and Description |
---|
BigIntPolynomial(IntegerPolynomial p)
Constructs a
BigIntPolynomial from a IntegerPolynomial . |
DenseTernaryPolynomial(IntegerPolynomial intPoly)
Constructs a
DenseTernaryPolynomial from a IntegerPolynomial . |
LongPolynomial2(IntegerPolynomial p)
Constructs a
LongPolynomial2 from a IntegerPolynomial . |
LongPolynomial5(IntegerPolynomial p)
Constructs a
LongPolynomial5 from a IntegerPolynomial . |
SparseTernaryPolynomial(IntegerPolynomial intPoly)
Constructs a
DenseTernaryPolynomial from a IntegerPolynomial . |