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

Safe HaskellNone

Crypto.Threefish.Skein.StreamCipher

Description

256 bit Skein as a stream cipher, as specified in the Skein 1.3 paper.

Synopsis

Documentation

encrypt :: Key256 -> Nonce256 -> ByteString -> ByteStringSource

Encrypt a lazy ByteString using 256 bit Skein as a stream cipher.

decrypt :: Key256 -> Nonce256 -> ByteString -> ByteStringSource

Encryption and decryption are the same operation for a stream cipher, but we may want to have a function called encrypt for clarity.

toBlock :: Threefish a b => ByteString -> Maybe aSource

Create an appropriately sized block.

fromBlock :: Threefish a b => a -> ByteStringSource

Extract the contents of a block.