Skip to content

Commit 6db00f5

Browse files
committed
Merge #132: Upstream PRs 831, 907, 903, 889, 918, 906, 928, 922, 933, Merge bitcoin-core/secp256k1#936: Fix gen_context/ASM build on ARM, 925, 937, 926, Merge bitcoin-core/secp256k1#940: contrib: Explain explicit header guards, 850, 930, 941, 846, 947, 662, 950
f09497e CI: tweak cirrus.yml to prevent OOM and timeout w sanitizer/valgrind (Jonas Nick) 7226cf2 ecdsa_adaptor: fix too small buffer in tests (Jonas Nick) b053e85 ecdsa_adaptor: fix test case with invalid signature (Jonas Nick) d27e459 Revert "Remove unused Jacobi symbol support" (Jonas Nick) c58c4ea ci: Add ppc64le build (Tim Ruffing) 8f879c2 Fix array size in bench_ecmult (Jonas Nick) 2fe1b50 Add ecmult_gen, ecmult_const and ecmult to benchmark (Jonas Nick) 593e6ba Clean up ecmult_bench to make space for more benchmarks (Jonas Nick) a35fdd3 ci: Run PRs on merge result even for i686 (Tim Ruffing) 02dcea1 ci: Make test iterations configurable and tweak for sanitizer builds (Tim Ruffing) 489ff5c tests: Treat empty SECP2561_TEST_ITERS as if it was unset (Tim Ruffing) fcfcb97 ci: Simplify to use generic wrapper for QEMU, Valgrind, etc (Tim Ruffing) de4157f ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs (Tim Ruffing) 09b3bb8 Clean up git tree (Tim Ruffing) 8bbad7a Add asm build to ARM32 CI (Pieter Wuille) 7d65ed5 Add ARM32/ARM64 CI (Pieter Wuille) 6eceec6 add `secp256k1_xonly_pubkey_cmp` method (Andrew Poelstra) 0d9561a add `secp256k1_ec_pubkey_cmp` method (Andrew Poelstra) 22a9ea1 contrib: Explain explicit header guards (Tim Ruffing) 0881633 secp256k1.h: clarify that by default arguments must be != NULL (Jonas Nick) 14c9739 tests: Improve secp256k1_ge_set_all_gej_var for some infinity inputs (Tim Ruffing) 4a19668 tests: Test secp256k1_ge_set_all_gej_var for all infinity inputs (Tim Ruffing) 45b6468 Have secp256k1_ge_set_all_gej_var initialize all fields. Previous behaviour would not initialize r->y values in the case where infinity is passed in. Furthermore, the previous behaviour wouldn't initialize anything in the case where all inputs were infinity. (Russell O'Connor) 31c0f6d Have secp256k1_gej_double_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in. (Russell O'Connor) dd6c3de Have secp256k1_ge_set_gej_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in. (Russell O'Connor) 3c90bdd change local lib headers to be relative for those pointing at "include/" dir (William Bright) c848352 Makefile.am: Don't pass a variable twice (Tim Ruffing) 2161f31 Makefile.am: Honor config when building gen_context (Tim Ruffing) 99f47c2 gen_context: Don't use external ASM because it complicates the build (Tim Ruffing) 99e2d5b Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers. (Gregory Maxwell) ed5a199 tests: fopen /dev/urandom in binary mode (Tim Ruffing) 4dc37bf Add mingw32-w64/wine CI build (Pieter Wuille) ae9e648 Define SECP256K1_BUILD in secp256k1.c directly. (Gregory Maxwell) be0609f Add unit tests for edge cases with delta=1/2 variant of divsteps (Pieter Wuille) cd393ce Optimization: only do 59 hddivsteps per iteration instead of 62 (Pieter Wuille) 277b224 Use modified divsteps with initial delta=1/2 for constant-time (Pieter Wuille) 376ca36 Fix typo in explanation (Pieter Wuille) 0706796 add ECMULT_GEN_PREC_BITS to basic_config.h (Aaron Voisine) a3aa262 gen_context: Don't include basic-config.h (Tim Ruffing) 99a1cfe print warnings for conditional-uninitialized (PiRK) 3d2cf6c initialize variable in tests (PiRK) 23c3fb6 Make argument of fe_normalizes_to_zero{_var} const (Pieter Wuille) 4504472 changed import to use brackets <> for openssl as they are not local to the project (William Bright) 24ad04f Make scalar_inverse{,_var} benchmark scale with SECP256K1_BENCH_ITERS (Pieter Wuille) ebc1af7 Optimization: track f,g limb count and pass to new variable-time update_fg_var (Peter Dettman) b306935 Optimization: use formulas instead of lookup tables for cancelling g bits (Peter Dettman) 9164a1b Optimization: special-case zero modulus limbs in modinv64 (Pieter Wuille) 1f233b3 Remove num/gmp support (Pieter Wuille) 20448b8 Remove unused Jacobi symbol support (Pieter Wuille) 5437e7b Remove unused scalar_sqr (Pieter Wuille) aa9cc52 Improve field/scalar inverse tests (Pieter Wuille) 1e0e885 Make field/scalar code use the new modinv modules for inverses (Pieter Wuille) 436281a Move secp256k1_fe_inverse{_var} to per-impl files (Pieter Wuille) aa404d5 Move secp256k1_scalar_{inverse{_var},is_even} to per-impl files (Pieter Wuille) 08d5496 Improve bounds checks in modinv modules (Pieter Wuille) 151aac0 Add tests for modinv modules (Pieter Wuille) d8a92fc Add extensive comments on the safegcd algorithm and implementation (Pieter Wuille) 8e415ac Add safegcd based modular inverse modules (Peter Dettman) de0a643 Add secp256k1_ctz{32,64}_var functions (Pieter Wuille) Pull request description: ACKs for top commit: real-or-random: ACK f09497e Tree-SHA512: 6cf3e96c5974e9aa17bd649fa7fdd738090ec3ab8c99e144fec397c086a24adc2ace9a5218a3c527989fc07e1d5c669027e4c895caf92d22771c8414b2a9bf35
2 parents 91b6477 + f09497e commit 6db00f5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+4387
-1763
lines changed

