csecp256k1

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

commit 5a2b86fca8e257a6faaf686830fcdb0ad1c4604b
parent 669ff15b24f7e5c736cafa9c2b9b2bb9e825594c
Author: Jared Tobin <jared@jtobin.io>
Date:   Wed, 28 Feb 2024 10:07:04 +0400

meta: docs, flake tweaks

Diffstat:
Mflake.nix | 2++
Mlib/Crypto/Secp256k1.hs | 40++++++++++++++--------------------------
Mppad-csecp256k1.cabal | 2+-
3 files changed, 17 insertions(+), 27 deletions(-)

diff --git a/flake.nix b/flake.nix @@ -31,6 +31,8 @@ defaultPackage = self.packages.${system}.${lib}; + hpkgs = hpkgs; + devShells.default = hpkgs.shellFor { packages = p: [ p.${lib} diff --git a/lib/Crypto/Secp256k1.hs b/lib/Crypto/Secp256k1.hs @@ -5,57 +5,45 @@ -- Module: Crypto.Secp256k1 -- Copyright: (c) 2024 Jared Tobin -- License: MIT --- -- Maintainer: Jared Tobin <jared@ppad.tech> --- Stability: stable --- Portability: portable -- --- Bindings to bitcoin-core/secp256k1, which provides digital signatures --- and other cryptographic primitives on the secp256k1 elliptic curve. +-- Bindings to bitcoin-core/secp256k1, a C library supporting digital +-- signatures and other cryptographic primitives on the secp256k1 +-- elliptic curve. -- -- This library exposes a minimal subset of functionality, primarily -- supporting ECDSA/Schnorr signatures and ECDH secret computation. module Crypto.Secp256k1 ( - -- exceptions - Secp256k1Exception(..) - - -- context - , Context + Context , wcontext , wrcontext - -- ec - , Pub - , derive_pub - , parse_pub - , serialize_pub - , serialize_pub_u - - -- ecdsa , Sig , sign + , sign_schnorr , verify + , verify_schnorr + , ecdh + , parse_der , serialize_der - -- ecdh - , ecdh - - -- extrakeys + , Pub + , derive_pub + , parse_pub + , serialize_pub + , serialize_pub_u , XOnlyPub , xonly , parse_xonly , serialize_xonly - , KeyPair , create_keypair , keypair_pub , keypair_sec - -- schnorr - , sign_schnorr - , verify_schnorr + , Secp256k1Exception(..) ) where import Control.Exception (Exception, bracket, throwIO) diff --git a/ppad-csecp256k1.cabal b/ppad-csecp256k1.cabal @@ -13,7 +13,7 @@ description: 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 functionality, primarily supporting ECDSA/Schnorr signatures and ECDH secret computation.