tests: Initialize random group elements fully #814

pull real-or-random wants to merge 1 commits into bitcoin-core:master from real-or-random:202009-test-ge-inf changing 2 files +2 −0
  1. real-or-random commented at 9:34 AM on September 13, 2020: contributor

    Also fix add a missing comment.

  2. tests: Initialize random group elements fully
    Also fix add a missing comment.
    5738e8622d
  3. real-or-random force-pushed on Sep 13, 2020
  4. gmaxwell commented at 6:22 PM on September 13, 2020: contributor

    utACK. Looks fine to me.

  5. sipa commented at 7:05 PM on September 13, 2020: contributor

    utACK 5738e8622d8ba02caa984425c23c072a3f14352c

  6. real-or-random merged this on Sep 13, 2020
  7. real-or-random closed this on Sep 13, 2020

  8. in src/tests.c:89 in 5738e8622d
      85 | @@ -86,6 +86,7 @@ void random_group_element_test(secp256k1_ge *ge) {
      86 |              break;
      87 |          }
      88 |      } while(1);
      89 | +    ge->infinity = 0;
    


    real-or-random commented at 10:57 AM on September 14, 2020:

    Oh, on a second thought, this is not just necessary. secp256k1_ge_set_xo_var (a few lines above) sets infinity to 0.

    I was playing around with multiple additional VERIFY_CHECKs when reviewing the schnorrsig PR and I wrongly believed that I found this bug ...

    Well whatever, the correct was correct before this PR and it's correct after this PR. If we want, we can reverse this commit in a later PR.

  9. jasonbcox referenced this in commit 521ffb0d68 on Sep 28, 2020
  10. deadalnix referenced this in commit 8a99323312 on Sep 29, 2020

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: 2026-05-19 06:52 UTC