Crypto.KDF.Scrypt

cryptonite-0.22: Cryptography Primitives sink

License | BSD-style
Maintainer | Vincent Hanquez <vincent@snarc.org>
Stability | experimental
Portability | unknown
Safe Haskell | None
Language | Haskell2010

Crypto.KDF.Scrypt

Description

Scrypt key derivation function as defined in Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard Functions" http://www.tarsnap.com/scrypt/scrypt.pdf.

Synopsis

- data Parameters = Parameters {
  - n :: Word64
  - r :: Int
  - p :: Int
  - outputLength :: Int
  }
- generate :: (ByteArrayAccess password, ByteArrayAccess salt, ByteArray output) => Parameters -> password -> salt -> output

# Documentation

data Parameters #

Parameters for Scrypt

Constructors

Parameters |
Fields n :: Word64 Cpu/Memory cost ratio. must be a power of 2 greater than 1. also known as N. r :: Int Must satisfy r * p < 2^30 p :: Int Must satisfy r * p < 2^30 outputLength :: Int the number of bytes to generate out of Scrypt

generate :: (ByteArrayAccess password, ByteArrayAccess salt, ByteArray output) => Parameters -> password -> salt -> output #

Generate the scrypt key derivation data