Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Fix check of __builtin functions #247

Draft
wants to merge 148 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
1a6be57
bench: Make benchmarks compile on MSVC
real-or-random Mar 9, 2022
cca8cbb
configure: Output message when checking for valgrind
real-or-random Mar 9, 2022
1cc0941
configure: Don't abort if the compiler does not define __STDC__
real-or-random Mar 9, 2022
3b4f3d0
build: Reject C++ compilers in the preprocessor
real-or-random Mar 17, 2022
09f3d71
configure: Add a few CFLAGS for MSVC
real-or-random Mar 9, 2022
2f984ff
Save negations in var-time group addition
peterdettman Dec 26, 2021
7efc983
Fix the false positive of `SECP_64BIT_ASM_CHECK`
SpriteOvO Apr 15, 2022
8b013fc
Merge bitcoin-core/secp256k1#1056: Save negations in var-time group a…
real-or-random Apr 16, 2022
485f608
Merge bitcoin-core/secp256k1#1104: Fix the false positive of `SECP_64…
real-or-random Apr 16, 2022
6f6cab9
abi: Don't export symbols in static Windows libraries
theuni May 4, 2022
44c2452
Merge bitcoin-core/secp256k1#1105: Don't export symbols in static lib…
real-or-random May 19, 2022
bd81f41
schnorrsig bench: Suppress a stupid warning in MSVC
real-or-random Mar 9, 2022
2be6ba0
configure: Convince autotools to work with MSVC's archiver lib.exe
real-or-random Mar 14, 2022
9efc2e5
ci: Add MSVC builds
real-or-random Mar 10, 2022
3fb3269
ci: Add 32-bit MinGW64 build
real-or-random Mar 15, 2022
51f296a
ci: Run persistent wineserver to speed up wine
real-or-random Mar 16, 2022
8dc4b03
ci: Add a C++ job that compiles the public headers without -fpermissive
real-or-random Mar 17, 2022
49e2acd
configure: Improve rationale for WERROR_CFLAGS
real-or-random Jun 29, 2022
1827c9b
scratch_destroy: move VERIFY_CHECK after invalid scrach space check
siv2r Jun 29, 2022
cd47033
Merge bitcoin-core/secp256k1#1084: ci: Add MSVC builds
jonasnick Jun 29, 2022
accadc9
Merge bitcoin-core/secp256k1#1114: `_scratch_destroy`: move `VERIFY_C…
jonasnick Jun 29, 2022
069aba8
Fix sepc256k1 -> secp256k1 typo in group.h
henopied Jun 30, 2022
43756da
Merge bitcoin-core/secp256k1#1115: Fix sepc256k1 -> secp256k1 typo in…
real-or-random Jun 30, 2022
40a3473
build: Fix #include "..." paths to get rid of further -I arguments
real-or-random Jun 30, 2022
af65d30
Merge bitcoin-core/secp256k1#1116: build: Fix #include "..." paths to…
real-or-random Jul 1, 2022
4cc0b1b
ecmult_gen: Skip RNG when creating blinding if no seed is available
real-or-random Jul 5, 2022
7a86955
ecmult_gen: Simplify code (no observable change)
real-or-random Jul 5, 2022
55f8bc9
ecmult_gen: Improve comments about projective blinding
real-or-random Jul 5, 2022
d0cf55e
config: Set preprocessor defaults for ECMULT_* config values
real-or-random Jul 6, 2022
63a3565
Merge bitcoin-core/secp256k1#1120: ecmult_gen: Skip RNG when creating…
real-or-random Jul 7, 2022
da6514a
config: Introduce DEBUG_CONFIG macro for debug output of config
real-or-random Jul 6, 2022
c27ae45
config: Remove basic-config.h
real-or-random Jul 6, 2022
17065f4
tests: Randomize the context with probability 15/16 instead of 1/4
real-or-random Jul 7, 2022
6a873cc
Merge bitcoin-core/secp256k1#1122: tests: Randomize the context with …
jonasnick Jul 11, 2022
3efeb9d
Merge bitcoin-core/secp256k1#1121: config: Set preprocessor defaults …
jonasnick Jul 11, 2022
cabe085
configure: Remove pkgconfig macros again (reintroduced by mismerge)
real-or-random Jul 21, 2022
9f8a13d
Merge bitcoin-core/secp256k1#1128: configure: Remove pkgconfig macros…
real-or-random Jul 21, 2022
ef48f08
readme: Add IRC channel
real-or-random Aug 2, 2022
78f5296
readme: Sell "no runtime dependencies"
real-or-random Aug 2, 2022
88b0089
readme: Fix line break
real-or-random Aug 2, 2022
694ce8f
Merge bitcoin-core/secp256k1#1131: readme: Misc improvements
real-or-random Aug 2, 2022
41e8704
build: Enable some modules by default
real-or-random Oct 19, 2021
798727a
Revert "Add test logs to gitignore"
hebasto Oct 28, 2022
f5039cb
Cleanup `.gitignore` file
hebasto Oct 28, 2022
a43e982
Merge bitcoin-core/secp256k1#1144: Cleanup `.gitignore` file
jonasnick Nov 1, 2022
4e54c03
ci: print env to allow reproducing the job outside of CI
jonasnick Nov 2, 2022
49ae843
ci: mostly prevent "-v/--version: not found" irrelevant error
jonasnick Nov 2, 2022
5c9f1a5
ci: always cat all logs_snippets
jonasnick Nov 7, 2022
6a965b6
Remove usage of CHECK from non-test file
tcharding Nov 4, 2022
2914bcc
Simulated int128 type.
roconnor-blockstream Jul 27, 2022
dceaa1f
int128: Tidy #includes of int128.h and int128_impl.h
real-or-random Feb 1, 2022
a340d95
ci: add int128_struct tests
jonasnick Nov 2, 2022
e13fae4
Merge bitcoin-core/secp256k1#1150: ci: always cat test_env.log
jonasnick Nov 8, 2022
c2ee917
Merge bitcoin-core/secp256k1#1146: ci: prevent "-v/--version: not fou…
jonasnick Nov 8, 2022
44916ae
Merge bitcoin-core/secp256k1#1147: ci: print env to allow reproducing…
real-or-random Nov 14, 2022
00a42b9
Add MSan CI job
sipa Nov 16, 2022
86e3b38
Merge bitcoin-core/secp256k1#1149: Remove usage of CHECK from non-tes…
real-or-random Nov 16, 2022
ddf2b29
Merge bitcoin-core/secp256k1#1000: Synthetic int128 type.
real-or-random Nov 16, 2022
6138d73
Merge bitcoin-core/secp256k1#1155: Add MSan CI jobs
jonasnick Nov 17, 2022
f2b7e88
Add int128 randomized tests
sipa Nov 14, 2022
63ff064
int128: Add test override for testing __(u)mulh on MSVC X64
real-or-random Nov 14, 2022
9b5f589
Heuristically decide whether to use int128_struct
sipa Nov 16, 2022
c0ae48c
Update macOS image for CI
sipa Nov 14, 2022
3afce0a
Avoid signed overflow in MSVC AMR64 secp256k1_mul128
sipa Nov 17, 2022
a8494b0
Use compute credits for macOS jobs
sipa Nov 15, 2022
99bd335
Make int128 overflow test use secp256k1_[ui]128_mul
sipa Nov 17, 2022
e40fd27
Merge bitcoin-core/secp256k1#1156: Followups to int128_struct arithmetic
real-or-random Nov 18, 2022
4bc4290
Add a secp256k1_i128_to_u64 function.
roconnor-blockstream Oct 25, 2022
d216475
test secp256k1_i128_to_i64
roconnor-blockstream Nov 21, 2022
2286f80
Merge bitcoin-core/secp256k1#993: Enable non-experimental modules by …
real-or-random Nov 22, 2022
751c435
Merge bitcoin-core/secp256k1#1152: Update macOS image for CI
jonasnick Nov 24, 2022
ee7341f
docs: Never require a verification context
real-or-random Jul 5, 2022
1a553ee
docs: Change signature "validation" to "verification"
real-or-random Jul 5, 2022
092be61
gitignore: Add *.sage.py files autogenerated by sage
real-or-random Dec 1, 2022
477f02c
Merge bitcoin-core/secp256k1#1165: gitignore: Add *.sage.py files aut…
jonasnick Dec 1, 2022
316ac76
contexts: Deprecate all context flags except SECP256K1_CONTEXT_NONE
real-or-random Jul 6, 2022
72fedf8
docs: Improve docs for static context
real-or-random Dec 5, 2022
53796d2
contexts: Rename static context
real-or-random Jul 6, 2022
d2c6d48
tests: Use new name of static context
real-or-random Jul 18, 2022
e383fbf
selftest: Rename internal function to make name available for API
real-or-random Jul 6, 2022
e02d686
selftest: Expose in public API
real-or-random Jul 15, 2022
0612636
docs: Tidy and improve docs about contexts and randomization
real-or-random Dec 5, 2022
e7d0185
docs: Get rid of "initialized for signing" terminology
real-or-random Nov 25, 2022
7289b51
docs: Use doxygen style if and only if comment is user-facing
real-or-random Nov 23, 2022
4386a23
examples: Switch to NONE contexts
real-or-random Nov 25, 2022
e3f8477
Merge bitcoin-core/secp256k1#1126: API cleanup with respect to contexts
jonasnick Dec 6, 2022
90618e9
doc: move CHANGELOG from doc/ to root directory
jonasnick Dec 6, 2022
8d7a9a8
benchmarks: Switch to NONE contexts
jonasnick Nov 28, 2022
37ba744
tests: Switch to NONE contexts in exhaustive and ctime tests
jonasnick Nov 28, 2022
caa0ad6
group: add gej_eq_var
jonasnick Dec 5, 2022
86540e9
tests: add test for deprecated flags and rm them from run_context
jonasnick Nov 28, 2022
0c8a5ca
tests: Switch to NONE contexts in tests.c
jonasnick Nov 28, 2022
d6dc0f4
tests: Switch to NONE contexts in module tests
jonasnick Nov 28, 2022
5c789dc
Merge bitcoin-core/secp256k1#1168: Replace deprecated context flags w…
real-or-random Dec 7, 2022
ad39e2d
build: change package version to 0.1.0-dev
jonasnick Dec 6, 2022
cf66f23
refactor: Add helper function secp256k1_context_is_proper()
real-or-random Dec 5, 2022
c635c1b
Change ARG_CHECK_NO_RETURN to ARG_CHECK_VOID which returns (void)
real-or-random Dec 7, 2022
2551cda
tests: Fix code formatting
real-or-random Dec 7, 2022
a49e094
docs: Fix typo
real-or-random Dec 8, 2022
7e5b226
Don't use compute credits for now
sipa Dec 12, 2022
b1f992a
doc: improve release process
jonasnick Dec 23, 2021
13bf1b6
changelog: make order of change types match keepachangelog.com
jonasnick Dec 12, 2022
8c949f5
Merge bitcoin-core/secp256k1#1173: Don't use compute credits for now
jonasnick Dec 12, 2022
6d1784a
build: add missing files to EXTRA_DIST
jonasnick Dec 12, 2022
e025ccd
release: prepare for initial release 0.2.0
jonasnick Dec 23, 2021
21ffe4b
Merge bitcoin-core/secp256k1#1055: Prepare initial release
sipa Dec 12, 2022
b6b360e
doc: improve message of cleanup commit
jonasnick Dec 12, 2022
02ebc29
release cleanup: bump version after 0.2.0
jonasnick Dec 12, 2022
9a8d65f
Merge bitcoin-core/secp256k1#1174: release cleanup: bump version afte…
jonasnick Dec 12, 2022
cee8223
Mention semantic versioning in changelog
sipa Dec 13, 2022
ac233e1
Add links to diffs to changelog
sipa Dec 13, 2022
2dc133a
Add more changelog entries
sipa Dec 13, 2022
9ecf814
Reduce font size in changelog
sipa Dec 13, 2022
b627ba7
Remove dependency on `src/libsecp256k1-config.h`
hebasto Dec 15, 2022
ad8647f
Drop no longer relevant files from `.gitignore`
hebasto Dec 15, 2022
9c5a4d2
Do not define unused `HAVE_VALGRIND` macro
hebasto Dec 15, 2022
c2e0fda
ci: set -u in cirrus.sh to treat unset variables as an error
jonasnick Nov 8, 2022
7a74688
ci: add missing CFLAGS & CPPFLAGS variable to print_environment
jonasnick Nov 17, 2022
75d7b7f
Merge bitcoin-core/secp256k1#1154: ci: set -u in cirrus.sh to treat u…
real-or-random Dec 19, 2022
665ba77
Merge bitcoin-core/secp256k1#1178: Drop `src/libsecp256k1-config.h`
sipa Dec 20, 2022
881fc33
Consistency in naming of modules
sipa Dec 20, 2022
c30b889
Clarify that the ABI-incompatible versions are earlier
sipa Dec 20, 2022
3f57b9f
Merge bitcoin-core/secp256k1#1177: Some improvements to the changelog
jonasnick Dec 20, 2022
eacad90
Merge bitcoin-core/secp256k1#1171: Change ARG_CHECK_NO_RETURN to ARG_…
jonasnick Dec 21, 2022
01b819a
Merge bitcoin-core/secp256k1#1158: Add a secp256k1_i128_to_u64 function.
real-or-random Dec 21, 2022
c0a555b
Bugfix: pass SECP_CONFIG_DEFINES to bench compilation
sipa Dec 29, 2022
31ed538
Merge bitcoin-core/secp256k1#1183: Bugfix: pass SECP_CONFIG_DEFINES t…
real-or-random Jan 2, 2023
2f9ca28
Drop `SECP_CONFIG_DEFINES` from examples
hebasto Jan 3, 2023
2a39ac1
Merge bitcoin-core/secp256k1#1185: Drop `SECP_CONFIG_DEFINES` from ex…
real-or-random Jan 3, 2023
b198061
tests: Use global copy of secp256k1_context_static instead of clone
real-or-random Dec 7, 2022
18e0db3
tests: Don't recreate global context in scratch space test
real-or-random Jan 4, 2023
ce4f936
tests: Tidy run_context_tests() by extracting functions
real-or-random Dec 7, 2022
f32a36f
tests: Don't use global context for context tests
real-or-random Dec 7, 2022
fc90bb5
refactor: Tidy up main()
real-or-random Jan 4, 2023
a4a0937
tests: Clean up and improve run_context_tests() further
real-or-random Jan 4, 2023
39e8f0e
refactor: Separate run_context_tests into static vs proper contexts
real-or-random Jan 4, 2023
0eb3000
Merge bitcoin-core/secp256k1#1186: tests: Tidy context tests
real-or-random Jan 6, 2023
2037600
tests: Add noverify_tests which is like tests but without VERIFY
real-or-random Jan 5, 2023
cbe41ac
Merge bitcoin-core/secp256k1#1188: tests: Add noverify_tests which is…
sipa Jan 9, 2023
3385a26
refactor: Rename global variables to uppercase in tests
real-or-random Jan 5, 2023
9a93f48
refactor: Rename STTC to STATIC_CTX in tests
real-or-random Jan 5, 2023
cc3b8a4
Merge bitcoin-core/secp256k1#1187: refactor: Rename global variables …
real-or-random Jan 11, 2023
9a98106
Merge commits '8b013fce 485f608f 44c2452f cd470333 accadc94 43756da8 …
jonasnick Jul 17, 2023
64717a7
Merge commits '8b013fce 485f608f 44c2452f cd470333 accadc94 43756da8 …
jonasnick Jul 17, 2023
e996d07
Merge commits '44916ae9 86e3b38a ddf2b291 6138d73b e40fd277 ' into te…
jonasnick Jul 17, 2023
6c54db1
Merge commits '2286f809 751c4354 477f02c4 e3f84777 5c789dcd 8c949f56 …
jonasnick Jul 18, 2023
304fc88
Merge commits '9a8d65f0 75d7b7f5 665ba77e 3f57b9f7 eacad90f 01b819a8 …
jonasnick Jul 19, 2023
9647687
build: Fix check of __builtin functions
real-or-random Jul 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 113 additions & 10 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
env:
### compiler options
HOST:
WRAPPER_CMD:
# Specific warnings can be disabled with -Wno-error=foo.
# -pedantic-errors is not equivalent to -Werror=pedantic and thus not implied by -Werror according to the GCC manual.
WERROR_CFLAGS: -Werror -pedantic-errors
Expand Down Expand Up @@ -32,17 +33,23 @@ env:
# Compile and run the tests
EXAMPLES: yes

