Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- keccak224 :: ByteString -> ByteString
- keccak256 :: ByteString -> ByteString
- keccak384 :: ByteString -> ByteString
- keccak512 :: ByteString -> ByteString
- sha3_512 :: ByteString -> ByteString
- sha3_384 :: ByteString -> ByteString
- sha3_256 :: ByteString -> ByteString
- sha3_224 :: ByteString -> ByteString
- shake128 :: Int -> ByteString -> ByteString
- shake256 :: Int -> ByteString -> ByteString
- keccakHash :: Int -> ByteString -> ByteString
- sha3Hash :: Int -> ByteString -> ByteString
- paddingKeccak :: Int -> ByteString -> Vector Word8
- paddingSha3 :: Int -> ByteString -> Vector Word8
- absorb :: Int -> Vector Word8 -> Vector Word64
- squeeze :: Int -> Int -> Vector Word64 -> ByteString
Standard keccak hash functions
keccak224 :: ByteString -> ByteString Source #
Keccak (224 bits) cryptographic hash algorithm
keccak256 :: ByteString -> ByteString Source #
Keccak (256 bits) cryptographic hash algorithm
keccak384 :: ByteString -> ByteString Source #
Keccak (384 bits) cryptographic hash algorithm
keccak512 :: ByteString -> ByteString Source #
Keccak (512 bits) cryptographic hash algorithm
Standard SHA3 hash functions
sha3_512 :: ByteString -> ByteString Source #
SHA3 (512 bits) cryptographic hash algorithm
sha3_384 :: ByteString -> ByteString Source #
SHA3 (384 bits) cryptographic hash algorithm
sha3_256 :: ByteString -> ByteString Source #
SHA3 (256 bits) cryptographic hash algorithm
sha3_224 :: ByteString -> ByteString Source #
SHA3 (224 bits) cryptographic hash algorithm
SHAKE extendable-output functions
shake128 :: Int -> ByteString -> ByteString Source #
SHAKE128 (128 bit security level) cryptographic extendable-output function
shake256 :: Int -> ByteString -> ByteString Source #
SHAKE256 (256 bit security level) cryptographic extendable-output function
Building blocks of a Keccak hash function
keccakHash :: Int -> ByteString -> ByteString Source #
Given a bitrate r
, returns a standard Keccak hash with state width w
= 1600 and
capacity = 1600 - r
sha3Hash :: Int -> ByteString -> ByteString Source #
Given a bitrate r
, returns a standard SHA3 hash with state width w
= 1600 and
capacity = 1600 - r
paddingKeccak :: Int -> ByteString -> Vector Word8 Source #
Appends a single bit 1 followed by the minimum number of bits 0 followed by a single bit 1 such that the length of the result is a multiple of the bitrate.
paddingSha3 :: Int -> ByteString -> Vector Word8 Source #
Appends to a message M padding of the form (M || 0x06 || 0x00... || 0x80) such that the length of the result is a multiple of the bitrate.