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

CHANGELOG (4193B)


      1 # Changelog
      2 
      3 - 0.5.9 (2026-10-31)
      4   * Bumps the ppad-fixed dependency to 0.2.1, which under the llvm
      5     flag on x86_64 compiles ppad-fixed with LLVM's x86 cmov converter
      6     off (-optlc=-x86-cmov-converter=false). This library is compiled
      7     likewise, as ppad-fixed's constant-time arithmetic can be inlined
      8     into it.
      9 
     10 - 0.5.8 (2026-08-01)
     11   * Addresses a number of minor issues found by an LLM scan:
     12 
     13     * Fixes potential out-of-bounds reads that could occur if anyone
     14       used the _no_hash-suffixed ECDSA internal entry points on invalid
     15       digest inputs.
     16 
     17     * Removes an entry point for the EC monoidal identity / point at
     18       infinity to make it into both the ECDSA and Schnorr signature
     19       machinery.
     20 
     21     * Fixes a validation lapse in sign_ecdsa, which previously e.g.
     22       accepted an invalid secret key of zero.
     23 
     24     * Fixes other minor spec conformance and testing issues.
     25 
     26 - 0.5.7 (2026-06-07)
     27   * Improves the performance of all wNAF-based signing & verification
     28     functions by about 1.5-2x, due to optimizations in 1) the
     29     constant-time wNAF scalar multiplication function, and 2) upstream
     30     modular field inversion (in ppad-fixed).
     31 
     32 - 0.5.6 (2026-06-07)
     33   * Improves the wall-clock performance of the constant-time, non-wNAF
     34     scalar multiplication function by about 35%. ECDH also speeds up
     35     proportionally as a direct result.
     36 
     37 - 0.5.5 (2026-05-22)
     38   * Adds no-hash ECDSA signature verification utilities that skip the
     39     internal SHA256 step.
     40 
     41 - 0.5.4 (2026-02-04)
     42   * Nonce generation for ECDSA is now more secure due to recent
     43     improvements in ppad-hmac-drbg. The DRBG state is now guaranteed
     44     to live in only one location on the heap, and it is now wiped
     45     explicitly after use.
     46 
     47   * ECDSA signing now allocates about 1.5 orders of magnitude less than
     48     it did previously.
     49 
     50 - 0.5.3 (2026-01-10)
     51   * Bumps the ppad-sha256 and ppad-hmac-drbg dependencies.
     52 
     53 - 0.5.2 (2025-12-28)
     54   * Adds an explicit 64-bit architecture constraint.
     55   * Tests on GHC.10.3.
     56 
     57 - 0.5.1 (2025-12-27)
     58   * Improves the constant-time semantics in wNAF scalar multiplication,
     59     replacing "indexing via a constant-time selected value" by performing
     60     a full window scan and selecting via mask.
     61 
     62 - 0.5.0 (2025-12-21)
     63   * We get a significant upgrade to all functionality by pulling in the
     64     ppad-fixed library for large unsigned and Montgomery-form integers.
     65     Constant-time and allocation properties are made much more rigorous
     66     across the board, as we no longer depend on 'Integer' whatsoever.
     67 
     68     This version also improves performance radically throughout. A
     69     summary of the speedups achieved:
     70 
     71     sign_schnorr:   ~7.1x speedup
     72     verify_schnorr: ~4.5x speedup
     73     sign_ecdsa:     ~1.5x speedup
     74     verify_ecdsa:   ~4.5x speedup
     75 
     76 - 0.4.0 (2025-06-21)
     77   * Scalar multiplication, signing, verifying, and ECHD functions are now
     78     all total, returning 'Nothing' when supplied with invalid inputs.
     79   * Adds a group element check to 'mul_wnaf'.
     80 
     81 - 0.3.0 (2025-03-14)
     82   * Adds 'ecdh' for computing ECDH secrets, any given secret being the
     83     SHA256 hash of the x-coordinate of the appropriate secp256k1 point.
     84 
     85 - 0.2.2 (2025-02-16)
     86   * Exports the secp256k1 "point at infinity" as _CURVE_ZERO.
     87 
     88 - 0.2.1 (2024-12-18)
     89   * Adds 'serialize_point' for compressed-format serialization of
     90     secp256k1 points.
     91 
     92 - 0.2.0 (2024-11-08)
     93   * Adds wNAF ("w-ary non-adjacent form") scalar multiplication, as
     94     well as fast 'sign' and 'verify' variants for Schnorr and ECDSA
     95     (disambiguated by a trailing apostrophe) that make use of it.
     96 
     97     Each wNAF-powered function requires a 'Context' consisting of
     98     precomputed secp256k1 generator multiples; one can be gotten via
     99     'precompute'.
    100 
    101     Note that the non-wNAF-powered sign and verify functions have
    102     incurred a slight performance decrease (on the order of tens to
    103     hundreds of microseconds) as a result.
    104 
    105   * Adds 'parse_sig' for parsing compact signatures.
    106 
    107   * Adds a dependency on the 'primitive' library (already transitively required
    108     via 'ppad-hmac-drbg').
    109 
    110 - 0.1.0 (2024-10-19)
    111   * Initial release, supporting public key derivation and Schnorr &
    112     ECDSA signatures on secp256k1.
    113