# https://cirrus-ci.org/pricing/#compute-credits
credits_snippet: &CREDITS
# Don't use any credits for now.
use_compute_credits: false

cat_logs_snippet: &CAT_LOGS
always:
cat_tests_log_script:
- cat tests.log || true
cat_noverify_tests_log_script:
- cat noverify_tests.log || true
cat_exhaustive_tests_log_script:
- cat exhaustive_tests.log || true
cat_valgrind_ctime_test_log_script:
- cat valgrind_ctime_test.log || true
cat_bench_log_script:
- cat bench.log || true
on_failure:
cat_config_log_script:
- cat config.log || true
cat_test_env_script:
Expand Down Expand Up @@ -75,6 +82,7 @@ task:
- env: {WIDEMUL: int64, RECOVERY: yes}
- env: {WIDEMUL: int64, ECDH: yes, SCHNORRSIG: yes, EXPERIMENTAL: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes, BPPP: yes}
- env: {WIDEMUL: int128}
- env: {WIDEMUL: int128_struct}
- env: {WIDEMUL: int128, RECOVERY: yes, SCHNORRSIG: yes}
- env: {WIDEMUL: int128, ECDH: yes, SCHNORRSIG: yes, EXPERIMENTAL: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes, BPPP: yes}
- env: {WIDEMUL: int128, ASM: x86_64}
Expand Down Expand Up @@ -148,6 +156,7 @@ task:
test_script:
- ./ci/cirrus.sh
<< : *CAT_LOGS
<< : *CREDITS

