1226 Commits

Author SHA1 Message Date
Tim Ruffing
d373bf6d08
Merge bitcoin-core/secp256k1#1474: tests: restore scalar_mul test
3dbfb48946b9d2a98acef23674617510cf1b3386 tests: restore scalar_mul test (Jonas Nick)

Pull request description:

  Without this commit, the res[i][1] test vectors are unused. They were introduced to test the correctness of scalar_sqr(x) and scalar_mul(x, x). These tests were deleted as part of removing scalar_sqr in commit
  [5437e7bdfbffddf69fdf7b4af7e997c78f5dafbf](5437e7bdfb (diff-c2d5f1f7616875ab71cd41b053cfb428696988ff89642b931a0963d50f34f7e8L2195)).

  Discovered in https://github.com/bitcoin-core/secp256k1/discussions/1463 by Coding-Enthusiast (thanks!).

ACKs for top commit:
  real-or-random:
    utACK 3dbfb48946b9d2a98acef23674617510cf1b3386

Tree-SHA512: 914e08db3efaa1cef546a9730096e740478c422d41fedb2b71ec3a7ea962f81740a05dc7e7c1fb191088f6d38b5690479c7d0864ca8abf2b2e9c4334f03ca605
2024-01-04 17:48:36 +01:00
Jonas Nick
3dbfb48946
tests: restore scalar_mul test
Without this commit, the res[i][1] test vectors are unused. They were introduced
to test the correctness of scalar_sqr(x) and scalar_mul(x, x). These tests were
deleted as part of removing scalar_sqr in commit
5437e7bdfbffddf69fdf7b4af7e997c78f5dafbf.
2024-01-04 15:45:11 +00:00
shuoer86
d77170a88d
Fix typos 2024-01-03 20:03:07 +08:00
Coding Enthusiast
3928b7c383 doc: improve secp256k1_fe_set_b32_mod doc 2023-12-08 14:58:38 +03:30
Tim Ruffing
5e9a4d7aec
Merge bitcoin-core/secp256k1#990: Add comment on length checks when parsing ECDSA sigs
e02f313b1f251ccb363ae1ac24016d87c1be9009 Add comment on length checks when parsing ECDSA sigs (Tim Ruffing)

Pull request description:

  I claim the check can be removed but I don't want to touch this
  stable and well-tested code.

  On the way, we fix grammar in another comment.

ACKs for top commit:
  sipa:
    ACK e02f313b1f251ccb363ae1ac24016d87c1be9009
  RandyMcMillan:
    ACK e02f313

Tree-SHA512: f82691a8f5db82a1e9683e52ce8e952ebd56b476a2817c5a876ce4638254b7b4ac93175318fb59598ed5532f33433951d75afea03724ef4419c3e1bd12ca8c20
2023-12-07 09:26:38 +01:00
Pieter Wuille
04af0ba162 Replace ge_equals_ge[,j] calls with group.h equality calls 2023-12-01 16:10:20 -05:00
Pieter Wuille
60525f6c14 Add unit tests for group.h equality functions 2023-12-01 16:10:15 -05:00
Pieter Wuille
a47cd97d51 Add group.h ge/gej equality functions 2023-12-01 16:06:29 -05:00
Jonas Nick
10e6d29b60
Merge bitcoin-core/secp256k1#1446: field: Remove x86_64 asm
f07cead0ca96e26356466b635ce6e7fe3834c949 build: Don't call assembly an optimization (Tim Ruffing)
2f0762fa8fd30b457bc5dcf53403123212091df5 field: Remove x86_64 asm (Tim Ruffing)

Pull request description:

ACKs for top commit:
  sipa:
    utACK f07cead0ca96e26356466b635ce6e7fe3834c949
  theStack:
    ACK f07cead0ca96e26356466b635ce6e7fe3834c949
  jonasnick:
    ACK f07cead0ca96e26356466b635ce6e7fe3834c949

