3440 Commits

Author SHA1 Message Date
Sebastian Falbesoner
7454a53736 README: mention ellswift module
Co-authored-by: Tim Ruffing <crypto@timruffing.de>
2024-06-24 12:49:01 +02:00
Hennadii Stepanov
4706be2cd0 cmake: Reimplement SECP256K1_APPEND_CFLAGS using Bitcoin Core approach 2024-06-21 16:14:05 +01:00
Hennadii Stepanov
c2764dbb99 cmake: Rename SECP256K1_LATE_CFLAGS to SECP256K1_APPEND_CFLAGS
This change follows the naming convention currently used in the Bitcoin
Core's CMake staging branch.
2024-06-21 14:46:42 +01:00
Hennadii Stepanov
f87a3589f4 cmake: Do not set CTEST_TEST_TARGET_ALIAS
An alias for the "test" target can be confusing for the downstream
project. So remove it.
2024-06-20 21:16:30 +01:00
Andrew Poelstra
6152622613 Merge ElementsProject/secp256k1-zkp#295: rangeproof: add unit test for malleating single-value proofs
3a1c39625e rangeproof: add unit test for malleating single-value proofs (Andrew Poelstra)

Pull request description:

  I was a bit confused reading `secp256k1_rangeproof_getheader_impl` because in the case of single-value proofs (`has_nz_range == 0`) some bits of the header are unconstrained. At first I thought this was a malleability vector. And I think I've had this same confusion in the past.

  But in fact it is not a malleability vector because the whole header gets hashed into the proof.

  Add a unit test to confirm this to reduce future confusion.

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

Tree-SHA512: 9670cd04fcc0bb322d89c2c86ef863e13c29e4477dc6fecdda16b9a745e42a84f237a7ec387b3291f334e2a5c5806a8cc7cc00e40246ad5b36366be841195b4b
2024-06-20 13:18:07 +00:00
Andrew Poelstra
3a1c39625e rangeproof: add unit test for malleating single-value proofs
I was a bit confused reading `secp256k1_rangeproof_getheader_impl`
because in the case of single-value proofs (`has_nz_range == 0`) some
bits of the header are unconstrained. At first I thought this was a
malleability vector. And I think I've had this same confusion in the
past.

But in fact it is not a malleability vector because the whole header
gets hashed into the proof.

Add a unit test to confirm this to reduce future confusion.
2024-06-19 15:27:06 +00:00
Hennadii Stepanov
158f9e5eae cmake: Do not modify build types when integrating by downstream project
The `CMAKE_BUILD_TYPE` and `CMAKE_CONFIGURATION_TYPES` variables must be
managed by the downstream project.

Suggesting to review with `git diff -w`.
2024-06-18 15:46:03 +01:00
merge-script
35c0fdc86b Merge bitcoin-core/secp256k1#1529: cmake: Fix cache issue when integrating by downstream project
ec4c002faa cmake: Simplify `PROJECT_IS_TOP_LEVEL` emulation (Hennadii Stepanov)
cae9a7ad14 cmake: Do not set emulated PROJECT_IS_TOP_LEVEL as cache variable (Hennadii Stepanov)

Pull request description:

  As CMake's cache is a global database, modifying it within a project integrated with the `add_subdirectory()` command, which may also include using the `FetchContent` module, could potentially affect downstream projects and sibling ones.

ACKs for top commit:
  real-or-random:
    utACK ec4c002faa
  theuni:
    utACK ec4c002faa

Tree-SHA512: de2c8c583367028d06701f79fc5232b351622c8496d196aad8c22a1ec4e450af53e556a4f6526ed47250f818143a69a12f5fc8cc755c864510e67530dacde66e
2024-06-12 17:02:17 +02:00
merge-script
4392f0f717 Merge bitcoin-core/secp256k1#1533: tests: refactor: tidy up util functions (#1491)
e73f6f8fd9 tests: refactor: drop `secp256k1_` prefix from testrand.h functions (Sebastian Falbesoner)
0ee7453a99 tests: refactor: add `testutil_` prefix to testutil.h functions (Sebastian Falbesoner)
0c6bc76dcd tests: refactor: move `random_` helpers from tests.c to testutil.h (Sebastian Falbesoner)
0fef8479be tests: refactor: rename `random_field_element_magnitude` -> `random_fe_magnitude` (Sebastian Falbesoner)
59db007f0f tests: refactor: rename `random_group_element_...` -> `random_ge_...` (Sebastian Falbesoner)

