csecp256k1

secp256k1 bindings.
Log | Files | Refs | README | LICENSE

commit dce0fbb94dd6f775ffe0a9e94be366b9d5256e00
parent 5f6fe8ddd9ce34760f1697548956af1b23ffbca0
Author: Jared Tobin <jared@jtobin.io>
Date:   Tue, 27 Feb 2024 11:16:24 +0400

docs: adds readme, misc fixes

Diffstat:
AREADME.md | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
Mlib/Crypto/Secp256k1.hs | 3+++
Mppad-csecp256k1.cabal | 2+-
3 files changed, 57 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md @@ -0,0 +1,53 @@ +# csecp256k1 + +Bindings to bitcoin-core/secp256k1, which provides digital signatures +and other cryptographic primitives on the secp256k1 elliptic curve. + +This library exposes a minimal subset of the underlying library, mainly +supporting ECDSA/Schnorr signatures and ECDH secret computation, as well +as utilities for public key manipulation. + +## Documentation + +API documentation and examples are hosted at +[docs.ppad.tech/csecp256k1][hadoc]. + +## Development + +You'll require [Nix][nixos] with [flake][flake] support enabled. Enter a +development shell with: + +``` +$ nix develop +``` + +Then you can do e.g.: + +``` +$ cabal repl ppad-csecp256k1 +``` + +to get a REPL for the main library, or: + +``` +$ cabal repl secp256k1-sys-tests +``` + +to get one for the internal test suite. You can run all tests via: + +``` +$ cabal test +``` + +## Security + +These bindings aim at the maximum security achievable in a +garbage-collected language under an optimizing compiler such as GHC, in +which strict constant-timeness can be challenging to achieve. + +If you discover any vulnerabilities, please disclose them via +security@ppad.tech. + +[nixos]: https://nixos.org/ +[flake]: https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake.html +[hadoc]: https://docs.ppad.tech/csecp256k1 diff --git a/lib/Crypto/Secp256k1.hs b/lib/Crypto/Secp256k1.hs @@ -162,6 +162,9 @@ wcontext = bracket create destroy where -- context with the provided entropy before executing the supplied -- continuation. -- +-- Use this function to execute computations that may benefit from +-- additional side-channel attack protection. +-- -- You must supply at least 32 bytes of entropy; any less will result -- in an InsufficientEntropy exception. -- diff --git a/ppad-csecp256k1.cabal b/ppad-csecp256k1.cabal @@ -9,7 +9,7 @@ maintainer: jared@ppad.tech category: Cryptography build-type: Simple tested-with: GHC == 9.6.4 -description: bitcoin-core/secp256k1 bindings. +description: Bindings to bitcoin-core/secp256k1, which provides digital signatures and other cryptographic primitives on the secp256k1 elliptic curve.