




Description 
Implements the Twofish symmetric block cipher, designed by:
Bruce Schneier, John Kelsey, Doug Whiting, David Wagner, Chris Hall,
and Niels Ferguson.
Implemented from the paper entitled Twofish: A 128Bit Block Cipher,
http://www.counterpane.com/twofish.html
with help from the reference C implementation.
This module provides two methods for constructiong a Twofish cipher
from a 128, 192 or 256 bit key. The mkCipher function allows you
to customize the number of rounds, while the mkStdCipher function
gives you the standard 16 rounds.


Synopsis 




Classes



A key is a vector of bytes of a certain size (given in bits).
Twofish suppports key sizes of 128, 192, and 256 bits.
  Instances  


Types



A keyed Twofish cipher capable of both encryption and decryption.
 Instances  


Functions



Constructs a standard Twofish cipher from the given key



Constructs an encryption/decryption cipher from the given key, and
a given number of rounds (standard Twofish uses 16 rounds)


Curiosities



Generates the q0 byte vector using the algorithm specified in
the Twofish paper. This function isn't used by the cipher; instead
the precomputed array is contained in the code.



Generates the q1 byte vector using the algorithm specified in
the Twofish paper. This function isn't used by the cipher; instead
the precomputed array is contained in the code.


Produced by Haddock version 2.6.1 