License:
BSD style: see doc/license.txt for details
Version:
Initial release: Feb 2006
author:
Regan Heath, Oskar Linde
This module implements the
Tiger
algorithm by Ross Anderson and Eli
Biham.
- class
Tiger
: tango.io.digest.MerkleDamgard.MerkleDamgard;
- this();
- Construct an Tiger
- uint
digestSize
();
- The size of a tiger digest is 24 bytes
- void
reset
();
- Initialize the cipher
Remarks:
Returns the cipher state to it's initial value
- void
createDigest
(ubyte[] buf);
- Obtain the digest
Returns:
the digest
Remarks:
Returns a digest of the current cipher state, this may be the
final digest, or a digest of the state between calls to update()
- uint
passes
();
- Get the number of
passes
being performed
Returns:
the number of
passes
Remarks:
The Tiger algorithm may perform an arbitrary number of
passes
the minimum recommended number is 3 and this number should be
quite secure however the "ultra-cautious" may wish to increase
this number.
- void
passes
(uint n);
- Set the number of
passes
to be performed
Params:
| uint n |
the number of
passes
to perform |
Remarks:
The Tiger algorithm may perform an arbitrary number of
passes
the minimum recommended number is 3 and this number should be
quite secure however the "ultra-cautious" may wish to increase
this number.
- protected uint
blockSize
();
- block size
Returns:
the block size
Remarks:
Specifies the size (in bytes) of the block of data to pass to
each call to transform(). For Tiger the
blockSize
is 64.
- protected uint
addSize
();
- Length padding size
Returns:
the length padding size
Remarks:
Specifies the size (in bytes) of the padding which uses the
length of the data which has been ciphered, this padding is
carried out by the padLength method. For Tiger the
addSize
is 8.
- protected void
padMessage
(ubyte[] at);
- Pads the cipher data
Params:
| data |
a slice of the cipher buffer to fill with padding |
Remarks:
Fills the passed buffer slice with the appropriate padding for
the final call to transform(). This padding will fill the cipher
buffer up to blockSize()-addSize().
- protected void
padLength
(ubyte[] at, ulong length);
- Performs the length padding
Params:
| data |
the slice of the cipher buffer to fill with padding |
| ulong length |
the length of the data which has been ciphered |
Remarks:
Fills the passed buffer slice with addSize() bytes of padding
based on the length in bytes of the input data which has been
ciphered.
- protected void
transform
(ubyte[] input);
- Performs the cipher on a block of data
Params:
| data |
the block of data to cipher |
Remarks:
The actual cipher algorithm is carried out by this method on
the passed block of data. This method is called for every
blockSize() bytes of input data and once more with the remaining
data padded to blockSize().
|