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

Crypto.Threefish.Skein

Description

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

Synopsis

Documentation

class Skein a where Source #

Methods

skeinMAC :: a -> ByteString -> a Source #

Calculate the Skein-MAC of a message.

skein :: ByteString -> a Source #

Calculate the Skein checksum of a message.

Instances

Instances details
Skein Block256 Source # 
Instance details

Defined in Crypto.Threefish.Skein

Skein Block512 Source # 
Instance details

Defined in Crypto.Threefish.Skein

class Serialize a => Threefish a b | a -> b where Source #

Methods

threefishKey :: Tweak -> a -> b Source #

Create a Threefish key using a custom tweak value.

threefishEncrypt :: a -> Tweak -> a -> a Source #

Encrypt a block using the given key and tweak value.

threefishDecrypt :: a -> Tweak -> a -> a Source #

Decrypt a block using the given key and tweak value.

toBlock :: ByteString -> Maybe a Source #

Create an appropriately sized block.

fromBlock :: a -> ByteString Source #

Extract the contents of a block.

hash512 :: Key512 -> ByteString -> Block512 Source #

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