secp256k1

Pure Haskell cryptographic primitives on the secp256k1 elliptic curve.
git clone git://git.ppad.tech/secp256k1.git
Log | Files | Refs | LICENSE

commit 61fc95a536d79d37f4a05e114d4440ec3c388ace
parent 5fa9baac3bf659987fe41dfe36e2ef1de9b6fe98
Author: Jared Tobin <jared@jtobin.io>
Date:   Fri, 11 Oct 2024 14:10:28 +0400

lib: inline pragmas

Diffstat:
Mlib/Crypto/Curve/Secp256k1.hs | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/Crypto/Curve/Secp256k1.hs b/lib/Crypto/Curve/Secp256k1.hs @@ -50,8 +50,6 @@ import GHC.Natural import qualified GHC.Num.Integer as I import Prelude hiding (mod) --- XX RFC 6979 uses Q whereas SEC1-v2 uses N for group order - -- keystroke savers & other utilities ----------------------------------------- fi :: (Integral a, Num b) => a -> b @@ -66,7 +64,7 @@ modinv a m = case I.integerRecipMod# a m of (# | _ #) -> Nothing {-# INLINE modinv #-} --- coordinate systems --------------------------------------------------------- +-- coordinate systems & transformations --------------------------------------- -- curve point, affine coordinates data Affine = Affine !Integer !Integer @@ -182,10 +180,12 @@ modQ a = I.integerMod a _CURVE_Q -- | Is field element? fe :: Integer -> Bool fe n = 0 < n && n < _CURVE_P +{-# INLINE fe #-} -- | Is group element? ge :: Integer -> Bool ge n = 0 < n && n < _CURVE_Q +{-# INLINE ge #-} -- | Square root (Shanks-Tonelli) modulo secp256k1 field prime. --