gnu.crypto.cipher
public final class Khazad extends BaseCipher
Khazad is a 64-bit (legacy-level) block cipher that accepts a 128-bit key. The cipher is a uniform substitution-permutation network whose inverse only differs from the forward operation in the key schedule. The overall cipher design follows the Wide Trail strategy, favours component reuse, and permits a wide variety of implementation trade-offs.
References:
Version: $Revision: 1.10 $
Constructor Summary | |
---|---|
Khazad() Trivial 0-arguments constructor. |
Method Summary | |
---|---|
Iterator | blockSizes() |
Object | clone() |
void | decrypt(byte[] in, int i, byte[] out, int j, Object k, int bs) |
void | encrypt(byte[] in, int i, byte[] out, int j, Object k, int bs) |
Iterator | keySizes() |
Object | makeKey(byte[] uk, int bs) Expands a user-supplied key material into a session key for a designated block size. |
boolean | selfTest() |
Expands a user-supplied key material into a session key for a designated block size.
Parameters: uk the 128-bit user-supplied key material. bs the desired block size in bytes.
Returns: an Object encapsulating the session key.
Throws: IllegalArgumentException if the block size is not 16 (128-bit). InvalidKeyException if the key data is invalid.