2531 Commits

Author SHA1 Message Date
Tim Ruffing
395e65e9f1 Merge branch 'master' into sync-upstream 2023-08-01 11:00:23 +02:00
Jonas Nick
394e09ee84 musig: change test vector generation code shebang from python to python3 2023-08-01 10:53:56 +02:00
Tim Ruffing
aa3edea119 scalar: Remove unused secp256k1_scalar_chacha20
Unused since a11250330b24b3dffdf11d2de5d496397b4e4410.
2023-08-01 10:50:10 +02:00
Tim Ruffing
167194bede rangeproof: Use util functions for writing big endian 2023-08-01 10:48:34 +02:00
Tim Ruffing
82777bba34 bppp: Fix test for invalid sign byte
The test is supposed to create an invalid sign byte. Before this PR,
the generated sign byte could in fact be valid due to an overflow.

Co-authored-by: Jonas Nick <jonasd.nick@gmail.com>
2023-07-28 14:20:44 +02:00
Tim Ruffing
54b37db953 build: Fix linkage of extra binaries in -zkp modules 2023-07-28 14:20:42 +02:00
Tim Ruffing
9e96a2e9d8 hsort tests: Don't call secp256k1_testrand_int(0) 2023-07-28 10:52:25 +02:00
Jonas Nick
80187089ff
Merge commits '4494a369 3aef6ab8 0fa84f86 249c81ea 7966aee3 fb758fe8 3fc1de5c 0aacf643 9e6d1b0e 332af315 afd7eb4a c9ebca95 cc557575 0f7657d5 907a6721 b40e2d30 c545fdc3 2bd5f3e6 0e00fc7d c734c642 26392da2 ' into temp-merge-1386 2023-07-27 18:57:30 +00:00
Jonas Nick
50e20fa7d4
Merge elementsproject/secp256k1-zkp#257: Upstream PRs 1314, 1317, 1318, 1316, 1327, 1310, 1328, 1333, 1330, 1334, 1337, 1341, 1339, 1350, 1349, 1338, 1129, 1347, 1336, 1295, 1354, 1355, 1356
525b661f83554281707182dc0756f26cca325915 bppp/build: Fix linkage of benchmark (Tim Ruffing)
4c70cc9bf56ab36f20cba5695d4f728a84779f91 Suppress wrong/buggy warning in MSVC <19.33 (Tim Ruffing)
579999b4252083afc8fb59fbec9e027ca7691194 scalar: adjust muladd2 to new int128 interface (Jonas Nick)
b160486766653015e05f94b6c8742d76850e2556 ecdsa_adaptor: add missing include (Jonas Nick)
c862a9fb49e885dcafb42d4e21e05a244248aab0 ci: Adjust Docker image to Debian 12 "bookworm" (Hennadii Stepanov)
a1782098a9f0174aa7b7da431bf77c009dfeef51 ci: Force DWARF v4 for Clang when Valgrind tests are expected (Hennadii Stepanov)
8a7273465b3b17d6dedc67c7aac32a89a0a4dacf Help the compiler prove that a loop is entered (Tim Ruffing)
67887ae65cf11d02c7055709082acd0e5d86db9b Fix a typo in the error message (Hennadii Stepanov)
7c7467ab7f935f6b982064c8c48772a433da1f8f Refer to ellswift.md in API docs (Pieter Wuille)
c32ffd8d8c833a964ee7fbb294640764ad25de5d Add ellswift to CHANGELOG (Pieter Wuille)
bc7c8db179a56cf7273f3c4c0decd10543a10521 abi: Use dllexport for mingw builds (Cory Fields)
5b7bf2e9d4ee02cbec1105ad6e890c34a4da1beb Use `__shiftright128` intrinsic in `secp256k1_u128_rshift` on MSVC (Hennadii Stepanov)
57791374579595bbc5d8d2e55f7fa0bc40d861a4 field: Document return value of fe_sqrt() (Tim Ruffing)
90e360acc2511f313964e394005bafb377b4f191 Add doc/ellswift.md with ElligatorSwift explanation (Pieter Wuille)
4f091847c20c9e9dd3cece2e8b62549278e5028b Add ellswift testing to CI (Pieter Wuille)
1bcea8c57f3f232c8e91d9eb3aad522766d13026 Add benchmarks for ellswift module (Pieter Wuille)
2d1d41acf85a385be6c436307eb826122c21846f Add ctime tests for ellswift module (Pieter Wuille)
df633cdeba133a9468c43f055122b07bf102dd2d Add _prefix and _bip324 ellswift_xdh hash functions (Pieter Wuille)
9695deb351e7742f78dc4ed72dea6655dcf6bb0e Add tests for ellswift module (Pieter Wuille)
c47917bbd62c488fb168431169c1ffe780562da1 Add ellswift module implementing ElligatorSwift (Pieter Wuille)
79e5b2a8b80f507e2c9936ff1c4e2fb39bc66a4e Add functions to test if X coordinate is valid (Pieter Wuille)
a597a5a9cedc27eb6a1190b1959cb9fe0d26a7dc Add benchmark for key generation (Pieter Wuille)
e449af6872445d33a0796224fcb733be6476ad36 Drop no longer needed `#include "../include/secp256k1.h"` (Hennadii Stepanov)
f1652528be5a287a3c33a4fae1e5763693333c2b Normalize ge produced from secp256k1_pubkey_load (stratospher)
7067ee54b4206c26b382980f3c20b5fa0262a23a tests: add tests for `secp256k1_{read,write}_be64` (Sebastian Falbesoner)
740528caad8c37e335cba2bcd02790d94c22e767 scalar: use newly introduced `secp256k1_{read,write}_be64` helpers (4x64 impl.) (Sebastian Falbesoner)
887183e7de4d1941792d78471a3adb004fd4ec8e scalar: use `secp256k1_{read,write}_be32` helpers (4x64 impl.) (Sebastian Falbesoner)
52b84238de27889f2517c845757bf5c2c65ed1d6 scalar: use `secp256k1_{read,write}_be32` helpers (8x32 impl.) (Sebastian Falbesoner)
f3644287b10cd7339fbb0e35e953235351f5efb6 docs: correct `pubkey` param descriptions for `secp256k1_keypair_{xonly_,}pub` (Sebastian Falbesoner)
db29bf220c73bc71b9d48c262ba2e88c1e741f92 ci: Remove quirk that runs dummy command after wineserver (Tim Ruffing)
c7db4942b34acd2a34e6249112f6c1db6cf5681d ci: Fix error D8037 in `cl.exe` (Hennadii Stepanov)
7dae11586135b59bd59fd9889c56aa9b6509021e Revert "ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe" (Hennadii Stepanov)
605e07e3657e4ff8d11893ee680a0446febf73a1 fix input range comment for `secp256k1_fe_add_int` (Sebastian Falbesoner)
ade5b367018a624ff7ca1ecbb4a64889d47b0142 tests: add checks for scalar constants `secp256k1_scalar_{zero,one}` (Sebastian Falbesoner)
654246c63585422a184121a26d42dcae792e87c6 refactor: take use of `secp256k1_scalar_{zero,one}` constants (Sebastian Falbesoner)
e83801f5db2cb63e6343eff0ecfa40b7cd4a9090 test: Warn if both `VERIFY` and `COVERAGE` are defined (Hennadii Stepanov)
1549db0ca5193b8ba5d8f7478d54af2ca4b36c7e build: Level up MSVC warnings (Hennadii Stepanov)
ad846032973cc1afd360613626c4e475bba66f56 release process: clarify change log updates (Jonas Nick)
6348bc7eeed8dbd9cb9bd5df643451a37392bae3 release process: fix process for maintenance release (Jonas Nick)
79fa50b082dd28dd4282d6211d52130db317389b release process: mention targeted release schedule (Jonas Nick)
165206789bc1ff1a95f62d9cd3ed79169b884d67 release process: add sanity checks (Jonas Nick)
27504d5c941df89bc828067248270179c9dcb04b ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe (Tim Ruffing)
6433175ffe2435bcee7333e21480e4194083caae Do not invoke fe_is_zero on failed set_b32_limit (Pieter Wuille)
5768b502291ed4214cf84b7d80ff540ed57d45c4 build: Enable -DVERIFY for precomputation binaries (Tim Ruffing)
31b4bbee1e115865a8a3aff6ccf04f6108371c5d Make fe_cmov take max of magnitudes (Pieter Wuille)
95448ef2f8a162c06b9cd566ce935164b14c6840 release cleanup: bump version after 0.3.2 (Pieter Wuille)