task:
name: "s390x (big-endian): Linux (Debian stable, QEMU)"
Expand Down Expand Up @@ -231,17 +240,70 @@ task:
<< : *CAT_LOGS

task:
name: "x86_64 (mingw32-w64): Windows (Debian stable, Wine)"
<< : *LINUX_CONTAINER
env:
WRAPPER_CMD: wine64-stable
SECP256K1_TEST_ITERS: 16
HOST: x86_64-w64-mingw32
WRAPPER_CMD: wine
WITH_VALGRIND: no
ECDH: yes
RECOVERY: yes
SCHNORRSIG: yes
CTIMETEST: no
matrix:
- name: "x86_64 (mingw32-w64): Windows (Debian stable, Wine)"
env:
HOST: x86_64-w64-mingw32
- name: "i686 (mingw32-w64): Windows (Debian stable, Wine)"
env:
HOST: i686-w64-mingw32
<< : *MERGE_BASE
test_script:
- ./ci/cirrus.sh
<< : *CAT_LOGS

task:
<< : *LINUX_CONTAINER
env:
WRAPPER_CMD: wine
WERROR_CFLAGS: -WX
WITH_VALGRIND: no
ECDH: yes
RECOVERY: yes
EXPERIMENTAL: yes
SCHNORRSIG: yes
ECDSA_S2C: yes
GENERATOR: yes
RANGEPROOF: yes
WHITELIST: yes
MUSIG: yes
ECDSAADAPTOR: yes
BPPP: yes
CTIMETEST: no
# Use a MinGW-w64 host to tell ./configure we're building for Windows.
# This will detect some MinGW-w64 tools but then make will need only
# the MSVC tools CC, AR and NM as specified below.
HOST: x86_64-w64-mingw32
CC: /opt/msvc/bin/x64/cl
AR: /opt/msvc/bin/x64/lib
NM: /opt/msvc/bin/x64/dumpbin -symbols -headers
# Set non-essential options that affect the CLI messages here.
# (They depend on the user's taste, so we don't want to set them automatically in configure.ac.)
CFLAGS: -nologo -diagnostics:caret
LDFLAGS: -XCClinker -nologo -XCClinker -diagnostics:caret
matrix:
- name: "x86_64 (MSVC): Windows (Debian stable, Wine)"
- name: "x86_64 (MSVC): Windows (Debian stable, Wine, int128_struct)"
env:
WIDEMUL: int128_struct
- name: "x86_64 (MSVC): Windows (Debian stable, Wine, int128_struct with __(u)mulh)"
env:
WIDEMUL: int128_struct
CPPFLAGS: -DSECP256K1_MSVC_MULH_TEST_OVERRIDE
- name: "i686 (MSVC): Windows (Debian stable, Wine)"
env:
HOST: i686-w64-mingw32
CC: /opt/msvc/bin/x86/cl
AR: /opt/msvc/bin/x86/lib
NM: /opt/msvc/bin/x86/dumpbin -symbols -headers
<< : *MERGE_BASE
test_script:
- ./ci/cirrus.sh
Expand Down Expand Up @@ -300,14 +362,47 @@ task:
- ./ci/cirrus.sh
<< : *CAT_LOGS

