packages feed

ppad-secp256k1-0.5.5: ppad-secp256k1.cabal

cabal-version:      3.0
name:               ppad-secp256k1
version:            0.5.5
synopsis:           Schnorr signatures, ECDSA, and ECDH on the elliptic curve
                    secp256k1
license:            MIT
license-file:       LICENSE
author:             Jared Tobin
maintainer:         jared@ppad.tech
category:           Cryptography
build-type:         Simple
tested-with:        GHC == { 9.10.3 }
extra-doc-files:    CHANGELOG
description:
  Pure BIP0340-style Schnorr signatures, deterministic RFC6979 ECDSA, and
  ECDH shared secret computation on the elliptic curve secp256k1.

flag llvm
  description: Use GHC's LLVM backend.
  default:     False
  manual:      True

source-repository head
  type:     git
  location: git.ppad.tech/secp256k1.git

library
  default-language: Haskell2010
  hs-source-dirs:   lib
  ghc-options:
      -Wall
  if flag(llvm)
    ghc-options: -fllvm -O2
  exposed-modules:
      Crypto.Curve.Secp256k1
  build-depends:
      base >= 4.9 && < 5
    , bytestring >= 0.9 && < 0.13
    , ppad-hmac-drbg >= 0.3.1 && < 0.4
    , ppad-sha256 >= 0.3.2 && < 0.4
    , ppad-fixed >= 0.1.4 && < 0.2
    , primitive >= 0.8 && < 0.10

test-suite secp256k1-tests
  type:                exitcode-stdio-1.0
  default-language:    Haskell2010
  hs-source-dirs:      test
  main-is:             Main.hs
  other-modules:
      BIP340
    , Noble
    , Wycheproof
    , WycheproofEcdh

  ghc-options:
    -rtsopts -Wall

  build-depends:
      aeson
    , attoparsec
    , base
    , bytestring
    , ppad-base16
    , ppad-fixed
    , ppad-secp256k1
    , ppad-sha256
    , tasty
    , tasty-hunit
    , text

benchmark secp256k1-bench
  type:                exitcode-stdio-1.0
  default-language:    Haskell2010
  hs-source-dirs:      bench
  main-is:             Main.hs

  ghc-options:
    -rtsopts -O2 -Wall -fno-warn-orphans

  build-depends:
      base
    , bytestring
    , criterion
    , deepseq
    , ppad-base16
    , ppad-fixed
    , ppad-secp256k1

benchmark secp256k1-weigh
  type:                exitcode-stdio-1.0
  default-language:    Haskell2010
  hs-source-dirs:      bench
  main-is:             Weight.hs

  ghc-options:
    -rtsopts -O2 -Wall -fno-warn-orphans

  build-depends:
      base
    , bytestring
    , deepseq
    , ppad-base16
    , ppad-fixed
    , ppad-secp256k1
    , weigh