gnu.crypto.cipher

Class Rijndael

public final class Rijndael extends BaseCipher

Rijndael --pronounced Reindaal-- is the AES. It is a variable block-size (128-, 192- and 256-bit), variable key-size (128-, 192- and 256-bit) symmetric key block cipher.

References:

  1. The Rijndael Block Cipher - AES Proposal.
    Vincent Rijmen and Joan Daemen.

Version: $Revision: 1.9 $

Constructor Summary
Rijndael()
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)
static intgetRounds(int ks, int bs)

Returns the number of rounds for a given Rijndael's key and block sizes.

IteratorkeySizes()
ObjectmakeKey(byte[] k, int bs)
Expands a user-supplied key material into a session key for a designated block size.
booleanselfTest()

Constructor Detail

Rijndael

public Rijndael()
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)

getRounds

public static int getRounds(int ks, int bs)

Returns the number of rounds for a given Rijndael's key and block sizes.

Parameters: ks the size of the user key material in bytes. bs the desired block size in bytes.

Returns: the number of rounds for a given Rijndael's key and block sizes.

keySizes

public Iterator keySizes()

makeKey

public Object makeKey(byte[] k, int bs)
Expands a user-supplied key material into a session key for a designated block size.

Parameters: k the 128/192/256-bit user-key to use. bs the block size in bytes of this Rijndael.

Returns: an Object encapsulating the session key.

Throws: IllegalArgumentException if the block size is not 16, 24 or 32. InvalidKeyException if the key data is invalid.

selfTest

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