# Memory sanitizers
task:
name: "C++ -fpermissive"
<< : *LINUX_CONTAINER
name: "MSan"
env:
# ./configure correctly errors out when given CC=g++.
# We hack around this by passing CC=g++ only to make.
CC: gcc
MAKEFLAGS: -j4 CC=g++ CFLAGS=-fpermissive\ -g
ECDH: yes
RECOVERY: yes
SCHNORRSIG: yes
EXPERIMENTAL: yes
ECDSA_S2C: yes
GENERATOR: yes
RANGEPROOF: yes
WHITELIST: yes
MUSIG: yes
ECDSAADAPTOR: yes
BPPP: yes
CTIMETEST: no
CC: clang
SECP256K1_TEST_ITERS: 32
ASM: no
container:
memory: 2G
matrix:
- env:
CFLAGS: "-fsanitize=memory -g"
- env:
ECMULTGENPRECISION: 2
ECMULTWINDOW: 2
CFLAGS: "-fsanitize=memory -g -O3"
<< : *MERGE_BASE
test_script:
- ./ci/cirrus.sh
<< : *CAT_LOGS

task:
name: "C++ -fpermissive (entire project)"
<< : *LINUX_CONTAINER
env:
CC: g++
CFLAGS: -fpermissive -g
CPPFLAGS: -DSECP256K1_CPLUSPLUS_TEST_OVERRIDE
WERROR_CFLAGS:
ECDH: yes
RECOVERY: yes
Expand All @@ -317,6 +412,14 @@ task:
- ./ci/cirrus.sh
<< : *CAT_LOGS

