Documentation
¶
Index ¶
- Constants
- func Decrypt512(block *[8]uint64, keys *[9]uint64, tweak *[3]uint64)
- func Encrypt512(block *[8]uint64, keys *[9]uint64, tweak *[3]uint64)
- func IncrementTweak(tweak *[3]uint64, ctr uint64)
- func NewCipher(tweak *[TweakSize]byte, key []byte) (cipher.Block, error)
- func UBI512(block *[8]uint64, hVal *[9]uint64, tweak *[3]uint64)
Constants ¶
const ( // TweakSize The size of the tweak in bytes. TweakSize = 16 // C240 is the key schedule constant C240 = 0x1bd11bdaa9fc1a22 // BlockSize512 The block size of Threefish-512 in bytes. BlockSize512 = 64 )
Variables ¶
This section is empty.
Functions ¶
func Decrypt512 ¶
Decrypt512 decrypts the 8 words of block using the expanded 512 bit key and the 128 bit tweak. The keys[8] must be keys[0] xor keys[1] xor ... keys[8] xor C240. The tweak[2] must be tweak[0] xor tweak[1].
func Encrypt512 ¶
Encrypt512 encrypts the 8 words of block using the expanded 512 bit key and the 128 bit tweak. The keys[8] must be keys[0] xor keys[1] xor ... keys[8] xor C240. The tweak[2] must be tweak[0] xor tweak[1].
func IncrementTweak ¶
IncrementTweak Increment the tweak by the ctr argument. Skein can consume messages up to 2^96 -1 bytes.
func NewCipher ¶
NewCipher returns a cipher.Block implementing the Threefish cipher. The length of the key must be 32, 64 or 128 byte. The length of the tweak must be TweakSize. The returned cipher implements:
- Threefish-256 - if len(key) = 32
- Threefish-512 - if len(key) = 64
- Threefish-1024 - if len(key) = 128
Types ¶
This section is empty.