Pull request description:

ACKs for top commit:
  real-or-random:
    tACK 525b661f83554281707182dc0756f26cca325915

Tree-SHA512: edee04b48ebcede0ad48b165b18a7542b48d6e5d9db034154682fa89bf76ec90569f8073cff8ce57f8abb016671604bcdec58a3a0c1aade911e62dcb63d4acd1
2023-07-27 18:40:29 +00:00
Tim Ruffing
525b661f83
bppp/build: Fix linkage of benchmark 2023-07-27 16:31:40 +00:00
Tim Ruffing
4c70cc9bf5
Suppress wrong/buggy warning in MSVC <19.33
For background, see:
https://developercommunity.visualstudio.com/t/c-compiler-incorrect-propagation-of-const-qualifie/390711
2023-07-27 16:31:40 +00:00
Jonas Nick
579999b425
scalar: adjust muladd2 to new int128 interface 2023-07-27 16:31:40 +00:00
Jonas Nick
b160486766
ecdsa_adaptor: add missing include 2023-07-27 16:31:40 +00:00
Jonas Nick
74d9073414
Merge commits '83186db3 e9e4526a 5f7903c7 d373a721 09df0bfb 20a5da5f 908e02d5 d75dc59b debf3e5c bf29f8d0 60556c9f cb1a5927 67214f5f 45c5ca76 30574f22 0702ecb0 705ce7ed 3c1a0fd3 10836832 926dd3e9 ac43613d fd491ea1 799f4eec ' into temp-merge-1356 2023-07-27 16:31:40 +00: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
Jonas Nick
4692478853
ci: print $ELLSWIFT in cirrus.sh 2023-07-27 10:20:50 +00:00
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
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
e593ed5685
musig: ensure point_load output is normalized
This is similar to the upstream commit "Normalize ge produced from
secp256k1_pubkey_load".
2023-07-25 07:28:33 +00:00
Jonas Nick
7a07f3d33f
Merge commits '3bab71cf 4258c54f 566faa17 9ce9984f 04bf3f67 5be353d6 2e035af2 5b0444a3 a6f4bcf6 5ec1333d f6bef03c 1f33bb2b 1c895367 6b7e5b71 596b336f 4b84f4bf 024a4094 222ecaf6 4b0f711d 3c818388 f30c7486 1cf15ebd 24c768ae 341cc197 c63ec88e 54d34b6c 073d98a0 9eb6934f ab5a9171 fb3a8063 006ddc1f 3353d3c7 b54a0672 7d4f86d2 e8295d07 3e3d125b acf5c55a ' into temp-merge-1312 2023-07-24 20:15:07 +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
Jonas Nick
a9a5c24de2
Merge commits '56582094 427bc3cd 0cf2fb91 9c8c4f44 70be3cad f16a709f 464a9115 1d8f3675 afd8b23b 2bca0a5c 2d51a454 4e682626 a0f4644f 145078c4 7b7503da ec98fced 346a053d ' into temp-merge-1269 2023-07-24 13:46:43 +00:00
Hennadii Stepanov
4f8c5bd761
refactor: Drop unused cast 2023-07-24 13:14:23 +01:00
Tim Ruffing
bfeae121fb
Merge ElementsProject/secp256k1-zkp#255: musig: change test vector generation code shebang from python to python3
ea478beec666dc38729f4927a005875f079fa914 musig: change test vector generation code shebang from python to python3 (Jonas Nick)