task:
name: "C++ (public headers)"
<< : *LINUX_CONTAINER
test_script:
- g++ -Werror include/*.h
- clang -Werror -x c++-header include/*.h
- /opt/msvc/bin/x64/cl.exe -c -WX -TP include/*.h

task:
name: "sage prover"
<< : *LINUX_CONTAINER
Expand Down
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ schnorr_example
*.so
*.a
*.csv
!.gitignore
*.log
*.trs
*.sage.py

Makefile
configure
Expand All @@ -39,8 +39,6 @@ libtool
*.lo
*.o
*~
*.log
*.trs

coverage/
coverage.html
Expand All @@ -49,8 +47,6 @@ coverage.*.html
*.gcno
*.gcov

src/libsecp256k1-config.h
src/libsecp256k1-config.h.in
build-aux/ar-lib
build-aux/config.guess
build-aux/config.sub
Expand All @@ -65,7 +61,6 @@ build-aux/m4/ltversion.m4
build-aux/missing
build-aux/compile
build-aux/test-driver
src/stamp-h1
libsecp256k1.pc
contrib/gh-pr-create.sh

Expand Down
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
**This changelog is not the libsecp256k1-zkp's changelog.**
Instead, it is the changelog of the upstream library [libsecp256k1](https://github.com/bitcoin-core/secp256k1).

# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.2.0] - 2022-12-12

#### Added
- Added usage examples for common use cases in a new `examples/` directory.
- Added `secp256k1_selftest`, to be used in conjunction with `secp256k1_context_static`.
- Added support for 128-bit wide multiplication on MSVC for x86_64 and arm64, giving roughly a 20% speedup on those platforms.

#### Changed
- Enabled modules `schnorrsig`, `extrakeys` and `ecdh` by default in `./configure`.
- The `secp256k1_nonce_function_rfc6979` nonce function, used by default by `secp256k1_ecdsa_sign`, now reduces the message hash modulo the group order to match the specification. This only affects improper use of ECDSA signing API.

#### Deprecated
- Deprecated context flags `SECP256K1_CONTEXT_VERIFY` and `SECP256K1_CONTEXT_SIGN`. Use `SECP256K1_CONTEXT_NONE` instead.
- Renamed `secp256k1_context_no_precomp` to `secp256k1_context_static`.
- Module `schnorrsig`: renamed `secp256k1_schnorrsig_sign` to `secp256k1_schnorrsig_sign32`.

#### ABI Compatibility

Since this is the first release, we do not compare application binary interfaces.
However, there are earlier unreleased versions of libsecp256k1 that are *not* ABI compatible with this version.

## [0.1.0] - 2013-03-05 to 2021-12-25

This version was in fact never released.
The number was given by the build system since the introduction of autotools in Jan 2014 (ea0fe5a5bf0c04f9cc955b2966b614f5f378c6f6).
Therefore, this version number does not uniquely identify a set of source files.

[unreleased]: https://github.com/bitcoin-core/secp256k1/compare/v0.2.0...HEAD
[0.2.0]: https://github.com/bitcoin-core/secp256k1/compare/423b6d19d373f1224fd671a982584d7e7900bc93..v0.2.0
[0.1.0]: https://github.com/bitcoin-core/secp256k1/commit/423b6d19d373f1224fd671a982584d7e7900bc93
53 changes: 36 additions & 17 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ noinst_HEADERS += src/precomputed_ecmult.h
noinst_HEADERS += src/precomputed_ecmult_gen.h
noinst_HEADERS += src/assumptions.h
noinst_HEADERS += src/util.h
noinst_HEADERS += src/int128.h
noinst_HEADERS += src/int128_impl.h
noinst_HEADERS += src/int128_native.h
noinst_HEADERS += src/int128_native_impl.h
noinst_HEADERS += src/int128_struct.h
noinst_HEADERS += src/int128_struct_impl.h
noinst_HEADERS += src/scratch.h
noinst_HEADERS += src/scratch_impl.h
noinst_HEADERS += src/selftest.h
Expand All @@ -60,7 +66,6 @@ noinst_HEADERS += src/hash_impl.h
noinst_HEADERS += src/field.h
noinst_HEADERS += src/field_impl.h
noinst_HEADERS += src/bench.h
noinst_HEADERS += src/basic-config.h
noinst_HEADERS += contrib/lax_der_parsing.h
noinst_HEADERS += contrib/lax_der_parsing.c
noinst_HEADERS += contrib/lax_der_privatekey_parsing.h
Expand All @@ -70,7 +75,7 @@ noinst_HEADERS += examples/random.h
PRECOMPUTED_LIB = libsecp256k1_precomputed.la
noinst_LTLIBRARIES = $(PRECOMPUTED_LIB)
libsecp256k1_precomputed_la_SOURCES = src/precomputed_ecmult.c src/precomputed_ecmult_gen.c
libsecp256k1_precomputed_la_CPPFLAGS = $(SECP_INCLUDES)
libsecp256k1_precomputed_la_CPPFLAGS = $(SECP_INCLUDES) $(SECP_CONFIG_DEFINES)

if USE_EXTERNAL_ASM
COMMON_LIB = libsecp256k1_common.la
Expand All @@ -89,7 +94,7 @@ endif
endif

libsecp256k1_la_SOURCES = src/secp256k1.c
libsecp256k1_la_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES)
libsecp256k1_la_CPPFLAGS = $(SECP_INCLUDES) $(SECP_CONFIG_DEFINES)
libsecp256k1_la_LIBADD = $(SECP_LIBS) $(COMMON_LIB) $(PRECOMPUTED_LIB)
libsecp256k1_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_CURRENT):$(LIB_VERSION_REVISION):$(LIB_VERSION_AGE)

Expand All @@ -102,37 +107,43 @@ if USE_BENCHMARK
noinst_PROGRAMS += bench bench_internal bench_ecmult
bench_SOURCES = src/bench.c
bench_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB)
bench_CPPFLAGS = $(SECP_CONFIG_DEFINES)
bench_internal_SOURCES = src/bench_internal.c
bench_internal_LDADD = $(SECP_LIBS) $(COMMON_LIB) $(PRECOMPUTED_LIB)
bench_internal_CPPFLAGS = $(SECP_INCLUDES)
bench_internal_CPPFLAGS = $(SECP_INCLUDES) $(SECP_CONFIG_DEFINES)
bench_ecmult_SOURCES = src/bench_ecmult.c
bench_ecmult_LDADD = $(SECP_LIBS) $(COMMON_LIB) $(PRECOMPUTED_LIB)
bench_ecmult_CPPFLAGS = $(SECP_INCLUDES)
bench_ecmult_CPPFLAGS = $(SECP_INCLUDES) $(SECP_CONFIG_DEFINES)
endif

TESTS =
if USE_TESTS
noinst_PROGRAMS += tests
tests_SOURCES = src/tests.c
tests_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include $(SECP_INCLUDES) $(SECP_TEST_INCLUDES)
TESTS += noverify_tests
noinst_PROGRAMS += noverify_tests
noverify_tests_SOURCES = src/tests.c
noverify_tests_CPPFLAGS = $(SECP_INCLUDES) $(SECP_TEST_INCLUDES) $(SECP_CONFIG_DEFINES)
noverify_tests_LDADD = $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB) $(PRECOMPUTED_LIB)
noverify_tests_LDFLAGS = -static
if VALGRIND_ENABLED
tests_CPPFLAGS += -DVALGRIND
noverify_tests_CPPFLAGS += -DVALGRIND
noinst_PROGRAMS += valgrind_ctime_test
valgrind_ctime_test_SOURCES = src/valgrind_ctime_test.c
valgrind_ctime_test_LDADD = libsecp256k1.la $(SECP_LIBS) $(COMMON_LIB)
endif
if !ENABLE_COVERAGE
tests_CPPFLAGS += -DVERIFY
endif
tests_LDADD = $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB) $(PRECOMPUTED_LIB)
tests_LDFLAGS = -static
TESTS += tests
noinst_PROGRAMS += tests
tests_SOURCES = $(noverify_tests_SOURCES)
tests_CPPFLAGS = $(noverify_tests_CPPFLAGS) -DVERIFY
tests_LDADD = $(noverify_tests_LDADD)
tests_LDFLAGS = $(noverify_tests_LDFLAGS)
endif
endif

if USE_EXHAUSTIVE_TESTS
noinst_PROGRAMS += exhaustive_tests
exhaustive_tests_SOURCES = src/tests_exhaustive.c
exhaustive_tests_CPPFLAGS = $(SECP_INCLUDES)
exhaustive_tests_CPPFLAGS = $(SECP_INCLUDES) $(SECP_CONFIG_DEFINES)
if !ENABLE_COVERAGE
exhaustive_tests_CPPFLAGS += -DVERIFY
endif
Expand Down Expand Up @@ -192,11 +203,11 @@ EXTRA_PROGRAMS = precompute_ecmult precompute_ecmult_gen
CLEANFILES = $(EXTRA_PROGRAMS)

precompute_ecmult_SOURCES = src/precompute_ecmult.c
precompute_ecmult_CPPFLAGS = $(SECP_INCLUDES)
precompute_ecmult_CPPFLAGS = $(SECP_INCLUDES) $(SECP_CONFIG_DEFINES)
precompute_ecmult_LDADD = $(SECP_LIBS) $(COMMON_LIB)

precompute_ecmult_gen_SOURCES = src/precompute_ecmult_gen.c
precompute_ecmult_gen_CPPFLAGS = $(SECP_INCLUDES)
precompute_ecmult_gen_CPPFLAGS = $(SECP_INCLUDES) $(SECP_CONFIG_DEFINES)
precompute_ecmult_gen_LDADD = $(SECP_LIBS) $(COMMON_LIB)

# See Automake manual, Section "Errors with distclean".
Expand Down Expand Up @@ -224,7 +235,15 @@ maintainer-clean-local: clean-precomp
clean-precomp:
rm -f $(PRECOMP)

EXTRA_DIST = autogen.sh SECURITY.md
EXTRA_DIST = autogen.sh CHANGELOG.md SECURITY.md
EXTRA_DIST += doc/release-process.md doc/safegcd_implementation.md
EXTRA_DIST += examples/EXAMPLES_COPYING
EXTRA_DIST += sage/gen_exhaustive_groups.sage
EXTRA_DIST += sage/gen_split_lambda_constants.sage
EXTRA_DIST += sage/group_prover.sage
EXTRA_DIST += sage/prove_group_implementations.sage
EXTRA_DIST += sage/secp256k1_params.sage
EXTRA_DIST += sage/weierstrass_prover.sage

if ENABLE_MODULE_BPPP
include src/modules/bppp/Makefile.am.include
Expand Down
Loading