public 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 and Description |
|---|---|
IntegerPolynomial |
fp |
IntegerPolynomial |
h |
Polynomial |
t |
params| Constructor and Description |
|---|
NTRUEncryptionPrivateKeyParameters(byte[] b,
NTRUEncryptionParameters params)
Converts a byte array to a polynomial
f and constructs a new private key |
NTRUEncryptionPrivateKeyParameters(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 and Description |
|---|---|
boolean |
equals(Object obj) |
byte[] |
getEncoded()
Converts the key to a byte array
|
int |
hashCode() |
void |
writeTo(OutputStream os)
Writes the key to an output stream
|
getParametersisPrivatepublic 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 IOException
f and constructs a new private keyb - an encoded polynomialparams - the NtruEncrypt parameters to useIOExceptiongetEncoded()public NTRUEncryptionPrivateKeyParameters(InputStream is, NTRUEncryptionParameters params) throws IOException
f from an input stream and constructs a new private keyis - an input streamparams - the NtruEncrypt parameters to useIOExceptionwriteTo(OutputStream)public byte[] getEncoded()
NTRUEncryptionPrivateKeyParameters(byte[], NTRUEncryptionParameters)public void writeTo(OutputStream os) throws IOException
os - an output streamIOExceptionNTRUEncryptionPrivateKeyParameters(InputStream, NTRUEncryptionParameters)Copyright © 2015–2020 The veraPDF Consortium. All rights reserved.