.cirrus.yml

Lines changed: 149 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
env:
22
WIDEMUL: auto
3-
BIGNUM: auto
43
STATICPRECOMPUTATION: yes
54
ECMULTGENPRECISION: auto
65
ASM: no
76
BUILD: check
87
WITH_VALGRIND: yes
9-
RUN_VALGRIND: no
108
EXTRAFLAGS:
119
HOST:
1210
ECDH: no
@@ -21,7 +19,8 @@ env:
2119
EXPERIMENTAL: no
2220
CTIMETEST: yes
2321
BENCH: yes
24-
ITERS: 2
22+
TEST_ITERS:
23+
BENCH_ITERS: 2
2524
MAKEFLAGS: -j2
2625

2726
cat_logs_snippet: &CAT_LOGS
@@ -65,47 +64,13 @@ task:
6564
- env: {WIDEMUL: int128, RECOVERY: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes}
6665
- env: {WIDEMUL: int128, ECDH: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes}
6766
- env: {WIDEMUL: int128, ASM: x86_64}
68-
- env: {BIGNUM: no}
69-
- env: {BIGNUM: no, RECOVERY: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes}
70-
- env: {BIGNUM: no, STATICPRECOMPUTATION: no}
67+
- env: { RECOVERY: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes}
68+
- env: { STATICPRECOMPUTATION: no}
7169
- env: {BUILD: distcheck, WITH_VALGRIND: no, CTIMETEST: no, BENCH: no}
7270
- env: {CPPFLAGS: -DDETERMINISTIC}
7371
- env: {CFLAGS: -O0, CTIMETEST: no}
74-
- env:
75-
CFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer"
76-
LDFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer"
77-
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1"
78-
BIGNUM: no
79-
ASM: x86_64
80-
ECDH: yes
81-
RECOVERY: yes
82-
EXPERIMENTAL: yes
83-
SCHNORRSIG: yes
84-
ECDSA_S2C: yes
85-
RANGEPROOF: yes
86-
WHITELIST: yes
87-
GENERATOR: yes
88-
MUSIG: yes
89-
ECDSAADAPTOR: yes
90-
CTIMETEST: no
9172
- env: { ECMULTGENPRECISION: 2 }
9273
- env: { ECMULTGENPRECISION: 8 }
93-
- env:
94-
RUN_VALGRIND: yes
95-
BIGNUM: no
96-
ASM: x86_64
97-
ECDH: yes
98-
RECOVERY: yes
99-
EXPERIMENTAL: yes
100-
SCHNORRSIG: yes
101-
ECDSA_S2C: yes
102-
RANGEPROOF: yes
103-
WHITELIST: yes
104-
GENERATOR: yes
105-
MUSIG: yes
106-
ECDSAADAPTOR: yes
107-
EXTRAFLAGS: "--disable-openssl-tests"
108-
BUILD:
10974
matrix:
11075
- env:
11176
CC: gcc
@@ -139,11 +104,6 @@ task:
139104
CC: i686-linux-gnu-gcc
140105
- env:
141106
CC: clang --target=i686-pc-linux-gnu -isystem /usr/i686-linux-gnu/include
142-
matrix:
143-
- env:
144-
BIGNUM: gmp
145-
- env:
146-
BIGNUM: no
147107
<< : *MERGE_BASE
148108
test_script:
149109
- ./ci/cirrus.sh
@@ -204,7 +164,7 @@ task:
204164
# If we haven't restored from cached (and just run brew install), this is a no-op.
205165
- brew link valgrind
206166
brew_script:
207-
- brew install automake libtool gmp gcc@9
167+
- brew install automake libtool gcc@9
208168
<< : *MERGE_BASE
209169
test_script:
210170
- ./ci/cirrus.sh
@@ -217,11 +177,10 @@ task:
217177
cpu: 1
218178
memory: 1G
219179
env:
220-
QEMU_CMD: qemu-s390x
180+
WRAPPER_CMD: qemu-s390x
181+
TEST_ITERS: 16
221182
HOST: s390x-linux-gnu
222-
BUILD:
223183
WITH_VALGRIND: no
224-
BIGNUM: no
225184
ECDH: yes
226185
RECOVERY: yes
227186
EXPERIMENTAL: yes
@@ -239,3 +198,145 @@ task:
239198
- rm /etc/ld.so.cache
240199
- ./ci/cirrus.sh
241200
<< : *CAT_LOGS
201+
202+
task:
203+
name: "ARM32: Linux (Debian stable, QEMU)"
204+
container:
205+
dockerfile: ci/linux-debian.Dockerfile
206+
cpu: 1
207+
memory: 1G
208+
env:
209+
WRAPPER_CMD: qemu-arm
210+
TEST_ITERS: 16
211+
HOST: arm-linux-gnueabihf
212+
WITH_VALGRIND: no
213+
ECDH: yes
214+
RECOVERY: yes
215+
EXPERIMENTAL: yes
216+
SCHNORRSIG: yes
217+
CTIMETEST: no
218+
matrix:
219+
- env: {}
220+
- env: {ASM: arm}
221+
<< : *MERGE_BASE
222+
test_script:
223+
- ./ci/cirrus.sh
224+
<< : *CAT_LOGS
225+
226+
task:
227+
name: "ARM64: Linux (Debian stable, QEMU)"
228+
container:
229+
dockerfile: ci/linux-debian.Dockerfile
230+
cpu: 1
231+
memory: 1G
232+
env:
233+
WRAPPER_CMD: qemu-aarch64
234+
TEST_ITERS: 16
235+
HOST: aarch64-linux-gnu
236+
WITH_VALGRIND: no
237+
ECDH: yes
238+
RECOVERY: yes
239+
EXPERIMENTAL: yes
240+
SCHNORRSIG: yes
241+
CTIMETEST: no
242+
<< : *MERGE_BASE
243+
test_script:
244+
- ./ci/cirrus.sh
245+
<< : *CAT_LOGS
246+
247+
task:
248+
name: "ppc64le: Linux (Debian stable, QEMU)"
249+
container:
250+
dockerfile: ci/linux-debian.Dockerfile
251+
cpu: 1
252+
memory: 1G
253+
env:
254+
WRAPPER_CMD: qemu-ppc64le
255+
TEST_ITERS: 16
256+
HOST: powerpc64le-linux-gnu
257+
WITH_VALGRIND: no
258+
ECDH: yes
259+
RECOVERY: yes
260+
EXPERIMENTAL: yes
261+
SCHNORRSIG: yes
262+
CTIMETEST: no
263+
<< : *MERGE_BASE
264+
test_script:
265+
- ./ci/cirrus.sh
266+
<< : *CAT_LOGS
267+
268+
task:
269+
name: "x86_64 (mingw32-w64): Windows (Debian stable, Wine)"
270+
container:
271+
dockerfile: ci/linux-debian.Dockerfile
272+
cpu: 1
273+
memory: 1G
274+
env:
275+
WRAPPER_CMD: wine64-stable
276+
TEST_ITERS: 16
277+
HOST: x86_64-w64-mingw32
278+
WITH_VALGRIND: no
279+
ECDH: yes
280+
RECOVERY: yes
281+
EXPERIMENTAL: yes
282+
SCHNORRSIG: yes
283+
CTIMETEST: no
284+
<< : *MERGE_BASE
285+
test_script:
286+
- ./ci/cirrus.sh
287+
<< : *CAT_LOGS
288+
289+
# Sanitizers
290+
task:
291+
timeout_in: 120m
292+
container:
293+
dockerfile: ci/linux-debian.Dockerfile
294+
cpu: 1
295+
memory: 2G
296+
env:
297+
ECDH: yes
298+
RECOVERY: yes
299+
EXPERIMENTAL: yes
300+
SCHNORRSIG: yes
301+
ECDSA_S2C: yes
302+
RANGEPROOF: yes
303+
WHITELIST: yes
304+
GENERATOR: yes
305+
MUSIG: yes
306+
ECDSAADAPTOR: yes
307+
CTIMETEST: no
308+
EXTRAFLAGS: "--disable-openssl-tests"
309+
matrix:
310+
- name: "Valgrind (memcheck)"
311+
env:
312+
# The `--error-exitcode` is required to make the test fail if valgrind found errors, otherwise it'll return 0 (https://www.valgrind.org/docs/manual/manual-core.html)
313+
WRAPPER_CMD: "valgrind --error-exitcode=42"
314+
TEST_ITERS: 8
315+
- name: "UBSan, ASan, LSan"
316+
env:
317+
CFLAGS: "-fsanitize=undefined,address"
318+
CFLAGS_FOR_BUILD: "-fsanitize=undefined,address"
319+
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1"
320+
ASAN_OPTIONS: "strict_string_checks=1:detect_stack_use_after_return=1:detect_leaks=1"
321+
LSAN_OPTIONS: "use_unaligned=1"
322+
TEST_ITERS: 32
323+
# Try to cover many configurations with just a tiny matrix.
324+
matrix:
325+
- env:
326+
ASM: auto
327+
STATICPRECOMPUTATION: yes
328+
- env:
329+
ASM: no
330+
STATICPRECOMPUTATION: no
331+
ECMULTGENPRECISION: 2
332+
matrix:
333+
- env:
334+
CC: clang
335+
- env:
336+
HOST: i686-linux-gnu
337+
CC: i686-linux-gnu-gcc
338+
<< : *MERGE_BASE
339+
test_script:
340+
- ./ci/cirrus.sh
341+
<< : *CAT_LOGS
342+

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ libtool
3535
*~
3636
*.log
3737
*.trs
38+
39+
coverage/
40+
coverage.html
41+
coverage.*.html
42+
*.gcda
43+
*.gcno
44+
*.gcov
45+
3846
src/libsecp256k1-config.h
3947
src/libsecp256k1-config.h.in
4048
src/ecmult_static_context.h