Pull request description:

  The linter included in the Bitcoin Core and Elements test framework requires python3.

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

Tree-SHA512: 0174e9d72529d1aa2c7a0542bc49a21af9163715961fa042da39c9bb857259f4c7e2b9be8e30b77c7b9b420574bd15f76308d807e22bdc590a91d249cca5ae86
2023-07-23 08:30:06 +02:00
Jonas Nick
ea478beec6
musig: change test vector generation code shebang from python to python3 2023-07-22 18:10:55 +00:00
Jonas Nick
d47e4d40ca
Merge elementsproject/secp256k1-zkp#252: Upstream PRs 1113, 1225, 1227, 1229, 1223
b40adf23604d4461f6a5a4af984f4d0c2f337933 release: prepare for 0.3.0 (Jonas Nick)
8be82d43628138553bc126a76d52edf523031792 cmake: Rename project to "libsecp256k1" (Hennadii Stepanov)
756b61d451d2e00c357a6b55863717519164cdb2 readme: Use correct build type in CMake/Windows build instructions (Tim Ruffing)
92098d84cf744cbe3e9cf641af6512ab25aa1e5e changelog: Add entry for CMake (Tim Ruffing)
e1eb33724c2ca47855a8c1dada421cabdb717fe7 ci: Add "x86_64: Windows (VS 2022)" task (Hennadii Stepanov)
10602b0030e67c830596e08ffc775039ee0b2607 cmake: Export config files (Hennadii Stepanov)
5468d709644823b6302141ff93d0b946b70def4a build: Add CMake-based build system (Hennadii Stepanov)