Tree-SHA512: df7f895ab8ab924c5f8f01c35d0cd2f65d5c947c5ab5325787d169c5b202834ab8aa5d85dedb25839fff3f518097fe8cf8e837d3c1918e5f039ddd6ddf4187da
2023-12-01 18:49:48 +00:00
Sebastian Falbesoner
bb4672342e remove VERIFY_SETUP define
This define was seemingly introduced for VERIFY mode code with side
effects (for setup purposes), that should just be executed without any
checks. The same can be achieved by putting it in an `#if VERIFY` block,
so we can remove it.
2023-12-01 01:36:32 +01:00
Sebastian Falbesoner
a3a3e11acd remove unneeded VERIFY_SETUP uses in ECMULT_CONST_TABLE_GET_GE macro
As the fields r->x and r->y are set immediately after (three lines
below), there is no need to clear them.
2023-12-01 01:36:32 +01:00
Sebastian Falbesoner
a0fb68a2e7 introduce and use SECP256K1_SCALAR_VERIFY macro
By providing an uppercase variant of these verification functions,
it is better visible that it is test code.
2023-12-01 01:36:29 +01:00
Sebastian Falbesoner
cf25c86d05 introduce and use SECP256K1_{FE,GE,GEJ}_VERIFY macros
By providing an uppercase variant of these verification functions, it is
better visible that it is test code and surrounding `#ifdef VERIFY`
blocks can be removed (if there is no other code around that could
remain in production mode), as they don't serve their purpose any more.

At some places intentional blank lines are inserted for grouping and
better readadbility.
2023-12-01 00:54:58 +01:00
Sebastian Falbesoner
5d89bc031b remove superfluous #ifdef VERIFY/#endif preprocessor conditions
Now that the `VERIFY_CHECK` compiles to empty in non-VERIFY mode, blocks
that only consist of these macros don't need surrounding `#ifdef VERIFY`
conditions anymore.

At some places intentional blank lines are inserted for grouping and
better readadbility.
2023-12-01 00:54:41 +01:00
Sebastian Falbesoner
c2688f8de9 redefine VERIFY_CHECK to empty in production (non-VERIFY) mode
As suggested in issue #1381, this will make things simpler and
improve code readability, as we don't need to force omitting of
evaluations on a case-by-case basis anymore and hence can remove
lots of `#ifdef VERIFY`/`#endif` lines (see next commit). Plus,
VERIFY_CHECK behaves now identical in both non-VERIFY and coverage mode,
making the latter not special anymore and hopefully decreasing
maintenance burden. The idea of "side-effect safety" is given up.

Note that at two places in the ellswift module void-casts of return
values have to be inserted for non-VERIFY builds, in order to avoid
   "variable ... set but not used [-Wunused-but-set-variable]"
warnings.
2023-12-01 00:22:40 +01:00
Tim Ruffing
5814d8485c
Merge bitcoin-core/secp256k1#1438: correct assertion for secp256k1_fe_mul_inner
dcdda31f2cda13839a4285d8601118c041b18c13 Tighten secp256k1_fe_mul_inner's VERIFY_BITS checks (Russell O'Connor)
8e2a5fe908faa2ad0b847b3e5c42662614c8fa88 correct assertion for secp256k1_fe_mul_inner (roconnor-blockstream)

Pull request description:

  Based on the surrounding asserts, 112 bits before this line, and 61 bits after this line, this assertion should be 113 bits.  Notably the commensurate line in secp256k1_fe_sqr_inner is correctly assert to be 113 bits.

ACKs for top commit:
  real-or-random:
    ACK dcdda31f2cda13839a4285d8601118c041b18c13 tested with asm disabled

Tree-SHA512: c35170e37d9a6d1413dd625032028129ab2eccee7da86697ab9641b68ad78efd7251953d51e7acaefd14888d3fd61877f9f05349c44f6fc0133ce9b3921b0e1a
2023-11-27 09:45:09 +01:00
Tim Ruffing
2f0762fa8f field: Remove x86_64 asm
Widely available versions of GCC and Clang beat our field asm on -O2.
In particular, GCC 10.5.0, which is Bitcoin Core's current compiler
for official x86_64 builds, produces code that is > 20% faster for
fe_mul and > 10% faster for signature verification (see #726).

These are the alternatives to this PR:

We could replace our current asm with the fastest compiler output
that we can find. This is potentially faster, but it has multiple
drawbacks:
 - It's more coding work because it needs detailed benchmarks (e.g.,
   with many compiler/options).
 - It's more review work because we need to deal with inline asm
   (including clobbers etc.) and there's a lack of experts reviewers
   in this area.
 - It's not unlikely that we'll fall behind again in a few compiler
   versions, and then we have to deal with this again, i.e., redo the
   benchmarks. Given our history here, I doubt that we'll revolve
   this timely.