Makefile.am

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ noinst_HEADERS += src/scalar_8x32_impl.h
1414
noinst_HEADERS += src/scalar_low_impl.h
1515
noinst_HEADERS += src/group.h
1616
noinst_HEADERS += src/group_impl.h
17-
noinst_HEADERS += src/num_gmp.h
18-
noinst_HEADERS += src/num_gmp_impl.h
1917
noinst_HEADERS += src/eccommit.h
2018
noinst_HEADERS += src/eccommit_impl.h
2119
noinst_HEADERS += src/ecdsa.h
@@ -28,14 +26,16 @@ noinst_HEADERS += src/ecmult_const.h
2826
noinst_HEADERS += src/ecmult_const_impl.h
2927
noinst_HEADERS += src/ecmult_gen.h
3028
noinst_HEADERS += src/ecmult_gen_impl.h
31-
noinst_HEADERS += src/num.h
32-
noinst_HEADERS += src/num_impl.h
3329
noinst_HEADERS += src/field_10x26.h
3430
noinst_HEADERS += src/field_10x26_impl.h
3531
noinst_HEADERS += src/field_5x52.h
3632
noinst_HEADERS += src/field_5x52_impl.h
3733
noinst_HEADERS += src/field_5x52_int128_impl.h
3834
noinst_HEADERS += src/field_5x52_asm_impl.h
35+
noinst_HEADERS += src/modinv32.h
36+
noinst_HEADERS += src/modinv32_impl.h
37+
noinst_HEADERS += src/modinv64.h
38+
noinst_HEADERS += src/modinv64_impl.h
3939
noinst_HEADERS += src/assumptions.h
4040
noinst_HEADERS += src/util.h
4141
noinst_HEADERS += src/scratch.h
@@ -70,7 +70,7 @@ endif
7070
endif
7171

