|
Bouncy Castle Cryptography 1.45 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.bouncycastle.crypto.engines.NaccacheSternEngine
public class NaccacheSternEngine
NaccacheStern Engine. For details on this cipher, please see http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
| Constructor Summary | |
|---|---|
NaccacheSternEngine()
|
|
| Method Summary | |
|---|---|
byte[] |
addCryptedBlocks(byte[] block1,
byte[] block2)
Adds the contents of two encrypted blocks mod sigma |
byte[] |
encrypt(java.math.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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NaccacheSternEngine()
| Method Detail |
|---|
public void init(boolean forEncryption,
CipherParameters param)
init in interface AsymmetricBlockCipherforEncryption - if true the cipher is initialised for
encryption, if false for decryption.param - the key and other data required by the cipher.AsymmetricBlockCipher.init(boolean,
org.bouncycastle.crypto.CipherParameters)public void setDebug(boolean debug)
public int getInputBlockSize()
getInputBlockSize in interface AsymmetricBlockCipherAsymmetricBlockCipher.getInputBlockSize()public int getOutputBlockSize()
getOutputBlockSize in interface AsymmetricBlockCipherAsymmetricBlockCipher.getOutputBlockSize()
public byte[] processBlock(byte[] in,
int inOff,
int len)
throws InvalidCipherTextException
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.AsymmetricBlockCipher.processBlock(byte[],
int, int)public byte[] encrypt(java.math.BigInteger plain)
plain - The BigInteger to encrypt
public byte[] addCryptedBlocks(byte[] block1,
byte[] block2)
throws InvalidCipherTextException
block1 - the first encrypted blockblock2 - the second encrypted block
InvalidCipherTextException
public byte[] processData(byte[] data)
throws InvalidCipherTextException
data - the data to be processed
InvalidCipherTextException
|
Bouncy Castle Cryptography 1.45 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||