secp256k1

Pure Haskell Schnorr, ECDSA on the elliptic curve secp256k1 (docs.ppad.tech/secp256k1).
git clone git://git.ppad.tech/secp256k1.git
Log | Files | Refs | README | LICENSE

ppad-secp256k1.cabal (2664B)


      1 cabal-version:      3.0
      2 name:               ppad-secp256k1
      3 version:            0.5.9
      4 synopsis:           Schnorr signatures, ECDSA, and ECDH on the elliptic curve
      5                     secp256k1
      6 license:            MIT
      7 license-file:       LICENSE
      8 author:             Jared Tobin
      9 maintainer:         jared@ppad.tech
     10 category:           Cryptography
     11 build-type:         Simple
     12 tested-with:        GHC == { 9.10.3 }
     13 extra-doc-files:    CHANGELOG
     14 description:
     15   Pure BIP0340-style Schnorr signatures, deterministic RFC6979 ECDSA, and
     16   ECDH shared secret computation on the elliptic curve secp256k1.
     17 
     18 flag llvm
     19   description: Use GHC's LLVM backend.
     20   default:     False
     21   manual:      True
     22 
     23 source-repository head
     24   type:     git
     25   location: git.ppad.tech/secp256k1.git
     26 
     27 library
     28   default-language: Haskell2010
     29   hs-source-dirs:   lib
     30   ghc-options:
     31       -Wall
     32   if flag(llvm)
     33     ghc-options: -fllvm -O2
     34   -- LLVM's x86 backend rewrites a cmov whose operand is a load as a
     35   -- branch (its cmov converter), which would make the borrow-masked
     36   -- correction of ppad-fixed's sub_mod# (inlinable here) a branch on
     37   -- the borrow; keep the cmov.
     38   if flag(llvm) && arch(x86_64)
     39     ghc-options: -optlc=-x86-cmov-converter=false
     40   exposed-modules:
     41       Crypto.Curve.Secp256k1
     42   build-depends:
     43       base >= 4.9 && < 5
     44     , bytestring >= 0.9 && < 0.13
     45     , ppad-hmac-drbg >= 0.3.1 && < 0.4
     46     , ppad-sha256 >= 0.3.2 && < 0.4
     47     , ppad-fixed >= 0.2.1 && < 0.3
     48     , primitive >= 0.8 && < 0.10
     49 
     50 test-suite secp256k1-tests
     51   type:                exitcode-stdio-1.0
     52   default-language:    Haskell2010
     53   hs-source-dirs:      test
     54   main-is:             Main.hs
     55   other-modules:
     56       BIP340
     57     , Noble
     58     , Wycheproof
     59     , WycheproofEcdh
     60 
     61   ghc-options:
     62     -rtsopts -Wall
     63 
     64   build-depends:
     65       aeson
     66     , attoparsec
     67     , base
     68     , bytestring
     69     , ppad-base16
     70     , ppad-fixed
     71     , ppad-secp256k1
     72     , ppad-sha256
     73     , tasty
     74     , tasty-hunit
     75     , text
     76 
     77 benchmark secp256k1-bench
     78   type:                exitcode-stdio-1.0
     79   default-language:    Haskell2010
     80   hs-source-dirs:      bench
     81   main-is:             Main.hs
     82 
     83   ghc-options:
     84     -rtsopts -O2 -Wall -fno-warn-orphans
     85 
     86   build-depends:
     87       base
     88     , bytestring
     89     , criterion
     90     , deepseq
     91     , ppad-base16
     92     , ppad-fixed
     93     , ppad-secp256k1
     94 
     95 benchmark secp256k1-weigh
     96   type:                exitcode-stdio-1.0
     97   default-language:    Haskell2010
     98   hs-source-dirs:      bench
     99   main-is:             Weight.hs
    100 
    101   ghc-options:
    102     -rtsopts -O2 -Wall -fno-warn-orphans
    103 
    104   build-depends:
    105       base
    106     , bytestring
    107     , deepseq
    108     , ppad-base16
    109     , ppad-fixed
    110     , ppad-secp256k1
    111     , weigh
    112