We could change the default of the asm build option to off. But this
will also disable the scalar asm, which is still faster.

We could split the build option into two separate options for field
and scalar asm and only disable the field asm by default. But this
adds complexity to the build and to the test matrix.

My conclusion is that this PR gets the low-hanging fruit in terms of
performance. It simplifies our code significantly. It's clearly an
improvement, and it's very easy to review. Whether re-introducing
better asm (whether from a compiler or from CryptOpt) is worth the
hassle can be evaluated separately, and should not hold up this
improvement.

Solves #726.
2023-11-24 08:11:08 +01:00
Sebastian Falbesoner
1ddd76af0a bench: add --help option to bench_internal 2023-11-24 02:33:40 +01:00
Tim Ruffing
e72103932d
Merge bitcoin-core/secp256k1#1441: asm: add .note.GNU-stack section for non-exec stack
33dc7e4d3e1947af4c84c09ecc75ea2eeed3f7e0 asm: add .note.GNU-stack section for non-exec stack (fanquake)

Pull request description:

  With this in place, we no-longer see warnings like the following:
  ```bash
  /usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: warning: field_10x26_arm.o: missing .note.GNU-stack section implies executable stack
  /usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
  ```

  Should close #1434.

ACKs for top commit:
  sipa:
    utACK 33dc7e4d3e1947af4c84c09ecc75ea2eeed3f7e0
  real-or-random:
    utACK 33dc7e4d3e1947af4c84c09ecc75ea2eeed3f7e0

Tree-SHA512: f75ded8d971f54d1e871bcc4d815ba367b3e154eea2f18309ecaf9053e22f986bfffcf28418367f8055b65a5a0b245fee045adfcb63a2196df5e2f3aa6c97b89
2023-11-16 09:46:16 +01:00
Russell O'Connor
dcdda31f2c Tighten secp256k1_fe_mul_inner's VERIFY_BITS checks
These changes bring the checks to the same values used at the corresponding positions in secp256k1_fe_sqr_inner.
2023-11-14 12:07:00 -05:00
roconnor-blockstream
10271356c8
Return temporaries to being unsigned in secp256k1_fe_sqr_inner
These temporaries seem to been inadvertently changed to signed during a refactoring.  Generally, bit shifting is frowned upon for signed values.
2023-11-14 09:29:21 -05:00
fanquake
33dc7e4d3e
asm: add .note.GNU-stack section for non-exec stack
With this in place, we no-longer see warnings like the following:
```bash
/usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: warning: field_10x26_arm.o: missing .note.GNU-stack section implies executable stack
/usr/lib/gcc-cross/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
```

Should close #1434.
2023-11-13 14:49:35 +00:00
roconnor-blockstream
8e2a5fe908
correct assertion for secp256k1_fe_mul_inner
Based on the surrounding asserts, 112 bits before this line, and 61 bits after this line, this assertion should be 113 bits.  Notably the commensurate line in secp256k1_fe_sqr_inner is correctly assert to be 113 bits.
2023-11-06 17:40:17 -05:00
Pieter Wuille
21f49d9bec Remove unused secp256k1_scalar_shr_int 2023-11-04 15:55:12 -04:00
Pieter Wuille
115fdc7232 Remove unused secp256k1_wnaf_const 2023-11-04 15:55:12 -04:00
Jonas Nick
aa9f3a3c00 ecmult_const: add/improve tests
* add test case for a=infinity

  The corresponding ecmult_const branch was not tested before this commit.

