crypton-0.32: Cryptography Primitives sink
LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityunknown
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

Documentation

data Parameters Source #

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 Source #

Generate the scrypt key derivation data