org.bouncycastle.crypto.engines
public class NaccacheSternEngine extends Object implements AsymmetricBlockCipher
Method Summary | |
---|---|
byte[] | addCryptedBlocks(byte[] block1, byte[] block2)
Adds the contents of two encrypted blocks mod sigma
|
byte[] | encrypt(BigInteger plain)
Encrypts a BigInteger aka Plaintext with the public key.
|
int | getInputBlockSize()
Returns the input block size of this algorithm.
|
int | getOutputBlockSize()
Returns the output block size of this algorithm.
|
void | init(boolean forEncryption, CipherParameters param)
Initializes this algorithm. |
byte[] | processBlock(byte[] in, int inOff, int len)
Process a single Block using the Naccache-Stern algorithm.
|
byte[] | processData(byte[] data)
Convenience Method for data exchange with the cipher.
|
void | setDebug(boolean debug) |
Parameters: block1 the first encrypted block block2 the second encrypted block
Returns: encrypt((block1 + block2) mod sigma)
Throws: InvalidCipherTextException
Parameters: plain The BigInteger to encrypt
Returns: The byte[] representation of the encrypted BigInteger (i.e. crypted.toByteArray())
See Also: getInputBlockSize
See Also: getOutputBlockSize
See Also: AsymmetricBlockCipher
See Also: (byte[],
int, int)
Parameters: data the data to be processed
Returns: the data after it went through the NaccacheSternEngine.
Throws: InvalidCipherTextException