bip-0374: fix challenge generation, use correct generator point #1734

pull guggero wants to merge 2 commits into bitcoin:master from guggero:bip-0374-test-vector-fix changing 1 files +3 −3
  1. guggero commented at 3:01 pm on December 28, 2024: contributor

    Both generating and verifying a proof allows for specifying a custom generator point G. But that custom generator point was not passed into the dleq_challenge function, resulting in the default (secp256k1) generator point to be used. This lead to the test vectors being incorrect.

    Noticed this while re-implementing DLEQ proof generation and verification in Golang.

  2. bip-0374: fix challenge generation, use correct G
    Both generating and verifying a proof allows for specifying a custom
    generator point G. But that custom generator point was not passed into
    the dleq_challenge function, resulting in the default (secp256k1)
    generator point to be used. This lead to the test vectors being
    incorrect.
    8bc42a2673
  3. jonatack added the label Bug fix on Dec 28, 2024
  4. jonatack commented at 5:30 pm on December 28, 2024: member
  5. jonatack commented at 5:33 pm on December 28, 2024: member
    utACK, at first glance the fix LGTM.
  6. andrewtoth approved
  7. andrewtoth commented at 6:09 pm on December 28, 2024: contributor
    Thanks! Might make sense to also remove the default value for G in dleq_challenge.
  8. bip-0374: remove default value for G in dleq_challenge
    To avoid the mistake fixed in the previous commit, we remove the default
    value from the G parameter of dleq_challenge.
    e141b9501d
  9. guggero commented at 8:43 pm on December 28, 2024: contributor

    Thanks! Might make sense to also remove the default value for G in dleq_challenge.

    Makes sense. Added a commit to remove the default value.

  10. andrewtoth approved
  11. andrewtoth commented at 8:46 pm on December 28, 2024: contributor
    utACK e141b9501d6f0602c603ad044dfde06c9cb3613e
  12. jonatack commented at 9:17 pm on December 28, 2024: member
    ACK
  13. jonatack merged this on Dec 28, 2024
  14. jonatack closed this on Dec 28, 2024

  15. jonatack commented at 9:21 pm on December 28, 2024: member

    There are a couple of unrelated other issues with this file, if it is intended to be run:

    • File permissions, i.e. 755
    • File header #!/usr/bin/env python3
  16. guggero deleted the branch on Dec 28, 2024
  17. theStack commented at 4:13 pm on December 30, 2024: contributor

    Post-merge ACK e141b9501d6f0602c603ad044dfde06c9cb3613e

    Thanks for fixing!


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-01-21 07:10 UTC

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