Pull request description:

  This PR is an attempt at tidying up test util functions, as suggested in #1491. The following changes are done:
  * rename `_group_element...` functions to `_ge...`
  * rename `_field_element...` functions to `_fe...`
  * move `random_` helpers from tests.c to testutil.h (the alternative would be testrand.h, but to my understanding, this one is meant to contain the actual RNG implementation rather than helpers using it; happy to move the helpers there if that is preferred though)
  * prefix testutil.h functions with `testutil_`
  * prefix testrand.h functions with `testrand_` (this is currently done in a sloppy way by simply dropping the `secp256k1_` prefix, so some functions don't have the full prefix, like e.g. `testrand256`; naming suggestions welcome)

ACKs for top commit:
  sipa:
    utACK e73f6f8fd9
  real-or-random:
    utACK e73f6f8fd9

Tree-SHA512: c87a35a9f7f23d4bbb87a1ff0d40dd5fbd7d976719ca1027cad187ac44aa2db3ae887ac620639d2287c260e701a5963830b52048692d3e6b38b5eb6cdf17b854
2024-06-12 17:01:26 +02:00
merge-script
bedffd53d8 Merge bitcoin-core/secp256k1#1488: ci: Add native macOS arm64 job
218f0cc93b ci: Add native macOS arm64 job (Hennadii Stepanov)

Pull request description:

  This PR starts using the [new](https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/) M1 macOS runner.

  The alternative approach might be using a matrix, but it is not trivial to implement.

ACKs for top commit:
  real-or-random:
    ACK 218f0cc93b

Tree-SHA512: 709e836909fa2a90248f689f4c57192d1daecc53abd3d2d1b8b892a7deb6fdd008bf8f7270ab39da5b0f994d0ea4cf0767dab3a07c6dfc2109a9735af1072f3f
2024-06-10 18:11:12 +02:00
merge-script
4b8d5eeacf Merge bitcoin-core/secp256k1#1532: cmake: Disable eager MSan in ctime_tests
f55703ba49 autotools: Delete unneeded compiler test (Hennadii Stepanov)
396e885886 autotools: Align MSan checking code with CMake's implementation (Hennadii Stepanov)
abde59f52d cmake: Report more compiler details in summary (Hennadii Stepanov)
7abf979a43 cmake: Disable `ctime_tests` if build with `-fsanitize=memory` (Hennadii Stepanov)

Pull request description:

  Same as https://github.com/bitcoin-core/secp256k1/pull/1517, but for the CMakle build system.

  The second commit improves the configure summary (similar to https://github.com/hebasto/bitcoin/pull/189.

ACKs for top commit:
  real-or-random:
    ACK f55703ba49

Tree-SHA512: 18190c062ae6e27d0ecbe7460cc22c960b25c0d35aa4b94f151d4b1c48f16e99fd5ecdfcb359784f95995292633d30d3d23b75a12be3aca5afffcc1e7e7daf31
2024-06-10 18:07:13 +02:00
Hennadii Stepanov
f55703ba49 autotools: Delete unneeded compiler test
This change makes both Autotools and CMake build systems consistent.
2024-05-28 09:47:00 +01:00
Hennadii Stepanov
396e885886 autotools: Align MSan checking code with CMake's implementation 2024-05-28 09:44:47 +01:00
Hennadii Stepanov
abde59f52d cmake: Report more compiler details in summary 2024-05-28 09:37:01 +01:00
Hennadii Stepanov
7abf979a43 cmake: Disable ctime_tests if build with -fsanitize=memory
Clang >= 16 has `-fsanitize-memory-param-retval` turned on by default,
which is incompatible with
2024-05-28 09:37:00 +01:00
Hennadii Stepanov
4d9645bee0 cmake: Remove "AUTO" value of SECP256K1_ECMULT_GEN_KB option
"AUTO" implies that a value is being chosen based on build system
introspection or host system capabilities. However, for the
`SECP256K1_ECMULT_GEN_KB` option, the value "AUTO" is hardcoded, which
might lead to confusion.

This change replaces "AUTO" with a more appropriate default value.
2024-05-27 13:32:23 +01:00
Hennadii Stepanov
a06805ee74 cmake: Remove "AUTO" value of SECP256K1_ECMULT_WINDOW_SIZE option
"AUTO" implies that a value is being chosen based on build system
introspection or host system capabilities. However, for the
`SECP256K1_ECMULT_WINDOW_SIZE` option, the value "AUTO" is hardcoded,
which might lead to confusion.

This change replaces "AUTO" with a more appropriate default value.
2024-05-27 13:28:48 +01:00
merge-script
1791f6fce4 Merge bitcoin-core/secp256k1#1517: autotools: Disable eager MSan in ctime_tests
ebfb82ee2f ci: Add job with -fsanitize-memory-param-retval (Tim Ruffing)
e1bef0961c configure: Move "experimental" warning to bottom (Tim Ruffing)
55e5d975db autotools: Disable eager MSan in ctime_tests (Tim Ruffing)

Pull request description:

  This is the autotools solution for #1516.

  Alternatively, we could have a full-blown `--enable-msan` option, but it's more work, and I'm not convinced that it's necessary or at least much better.

  hebasto If you're Concept ACK, are you willing to work on an equivalent PR for CMake?

ACKs for top commit:
  hebasto:
    ACK ebfb82ee2f, tested on Ubuntu 24.04 with different clang versions (from 15 to 18) and different build configurations. CI changes look OK as well.

Tree-SHA512: c083d778fd50bd35c2e29b7fe0d92b98d912ee5ac7809ae73067d050a0d3c42b3483260f1286d0023cdb802a3c3006bf932ecf60ce81b942de1c9824374c0132
2024-05-27 14:14:04 +02:00
Hennadii Stepanov
26b94ee92a autotools: Remove "auto" value of --with-ecmult-gen-kb option
"auto" implies that a value is being chosen based on build system
introspection or host system capabilities. However, for the
`--with-ecmult-gen-kb` option, the value "auto" is hardcoded, which
might lead to confusion.

This change replaces "auto" with a more appropriate default value.
2024-05-27 10:57:30 +01:00
Hennadii Stepanov
122dbaeb37 autotools: Remove "auto" value of --with-ecmult-window option
"auto" implies that a value is being chosen based on build system
introspection or host system capabilities. However, for the
`--with-ecmult-window` option, the value "auto" is hardcoded, which
might lead to confusion.

This change replaces "auto" with a more appropriate default value.
2024-05-27 10:56:37 +01:00
Sebastian Falbesoner
e73f6f8fd9 tests: refactor: drop secp256k1_ prefix from testrand.h functions
The rename was done with the following command:

$ sed -i 's/secp256k1_testrand/testrand/g' $(git grep -l secp256k1_testrand)
2024-05-27 03:29:36 +02:00
Sebastian Falbesoner
0ee7453a99 tests: refactor: add testutil_ prefix to testutil.h functions 2024-05-27 03:29:32 +02:00
Sebastian Falbesoner
0c6bc76dcd tests: refactor: move random_ helpers from tests.c to testutil.h
Can be reviewed via `--color-moved=dimmed-zebra`.
2024-05-27 03:09:11 +02:00
Sebastian Falbesoner
0fef8479be tests: refactor: rename random_field_element_magnitude -> random_fe_magnitude
Note that the already existing function `random_fe_magnitude` is removed
and the call-sites are adapted to pass the magnitude range of 8
(the maximum for secp256k1_fe_mul and secp256k1_fe_sqr) explicitly.
2024-05-27 03:09:11 +02:00
Sebastian Falbesoner
59db007f0f tests: refactor: rename random_group_element_... -> random_ge_...
The rename was done with the following command:

$ sed -i 's/random_group_element_/random_ge_/g' $(git grep -l random_group_element_)
2024-05-27 03:09:04 +02:00
Tim Ruffing
ebfb82ee2f ci: Add job with -fsanitize-memory-param-retval 2024-05-26 14:01:14 +02:00
Tim Ruffing
e1bef0961c configure: Move "experimental" warning to bottom
to make it more promiment
2024-05-26 14:01:14 +02:00
Tim Ruffing
55e5d975db autotools: Disable eager MSan in ctime_tests
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2024-05-26 14:01:14 +02:00
Jonas Nick
168377204d Merge elementsproject/secp256k1-zkp#294: generator: massively speed up serialization
6361266013 generator: speed up parsing (Andrew Poelstra)
5e7c2c178d generator: massively speed up serialization (Andrew Poelstra)

Pull request description:

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

Tree-SHA512: 9f35467ac9d39d23b68a3f830c920f61ae39d99974d6a864df4a3c19860dc8fc447609d0480e45234c66250878d34da03bfcf0056eaa83d3c78babb254962bf4
2024-05-22 11:55:07 +00:00
Andrew Poelstra
6361266013 generator: speed up parsing
Similar to speeding up serialization; in our parsing logic we did a
bunch of expensive stuff then expensively inverted it. Drop everything
except the essential checks and then memcpy.
2024-05-21 13:32:12 +00:00
Andrew Poelstra
5e7c2c178d generator: massively speed up serialization
`secp256k1_pedersen_commit_serialize` would call `_load` (which does a
sqrt to fully decompress the key, then a conditional negation based on
the flag), then check the Jacobian symbol of the resulting y-coordinate,
then re-serialize based on this.

Instead, don't do any of this stuff. Copy the flag directly out of the
internal representation and copy the x-coordinate directly out of the
internal representation.

Checked that none of the other _serialize methods in the modules do
this.

Fixes #293
2024-05-20 12:40:02 +00:00
Tim Ruffing
06bff6dec8 Merge bitcoin-core/secp256k1#1528: tests: call secp256k1_ecmult_multi_var with a non-NULL error callback
9554362b15 tests: call secp256k1_ecmult_multi_var with a non-NULL error callback (Nicolas Iooss)

Pull request description:

  Hello,
  This Pull Request fixes the issue reported in https://github.com/bitcoin-core/secp256k1/issues/1527. Function `secp256k1_ecmult_multi_var` expects to be called with a non-`NULL` `error_callback` parameter. Fix the invocation in `test_ecmult_accumulate` to do this. While at it, wrap the call in a `CHECK` macro to ensure it succeeds.

ACKs for top commit:
  real-or-random:
    utACK 9554362b15
  siv2r:
    ACK 9554362, I have also verified that other invocations of `ecmult_multi_var` (in tests) don’t use `NULL` for the error callback function argument.

Tree-SHA512: 6a9f6c10c575794da75f2254d6fbbc195de889c81a371ce35ab38e2e5483aa1e25ec0bcd5aa8d6a32a1493586f73430208a4bd0613e373571d2f04d63dbc4a1c
2024-05-13 16:06:55 +02:00
Hennadii Stepanov
ec4c002faa cmake: Simplify PROJECT_IS_TOP_LEVEL emulation
Detecting whether it is the top level by comparing the value of
`CMAKE_SOURCE_DIR` with `CMAKE_CURRENT_SOURCE_DIR` is supported by all
versions of CMake and is a very common pattern.
2024-05-11 11:13:41 +01:00
Hennadii Stepanov
cae9a7ad14 cmake: Do not set emulated PROJECT_IS_TOP_LEVEL as cache variable
Otherwise, downstream projects, which integrate the libsecp256k1 library
using the `add_subdirectory()` command, will be affected.
2024-05-11 11:05:12 +01:00
Tim Ruffing
4155e62fcc Merge bitcoin-core/secp256k1#1526: cmake: Fix check_arm32_assembly when using as subproject
9f4c8cd730 cmake: Fix `check_arm32_assembly` when using as subproject (Hennadii Stepanov)

Pull request description:

  When integrating libsecpk1 in a downstream project like this:
  ```cmake
  set(SECP256K1_ASM arm32 CACHE STRING "" FORCE)
  add_subdirectory(src/secp256k1)
  ```
  it fails to configure:
  ```
  CMake Error at /home/hebasto/git/bitcoin/build/check_arm32_assembly/CMakeFiles/CMakeTmp/CMakeLists.txt:21 (target_sources):
    Cannot find source file:

      /home/hebasto/git/bitcoin/cmake/source_arm32.s

  CMake Error at /home/hebasto/git/bitcoin/build/check_arm32_assembly/CMakeFiles/CMakeTmp/CMakeLists.txt:20 (add_executable):
    No SOURCES given to target: cmTC_d0f0b

  CMake Error at src/secp256k1/cmake/CheckArm32Assembly.cmake:2 (try_compile):
    Failed to generate test project build system.
  Call Stack (most recent call first):
    src/secp256k1/CMakeLists.txt:127 (check_arm32_assembly)

  ```

  This PR fixes this issue, which was overlooked in https://github.com/bitcoin-core/secp256k1/pull/1304.

ACKs for top commit:
  real-or-random:
    utACK 9f4c8cd730
  theuni:
    utACK 9f4c8cd730

Tree-SHA512: 47d97ad0fb2e3779523c2111ea75906671a0fb3f50646e29dee195f53106ace69af5e4abc92c765f0eee6973528ce9195b94377d0157209230c958894d4049fb
2024-05-09 09:51:58 +02:00
Nicolas Iooss
9554362b15 tests: call secp256k1_ecmult_multi_var with a non-NULL error callback
Function secp256k1_ecmult_multi_var expects to be called with a non-NULL
error_callback parameter. Fix the invocation in test_ecmult_accumulate
to do this.

While at it, wrap the call in a CHECK macro to ensure it succeeds.

Fixes: https://github.com/bitcoin-core/secp256k1/issues/1527
2024-05-08 19:13:35 +02:00
Tim Ruffing
d661a93cc9 Merge BlockstreamResearch/secp256k1-zkp#292: doc: fix sage code for deriving alternative generator H
7040a20247 doc: fix sage code for deriving alternative generator H (Sebastian Falbesoner)

Pull request description:

  The line calculating H (in particular, the expression `G.decode('hex')`) fails with the following error message on Sage 9.5:

  ```
  AttributeError: 'str' object has no attribute 'decode'
  ```

  Fix that by converting the hex-string to bytes using `bytes.fromhex`.

  (Noticed while reviewing https://github.com/bitcoin/bitcoin/pull/30048 which picks this code snippet comment up.)

ACKs for top commit:
  josibake:
    ACK 7040a20247
  real-or-random:
    utACK 7040a20247

Tree-SHA512: 0a44f399b103c2f5840056d163c1483a1d4f032bc0f8d3822507ac6da9d567f46e36caa79c7f5016aebcc8827b79e9aec7ebdb4f21c3c0242dc6875be140f289
2024-05-08 12:20:56 +02:00
Sebastian Falbesoner
7040a20247 doc: fix sage code for deriving alternative generator H
The expression `G.decode('hex')` fails with the following error message
on Sage 9.5:

AttributeError: 'str' object has no attribute 'decode'

Fix that by converting the hex-string to bytes using `bytes.fromhex`.
2024-05-07 19:38:51 +02:00
Hennadii Stepanov
9f4c8cd730 cmake: Fix check_arm32_assembly when using as subproject 2024-05-07 12:29:25 +01:00
Tim Ruffing
7712a53061 Merge bitcoin-core/secp256k1#1524: check-abi: explicitly provide public headers
dd695563e6 check-abi: explicitly provide public headers (Jonas Nick)

Pull request description:

  Without this commit, the check-abi shell script outputs false positives because it consider some headers public that are actually not public.

ACKs for top commit:
  real-or-random:
    ACK dd695563e6
  hebasto:
    ACK dd695563e6, tested on Ubuntu 24.04.

Tree-SHA512: b26e61639061f5fbbdd47569ba04f91c627feeefc43ec3d529a3ac4012ab6487aa1904bd38100ed190dcaebdffe60895a8c99346720d5dee84a0c457ec3b6f94
2024-05-07 10:35:52 +02:00
Tim Ruffing
7d0bc0870f Merge bitcoin-core/secp256k1#1525: changelog: Correct 0.5.0 release date
d45d9b74bb changelog: Correct 0.5.0 release date (Tim Ruffing)

Pull request description:

ACKs for top commit:
  sipa:
    ACK d45d9b74bb

Tree-SHA512: 45f59cd23f5ac25bd4d9cde42aea19600cdc86a4ee98ae829c1a9c8235479792c0e5bc56d470afcf6a54cf7d57d29501fb57349aa7606ae896ca10bfaf38790b
2024-05-06 19:29:57 +02:00
Tim Ruffing
d45d9b74bb changelog: Correct 0.5.0 release date 2024-05-06 19:22:16 +02:00
Jonas Nick
d7f6613dbb Merge bitcoin-core/secp256k1#1523: release cleanup: bump version after 0.5.0
2f05e2da4b release cleanup: bump version after 0.5.0 (Tim Ruffing)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 2f05e2da4b

Tree-SHA512: 30e1e990b9f9b55b07895332ce46e3e12b92e5646120b504e04c8f5f88be6546c5d031ee11db8ef8226c8aacffcbaa83f96f415cc7137c4535f397a12c06bd0c
2024-05-06 17:13:29 +00:00
Tim Ruffing
2f05e2da4b release cleanup: bump version after 0.5.0 2024-05-06 19:02:57 +02:00
Jonas Nick
e3a885d42a Merge bitcoin-core/secp256k1#1522: release: prepare for 0.5.0
c0e4ec3fee release: prepare for 0.5.0 (Tim Ruffing)

Pull request description:

ACKs for top commit:
  sipa:
    ACK c0e4ec3fee
  jonasnick:
    ACK c0e4ec3fee

Tree-SHA512: f683d084e3f3edf13892df46a869ae9a62d4e165d08aad224b352b3f6f33bc30b1e596457bfad8c411900bf334d43d6f160889acf97dca88fea2b1d88688990a
2024-05-06 16:56:12 +00:00
Jonas Nick
dd695563e6 check-abi: explicitly provide public headers
Without this commit, the check-abi shell script outputs false positives because
it consider some headers public that are actually not public.
2024-05-06 16:28:01 +00:00
Tim Ruffing
c0e4ec3fee release: prepare for 0.5.0 2024-05-06 17:59:34 +02:00
Pieter Wuille
bb528cfb08 Merge bitcoin-core/secp256k1#1518: Add secp256k1_pubkey_sort
7d2591ce12 Add secp256k1_pubkey_sort (Jonas Nick)

Pull request description:

  This PR adds a  `secp256k1_pubkey_sort` function the the public API which was originally part of the musig PR (#1479). However, I opened a separate PR because it adds internal functions that are also used by the WIP silent payments module.

ACKs for top commit:
  sipa:
    ACK 7d2591ce12
  josibake:
    ACK 7d2591ce12
  real-or-random:
    ACK 7d2591ce12

Tree-SHA512: d0e4464dc9cd4bdb35cc5d9bb4c37a7b71233328319165d49bc940d8d3394a2d74a43d2f73ee7bfe8f3f90a466ee8afcdca75cfbbf3969e218d76b89f4af55fb
2024-05-06 11:18:26 -04:00
Jonas Nick
7d2591ce12 Add secp256k1_pubkey_sort
Co-authored-by: Tim Ruffing <crypto@timruffing.de>
Co-authored-by: Russell O'Connor <roconnor@blockstream.io>
2024-04-25 20:23:31 +00:00
Jonas Nick
da515074e3 Merge bitcoin-core/secp256k1#1058: Signed-digit multi-comb ecmult_gen algorithm
4c341f89ab Add changelog entry for SDMC (Pieter Wuille)
a043940253 Permit COMB_BITS < 256 for exhaustive tests (Pieter Wuille)
39b2f2a321 Add test case for ecmult_gen recoded = {-1,0,1} (Pieter Wuille)
644e86de9a Reintroduce projective blinding (Pieter Wuille)
07810d9abb Reduce side channels from single-bit reads (Peter Dettman)
a0d32b597d Optimization: use Nx32 representation for recoded bits (Peter Dettman)
e03dcc44b5 Make secp256k1_scalar_get_bits support 32-bit reads (Pieter Wuille)
5005abee60 Rename scalar_get_bits -> scalar_get_bits_limb32; return uint32_t (Pieter Wuille)
6247f485b6 Optimization: avoid unnecessary doublings in precomputation (Peter Dettman)
15d0cca2a6 Optimization: first table lookup needs no point addition (Pieter Wuille)
7a33db35cd Optimization: move (2^COMB_BITS-1)/2 term into ctx->scalar_offset (Pieter Wuille)
ed2a056f3d Provide 3 configurations accessible through ./configure (Pieter Wuille)
5f7be9f6a5 Always generate tables for current (blocks,teeth) config (Pieter Wuille)
fde1dfcd8d Signed-digit multi-comb ecmult_gen algorithm (Peter Dettman)
486518b350 Make exhaustive tests's scalar_inverse(&x,&x) work (Pieter Wuille)
ab45c3e089 Initial gej blinding -> final ge blinding (Pieter Wuille)
aa00a6b892 Introduce CEIL_DIV macro and use it (Tim Ruffing)

Pull request description:

ACKs for top commit:
  real-or-random:
    reACK 4c341f89ab
  jonasnick:
    ACK 4c341f89ab
  stratospher:
    ACK 4c341f8. Did [these benchmarks](https://github.com/bitcoin-core/secp256k1/pull/1058#issuecomment-1002807283) and saw a 12.4% on gcc 13.2.0 and 11.5% on clang 15.0.0. Also summarised how the precomputed table generation works [here](https://github.com/stratospher/blogosphere/blob/main/sdmc.md) for future me :)

Tree-SHA512: 9a11138e4fb98b98e85c82cd46ed78b29fbe63d6efe61654ef519a64b1e175d63395a8a931c1646f9df8c7daacd796d5fe2384899d5a13a2c7ed2ded696ceed5
2024-04-22 15:17:33 +00:00