-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Stronger password hashing via sequential memory-hard functions. -- -- This package provides bindings to Colin Percival's scrypt -- implementation (http://www.tarsnap.com/scrypt.html). Scrypt is -- a key derivation function designed to be far more secure against -- hardware brute-force attacks than alternative functions such as PBKDF2 -- or bcrypt. -- -- Details of the scrypt key derivation function are given in a paper by -- Colin Percival, Stronger Key Derivation via Sequential Memory-Hard -- Functions: http://www.tarsnap.com/scrypt/scrypt.pdf. @package scrypt @version 0.1.1 -- | Scrypt is a sequential memory-hard key derivation function. This -- module provides bindings to a fast C implementation of scrypt, written -- by Colin Percival. For more information see -- http://www.tarsnap.com/scrypt.html. module Crypto.Scrypt -- | Encapsulates the three tuning parameters to the scrypt -- function: N, r and p. The parameters affect -- running time and memory usage: -- -- Memory usage is approximately 128*r*N bytes. Note that -- the params function takes log_2(N) as a parameter. As -- an example, the defaultParams -- --
--   log_2(N) = 14, r = 8 and p = 1
--   
-- -- lead to scrypt using 128 * 8 * 2^14 = 16M bytes of -- memory. -- -- Running time is proportional to all of N, r -- and p. However p only as an insignificant influence -- on memory usage an can thus be used to tune the running time of -- scrypt. data ScryptParams -- | Constructor function for the ScryptParams data type params :: Integer -> Integer -> Integer -> Maybe ScryptParams -- | Default parameters as recommended in the scrypt paper: -- --
--   N = 2^14, r = 8, p = 1
--   
-- -- Equivalent to fromJust (params 14 8 1). defaultParams :: ScryptParams -- | Calculates a 64-byte hash from the given password, salt and -- parameters. scrypt :: ScryptParams -> Salt -> Pass -> PassHash -- | Reads a 32-byte random salt from /dev/urandom. getSalt :: IO Salt newtype Pass Pass :: ByteString -> Pass newtype Salt Salt :: ByteString -> Salt newtype PassHash PassHash :: ByteString -> PassHash instance Show Pass instance Show Salt instance Show PassHash instance Eq PassHash