You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
31f8459 Add ellswift usage example (Sebastian Falbesoner)
fe4fbaa examples: fix case typos in secret clearing paragraphs (s/, Or/, or/) (Sebastian Falbesoner)
1668564 doc: Add convention for defaults (Tim Ruffing)
e2af491 ci: Switch to the new default value of the precomputed table for signing (Hennadii Stepanov)
d94a927 build: Adjust the default size of the precomputed table for signing (Hennadii Stepanov)
9420eec cmake: Bump CMake minimum required version up to 3.16 (Hennadii Stepanov)
b8fe333 cmake: Fixed O3 replacement (Eduardo Menges Mattje)
4d9645b cmake: Remove "AUTO" value of `SECP256K1_ECMULT_GEN_KB` option (Hennadii Stepanov)
a06805e cmake: Remove "AUTO" value of `SECP256K1_ECMULT_WINDOW_SIZE` option (Hennadii Stepanov)
26b94ee autotools: Remove "auto" value of `--with-ecmult-gen-kb` option (Hennadii Stepanov)
122dbae autotools: Remove "auto" value of `--with-ecmult-window` option (Hennadii Stepanov)
158f9e5 cmake: Do not modify build types when integrating by downstream project (Hennadii Stepanov)
4706be2 cmake: Reimplement `SECP256K1_APPEND_CFLAGS` using Bitcoin Core approach (Hennadii Stepanov)
c2764db cmake: Rename `SECP256K1_LATE_CFLAGS` to `SECP256K1_APPEND_CFLAGS` (Hennadii Stepanov)
0e2fadb fix: typos in secp256k1.c (Elliot Lee)
f87a358 cmake: Do not set `CTEST_TEST_TARGET_ALIAS` (Hennadii Stepanov)
7454a53 README: mention ellswift module (Sebastian Falbesoner)
ec4c002 cmake: Simplify `PROJECT_IS_TOP_LEVEL` emulation (Hennadii Stepanov)
cae9a7a cmake: Do not set emulated PROJECT_IS_TOP_LEVEL as cache variable (Hennadii Stepanov)
Pull request description:
Merge bitcoin-core/secp256k1#1529: cmake: Fix cache issue when integrating by downstream project
Merge bitcoin-core/secp256k1#1548: README: mention ellswift module
Merge bitcoin-core/secp256k1#1545: cmake: Do not set `CTEST_TEST_TARGET_ALIAS`
Merge bitcoin-core/secp256k1#1550: fix: typos in secp256k1.c
Merge bitcoin-core/secp256k1#1546: cmake: Rename `SECP256K1_LATE_CFLAGS` and switch to Bitcoin Core's approach
Merge bitcoin-core/secp256k1#1543: cmake: Do not modify build types when integrating by downstream project
Merge bitcoin-core/secp256k1#1535: build: Replace hardcoded "auto" value with default one
Merge bitcoin-core/secp256k1#1555: Fixed O3 replacement
Merge bitcoin-core/secp256k1#1565: cmake: Bump CMake minimum required version up to 3.16
Merge bitcoin-core/secp256k1#1564: build, ci: Adjust the default size of the precomputed table for signing
Merge bitcoin-core/secp256k1#1563: doc: Add convention for defaults
Merge bitcoin-core/secp256k1#1551: Add ellswift usage example
This PR can be recreated with `./contrib/sync-upstream.sh -b master range 0055b86`.
Tips:
* Use `git show --remerge-diff <pr-branch>` to show the conflict resolution in the merge commit.
* Use `git read-tree --reset -u <pr-branch>` to replay these resolutions during the conflict resolution stage when recreating the PR branch locally.
Be aware that this may discard your index as well as the uncommitted changes and untracked files in your worktree.
ACKs for top commit:
real-or-random:
ACK d0dde4a
Tree-SHA512: 8551626c0f183c495cbbc12d9c292e1995ce4b5558f950e1a2ca84188724884180117f9bcc10c0d2f3e73da054c5b4647efaa8282be74936f4d156038b1c10da
set(SECP256K1_ECMULT_WINDOW_SIZE "AUTO"CACHESTRING"Window size for ecmult precomputation for verification, specified as integer in range [2..24]. \"AUTO\"is a reasonable setting for desktop machines (currently 15). [default=AUTO]")
set(SECP256K1_ECMULT_WINDOW_SIZE 15CACHESTRING"Window size for ecmult precomputation for verification, specified as integer in range [2..24]. The default value is a reasonable setting for desktop machines (currently 15). [default=15]")
set(SECP256K1_ECMULT_GEN_KB "AUTO"CACHESTRING"The size of the precomputed table for signing in multiples of 1024 bytes (on typical platforms). Larger values result in possibly better signing or key generation performance at the cost of a larger table. Valid choices are 2, 22, 86. \"AUTO\"is a reasonable setting for desktop machines (currently 22). [default=AUTO]")
set(SECP256K1_ECMULT_GEN_KB 86CACHESTRING"The size of the precomputed table for signing in multiples of 1024 bytes (on typical platforms). Larger values result in possibly better signing or key generation performance at the cost of a larger table. Valid choices are 2, 22, 86. The default value is a reasonable setting for desktop machines (currently 86). [default=86]")
# We do not use CTest's BUILD_TESTING because a single toggle for all tests is too coarse for our needs.
345
329
mark_as_advanced(BUILD_TESTING)
346
330
if(SECP256K1_BUILD_BENCHMARK OR SECP256K1_BUILD_TESTS OR SECP256K1_BUILD_EXHAUSTIVE_TESTS OR SECP256K1_BUILD_CTIME_TESTS OR SECP256K1_BUILD_EXAMPLES)
347
331
enable_testing()
348
332
endif()
349
333
350
-
set(SECP256K1_LATE_CFLAGS ""CACHESTRING"Compiler flags that are added to the command line after all other flags added by the build system.")
351
-
include(AllTargetsCompileOptions)
334
+
set(SECP256K1_APPEND_CFLAGS ""CACHESTRING"Compiler flags that are appended to the command line after all other flags added by the build system. This variable is intended for debugging and special builds.")
335
+
if(SECP256K1_APPEND_CFLAGS)
336
+
# Appending to this low-level rule variable is the only way to
337
+
# guarantee that the flags appear at the end of the command line.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,7 @@ In addition, libsecp256k1 tries to maintain the following coding conventions:
49
49
* Operations involving secret data should be tested for being constant time with respect to the secrets (see [src/ctime_tests.c](src/ctime_tests.c)).
50
50
* Local variables containing secret data should be cleared explicitly to try to delete secrets from memory.
51
51
* Use `secp256k1_memcmp_var` instead of `memcmp` (see [#823](https://github.com/bitcoin-core/secp256k1/issues/823)).
52
+
* As a rule of thumb, the default values for configuration options should target standard desktop machines and align with Bitcoin Core's defaults, and the tests should mostly exercise the default configuration (see [#1549](https://github.com/bitcoin-core/secp256k1/issues/1549#issuecomment-2200559257)).
To compile optional modules (such as Schnorr signatures), you need to run `cmake` with additional flags (such as `-DSECP256K1_ENABLE_MODULE_SCHNORRSIG=ON`). Run `cmake .. -LH` to see the full list of available flags.
46
46
@@ -73,6 +73,7 @@ Usage examples can be found in the [examples](examples) directory. To compile th
73
73
*[ECDSA example](examples/ecdsa.c)
74
74
*[Schnorr signatures example](examples/schnorr.c)
75
75
*[Deriving a shared secret (ECDH) example](examples/ecdh.c)
To compile the Schnorr signature, ECDH and MuSig examples, you need to enable the corresponding module by providing a flag to the `configure` script, for example `--enable-module-schnorrsig`.
0 commit comments