2289 Commits

Author SHA1 Message Date
Tim Ruffing
374e2b54e2
Merge bitcoin-core/secp256k1#1290: cmake: Set ENVIRONMENT property for examples on Windows
175db31149fff4b3dc3d3dab021f289d7e98381c ci: Drop no longer needed `PATH` variable update on Windows (Hennadii Stepanov)
116d2ab3df630455f23a7b21f50237689879ecc0 cmake: Set `ENVIRONMENT` property for examples on Windows (Hennadii Stepanov)
cef373997c29c5e6077b9367c92812bcc99bc8bf cmake, refactor: Use helper function instead of interface library (Hennadii Stepanov)

Pull request description:

  This PR simplifies running examples on Windows, because the DLL must reside either in the same folder where the executable is or somewhere in PATH.

  It is an alternative to #1233.

ACKs for top commit:
  real-or-random:
    utACK 175db31149fff4b3dc3d3dab021f289d7e98381c

Tree-SHA512: 8188018589a5bcf0179647a039cdafcce661dc103a70a5bb9e6b6f680b899332ba30b1e9ef5dad2a8c22c315d7794747e49d8cf2e391eebea21e3d8505ee334b
2023-08-03 15:15:03 +02:00
Jonas Nick
1b13415df9
Merge bitcoin-core/secp256k1#1391: refactor: take use of secp256k1_scalar_{zero,one} constants (part 2)
a1bd4971d6c6113f140143275141adb336fc3702 refactor: take use of `secp256k1_scalar_{zero,one}` constants (part 2) (Sebastian Falbesoner)

Pull request description:

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

Tree-SHA512: 09ef6d9be1d3f9c19f8fe4614fe629de5c45197027e0e3f9dd8d4679a510a7b57f8aa499707a6daf652041f255c87316c9883bf7cf9a08bd41a3651bff54299e
2023-08-03 09:41:58 +00: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
Tim Ruffing
26392da2fb
Merge bitcoin-core/secp256k1#1386: ci: print $ELLSWIFT in cirrus.sh
4692478853df2149375d1447908a792fcf240fbf ci: print $ELLSWIFT in cirrus.sh (Jonas Nick)

Pull request description:

ACKs for top commit:
  real-or-random:
    ACK 4692478853df2149375d1447908a792fcf240fbf

Tree-SHA512: 84c6021e2135857541def6ba058d9c9a1c180fd32a625854ff82d51d0561a4dd243623d38d335aeaf40200501581c0678878a9166f4a96ae3fb32717b8d39fbd
2023-07-27 15:05:29 +02:00
stratospher
d23da6d557 use secp256k1_scalar_verify checks 2023-07-27 17:35:50 +05:30
Jonas Nick
4692478853
ci: print $ELLSWIFT in cirrus.sh 2023-07-27 10:20:50 +00:00
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
Tim Ruffing
c734c64278
Merge bitcoin-core/secp256k1#1384: build: enable ellswift module via SECP_CONFIG_DEFINES
78ca8807880def68a575b2487f374fdf4b49962d build: enable ellswift module via SECP_CONFIG_DEFINES (Jonas Nick)

Pull request description:

  ...like the other modules.

ACKs for top commit:
  sipa:
    utACK 78ca8807880def68a575b2487f374fdf4b49962d
  real-or-random:
    utACK 78ca8807880def68a575b2487f374fdf4b49962d

Tree-SHA512: c157a1ed912b9aa1a318aa0a70859a3ac67cb22303993f08ff00ed601e6ac197380dd503d3b361cbc4e698fc6489b5283b782f570f2703809d23668f3ebe5ba6
2023-07-27 09:21:00 +02:00
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
Jonas Nick
78ca880788
build: enable ellswift module via SECP_CONFIG_DEFINES
...like the other modules.
2023-07-26 14:44:20 +00:00
Tim Ruffing
0e00fc7d10
Merge bitcoin-core/secp256k1#1383: util: remove unused checked_realloc
b097a466c168dcdb3fde435ec4a1e0b63609f55d util: remove unused checked_realloc (Cory Fields)

Pull request description:

  Usage was removed in 6fe50439 . This should be a NOOP.

  Noticed when analyzing for zenbleed exposure: stdlib calls that aren't optimized away.

  In this case realloc isn't making it into the final binary, but as far as I can tell this is completely dead code and should be dropped.

