CipherParameterspublic class NTRUEncryptionPrivateKeyParameters extends NTRUEncryptionKeyParameters
f
which takes different forms depending on whether product-form polynomials are used,
and on fastPf modulo p is precomputed on initialization.| Modifier and Type | Field | Description |
|---|---|---|
IntegerPolynomial |
fp |
|
IntegerPolynomial |
h |
|
Polynomial |
t |
params| Constructor | Description |
|---|---|
NTRUEncryptionPrivateKeyParameters(byte[] b,
NTRUEncryptionParameters params) |
Converts a byte array to a polynomial
f and constructs a new private key |
NTRUEncryptionPrivateKeyParameters(java.io.InputStream is,
NTRUEncryptionParameters params) |
Reads a polynomial
f from an input stream and constructs a new private key |
NTRUEncryptionPrivateKeyParameters(IntegerPolynomial h,
Polynomial t,
IntegerPolynomial fp,
NTRUEncryptionParameters params) |
Constructs a new private key from a polynomial
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object obj) |
|
byte[] |
getEncoded() |
Converts the key to a byte array
|
int |
hashCode() |
|
void |
writeTo(java.io.OutputStream os) |
Writes the key to an output stream
|
isPrivategetParameterspublic Polynomial t
public IntegerPolynomial fp
public IntegerPolynomial h
public NTRUEncryptionPrivateKeyParameters(IntegerPolynomial h, Polynomial t, IntegerPolynomial fp, NTRUEncryptionParameters params)
h - the public polynomial for the key.t - the polynomial which determines the key: if fastFp=true, f=1+3t; otherwise, f=tfp - the inverse of fparams - the NtruEncrypt parameters to usepublic NTRUEncryptionPrivateKeyParameters(byte[] b,
NTRUEncryptionParameters params)
throws java.io.IOException
f and constructs a new private keyb - an encoded polynomialparams - the NtruEncrypt parameters to usejava.io.IOExceptiongetEncoded()public NTRUEncryptionPrivateKeyParameters(java.io.InputStream is,
NTRUEncryptionParameters params)
throws java.io.IOException
f from an input stream and constructs a new private keyis - an input streamparams - the NtruEncrypt parameters to usejava.io.IOExceptionwriteTo(OutputStream)public byte[] getEncoded()
NTRUEncryptionPrivateKeyParameters(byte[], NTRUEncryptionParameters)public void writeTo(java.io.OutputStream os)
throws java.io.IOException
os - an output streamjava.io.IOExceptionNTRUEncryptionPrivateKeyParameters(InputStream, NTRUEncryptionParameters)public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object