| java.lang.Object org.bouncycastle.crypto.engines.NaccacheSternEngine
NaccacheSternEngine | public class NaccacheSternEngine implements AsymmetricBlockCipher(Code) | | NaccacheStern Engine. For details on this cipher, please see
http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
|
Method Summary | |
public byte[] | addCryptedBlocks(byte[] block1, byte[] block2) | public byte[] | encrypt(BigInteger plain) Encrypts a BigInteger aka Plaintext with the public key. | public int | getInputBlockSize() Returns the input block size of this algorithm. | public int | getOutputBlockSize() Returns the output block size of this algorithm. | public void | init(boolean forEncryption, CipherParameters param) Initializes this algorithm. | public byte[] | processBlock(byte[] in, int inOff, int len) Process a single Block using the Naccache-Stern algorithm. | public byte[] | processData(byte[] data) Convenience Method for data exchange with the cipher. | public void | setDebug(boolean debug) |
addCryptedBlocks | public byte[] addCryptedBlocks(byte[] block1, byte[] block2) throws InvalidCipherTextException(Code) | | Adds the contents of two encrypted blocks mod sigma
Parameters: block1 - the first encrypted block Parameters: block2 - the second encrypted block encrypt((block1 + block2) mod sigma) throws: InvalidCipherTextException - |
encrypt | public byte[] encrypt(BigInteger plain)(Code) | | Encrypts a BigInteger aka Plaintext with the public key.
Parameters: plain - The BigInteger to encrypt The byte[] representation of the encrypted BigInteger (i.e.crypted.toByteArray()) |
processData | public byte[] processData(byte[] data) throws InvalidCipherTextException(Code) | | Convenience Method for data exchange with the cipher.
Determines blocksize and splits data to blocksize.
Parameters: data - the data to be processed the data after it went through the NaccacheSternEngine. throws: InvalidCipherTextException - |
setDebug | public void setDebug(boolean debug)(Code) | | |
|
|