| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private NTRUEncryptionParameters | |
| private NTRUEncryptionPrivateKeyParameters | |
| private NTRUEncryptionPublicKeyParameters | |
| private SecureRandom |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private byte[] | |
| private byte[] | |
| private byte[] | |
| private byte[] | |
| private byte[] | Returns: the decrypted messageThe message to decrypt data, NTRUEncryptionPrivateKeyParameters the corresponding private key privKey)Decrypts a message. |
| protected IntegerPolynomial | Returns: an IntegerPolynomial representing the output.a polynomial such that if priv_t, IntegerPolynomial priv_fp)fastFp=true, f=1+3*priv_t; otherwise, f=priv_t
|
| private byte[] | Returns: the encrypted messageThe message to encrypt m, NTRUEncryptionPublicKeyParameters the public key to encrypt the message with pubKey)Encrypts a message. |
| protected IntegerPolynomial | |
| private int[] | Returns: an array containing numbers between-1 and 1an index generator ig, int number of ones / negative ones dr)Generates an |
| private Polynomial | Returns: a blinding polynomialmessage representative M)Deterministically generates a blinding polynomial from a seed and a message representative. |
| public int | getInputBlockSize()
Implements org. |
| public int | getOutputBlockSize()
Implements org. |
| public void | init(boolean
if true the cipher is initialised for
encryption, if false for decryption. forEncryption, CipherParameters the key and other data required by the cipher. parameters)Implements org. |
| private int | |
| private IntegerPolynomial | MGF(byte[] seed, int N, int minCallsR, boolean
whether to hash the seed hashSeed)An implementation of MGF-TP-1 from P1363.1 section 8.4.1.1. |
| public byte[] | processBlock(byte[]
the input data in, int offset into the in array where the data starts inOff, int the length of the block to be processed. len)Implements org. |
| private void |
| forEncryption | back to summary |
|---|---|
| private boolean forEncryption | |
| params | back to summary |
|---|---|
| private NTRUEncryptionParameters params | |
| privKey | back to summary |
|---|---|
| private NTRUEncryptionPrivateKeyParameters privKey | |
| pubKey | back to summary |
|---|---|
| private NTRUEncryptionPublicKeyParameters pubKey | |
| random | back to summary |
|---|---|
| private SecureRandom random | |
| NTRUEngine | back to summary |
|---|---|
| public NTRUEngine() Constructs a new instance with a set of encryption parameters. | |
| buildSData | back to summary |
|---|---|
| private byte[] buildSData(byte[] oid, byte[] m, int l, byte[] b, byte[] hTrunc) | |
| calcHash | back to summary |
|---|---|
| private byte[] calcHash(Digest hashAlg) | |
| calcHash | back to summary |
|---|---|
| private byte[] calcHash(Digest hashAlg, byte[] input) | |
| copyOf | back to summary |
|---|---|
| private byte[] copyOf(byte[] src, int len) | |
| decrypt | back to summary |
|---|---|
| private byte[] decrypt(byte[] data, NTRUEncryptionPrivateKeyParameters privKey) throws InvalidCipherTextException Decrypts a message.
| |
| decrypt | back to summary |
|---|---|
protected IntegerPolynomial decrypt(IntegerPolynomial e, Polynomial priv_t, IntegerPolynomial priv_fp)
| |
| encrypt | back to summary |
|---|---|
| private byte[] encrypt(byte[] m, NTRUEncryptionPublicKeyParameters pubKey) Encrypts a message.
| |
| encrypt | back to summary |
|---|---|
| protected IntegerPolynomial encrypt(IntegerPolynomial m, TernaryPolynomial r, IntegerPolynomial pubKey) | |
| generateBlindingCoeffs | back to summary |
|---|---|
| private int[] generateBlindingCoeffs(IndexGenerator ig, int dr) Generates an
| |
| generateBlindingPoly | back to summary |
|---|---|
| private Polynomial generateBlindingPoly(byte[] seed, byte[] M) Deterministically generates a blinding polynomial from a seed and a message representative.
| |
| getInputBlockSize | back to summary |
|---|---|
| public int getInputBlockSize() Implements org. Doc from org. returns the largest size an input block can be.
| |
| getOutputBlockSize | back to summary |
|---|---|
| public int getOutputBlockSize() Implements org. Doc from org. returns the maximum size of the block produced by this cipher.
| |
| init | back to summary |
|---|---|
| public void init(boolean forEncryption, CipherParameters parameters) Implements org. Doc from org. initialise the cipher.
| |
| log2 | back to summary |
|---|---|
| private int log2(int value) | |
| MGF | back to summary |
|---|---|
| private IntegerPolynomial MGF(byte[] seed, int N, int minCallsR, boolean hashSeed) An implementation of MGF-TP-1 from P1363.1 section 8.4.1.1.
| |
| processBlock | back to summary |
|---|---|
| public byte[] processBlock(byte[] in, int inOff, int len) throws InvalidCipherTextException Implements org. Doc from org. process the block of len bytes stored in in from offset inOff.
| |
| putInt | back to summary |
|---|---|
| private void putInt(Digest hashAlg, int counter) | |