ACKs for top commit:
  jonasnick:
    ACK b097a466c168dcdb3fde435ec4a1e0b63609f55d
  real-or-random:
    ACK b097a466c168dcdb3fde435ec4a1e0b63609f55d

Tree-SHA512: d4249215eddd4035be2b50a8bb48b8a681abdab4ab41ca53f6c2a2507edfbc9ffa39ba22eb48e7da52f978e224198294495ce64f9d571d98c19283b20b82a63a
2023-07-26 13:50:23 +02:00
Cory Fields
b097a466c1 util: remove unused checked_realloc
Usage was removed in 6fe50439 .
2023-07-25 20:37:46 +00:00
Jonas Nick
2bd5f3e618
Merge bitcoin-core/secp256k1#1382: refactor: Drop unused cast
4f8c5bd76132a0d0242c7a29b666153f927800bb refactor: Drop unused cast (Hennadii Stepanov)

Pull request description:

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

Tree-SHA512: cc94b524f53e393bd843383e92bbc5b84dd7557d8121241f2d0461b960a0706236147d02b6f5bfc433272849f517c62eb6f1e0cfae892e1b8054817c27365430
2023-07-24 19:07:54 +00:00
Hennadii Stepanov
4f8c5bd761
refactor: Drop unused cast 2023-07-24 13:14:23 +01:00
Peter Dettman
173e8d061a Implement current magnitude assumptions
Remove also the explicit magnitude restriction `a->x.magnitude <= 31`
in `secp256k1_gej_eq_x_var` (introduced in commit
07c0e8b82e2cea87f85263512945fed7adffea18), as this is implied by the
new limits.

Co-authored-by: Sebastian Falbesoner <sebastian.falbesoner@gmail.com>
2023-07-22 01:52:06 +02:00
Sebastian Falbesoner
49afd2f5d8 Take use of _fe_verify_magnitude in field_impl.h 2023-07-22 01:52:06 +02:00
Peter Dettman
4e9661fc42 Add _fe_verify_magnitude (no-op unless VERIFY is enabled)
Co-authored-by: Tim Ruffing <crypto@timruffing.de>
2023-07-22 01:52:06 +02:00
Sebastian Falbesoner
690b0fc05a add missing group element invariant checks
The group element checks `secp256k1_{ge,gej}_verify` have first been
implemented and added in commit f20266722ac93ca66d1beb0d2f2d2469b95aafea
(PR #1299). This commit adds additional verification calls in group
functions, to match the ones that were originally proposed in commit
09dbba561fdb9d57a2cc9842ce041d9ba29a6189 of WIP-PR #1032 (which is
obviously not rebased on #1299 yet).

Also, for easier review, all functions handling group elements are
structured in the following wasy for easier review (idea suggested by
Tim Ruffing):

- on entry, verify all input ge, gej (and fe)
- empty line
- actual function body
- empty line
- on exit, verify all output ge, gej

Co-authored-by: Peter Dettman <peter.dettman@gmail.com>
Co-authored-by: Tim Ruffing <crypto@timruffing.de>
2023-07-22 01:52:06 +02:00
Jonas Nick
c545fdc374
Merge bitcoin-core/secp256k1#1298: Remove randomness tests
6ec3731e8c53658fcf68634c81bb1e47cad791ad Simplify test PRNG implementation (Pieter Wuille)
fb5bfa4eed834dcd58109525408a2d88dabc48c5 Add static test vector for Xoshiro256++ (Tim Ruffing)
723e8ca8f7ee75126bac4240feeac825c23a0d44 Remove randomness tests (Pieter Wuille)

Pull request description:

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

Tree-SHA512: 4cbbb9c42e31f067b17dd9169ae5d5e68bce77d1253452db9df523d3be2b5d61002d5a4203e5a153f257ec63c5ff2113555743eeb402d4b6c573069ea494d407
2023-07-18 14:05:46 +00:00
Tim Ruffing
b40e2d30b7
Merge bitcoin-core/secp256k1#1378: ellswift: fix probabilistic test failure when swapping sides
c424e2fb43c8ed959b2af7b2216028ce2a023488 ellswift: fix probabilistic test failure when swapping sides (Jonas Nick)

Pull request description:

  Reported by jonatack in https://github.com/bitcoin/bitcoin/issues/28079.

  When configured with `--disable-module-ecdh --enable-module-recovery`, then `./tests  64 81af32fd7ab8c9cbc2e62a689f642106` fails with
  ```
  src/modules/ellswift/tests_impl.h:396: test condition failed: secp256k1_memcmp_var(share32_bad, share32a, 32) != 0
  ```

  This tests verifies that changing the `party` bit of the `secp256k1_ellswift_xdh` function results in a different share. However, that's not the case when the secret keys of both parties are the same and this is actually what happens in the observed test failure. The keys can be equal in this test case because they are created by the `random_scalar_order_test` function whose output is not uniformly random (it's biased towards 0).

  This commit restores the assumption that the secret keys differ.

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