7272
libsecp256k1_la_SOURCES = src/secp256k1.c
73-
libsecp256k1_la_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES)
73+
libsecp256k1_la_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES)
7474
libsecp256k1_la_LIBADD = $(SECP_LIBS) $(COMMON_LIB)
7575

7676
if VALGRIND_ENABLED
@@ -83,27 +83,27 @@ noinst_PROGRAMS += bench_verify bench_sign bench_internal bench_ecmult
8383
bench_verify_SOURCES = src/bench_verify.c
8484
bench_verify_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB)
8585
# SECP_TEST_INCLUDES are only used here for CRYPTO_CPPFLAGS
86-
bench_verify_CPPFLAGS = -DSECP256K1_BUILD $(SECP_TEST_INCLUDES)
86+
bench_verify_CPPFLAGS = $(SECP_TEST_INCLUDES)
8787
bench_sign_SOURCES = src/bench_sign.c
8888
bench_sign_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB)
8989
bench_internal_SOURCES = src/bench_internal.c
9090
bench_internal_LDADD = $(SECP_LIBS) $(COMMON_LIB)
91-
bench_internal_CPPFLAGS = -DSECP256K1_BUILD $(SECP_INCLUDES)
91+
bench_internal_CPPFLAGS = $(SECP_INCLUDES)
9292
bench_ecmult_SOURCES = src/bench_ecmult.c
9393
bench_ecmult_LDADD = $(SECP_LIBS) $(COMMON_LIB)
94-
bench_ecmult_CPPFLAGS = -DSECP256K1_BUILD $(SECP_INCLUDES)
94+
bench_ecmult_CPPFLAGS = $(SECP_INCLUDES)
9595
endif
9696

