crypton-1.0.1: Cryptography Primitives sink

License | BSD-style
Maintainer | Kei Hibino <ex8k.hibino@gmail.com>
Stability | experimental
Portability | unknown
Safe Haskell | None
Language | Haskell2010

Crypto.ConstructHash.MiyaguchiPreneel

Description

Provide the hash function construction method from block cipher https://en.wikipedia.org/wiki/One-way_compression_function

Synopsis

- compute :: (ByteArrayAccess bin, BlockCipher cipher) => bin -> MiyaguchiPreneel cipher
- compute' :: (ByteArrayAccess bin, BlockCipher cipher) => (Bytes -> cipher) -> bin -> MiyaguchiPreneel cipher
- data MiyaguchiPreneel a

# Documentation

compute #

Arguments

:: (ByteArrayAccess bin, BlockCipher cipher) |
=> bin | input message
-> MiyaguchiPreneel cipher | output tag

Compute Miyaguchi-Preneel one way compress using the inferred block cipher. Only safe when KEY-SIZE equals to BLOCK-SIZE.

Simple usage mp' msg :: MiyaguchiPreneel AES128

compute' #

Arguments

:: (ByteArrayAccess bin, BlockCipher cipher) |
=> (Bytes -> cipher) | key build function to compute Miyaguchi-Preneel. care about block-size and key-size
-> bin | input message
-> MiyaguchiPreneel cipher | output tag

Compute Miyaguchi-Preneel one way compress using the supplied block cipher.

data MiyaguchiPreneel a #

#### Instances

Instances details

Eq (MiyaguchiPreneel a) # |
Instance details Defined in Crypto.ConstructHash.MiyaguchiPreneel Methods (==) :: MiyaguchiPreneel a -> MiyaguchiPreneel a -> Bool # (/=) :: MiyaguchiPreneel a -> MiyaguchiPreneel a -> Bool #
ByteArrayAccess (MiyaguchiPreneel a) # |
Instance details Defined in Crypto.ConstructHash.MiyaguchiPreneel Methods length :: MiyaguchiPreneel a -> Int # withByteArray :: MiyaguchiPreneel a -> (Ptr p -> IO a0) -> IO a0 # copyByteArrayToPtr :: MiyaguchiPreneel a -> Ptr p -> IO () #