Pull request description:

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

Tree-SHA512: ded76837ee78d3a99daf5e9dbdb3912a1f7efb8b9ea329535e5b5452f8bf6d02bc290dd2378b17a20e1d33b4811c1d88482bf46a57d6c414855b64cf55e38e99
2023-07-21 14:57:16 +00:00
Jonas Nick
dc733595b0
Merge commits 'df323b5c 3295aa14 ef4f8bd0 90b513aa bdf39000 ' into temp-merge-1223 2023-07-21 13:34:46 +00:00
Jonas Nick
3937cefce6
Merge elementsproject/secp256k1-zkp#249: Upstream PRs 1160, 1193, 1169, 1190, 1192, 1194, 1196, 1195, 1170, 1172, 1200, 1199, 1203, 1201, 1206, 1078, 1209, 979, 1212, 1218, 1217, 1221, 1222
5d8f53e31293c582fb3fe02157bc67d2eeccea77 Remove redudent checks. (Russell O'Connor)
d232112fa7e17fbbed7927bf02e8b1a0c54aeb53 Update Changelog (Tim Ruffing)
b081f7e4cbfd27edc36e823dcd93537a46f7d2a6 Add secp256k1_fe_add_int function (Pieter Wuille)
2ef1c9b38700b7cca2ee1aace2f020ee834729c0 Update overflow check (Russell O'Connor)
5660c137552c657da5265691dea0fb10faae6a76 prevent optimization in algorithms (Harshil Jani)
ce3cfc78a6020d21be299e1e4f22cf8ef089194d doc: Describe Jacobi calculation in safegcd_implementation.md (Elliott Jin)
6be01036c8a6da5043953d055ffb5920728fbff7 Add secp256k1_fe_is_square_var function (Pieter Wuille)
1de2a01c2b22dc8216393ad0471382beaffef525 Native jacobi symbol algorithm (Pieter Wuille)
04c6c1b18162e3dc00d9be5098ee1ccbcb2e78d9 Make secp256k1_modinv64_det_check_pow2 support abs val (Pieter Wuille)
5fffb2c7af5d33223d819283f1a561889a8210d9 Make secp256k1_i128_check_pow2 support -(2^n) (Pieter Wuille)
e4330341bd648e93b60fe70c631e311a98bce549 ci: Shutdown wineserver whenever CI script exits (Tim Ruffing)
9a5a611a21fcdf7bf2dab30964cd0208d8cdf444 build: Suppress stupid MSVC linker warning (Tim Ruffing)
739c53b19a22bd8cd251e25ea286089664a2f0eb examples: Extend sig examples by call that uses static context (Tim Ruffing)
914276e4d27a5f21407744d8016b6d0789e676b1 build: Add SECP256K1_API_VAR to fix importing variables from DLLs (Tim Ruffing)
e089eecc1e54551287b12539d2211da631a6ec5c group: Further simply gej_add_ge (Tim Ruffing)
ac71020ebe052901000e5efa7a59aad77ecfc1a0 group: Save a normalize_to_zero in gej_add_ge (Tim Ruffing)
8c7e0fc1de048be98a1f1bc75557671afc14beaa build: Add -Wreserved-identifier supported by clang (Tim Ruffing)
9b60e3148d8c19562c8c3805bd0cdc55933e912c ci: Do not set git's `user.{email,name}` config options (Hennadii Stepanov)
ef39721cccec344983f09180bcf9c443d491f7cb Do not link `bench` and `ctime_tests` to `COMMON_LIB` (Hennadii Stepanov)
c2415866c7a6769cb29e3db6c5312c1255b37083 ci: Don't fetch git history (Tim Ruffing)
0ecf3188515e46b4da5580b4b9805d2cb927eb91 ci: Use remote pull/merge ref instead of local git merge (Tim Ruffing)
9b7d18669dc2410bde7690d9b04d90b3dc3e25ce Drop no longer used Autoheader macros (Hennadii Stepanov)
eb6bebaee3947f8bca46816fa6bf6182085f1b56 scalar: restrict split_lambda args, improve doc and VERIFY_CHECKs (Jonas Nick)
7f49aa7f2dca595ac8b58d0268dc46a9dfff1e38 ci: add test job with -DVERIFY (Jonas Nick)
620ba3d74bed3095cec7cd8877c8ce14cbf5e329 benchmarks: fix bench_scalar_split (Jonas Nick)
e39d954f118a29db2c33e9a9a507053fff5573ed tests: Add CHECK_ILLEGAL(_VOID) macros and use in static ctx tests (Tim Ruffing)
61841fc9ee5aa1ffde3ccd512660207034125ebd contexts: Forbid randomizing secp256k1_context_static (Tim Ruffing)
4b6df5e33e197a50fd7d9bc4c14b8ba8526013b9 contexts: Forbid cloning/destroying secp256k1_context_static (Tim Ruffing)
8f51229e0348a1524fed541f334cd4f1726d2685 ctime_tests: improve output when CHECKMEM_RUNNING is not defined (Jonas Nick)
2cd4e3c0a976c78c1619fc7456fcc4eaa92897a9 Drop no longer used `SECP_{LIBS,INCLUDE}` variables (Hennadii Stepanov)
613626f94c77a484f6acf22a72ab6cd8ddda00cd Drop no longer used `SECP_TEST_{LIBS,INCLUDE}` variables (Hennadii Stepanov)
d6ff738d5bbdf965590fc07efca23b13c0ea3082 Ensure safety of ctz_debruijn implementation. (Russell O'Connor)
ce60785b2654e60b43577dd75996b7020afbfec8 Introduce SECP256K1_B macro for curve b coefficient (Pieter Wuille)
4934aa79958b506a6e9cfcfe30a8f685db3f5f5f Switch to exhaustive groups with small B coefficient (Pieter Wuille)
e03ef8655933d3e2b4830e7f8fe86deba820a073 Make all non-API functions (except main) static (Pieter Wuille)
0f088ec11263261497661215c110a4c395acc0ac Rename CTIMETEST -> CTIMETESTS (Pieter Wuille)
74b026f05d52216fa4c83cbfada416a30ddfc9b9 Add runtime checking for DECLASSIFY flag (Pieter Wuille)
5e2e6fcfc0ebcdaad96fda9db9b8946d8bcdc8e5 Run ctime test in Linux MSan CI job (Pieter Wuille)
18974061a3ffef514cc393768401b2f104fe6cef Make ctime tests building configurable (Pieter Wuille)
5048be17e93a21ab2e33b939b40339ed4861a692 Rename valgrind_ctime_test -> ctime_tests (Pieter Wuille)
6eed6c18ded7bd89d82fe1ebb13b488a2cf5e567 Update error messages to suggest msan as well (Pieter Wuille)
8e11f89a685063221fa4c2df0ee750d997aee386 Add support for msan integration to checkmem.h (Pieter Wuille)
8dc64079eb1db5abafbc18e335bcf179ae851ae8 Add compile-time error to valgrind_ctime_test (Pieter Wuille)
0db05a770ebd41999b88358ee6ab4bdd6a7d57ee Abstract interactions with valgrind behind new checkmem.h (Pieter Wuille)
4f1a54e41d84a81e4506668bfabed1f3c632973b Move valgrind CPPFLAGS into SECP_CONFIG_DEFINES (Pieter Wuille)
d4a6b58df7490ff9c656e158f246cf396b4cfa72 Add `noverify_tests` to `.gitignore` (Hennadii Stepanov)
e862c4af0c5a7300129700d38eff499a836a108d Makefile: add -I$(top_srcdir)/src to CPPFLAGS for precomputed (Matt Whitlock)

Pull request description:

ACKs for top commit:
  real-or-random:
    tACK  0d540ec942

Tree-SHA512: bc54ccf752163ab6e1a12bb8c4e1f9339f4421d2e4f7716c408549514b3c902f2e9f727655799f1eecb085b0026761b04735b17be3c95c6cf54e07fbf7e86477
2023-07-21 13:29:02 +00:00
Jonas Nick
897c765a49
Merge elementsproject/secp256k1-zkp#251: Update sync-upstream with master
7e9193666f840eaec024d1dad968361b79a14753 ci: Always define EXPERIMENTAL variable (Tim Ruffing)
0a9915687191cabba0241bd45c3a3416b7f36e29 sync-upstream.sh: Add "git show --remerge-diff" tip (Tim Ruffing)
9b6a1c384d00cc61bf9160e5df858ca6c52e6af3 sync-upstream.sh: Fix position of "-b" option in reproduce command (Tim Ruffing)
05b207e969f9b4181061dd3fba749b6df06de718 sync-upstream: allows providing the local branch via cli (Jonas Nick)

Pull request description:

ACKs for top commit:
  real-or-random:
    utACK 7e9193666f840eaec024d1dad968361b79a14753

Tree-SHA512: 4527cb6a2493d210eb7ba6d8f6e717b2acbc07aebdc1c4011cffe23490876a4e795d656a69df2cd50e4e3fe8742c123d9ea493914c148c8fbc93d7d3799e7447
2023-07-21 13:28:15 +00:00
Jonas Nick
53bc63f9f9
Merge elementsproject/secp256k1-zkp#245: scalar: Remove unused secp256k1_scalar_chacha20
860360eed448b846ef0212499f5507a996488d16 scalar: Remove unused secp256k1_scalar_chacha20 (Tim Ruffing)
3970a7292aedc64c13983d3e48d7485fce44f928 rangeproof: Use util functions for writing big endian (Tim Ruffing)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 860360eed448b846ef0212499f5507a996488d16

Tree-SHA512: 0e74fe6f4aa5ab12eea1dece3b43aa2f98c188096ab4bb59324f86f1c88d4f13fc81b9fe852701682a9c4c1fccdc17e3bdbc1d3df7cc341822ac022772037c29
2023-07-21 12:24:21 +00:00
Tim Ruffing
860360eed4 scalar: Remove unused secp256k1_scalar_chacha20
Unused since a11250330b24b3dffdf11d2de5d496397b4e4410.
2023-07-21 13:06:17 +02:00
Tim Ruffing
3970a7292a rangeproof: Use util functions for writing big endian 2023-07-21 13:06:17 +02:00
Jonas Nick
afe7e649ee
Merge elementsproject/secp256k1-zkp#248: bppp: Fix and improve test for invalid sign byte
3372993060bfe914d828e13499fcd2763ef83dd5 bppp: Fix test for invalid sign byte (Tim Ruffing)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 3372993060bfe914d828e13499fcd2763ef83dd5

Tree-SHA512: cfc317b47dc731b419cc88d0c5292cb6b3ca9e28c937d316f63940be6ad4607056ece81136ca1226f94dbf26cfe0492f5d27f4cfa473cf46898474b342a55593
2023-07-21 07:19:51 +00:00
Jonas Nick
1a6d93f8b6
Merge elementsproject/secp256k1-zkp#250: ci: Always define EXPERIMENTAL variable
7e9193666f840eaec024d1dad968361b79a14753 ci: Always define EXPERIMENTAL variable (Tim Ruffing)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 7e9193666f840eaec024d1dad968361b79a14753

Tree-SHA512: d684ae76456a90b6bb8d215b108a420f6bb32800fe515a201de948366ffc9a1c33c7dd35a491db44f0db8b06c41c976ffe423bfccbab88b51bacbc23453992d1
2023-07-21 07:17:41 +00:00
Tim Ruffing
3372993060 bppp: Fix test for invalid sign byte
The test is supposed to create an invalid sign byte. Before this PR,
the generated sign byte could in fact be valid due to an overflow.

Co-authored-by: Jonas Nick <jonasd.nick@gmail.com>
2023-07-20 23:34:43 +02:00
Tim Ruffing
7e9193666f ci: Always define EXPERIMENTAL variable 2023-07-20 23:02:55 +02:00
Jonas Nick
0d540ec942
Merge commits '88e80722 ff8edf89 f29a3270 a7a7bfaf a01a7d86 b1579cf5 ad7433b1 233822d8 5fbff5d3 2b77240b 1bff2005 e1817a6f 5596ec5c 8ebe5c52 1cca7c17 1b21aa51 cbd25559 09b1d466 57573187 8962fc95 9d1b458d eb8749fc 6048e6c0 ' into temp-merge-1222 2023-07-20 16:29:40 +00:00
Jonas Nick
7aa9887128
Merge pull request #246 from jonasnick/temp-merge-1187
Upstream PRs 1174, 1154, 1178, 1177, 1171, 1158, 1183, 1185, 1186, 1188, 1187
2023-07-20 15:35:18 +00:00
Jonas Nick
304fc88557
Merge commits '9a8d65f0 75d7b7f5 665ba77e 3f57b9f7 eacad90f 01b819a8 31ed5386 2a39ac16 0eb30004 cbe41ac1 cc3b8a4f ' into temp-merge-1187 2023-07-20 12:19:00 +00:00
Tim Ruffing
58e27bc2d2
Merge ElementsProject/secp256k1-zkp#244: sync-upstream.sh: Add "git show --remerge-diff" tip
0a9915687191cabba0241bd45c3a3416b7f36e29 sync-upstream.sh: Add "git show --remerge-diff" tip (Tim Ruffing)

Pull request description:

ACKs for top commit:
  jonasnick:
    utACK 0a9915687191cabba0241bd45c3a3416b7f36e29

Tree-SHA512: 6d3a26481f8d8f263db2379aca2670f5610b44fbf6b283550d83af9500b7e156927683d400e720fcb017cade317b176f882159a472ac8d5c99cff886b497dcfb
2023-07-19 11:15:29 +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
0a99156871 sync-upstream.sh: Add "git show --remerge-diff" tip 2023-07-18 15:05:27 +02:00
Jonas Nick
6c54db1987
Merge commits '2286f809 751c4354 477f02c4 e3f84777 5c789dcd 8c949f56 21ffe4b2 ' into temp-merge-1055 2023-07-18 12:51:17 +00:00
Tim Ruffing
30fc9d6551
Merge ElementsProject/secp256k1-zkp#242: sync-upstream.sh: Fix position of "-b" option in reproduce command
9b6a1c384d00cc61bf9160e5df858ca6c52e6af3 sync-upstream.sh: Fix position of "-b" option in reproduce command (Tim Ruffing)

Pull request description:

ACKs for top commit:
  jonasnick:
    utACK 9b6a1c384d00cc61bf9160e5df858ca6c52e6af3

Tree-SHA512: 27e4a41bc9c8f10715623f669c97a511520753b23d24ae91d6d2144e54588da0769f97b1de78c87b7471b39e556b682b1c2910b2bf71f124fb77cbc9e446d5f8
2023-07-18 10:11:23 +02:00
Tim Ruffing
9b6a1c384d sync-upstream.sh: Fix position of "-b" option in reproduce command 2023-07-17 18:44:33 +02: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
e996d076da
Merge commits '44916ae9 86e3b38a ddf2b291 6138d73b e40fd277 ' into temp-merge-1156 2023-07-17 14:02:13 +00:00
Tim Ruffing
533571d6cf
Merge ElementsProject/secp256k1-zkp#239: sync-upstream: allows providing the local branch via cli
05b207e969f9b4181061dd3fba749b6df06de718 sync-upstream: allows providing the local branch via cli (Jonas Nick)

Pull request description:

ACKs for top commit:
  real-or-random:
    ACK 05b207e969f9b4181061dd3fba749b6df06de718

Tree-SHA512: b02f3fdf6565943cea2b93a0b2b0a38c30bb3c94873d0c4ed2ad276c75f3dc610911d1c9c076c8b7fd3a5baf83aa1ab66ec86415333cf58fe8f07c64fa74656f
2023-07-17 15:47:16 +02:00