9797
TESTS =
9898
if USE_TESTS
9999
noinst_PROGRAMS += tests
100100
tests_SOURCES = src/tests.c
101-
tests_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/src -I$(top_srcdir)/include $(SECP_INCLUDES) $(SECP_TEST_INCLUDES)
101+
tests_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include $(SECP_INCLUDES) $(SECP_TEST_INCLUDES)
102102
if VALGRIND_ENABLED
103103
tests_CPPFLAGS += -DVALGRIND
104104
noinst_PROGRAMS += valgrind_ctime_test
105105
valgrind_ctime_test_SOURCES = src/valgrind_ctime_test.c
106-
valgrind_ctime_test_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_LIBS) $(COMMON_LIB)
106+
valgrind_ctime_test_LDADD = libsecp256k1.la $(SECP_LIBS) $(COMMON_LIB)
107107
endif
108108
if !ENABLE_COVERAGE
109109
tests_CPPFLAGS += -DVERIFY
@@ -116,7 +116,7 @@ endif
116116
if USE_EXHAUSTIVE_TESTS
117117
noinst_PROGRAMS += exhaustive_tests
118118
exhaustive_tests_SOURCES = src/tests_exhaustive.c
119-
exhaustive_tests_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/src $(SECP_INCLUDES)
119+
exhaustive_tests_CPPFLAGS = -I$(top_srcdir)/src $(SECP_INCLUDES)
120120
if !ENABLE_COVERAGE
121121
exhaustive_tests_CPPFLAGS += -DVERIFY
122122
endif
@@ -131,7 +131,7 @@ CPPFLAGS_FOR_BUILD +=-I$(top_srcdir) -I$(builddir)/src
131131
gen_context_OBJECTS = gen_context.o
132132
gen_context_BIN = gen_context$(BUILD_EXEEXT)
133133
gen_%.o: src/gen_%.c src/libsecp256k1-config.h
134-
$(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c $< -o $@
134+
$(CC_FOR_BUILD) $(DEFS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c $< -o $@
135135

136136
$(gen_context_BIN): $(gen_context_OBJECTS)
137137
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $^ -o $@

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ Implementation details
3535
* Optimized implementation of arithmetic modulo the curve's field size (2^256 - 0x1000003D1).
3636
* Using 5 52-bit limbs (including hand-optimized assembly for x86_64, by Diederik Huys).
3737
* Using 10 26-bit limbs (including hand-optimized assembly for 32-bit ARM, by Wladimir J. van der Laan).
38-
* Field inverses and square roots using a sliding window over blocks of 1s (by Peter Dettman).
3938
* Scalar operations
4039
* Optimized implementation without data-dependent branches of arithmetic modulo the curve's order.
4140
* Using 4 64-bit limbs (relying on __int128 support in the compiler).
4241
* Using 8 32-bit limbs.
42+
* Modular inverses (both field elements and scalars) based on [safegcd](https://gcd.cr.yp.to/index.html) with some modifications, and a variable-time variant (by Peter Dettman).
4343
* Group operations
4444
* Point addition formula specifically simplified for the curve equation (y^2 = x^3 + 7).
4545
* Use addition between points in Jacobian and affine coordinates where possible.
@@ -97,7 +97,8 @@ To create a report, `gcovr` is recommended, as it includes branch coverage repor
9797

9898
To create a HTML report with coloured and annotated source code:
9999

100-
$ gcovr --exclude 'src/bench*' --html --html-details -o coverage.html
100+
$ mkdir -p coverage
101+
$ gcovr --exclude 'src/bench*' --html --html-details -o coverage/coverage.html
101102

102103
Reporting a vulnerability
103104
------------

build-aux/m4/bitcoin_secp.m4

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,6 @@ if test x"$has_libcrypto" = x"yes" && test x"$has_openssl_ec" = x; then
7575
fi
7676
])
7777

78-
dnl
79-
AC_DEFUN([SECP_GMP_CHECK],[
80-
if test x"$has_gmp" != x"yes"; then
81-
CPPFLAGS_TEMP="$CPPFLAGS"
82-
CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS"
83-
LIBS_TEMP="$LIBS"
84-
LIBS="$GMP_LIBS $LIBS"
85-
AC_CHECK_HEADER(gmp.h,[AC_CHECK_LIB(gmp, __gmpz_init,[has_gmp=yes; GMP_LIBS="$GMP_LIBS -lgmp"; AC_DEFINE(HAVE_LIBGMP,1,[Define this symbol if libgmp is installed])])])
86-
CPPFLAGS="$CPPFLAGS_TEMP"
87-
LIBS="$LIBS_TEMP"
88-
fi
89-
])
90-
9178
AC_DEFUN([SECP_VALGRIND_CHECK],[
9279
if test x"$has_valgrind" != x"yes"; then
9380
CPPFLAGS_TEMP="$CPPFLAGS"

0 commit comments

Comments
 (0)