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

Upstream PRs 1064, 1049, 899, 1068, 1072, 1069, 1074, 1026, 1033, 748, 1079, 1088, 1090, 731, 1089, 995, 1094, 1093 #174

Merged
merged 81 commits into from
Apr 1, 2022
Merged
Changes from 1 commit
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
45f37b6
Modulo-reduce msg32 inside RFC6979 nonce fn to match spec. Fixes #1063.
paulmillr Jan 17, 2022
c9da1ba
Move secp256k1_fe_one to field.h
roconnor-blockstream Jan 19, 2022
e5c1889
Eliminate the prej array from ecmult_strauss_wnaf.
roconnor-blockstream Feb 26, 2021
ae7ba0f
Remove the unused prej allocations.
roconnor-blockstream Feb 26, 2021
b3b57ad
Eliminate the pre_a_lam array from ecmult_strauss_wnaf.
roconnor-blockstream Feb 27, 2021
7ba3ffc
Remove the unused pre_a_lam allocations.
roconnor-blockstream Feb 27, 2021
0397d00
Eliminate na_1 and na_lam state fields from ecmult_strauss_wnaf.
roconnor-blockstream Feb 27, 2021
fe34d9f
Eliminate input_pos state field from ecmult_strauss_wnaf.
roconnor-blockstream Feb 27, 2021
a731200
Replace ECMULT_TABLE_GET_GE_STORAGE macro with a function.
roconnor-blockstream Jan 18, 2022
b797a50
Create a SECP256K1_ECMULT_TABLE_VERIFY macro.
roconnor-blockstream Jan 19, 2022
c8aa516
Merge bitcoin-core/secp256k1#1064: Modulo-reduce msg32 inside RFC6979…
sipa Jan 22, 2022
070e772
Faster fixed-input ecmult tests
sipa Dec 22, 2021
0a40a48
Merge bitcoin-core/secp256k1#1049: Faster fixed-input ecmult tests
real-or-random Jan 24, 2022
d8a2463
Merge bitcoin-core/secp256k1#899: Reduce stratch space needed by ecmu…
jonasnick Jan 26, 2022
e108d00
sage: Fix incompatibility with sage 9.4
real-or-random Jan 31, 2022
925f78d
Add _fe_half and use in _gej_add_ge
peterdettman Dec 5, 2021
9cc5c25
Add test for secp256k1_fe_half
sipa Dec 22, 2021
2cbb4b1
Run more iterations of run_field_misc
sipa Dec 22, 2021
557b31f
Doubling formula using fe_half
sipa Dec 23, 2021
4eb8b93
Further improve doubling formula using fe_half
peterdettman Dec 23, 2021
b54d843
sage: Fix printing of errors
real-or-random Jan 31, 2022
d64bb5d
Add fe_half tests for worst-case inputs
peterdettman Dec 23, 2021
e848c37
Update sage files for new formulae
peterdettman Dec 27, 2021
e0db3f8
build: Replace use of deprecated autoconf macro AC_PROG_CC_C89
laanwj Feb 2, 2022
d9396a5
ci: Attempt to make macOS builds more reliable
real-or-random Feb 4, 2022
eae7586
sage: Exit with non-zero status in case of failures
real-or-random Jan 31, 2022
77cfa98
sage: Normalize sign of polynomial factors in prover
real-or-random Feb 3, 2022
d8d5485
ci: Run sage prover on CI
real-or-random Feb 3, 2022
ebb1bee
sage: Ensure that constraints are always fastfracs
real-or-random Feb 4, 2022
85b00a1
Merge bitcoin-core/secp256k1#1068: sage: Fix incompatibility with sag…
jonasnick Feb 5, 2022
5954794
Merge bitcoin-core/secp256k1#1072: ci: Attempt to make macOS builds m…
jonasnick Feb 6, 2022
5dcc6f8
Merge bitcoin-core/secp256k1#1069: build: Replace use of deprecated a…
jonasnick Feb 6, 2022
b1cb969
ci: Revert "Attempt to make macOS builds more reliable"
real-or-random Feb 8, 2022
e51ad3b
ci: Retry `brew update` a few times to avoid random failures
real-or-random Feb 8, 2022
0775283
Merge bitcoin-core/secp256k1#1074: ci: Retry brew update a few times …
jonasnick Feb 8, 2022
c881dd4
ecdh: Add test computing shared_secret=basepoint with random inputs
real-or-random Dec 3, 2021
3531a43
ecdh: Make generator_basepoint test depend on global iteration count
real-or-random Feb 9, 2022
3ef94aa
Merge bitcoin-core/secp256k1#1026: ecdh: Add test computing shared_se…
jonasnick Feb 11, 2022
1253a27
Merge bitcoin-core/secp256k1#1033: Add _fe_half and use in _gej_add_g…
real-or-random Feb 21, 2022
fee7d4b
Add an ECDSA signing and verifying example
elichai Apr 30, 2020
b0cfbcc
Add a Schnorr signing and verifying example
elichai Nov 9, 2020
422a7cc
Add a ecdh shared secret example
elichai Apr 30, 2020
517644e
Optionally compile the examples in autotools, compile+run in travis
elichai Apr 30, 2020
42e0343
Add usage examples to the readme
elichai Apr 30, 2020
7c9502c
Add a copy of the CC0 license to the examples
elichai Jul 4, 2021
64b3497
Merge bitcoin-core/secp256k1#748: Add usage examples
jonasnick Feb 23, 2022
0d4226c
configure: Use canonical variable prefix _enable consistently
real-or-random Feb 23, 2022
fabd579
configure: Remove redundant code that sets _enable variables
real-or-random Feb 23, 2022
e0838d6
configure: Add hidden --enable-dev-mode to enable all the stuff
real-or-random Feb 23, 2022
ac83be3
Merge bitcoin-core/secp256k1#1079: configure: Add hidden --enable-dev…
jonasnick Feb 27, 2022
eb28464
Change SHA256 byte counter from size_t to uint64_t
real-or-random Mar 31, 2020
8e3dde1
Simplify struct initializer for SHA256 padding
real-or-random Mar 31, 2020
9b514ce
Add test vector for very long SHA256 messages
real-or-random Apr 16, 2020
0d253d5
configure: Use modern way to set AR
real-or-random Mar 13, 2022
0e5cbd0
Merge bitcoin-core/secp256k1#1088: configure: Use modern way to set AR
jonasnick Mar 16, 2022
21b2eba
configure: Remove redundant pkg-config code
real-or-random Mar 16, 2022
e0508ee
Merge bitcoin-core/secp256k1#1090: configure: Remove redundant pkg-co…
real-or-random Mar 17, 2022
80cf4ee
build: stop treating schnorrsig, extrakeys modules as experimental
jonasnick Oct 20, 2021
3db0560
Add SECP256K1_DEPRECATED attribute for marking API parts as deprecated
real-or-random Mar 16, 2022
fc94a2d
Use SECP256K1_DEPRECATED for existing deprecated API functions
real-or-random Mar 16, 2022
99e6568
schnorrsig: Rename schnorrsig_sign to schnorsig_sign32 and deprecate
real-or-random Mar 16, 2022
f813bb0
schnorrsig: Adapt example to new API
real-or-random Mar 16, 2022
b8f8b99
docs: Fix return value for functions that don't have invalid inputs
real-or-random Mar 16, 2022
7f09d0f
README: mention that ARM assembly is experimental
jonasnick Oct 20, 2021
f8d9174
Add SHA256 bit counter tests
real-or-random Apr 22, 2020
587239d
Merge bitcoin-core/secp256k1#731: Change SHA256 byte counter from siz…
real-or-random Mar 24, 2022
1ac7e31
Merge bitcoin-core/secp256k1#1089: Schnorrsig API improvements
real-or-random Mar 24, 2022
d0ad581
Merge bitcoin-core/secp256k1#995: build: stop treating schnorrsig, ex…
real-or-random Mar 25, 2022
8d89b9e
hash: Make code agnostic of endianness
real-or-random Mar 25, 2022
616b43d
util: Remove endianness detection
real-or-random Mar 25, 2022
d9d94a9
doc: mention optional modules in README
robot-dreams Mar 25, 2022
55512d3
doc: clean up module help text in configure.ac
robot-dreams Mar 25, 2022
912b7cc
Merge bitcoin-core/secp256k1#1094: doc: Clarify configure flags for o…
jonasnick Mar 25, 2022
37d3692
tests: Add tests for _read_be32 and _write_be32
real-or-random Mar 26, 2022
8746600
Merge bitcoin-core/secp256k1#1093: hash: Make code agnostic of endian…
real-or-random Mar 28, 2022
8298c0c
Merge commits 'c8aa516b 0a40a486 d8a24632 85b00a1c 59547943 5dcc6f8d …
jonasnick Mar 30, 2022
2adb741
examples: rename example_musig to musig_example for consistency
jonasnick Mar 30, 2022
03bea1e
configure: add -zkp modules to dev-mode and remove redundant code
jonasnick Mar 30, 2022
7c5af74
ci: fix missing EXPERIMENTAL flags
jonasnick Mar 30, 2022
eccba5b
examples: relicense musig example to CC0 public domain
jonasnick Mar 31, 2022
645d9c5
examples: let musig use random.h instead of /dev/urandom
jonasnick Mar 31, 2022
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
Prev Previous commit
Next Next commit
docs: Fix return value for functions that don't have invalid inputs
_tagged_sha256 simply cannot have invalid inputs.

