fixed

Pure Haskell large fixed-width integers.
git clone git://git.ppad.tech/fixed.git
Log | Files | Refs | README | LICENSE

commit 7972c600d5570b586cd1bf95d19ca0060f3ccf33
parent 03473e407d0150cdc7991a5db2e3bf8e6c51c4c3
Author: Jared Tobin <jared@jtobin.io>
Date:   Sat, 22 Nov 2025 08:28:36 +0400

lib: add montgomery zeros

Diffstat:
Mlib/Numeric/Montgomery/Secp256k1/Curve.hs | 3+++
Mlib/Numeric/Montgomery/Secp256k1/Scalar.hs | 3+++
2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/lib/Numeric/Montgomery/Secp256k1/Curve.hs b/lib/Numeric/Montgomery/Secp256k1/Curve.hs @@ -373,6 +373,9 @@ sqr (Montgomery a) = Montgomery (mul# a a) one :: Montgomery one = Montgomery (# 0x1000003D1##, 0##, 0##, 0## #) +zero :: Montgomery +zero = Montgomery (# 0##, 0##, 0##, 0## #) + -- generated by etc/generate_inv.sh inv# :: (# Word#, Word#, Word#, Word# #) diff --git a/lib/Numeric/Montgomery/Secp256k1/Scalar.hs b/lib/Numeric/Montgomery/Secp256k1/Scalar.hs @@ -375,6 +375,9 @@ one :: Montgomery one = Montgomery (# 0x402DA1732FC9BEBF##, 0x4551231950B75FC4## , 0x0000000000000001##, 0x0000000000000000## #) +zero :: Montgomery +zero = Montgomery (# 0##, 0##, 0##, 0## #) + -- generated by etc/generate_inv.sh inv# :: (# Word#, Word#, Word#, Word# #)