|
Bouncy Castle Cryptography 1.50 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.bouncycastle.pqc.crypto.ntru.NTRUEngine
public class NTRUEngine
Encrypts, decrypts data and generates key pairs.
The parameter p is hardcoded to 3.
| Constructor Summary | |
|---|---|
NTRUEngine()
Constructs a new instance with a set of encryption parameters. |
|
| Method Summary | |
|---|---|
protected IntegerPolynomial |
decrypt(IntegerPolynomial e,
Polynomial priv_t,
IntegerPolynomial priv_fp)
|
protected IntegerPolynomial |
encrypt(IntegerPolynomial m,
TernaryPolynomial r,
IntegerPolynomial pubKey)
|
int |
getInputBlockSize()
returns the largest size an input block can be. |
int |
getOutputBlockSize()
returns the maximum size of the block produced by this cipher. |
void |
init(boolean forEncryption,
CipherParameters parameters)
initialise the cipher. |
byte[] |
processBlock(byte[] in,
int inOff,
int len)
process the block of len bytes stored in in from offset inOff. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NTRUEngine()
| Method Detail |
|---|
public void init(boolean forEncryption,
CipherParameters parameters)
AsymmetricBlockCipher
init in interface AsymmetricBlockCipherforEncryption - if true the cipher is initialised for
encryption, if false for decryption.parameters - the key and other data required by the cipher.public int getInputBlockSize()
AsymmetricBlockCipher
getInputBlockSize in interface AsymmetricBlockCipherpublic int getOutputBlockSize()
AsymmetricBlockCipher
getOutputBlockSize in interface AsymmetricBlockCipher
public byte[] processBlock(byte[] in,
int inOff,
int len)
throws InvalidCipherTextException
AsymmetricBlockCipher
processBlock in interface AsymmetricBlockCipherin - the input datainOff - offset into the in array where the data startslen - the length of the block to be processed.
InvalidCipherTextException - data decrypts improperly.
protected IntegerPolynomial encrypt(IntegerPolynomial m,
TernaryPolynomial r,
IntegerPolynomial pubKey)
protected IntegerPolynomial decrypt(IntegerPolynomial e,
Polynomial priv_t,
IntegerPolynomial priv_fp)
e - priv_t - a polynomial such that if fastFp=true, f=1+3*priv_t; otherwise, f=priv_tpriv_fp -
|
Bouncy Castle Cryptography 1.50 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||