Documentation ¶
Overview ¶
Package threefish implements the Threefish tweakable block cipher.
Threefish is a block cipher that was developed as part of the Skein hash function as a submission to the NIST hash function competition. Threefish supports block sizes of 256, 512, and 1024 bits.
For the full Threefish specification, see [1].
Test vectors were extracted from the latest reference implementation [2].
Encryption and decryption loops have been unrolled to contain eight rounds in each iteration. This allows rotation constants to be embedded in the code without being repeated. This practice is described in detail in the paper [1] which also provides detailed performance information.
[1] http://www.skein-hash.info/sites/default/files/skein1.3.pdf [2] http://www.skein-hash.info/sites/default/files/NIST_CD_102610.zip
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New1024 ¶
New1024 creates a new Threefish cipher with a block size of 1024 bits. The key argument must be 64 bytes and the tweak argument must be 16 bytes.
Types ¶
type KeySizeError ¶
type KeySizeError int
A KeySizeError is returned when the provided key isn't the correct size.
type TweakSizeError ¶
type TweakSizeError struct{}
A TweakSizeError is returned when the provided tweak isn't the correct size.
func (TweakSizeError) Error ¶
func (e TweakSizeError) Error() string
Error describes a TweakSizeError.