|
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.crypto.engines.Shacal2Engine
public class Shacal2Engine
Block cipher Shacal2, designed by Helena Handschuh and David Naccache, based on hash function SHA-256, using SHA-256-Initialization-Values as data and SHA-256-Data as key.
A description of Shacal can be found at: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.3.4066 Best known cryptanalytic (Wikipedia 11.2013): Related-key rectangle attack on 44-rounds (Jiqiang Lu, Jongsung Kim). Comments are related to SHA-256-Naming as described in FIPS PUB 180-2
| Constructor Summary | |
|---|---|
Shacal2Engine()
|
|
| Method Summary | |
|---|---|
void |
decryptBlock(byte[] in,
int inOffset,
byte[] out,
int outOffset)
|
void |
encryptBlock(byte[] in,
int inOffset,
byte[] out,
int outOffset)
|
java.lang.String |
getAlgorithmName()
Return the name of the algorithm the cipher implements. |
int |
getBlockSize()
Return the block size for this cipher (in bytes). |
void |
init(boolean _forEncryption,
CipherParameters params)
Initialise the cipher. |
int |
processBlock(byte[] in,
int inOffset,
byte[] out,
int outOffset)
Process one block of input from the array in and write it to the out array. |
void |
reset()
Reset the cipher. |
void |
setKey(byte[] kb)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Shacal2Engine()
| Method Detail |
|---|
public void reset()
BlockCipher
reset in interface BlockCipherpublic java.lang.String getAlgorithmName()
BlockCipher
getAlgorithmName in interface BlockCipherpublic int getBlockSize()
BlockCipher
getBlockSize in interface BlockCipher
public void init(boolean _forEncryption,
CipherParameters params)
throws java.lang.IllegalArgumentException
BlockCipher
init in interface BlockCipher_forEncryption - if true the cipher is initialised for
encryption, if false for decryption.params - the key and other data required by the cipher.
java.lang.IllegalArgumentException - if the params argument is
inappropriate.public void setKey(byte[] kb)
public void encryptBlock(byte[] in,
int inOffset,
byte[] out,
int outOffset)
public void decryptBlock(byte[] in,
int inOffset,
byte[] out,
int outOffset)
public int processBlock(byte[] in,
int inOffset,
byte[] out,
int outOffset)
throws DataLengthException,
java.lang.IllegalStateException
BlockCipher
processBlock in interface BlockCipherin - the array containing the input data.inOffset - offset into the in array the data starts at.out - the array the output data will be copied into.outOffset - the offset into the out array the output will start at.
DataLengthException - if there isn't enough data in in, or
space in out.
java.lang.IllegalStateException - if the cipher isn't initialised.
|
Bouncy Castle Cryptography 1.50 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||