The other functions could in some sense have invalid inputs but only in
violation of the type system. For example, a pubkey could be invalid but
invalid objects of type secp256k1_pubkey either can't be obtained
via the API or will be caught by an ARG_CHECK when calling pubkey_load.

This is consistent with similar functions in the public API, e.g.,
_ec_pubkey_negate or _ec_pubkey_serialize.
real-or-random committed Mar 18, 2022
commit b8f8b99f0fb3a5cd4c6fb1c9c8dfed881839e19e
2 changes: 1 addition & 1 deletion include/secp256k1.h
Original file line number Diff line number Diff line change
@@ -814,7 +814,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_combine(
* implementations optimized for a specific tag can precompute the SHA256 state
* after hashing the tag hashes.
*
* Returns 0 if the arguments are invalid and 1 otherwise.
* Returns: 1 always.
* Args: ctx: pointer to a context object
* Out: hash32: pointer to a 32-byte array to store the resulting hash
* In: tag: pointer to an array containing the tag
9 changes: 4 additions & 5 deletions include/secp256k1_extrakeys.h
Original file line number Diff line number Diff line change
@@ -81,8 +81,7 @@ SECP256K1_API int secp256k1_xonly_pubkey_cmp(

/** Converts a secp256k1_pubkey into a secp256k1_xonly_pubkey.
*
* Returns: 1 if the public key was successfully converted
* 0 otherwise
* Returns: 1 always.
*
* Args: ctx: pointer to a context object.
* Out: xonly_pubkey: pointer to an x-only public key object for placing the converted public key.
@@ -172,7 +171,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_create(

/** Get the secret key from a keypair.
*
* Returns: 0 if the arguments are invalid. 1 otherwise.
* Returns: 1 always.
* Args: ctx: pointer to a context object.
* Out: seckey: pointer to a 32-byte buffer for the secret key.
* In: keypair: pointer to a keypair.
@@ -185,7 +184,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_sec(

/** Get the public key from a keypair.
*
* Returns: 0 if the arguments are invalid. 1 otherwise.
* Returns: 1 always.
* Args: ctx: pointer to a context object.
* Out: pubkey: pointer to a pubkey object. If 1 is returned, it is set to
* the keypair public key. If not, it's set to an invalid value.
@@ -202,7 +201,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_keypair_pub(
* This is the same as calling secp256k1_keypair_pub and then
* secp256k1_xonly_pubkey_from_pubkey.
*
* Returns: 0 if the arguments are invalid. 1 otherwise.
* Returns: 1 always.
* Args: ctx: pointer to a context object.
* Out: pubkey: pointer to an xonly_pubkey object. If 1 is returned, it is set
* to the keypair public key after converting it to an