* add test for edge cases
2023-11-04 15:55:12 -04:00
Pieter Wuille
4d16e90111 Signed-digit based ecmult_const algorithm 2023-11-04 15:55:12 -04:00
Pieter Wuille
ba523be067 make SECP256K1_SCALAR_CONST reduce modulo exhaustive group order 2023-11-04 15:54:08 -04:00
Pieter Wuille
2140da9cd5 Add secp256k1_scalar_half for halving scalars (+ tests/benchmarks).
Co-authored-by: Jonas Nick <jonasd.nick@gmail.com>
Co-authored-by: Tim Ruffing <crypto@timruffing.de>
2023-11-04 15:54:08 -04:00
Tim Ruffing
ee7aaf213e
Merge bitcoin-core/secp256k1#1395: tests: simplify random_fe_non_zero (remove loop limit and unneeded normalize)
c45b7c4fbbf41b011f138c465a58322a36664fd3 refactor: introduce testutil.h (deduplicate `random_fe_`, `ge_equals_` helpers) (Sebastian Falbesoner)
dc5514144fb9d412aa3845432b053ee06a27da37 tests: simplify `random_fe_non_zero` (remove loop limit and unneeded normalize) (Sebastian Falbesoner)

Pull request description:

  `random_fe_non_zero` contains a loop iteration limit that ensures that we abort if `random_fe` ever yielded zero more than ten times in a row. This construct was first introduced in PR #19 (commit 09ca4f32) for random non-square field elements and was later refactored into the non-zero helper in PR #25 (commit 6d6102fe). The copy-over to the exhaustive tests happened recently in PR #1118 (commit 0f864207).

  This case seems to be practically irrelevant and I'd argue for keeping things simple and removing it (which was already suggested in https://github.com/bitcoin-core/secp256k1/pull/1118#discussion_r1067259954); if there's really a worry that the test's random generator is heavily biased towards certain values or value ranges then there should consequently be checks at other places too (e.g. directly in `random_fe` for 256-bit values that repeatedly overflow, i.e. >= p).

  Also, the _fe_normalize call is not needed and can be removed, as the result of `random_fe` is already normalized.

ACKs for top commit:
  real-or-random:
    utACK c45b7c4fbbf41b011f138c465a58322a36664fd3
  siv2r:
    ACK `c45b7c4` (reviewed the changes and tests for both the commits passed locally).

Tree-SHA512: 4ffa66dd0b8392d7d0083a71e7b0682ad18f9261fd4ce8548c3059b497d3462db97e16114fded9787661ca447a877a27f5b996bd7d47e6f91c4454079d28a8ac
2023-09-14 15:06:41 +02:00
Hennadii Stepanov
9f005c60d6
cmake: Install libsecp256k1.pc file
This change allows downstream projects to use pkg-config to search for
the libsecp256k1 library that is built with CMake.
2023-09-07 20:47:57 +01:00
Jonas Nick
70303643cf
tests: add CHECK_ERROR_VOID and use it in scratch tests 2023-09-04 16:19:49 +00:00
Jonas Nick
f8d7ea68df
tests: Replace counting_illegal_callbacks with CHECK_ILLEGAL_VOID
This commit also explicitly initializes shortpubkey. For some reason, removing
surrounding, unrelated lines results in gcc warnings when configured with
--enable-ctime-tests=no --with-valgrind=no.
2023-09-04 16:19:40 +00:00
Jonas Nick
a1d52e3e12
tests: remove unnecessary test in run_ec_pubkey_parse_test
This test tested whether setting the callback works correctly which should be
tested in the context tests.
2023-09-04 12:52:19 +00:00
Jonas Nick
875b0ada25
tests: remove unnecessary set_illegal_callback 2023-09-04 12:50:32 +00:00
Tim Ruffing
0ba2b94551
Merge bitcoin-core/secp256k1#1373: Add invariant checking for scalars
d23da6d55714271c720fee58fbff5e5ef2fe193f use secp256k1_scalar_verify checks (stratospher)
c7d0454932b42a9728b55033c94e000b1dbbb6f2 add verification for scalars (stratospher)
ad152151b06a40aaf6cd90561356ff451996455d update max scalar in scalar_cmov_test and fix schnorrsig_verify exhaustive test (stratospher)

Pull request description:

  From #1360. This PR:
  1. adds `secp256k1_scalar_verify` to make sure scalars are reduced mod the group order in VERIFY mode
  2. uses `secp256k1_scalar_verify` in all the scalar functions except `secp256k1_scalar_clear`, `secp256k1_scalar_reduce_512`, `secp256k1_scalar_mul_512` and `secp256k1_scalar_*_var` functions in `scalar_low_impl.h`

