threefish-0.2.6: The Threefish block cipher and the Skein hash function for Haskell.

Safe HaskellNone

Crypto.Threefish.Skein

Description

256 and 512 bit Skein. Supports normal hashing and Skein-MAC.

Synopsis

Documentation

class Skein a whereSource

Methods

skeinMAC :: a -> ByteString -> aSource

Calculate the Skein-MAC of a message.

skein :: ByteString -> aSource

Calculate the Skein checksum of a message.

class Serialize a => Threefish a b | a -> b whereSource

Methods

threefishKey :: Tweak -> a -> bSource

Create a Threefish key using a custom tweak value.

threefishEncrypt :: a -> Tweak -> a -> aSource

Encrypt a block using the given key and tweak value.

threefishDecrypt :: a -> Tweak -> a -> aSource

Decrypt a block using the given key and tweak value.

toBlock :: ByteString -> Maybe aSource

Create an appropriately sized block.

fromBlock :: a -> ByteStringSource

Extract the contents of a block.

hash512 :: Key512 -> ByteString -> Block512Source

Hash a message using a particular key. For normal hashing, use all zeroes; for Skein-MAC, use the MAC key.