Tree-SHA512: d1ab61473a77478f9aeffb21ad73e0bba478c90d8573c72ec89d2e0140434cc65c9d5f4d56e5f259931dc68fc1800695c6cd5d63d9cfce4c1c4d6744eeaa2028
2023-07-17 18:37:20 +02:00
Jonas Nick
c424e2fb43
ellswift: fix probabilistic test failure when swapping sides
When configured with `--disable-module-ecdh --enable-module-recovery`, then
`./tests  64 81af32fd7ab8c9cbc2e62a689f642106` fails with
```
src/modules/ellswift/tests_impl.h:396: test condition failed: secp256k1_memcmp_var(share32_bad, share32a, 32) != 0
```

This tests verifies that changing the `party` bit of the
`secp256k1_ellswift_xdh` function results in a different share. However, that's
not the case when the secret keys of both parties are the same and this is
actually what happens in the observed test failure. The keys can be equal in
this test case because they are created by the `random_scalar_order_test`
function whose output is not uniformly random (it's biased towards 0).

This commit restores the assummption that the secret keys differ.
2023-07-17 09:50:32 +00:00
Hennadii Stepanov
175db31149
ci: Drop no longer needed PATH variable update on Windows 2023-07-14 08:43:08 +01:00
Hennadii Stepanov
116d2ab3df
cmake: Set ENVIRONMENT property for examples on Windows
This change simplifies running examples on Windows, because the DLL
must reside either in the same folder where the executable is or
somewhere in PATH.
2023-07-14 08:42:48 +01:00
Hennadii Stepanov
cef373997c
cmake, refactor: Use helper function instead of interface library
This change aims to simplify the following commit.
2023-07-14 08:41:26 +01:00
Jonas Nick
907a67212e
Merge bitcoin-core/secp256k1#1313: ci: Test on development snapshots of GCC and Clang
981e5be38c492f0c0230fbe61be555d157380331 ci: Fix typo in comment (Tim Ruffing)
e9e96482196da641733a8a6763341a84f8b9806a ci: Reduce number of macOS tasks from 28 to 8 (Tim Ruffing)
609093b3877b2fb21bd4bb2301a3eafb444a2fdb ci: Add x86_64 Linux tasks for gcc and clang snapshots (Tim Ruffing)
1deecaaf3b94dbf08896e015e7f1e5ec328a40f2 ci: Install development snapshots of gcc and clang (Tim Ruffing)

Pull request description:

ACKs for top commit:
  hebasto:
    re-ACK 981e5be38c492f0c0230fbe61be555d157380331
  jonasnick:
    ACK 981e5be38c492f0c0230fbe61be555d157380331

Tree-SHA512: a36ef6f3c30a7f6e09e186e67b8eeb6e16e05de3bd97f21342866e75e33275103d463b6a12603ce235da7e26e4acdef4d811f62f369f18db9ac4e7ff06749136
2023-07-13 14:44:45 +00:00
Tim Ruffing
0f7657d59c
Merge bitcoin-core/secp256k1#1366: field: Use restrict consistently in fe_sqrt
b79ba8aa4c074b2cd09188f6f85ba68d6b80fe50 field: Use `restrict` consistently in fe_sqrt (Tim Ruffing)

Pull request description:

  That is, use it also in the definition and not only the declaration.

  I believe this was the intention of commit
  be82bd8e03, but it was omitted there.

  edit: Changed the description. I'm not entirely sure but after looking at the standard, I tend to think this is more than a cosmetic change, and only this change actually makes the parameters `restrict`. Anyway, I believe making them `restrict` was simply forgotten in be82bd8e0347e090037ff1d30a22a9d614db8c9f.

ACKs for top commit:
  sipa:
    utACK b79ba8aa4c074b2cd09188f6f85ba68d6b80fe50

Tree-SHA512: eecec7674d8cef7833d50f4041b87241ca8de4839aa8027df1c422b89f5a1bcef3916ac785057a596c459ce1aa9d41e5a21ecb6fed9c5d15a1d9f588c7ee208e
2023-07-12 01:14:22 +02:00
Tim Ruffing
cc55757552
Merge bitcoin-core/secp256k1#1340: clean up in-comment Sage code (refer to secp256k1_params.sage, update to Python3)
600c5adcd59240305e22918943f45dceeabb7e93 clean up in-comment Sage code (refer to secp256k1_params.sage, update to Python3) (Sebastian Falbesoner)

Pull request description:

  Some of the C source files contain contain in-comment Sage code calculating secp256k1 parameters that are already defined in the file secp256k1_params.sage.  Replace that by a corresponding load instruction and access the necessary variables. In ecdsa_impl.h, update the comment to use a one-line shell command calling sage to get the values.

  The remaining code (test `test_add_neg_y_diff_x` in tests.c) is updated to work with a current version based on Python3 (Sage 9.0+, see https://wiki.sagemath.org/Python3-Switch).

  The latter can be seen as a small follow-up to PR #849 (commit 13c88efed0005eb6745a222963ee74564054eafb).

ACKs for top commit:
  sipa:
    ACK 600c5adcd59240305e22918943f45dceeabb7e93
  real-or-random:
    ACK 600c5adcd59240305e22918943f45dceeabb7e93

Tree-SHA512: a9e52f6afbce65edd9ab14203612c3d423639f450fe8f0d269a3dda04bebefa95b607f7aa0faec864cb78b46d49f281632bb1277118749b7d8613e9f5dcc8f3d
2023-07-10 18:34:16 +02:00
Sebastian Falbesoner
600c5adcd5 clean up in-comment Sage code (refer to secp256k1_params.sage, update to Python3)
Some of the C source files contain contain in-comment Sage code
calculating secp256k1 parameters that are already defined in the file
secp256k1_params.sage.  Replace that by a corresponding load instruction
and access the necessary variables. In ecdsa_impl.h, update the comment
to use a one-line shell command calling sage to get the values.

The remaining code (test `test_add_neg_y_diff_x` in tests.c) is updated
to work with a current version based on Python3 (Sage 9.0+, see
https://wiki.sagemath.org/Python3-Switch).

The latter can be seen as a small follow-up to PR #849 (commit
13c88efed0005eb6745a222963ee74564054eafb).
2023-07-10 02:28:31 +02:00
Tim Ruffing
981e5be38c ci: Fix typo in comment 2023-07-06 20:19:07 +02:00
Tim Ruffing
e9e9648219 ci: Reduce number of macOS tasks from 28 to 8 2023-07-06 20:19:04 +02:00
Tim Ruffing
609093b387 ci: Add x86_64 Linux tasks for gcc and clang snapshots 2023-07-06 20:19:04 +02:00
Tim Ruffing
1deecaaf3b ci: Install development snapshots of gcc and clang
TODO: Make sure the Docker image is actually rebuild
2023-07-06 20:19:04 +02:00
Tim Ruffing
b79ba8aa4c field: Use restrict consistently in fe_sqrt
That is, use it also in the definition and not only the declaration.

I believe this was the intention of commit
be82bd8e0347e090037ff1d30a22a9d614db8c9f, but it was omitted there.
2023-07-06 16:44:52 +02:00
Tim Ruffing
c9ebca95f9
Merge bitcoin-core/secp256k1#1363: doc: minor ellswift.md updates
c7d900ffd18e88076920d4cd13fcdca210acd903 doc: minor ellswift.md updates (stratospher)

Pull request description:

ACKs for top commit:
  sipa:
    ACK c7d900ffd18e88076920d4cd13fcdca210acd903
  real-or-random:
    ACK c7d900ffd18e88076920d4cd13fcdca210acd903

Tree-SHA512: 161c17d038eb1eed9f5811c3eb92975a821a5274e7f69aa386bfbe5376b3f06f3d0d2887ea3310efbec83424f09ea8e4082e8c02b2fcad3b915625ce5c2007d2
2023-07-06 16:03:19 +02:00
Tim Ruffing
afd7eb4a55
Merge bitcoin-core/secp256k1#1371: Add exhaustive tests for ellswift (with create+decode roundtrip)
2792119278bcb2a0befce3fbc64c83578df54953 Add exhaustive test for ellswift (create+decode roundtrip) (Sebastian Falbesoner)

Pull request description:

  This PR adds the basic structure for ellswift exhaustive tests. Right now only a `secp256k1_ellswift_create` + `secp256k1_ellswift_decode` indirect roundtrip (exhaustive loop scalar -> ellswift pubkey -> decoded pubkey -> decoded group element, compared with exhaustive precomputed group element) is included.

  The exhaustive tests passes locally with all currently supported orders (n=13 [default] and n=199). Note that for n=7, the test is skipped, as the used curve in this case is even-ordered and ellswift only supports odd-ordered curves.

ACKs for top commit:
  sipa:
    utACK 2792119278bcb2a0befce3fbc64c83578df54953
  real-or-random:
    utACK 2792119278bcb2a0befce3fbc64c83578df54953

Tree-SHA512: c51d3d99e9839793b3c15d75b9a29f01080db160ab8819973abd877288f9f0af972ea4264290220ab1cd035fdebcfac7767436aa39154d924ef0bf6a5733a55d
2023-07-05 23:19:31 +02:00
Sebastian Falbesoner
2792119278 Add exhaustive test for ellswift (create+decode roundtrip)
Co-authored-by: Pieter Wuille <pieter@wuille.net>
Co-authored-by: Tim Ruffing <crypto@timruffing.de>
2023-07-05 18:24:37 +02:00
stratospher
c7d900ffd1 doc: minor ellswift.md updates 2023-07-05 20:26:18 +05:30
Tim Ruffing
332af315fc
Merge bitcoin-core/secp256k1#1344: group: save normalize_weak calls in secp256k1_ge_is_valid_var/secp256k1_gej_eq_x_var
07c0e8b82e2cea87f85263512945fed7adffea18 group: remove unneeded normalize_weak in `secp256k1_gej_eq_x_var` (Sebastian Falbesoner)
efa76c4bf7cab1c22aa476cd2730e891450ad4a0 group: remove unneeded normalize_weak in `secp256k1_ge_is_valid_var` (Sebastian Falbesoner)

Pull request description:

  This PR removes unneeded normalize_weak calls in two group element functions:
  * `secp256k1_ge_is_valid_var`: After calculating the right-hand side of the elliptic curve equation (x^3 + 7), the field element `x3` has a magnitude of 2 (1 as result of `secp256k1_fe_mul`, then increased by 1 due to `secp256k1_fe_add_int`). This is fine for `secp256k1_fe_equal_var`, as the second parameter only requires the magnitude to not exceed 31, and the normalize_weak call is hence not needed and can be dropped. Note that the interface description for `secp256k1_fe_equal` (which also applies to `secp256k1_fe_equal_var`) once stated that _both_ parameters need to have magnitude 1, but that was corrected in commit 7d7d43c6dd2741853de4631881d77ae38a14cd23.

  * `secp256k1_gej_eq_x_var`: By requiring that the input group element's X coordinate (`a->x`) has a magnitude of <= 31, the normalize_weak call and also the field element variable `r2` are not needed anymore and hence can be dropped.

ACKs for top commit:
  sipa:
    utACK 07c0e8b82e2cea87f85263512945fed7adffea18
  jonasnick:
    ACK 07c0e8b82e2cea87f85263512945fed7adffea18

Tree-SHA512: 9037e4af881ce7bf3347414d6da06b99e3d318733ba4f70e8b24d2320c2f26d022144e17bd6b95c1a4ef1be3825a4464e56ce2d2b3ae7bbced04257048832b7f
2023-07-04 14:21:46 +02:00
Tim Ruffing
9e6d1b0e9b
Merge bitcoin-core/secp256k1#1367: build: Improvements to symbol visibility logic on Windows (attempt 3)
c6cd2b15a007ad0a2d5c4656ae641ba442d8b2fe ci: Add task for static library on Windows + CMake (Hennadii Stepanov)
020bf69a44ba700624d09de0c18ceb867369d24e build: Add extensive docs on visibility issues (Tim Ruffing)
0196e8ade16e2b2d8efadac01d8520205553ee39 build: Introduce `SECP256k1_DLL_EXPORT` macro (Hennadii Stepanov)
9f1b1904a358e4ce7248c6542e8c7ac143ba0e3f refactor: Replace `SECP256K1_API_VAR` with `SECP256K1_API` (Hennadii Stepanov)
ae9db95ceaa2605138fac9c237c640acea3f3bd6 build: Introduce `SECP256K1_STATIC` macro for Windows users (Hennadii Stepanov)

Pull request description:

  Previous attempts:
  - https://github.com/bitcoin-core/secp256k1/pull/1346
  - https://github.com/bitcoin-core/secp256k1/pull/1362

  The result is as follows:
  1. Simple, concise and extensively documented code.
  2. Explicitly documented use cases with no ambiguities.
  3. No workarounds for linker warnings.
  4. Solves one item in https://github.com/bitcoin-core/secp256k1/issues/1235.

ACKs for top commit:
  real-or-random:
    utACK c6cd2b15a007ad0a2d5c4656ae641ba442d8b2fe

Tree-SHA512: d58694452d630aefbd047916033249891bc726b7475433aaaa7c3ea2a07ded8f185a598385b67c2ee3440ec5904ff9d9452c97b0961d84dcb2eb2cf46caa171e
2023-07-03 18:53:38 +02:00
Tim Ruffing
0aacf64352
Merge bitcoin-core/secp256k1#1370: Corrected some typos
b6b9834e8da7f3fd91b95f750a4ee7a10bf67435 small fixes (Alejandro)

Pull request description:

  Corrected some typos

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

Tree-SHA512: c40c22c66f1067ecca351f08cca07a78b00bb98af2f6cfb08c25d0b1db6845e0e32ace1954c386db7020cf9fc7ae973ff15bd6d9c0144f3d21ea28c15741050f
2023-07-03 18:50:45 +02:00
Alejandro
b6b9834e8d small fixes
restoring wycheproof files

restoring wycheproof files2
2023-07-03 17:05:55 +02:00
Sebastian Falbesoner
07c0e8b82e group: remove unneeded normalize_weak in secp256k1_gej_eq_x_var
By requiring that the input group element's X coordinate (`a->x`) has a
magnitude of <= 31, the normalize_weak call and also the field element
variable `r2` are not needed anymore and hence can be dropped.
2023-07-03 16:54:19 +02:00
Tim Ruffing
3fc1de5c55
Merge bitcoin-core/secp256k1#1364: Avoid -Wmaybe-uninitialized when compiling with gcc -O1
5b9f37f136620b9c61cd66439904b2db266fba70 ci: Add `CFLAGS: -O1` to task matrix (Hennadii Stepanov)
a6ca76cdf2a3d0aef091e3d26d7c6c8ee9c88e72 Avoid `-Wmaybe-uninitialized` when compiling with `gcc -O1` (Hennadii Stepanov)

Pull request description:

  Fixes https://github.com/bitcoin-core/secp256k1/issues/1361.

  CI tasks have been adjusted to catch similar issues in the future.

ACKs for top commit:
  real-or-random:
    utACK 5b9f37f136620b9c61cd66439904b2db266fba70
  jonasnick:
    tACK 5b9f37f136620b9c61cd66439904b2db266fba70

Tree-SHA512: 8aa5ec22ed88579ecd37681df68d64f8bab93cd14bdbf432a3af41cadc7ab3eba86c33c179db15bf3a3c798c33064bd845ebdedb02ee617ef634e98c596838c2
2023-07-03 15:32:17 +02:00
Jonas Nick
fb758fe8d6
Merge bitcoin-core/secp256k1#1323: tweak_add: fix API doc for tweak=0
05873bb6b1041227f413626717b7af69fb6176ef tweak_add: fix API doc for tweak=0 (Jonas Nick)

Pull request description:

ACKs for top commit:
  real-or-random:
    ACK 05873bb6b1041227f413626717b7af69fb6176ef

Tree-SHA512: ef587a680c3355c6328dd61e0f5fcac80ea995f6045b4392fe35f3ee1c04ee1bd941662c120758ad641588670c1f0f53bfb17a802821f54100f1385b8bb7375a
2023-07-03 13:11:20 +00:00
Hennadii Stepanov
c6cd2b15a0
ci: Add task for static library on Windows + CMake 2023-07-03 13:57:31 +01:00
Tim Ruffing
020bf69a44
build: Add extensive docs on visibility issues 2023-07-03 13:57:17 +01:00
Hennadii Stepanov
0196e8ade1
build: Introduce SECP256k1_DLL_EXPORT macro
This change provides a way to build a shared library that is not tired
to the Libtool-specific `DLL_EXPORT` macro.
2023-07-03 13:57:17 +01:00
Hennadii Stepanov
9f1b1904a3
refactor: Replace SECP256K1_API_VAR with SECP256K1_API 2023-07-03 13:57:16 +01:00