ACKs for top commit:
  real-or-random:
    utACK d23da6d55714271c720fee58fbff5e5ef2fe193f
  theStack:
    Code-review ACK d23da6d55714271c720fee58fbff5e5ef2fe193f

Tree-SHA512: a371b319d948198c4038d35c9ea58f4b94de4dc312215e2b78a323c2acd4ae1355d97935c558b388774832d6d0058b97ff8ca50c3aab40b9ede5307760d0a505
2023-08-18 11:44:17 +02:00
Sebastian Falbesoner
c45b7c4fbb refactor: introduce testutil.h (deduplicate random_fe_, ge_equals_ helpers) 2023-08-17 19:44:00 +02:00
Sebastian Falbesoner
dc5514144f tests: simplify random_fe_non_zero (remove loop limit and unneeded normalize)
`random_fe_non_zero` contains a loop iteration limit that ensures that
we abort if `random_fe` ever yielded zero more than ten times in a row.
This construct was first introduced in PR #19 (commit 09ca4f32) for
random non-square field elements and was later refactored into the
non-zero helper in PR #25 (commit 6d6102fe). The copy-over to the
exhaustive tests happened recently in PR #1118 (commit 0f864207).

This case seems to be practically irrelevant and I'd argue for keeping
things simple and removing it; if there's really a worry that the test's
random generator is heavily biased towards certain values or value
ranges then there should consequently be checks at other places too
(e.g. directly in `random_fe` for 256-bit values that repeatedly
overflow, i.e. >= p).

Also, the _fe_normalize call is not needed and can be removed, as the
result of `random_fe` is already normalized.
2023-08-17 19:40:49 +02:00
Tim Ruffing
de657c2044
Merge bitcoin-core/secp256k1#1062: Removes _fe_equal_var, and unwanted _fe_normalize_weak calls (in tests)
54058d16feaa431520029335e2d56252859d3260 field: remove `secp256k1_fe_equal_var` (siv2r)
bb4efd6404960f9e8f93c15d7d001af068e5b5a4 tests: remove unwanted `secp256k1_fe_normalize_weak` call (siv2r)

Pull request description:

  Fixes #946 and #1061

  Changes:
  - removes unwanted `fe_normalize_weak` calls to the second argument of `fe_equal`
  - removes `fe_equal_var`

ACKs for top commit:
  real-or-random:
    utACK 54058d16feaa431520029335e2d56252859d3260
  jonasnick:
    ACK 54058d16feaa431520029335e2d56252859d3260

Tree-SHA512: 89bfd1c205f760d0736b995adebb96d15b0df0a42ece25885c57ae7f4318f6816eb009a7fe94b5987a4cbb8588f0fffbdc275234b406a2d1f80d7695b4bd89db
2023-08-17 18:25:22 +02:00
Tim Ruffing
5d8fa825e2
Merge bitcoin-core/secp256k1#1274: test: Silent noisy clang warnings about Valgrind code on macOS x86_64
747ada35877d4392c453b7c7249465fb382125ea test: Silent noisy clang warnings about Valgrind code on macOS x86_64 (Hennadii Stepanov)

Pull request description:

  Since #1206, on macOS x86_64 with Valgrind installed, clang emits a massive amount of `-Wreserved-identifier` and `-Wreserved-macro-identifier` warnings from the `valgrind/valgrind.h` and `valgrind/memcheck.h` headers.

  This PR prevents warnings emitted for the Valgrind code.

ACKs for top commit:
  real-or-random:
    utACK 747ada35877d4392c453b7c7249465fb382125ea

