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
  1. real-or-random commented at 3:16 pm on August 11, 2022: contributor
  2. real-or-random force-pushed on Aug 22, 2022
  3. 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.

  4. 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:
    fixed
  5. real-or-random force-pushed on Aug 23, 2022
  6. real-or-random cross-referenced this on Apr 8, 2023 from issue tests: Add Wycheproof ECDSA vectors by RandomLattice
  7. in 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 running secp256k1_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

  8. schnorrsig: Refactor test vector code to allow varlen messages 97a98bed1e
  9. schnorrsig: Add BIP340 varlen test vectors 28687b0312
  10. schnorrsig: Improve docs of schnorrsig_sign_custom cd54ac7c1c
  11. real-or-random force-pushed on May 11, 2023
  12. jonasnick commented at 4:40 pm on May 11, 2023: contributor
    ACK cd54ac7c1cca509404b62e626a6291f434af88e8
  13. sipa commented at 4:41 pm on May 11, 2023: contributor
    ACK cd54ac7c1cca509404b62e626a6291f434af88e8. I didn’t verify the included test vectors match the BIP.
  14. jonasnick merged this on May 11, 2023
  15. jonasnick closed this on May 11, 2023

  16. sipa referenced this in commit b4eb644b6c on May 12, 2023
  17. hebasto referenced this in commit 49c52ea2b1 on May 13, 2023
  18. vmta referenced this in commit e1120c94a1 on Jun 4, 2023
  19. sipa referenced this in commit 901336eee7 on Jun 21, 2023
  20. vmta referenced this in commit 8f03457eed on Jul 1, 2023

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-11-22 19:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me