gnu.crypto.cipher

Class Khazad

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:

  1. The Khazad Block Cipher.
    Paulo S.L.M. Barreto and Vincent Rijmen.

Version: $Revision: 1.10 $

Constructor Summary
Khazad()
Trivial 0-arguments constructor.
Method Summary
IteratorblockSizes()
Objectclone()
voiddecrypt(byte[] in, int i, byte[] out, int j, Object k, int bs)
voidencrypt(byte[] in, int i, byte[] out, int j, Object k, int bs)
IteratorkeySizes()
ObjectmakeKey(byte[] uk, int bs)

Expands a user-supplied key material into a session key for a designated block size.

booleanselfTest()

Constructor Detail

Khazad

public Khazad()
Trivial 0-arguments constructor.

Method Detail

blockSizes

public Iterator blockSizes()

clone

public Object clone()

decrypt

public void decrypt(byte[] in, int i, byte[] out, int j, Object k, int bs)

encrypt

public void encrypt(byte[] in, int i, byte[] out, int j, Object k, int bs)

keySizes

public Iterator keySizes()

makeKey

public Object makeKey(byte[] uk, int bs)

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.

selfTest

public boolean selfTest()
Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.