Tree-SHA512: dd1b2b9db2d471939fdc30f9d8fd106a12f21ec5008ca98d8ebe3087d7ea352d564e8bbd0cec59a004e084af3a84d4680cb81f2ef6fe13cf164b7691e33f437d
2023-08-16 19:04:31 +02:00
siv2r
54058d16fe field: remove secp256k1_fe_equal_var
`fe_equal_var` hits a fast path only when the inputs are unequal, which is
uncommon among its callers (public key parsing, ECDSA verify).
2023-08-16 17:39:25 +05:30
siv2r
bb4efd6404 tests: remove unwanted secp256k1_fe_normalize_weak call
It is not neccessary for the second argument in `secp256k1_fe_equal_var`
(or `secp256k1_fe_equal`) to have magnitude = 1.
Hence, removed the `secp256k1_fe_normalize_weak` call for those argument.
2023-08-16 17:38:04 +05:30
Tim Ruffing
eedd781085
Merge bitcoin-core/secp256k1#1348: tighten group magnitude limits, save normalize_weak calls in group add methods (revival of #1032)
b7c685e74adbd83937990e90f076600fabf8ccf0 Save _normalize_weak calls in group add methods (Peter Dettman)
c83afa66e0c324e42d13adff0e4f7db9b2868788 Tighten group magnitude limits (Peter Dettman)
173e8d061a8d1526f80d9ae79dd7f0371d38f7e0 Implement current magnitude assumptions (Peter Dettman)
49afd2f5d8c323d32a21f2fe182823b6d7704eb2 Take use of _fe_verify_magnitude in field_impl.h (Sebastian Falbesoner)
4e9661fc426c6068b2472f52a772c312bc26acc9 Add _fe_verify_magnitude (no-op unless VERIFY is enabled) (Peter Dettman)
690b0fc05abd76cb7f6bd87e88bf7b8b0fd1ab70 add missing group element invariant checks (Sebastian Falbesoner)

Pull request description:

  This PR picks up #1032 by peterdettman. It's essentially a rebase on master; the original first commit (09dbba561fdb9d57a2cc9842ce041d9ba29a6189) which introduced group verification methods has mostly been replaced by PR #1299 (commit f20266722ac93ca66d1beb0d2f2d2469b95aafea) and what remains now is only adding a few missing checks at some places. The remaining commits are unchanged, though some (easy-to-solve) conflicts appeared through cherry-picking. The last commit which actually removes the `normalize_weak` calls is obviously the critical one and needs the most attention for review.

ACKs for top commit:
  sipa:
    utACK b7c685e74adbd83937990e90f076600fabf8ccf0
  real-or-random:
    ACK b7c685e74adbd83937990e90f076600fabf8ccf0
  jonasnick:
    ACK b7c685e74adbd83937990e90f076600fabf8ccf0

Tree-SHA512: f15167eff7ef6ed971c726a4d738de9a15be95b0c947d7e38329e7b16656202b7113497d36625304e784866349f2293f6f1d8cb97df35393af9ea465a4156da3
2023-08-16 13:51:11 +02:00
Tim Ruffing
db32a24761 ctimetests: Use new SECP256K1_CHECKMEM macros also for ellswift 2023-08-15 19:13:09 +02:00
Sebastian Falbesoner
a1bd4971d6 refactor: take use of secp256k1_scalar_{zero,one} constants (part 2) 2023-08-01 02:40:21 +02:00
Peter Dettman
b7c685e74a Save _normalize_weak calls in group add methods
Also update the operations count comments in each of the affected
functions accordingly and remove a redundant VERIFY_CHECK in
secp256k1_gej_add_ge (the infinity value range check [0,1] is already
covered by secp256k1_gej_verify above).

Co-authored-by: Sebastian Falbesoner <sebastian.falbesoner@gmail.com>
Co-authored-by: Tim Ruffing <crypto@timruffing.de>
Co-authored-by: Jonas Nick <jonasd.nick@gmail.com>
2023-07-29 01:10:21 +02:00
Peter Dettman
c83afa66e0 Tighten group magnitude limits
- adjust test methods that randomize magnitudes

Co-authored-by: Sebastian Falbesoner <sebastian.falbesoner@gmail.com>
Co-authored-by: Jonas Nick <jonasd.nick@gmail.com>
2023-07-28 13:05:04 +02:00
stratospher
d23da6d557 use secp256k1_scalar_verify checks 2023-07-27 17:35:50 +05:30
stratospher
c7d0454932 add verification for scalars
secp256k1_scalar_verify checks that scalars are reduced mod the
group order
2023-07-27 14:03:59 +05:30
stratospher
ad152151b0 update max scalar in scalar_cmov_test and fix schnorrsig_verify exhaustive test
- `secp256k1_scalar_set_int` in scalar_low uses input mod EXHAUSTIVE_TEST_ORDER
- directly store s in sig64 without reducing it mod the group order for testing
2023-07-27 11:59:33 +05:30