hmac-drbg

Pure Haskell HMAC-DRBG (docs.ppad.tech/hmac-drbg).
git clone git://git.ppad.tech/hmac-drbg.git
Log | Files | Refs | README | LICENSE

commit fc71ab3c2f1bd769b032528475727edf0adcb835
parent 0753c3d56826e4b10ec22feb63a13bd85946e933
Author: Jared Tobin <jared@jtobin.io>
Date:   Thu, 10 Oct 2024 19:34:29 +0400

bench: add HMAC-SHA512

Diffstat:
Mbench/Main.hs | 7+++++++
Mppad-hmac-drbg.cabal | 1+
2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/bench/Main.hs b/bench/Main.hs @@ -7,6 +7,7 @@ module Main where import Criterion.Main import qualified Crypto.DRBG.HMAC as DRBG import qualified Crypto.Hash.SHA256 as SHA256 +import qualified Crypto.Hash.SHA512 as SHA512 main :: IO () main = do @@ -23,5 +24,11 @@ suite drbg = , bench "gen (32B)" $ whnfAppIO (DRBG.gen mempty 32) drbg , bench "gen (256B)" $ whnfAppIO (DRBG.gen mempty 256) drbg ] + , bgroup "HMAC-SHA512" [ + bench "new" $ whnfAppIO (DRBG.new SHA512.hmac mempty mempty) mempty + , bench "reseed" $ whnfAppIO (DRBG.reseed mempty mempty) drbg + , bench "gen (32B)" $ whnfAppIO (DRBG.gen mempty 32) drbg + , bench "gen (256B)" $ whnfAppIO (DRBG.gen mempty 256) drbg + ] ] diff --git a/ppad-hmac-drbg.cabal b/ppad-hmac-drbg.cabal @@ -65,4 +65,5 @@ benchmark hmac-drbg-bench , criterion , ppad-hmac-drbg , ppad-sha256 + , ppad-sha512