schnorrsig: Add test vectors for variable-length messages #1133
pull real-or-random wants to merge 3 commits into bitcoin-core:master from real-or-random:202208-schnorrsig-varlen-vectors changing 2 files +181 −28-
real-or-random commented at 3:16 pm on August 11, 2022: contributor
-
real-or-random force-pushed on Aug 22, 2022
-
real-or-random commented at 5:13 pm on August 22, 2022: contributor
Updated after one vector was removed from my draft at https://github.com/sipa/bips/pull/221.
I think this is ready for reviewm/merge, independently of whether https://github.com/sipa/bips/pull/221 has been merged or merged in the official BIPs repo.
-
in include/secp256k1_schnorrsig.h:144 in 67dd87eb55 outdated
140@@ -141,8 +141,12 @@ SECP256K1_API int secp256k1_schnorrsig_sign( 141 * variable length messages and accepts a pointer to an extraparams object that 142 * allows customizing signing by passing additional arguments. 143 * 144- * Creates the same signatures as schnorrsig_sign if msglen is 32 and the 145- * extraparams.ndata is the same as aux_rand32. 146+ * Equivalent to secp256k1_schnorrsig_sign32(..., auxrand32) if msglen is 32
jonasnick commented at 12:30 pm on August 23, 2022:auxrand32 -> aux_rand32
real-or-random commented at 3:10 pm on August 23, 2022:fixedreal-or-random force-pushed on Aug 23, 2022real-or-random cross-referenced this on Apr 8, 2023 from issue tests: Add Wycheproof ECDSA vectors by RandomLatticein src/modules/schnorrsig/tests_impl.h:250 in 618253e69a outdated
249 250+ secp256k1_schnorrsig_extraparams extraparams = SECP256K1_SCHNORRSIG_EXTRAPARAMS_INIT; 251+ extraparams.ndata = (unsigned char*)aux_rand; 252+ 253 CHECK(secp256k1_keypair_create(ctx, &keypair, sk)); 254- CHECK(secp256k1_schnorrsig_sign32(ctx, sig, msg32, &keypair, aux_rand));
jonasnick commented at 4:18 pm on May 11, 2023:Wouldn’t it be better if we continued runningsecp256k1_schnorrsig_sign32
if the msglen is 32?
sipa commented at 4:26 pm on May 11, 2023:Or run both in that case.
real-or-random commented at 4:37 pm on May 11, 2023:Or run both in that case.
done
schnorrsig: Refactor test vector code to allow varlen messages 97a98bed1eschnorrsig: Add BIP340 varlen test vectors 28687b0312schnorrsig: Improve docs of schnorrsig_sign_custom cd54ac7c1creal-or-random force-pushed on May 11, 2023jonasnick commented at 4:40 pm on May 11, 2023: contributorACK cd54ac7c1cca509404b62e626a6291f434af88e8sipa commented at 4:41 pm on May 11, 2023: contributorACK cd54ac7c1cca509404b62e626a6291f434af88e8. I didn’t verify the included test vectors match the BIP.jonasnick merged this on May 11, 2023jonasnick closed this on May 11, 2023
sipa referenced this in commit b4eb644b6c on May 12, 2023hebasto referenced this in commit 49c52ea2b1 on May 13, 2023vmta referenced this in commit e1120c94a1 on Jun 4, 2023sipa referenced this in commit 901336eee7 on Jun 21, 2023vmta referenced this in commit 8f03457eed on Jul 1, 2023jonasnick cross-referenced this on Jul 24, 2023 from issue Upstream PRs 1268, 1276, 1267, 1265, 1230, 1279, 1273, 1263, 1231, 1285, 1283, 1205, 1286, 1275, 1234, 1239, 1240, 1284, 1277, 1289, 1270, 1296, 1301, 1299, 1066, 1300, 1292, 1305, 1303, 1133, 1306, 1207, 1304, 1307, 1311, 1309, 1312 by jonasnick
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-30 03:15 UTC
This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-30 03:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me