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. real-or-random cross-referenced this on Sep 13, 2020 from issue Cleaner infinity handling in group law and ecmult_const. by gmaxwell
  5. gmaxwell commented at 6:22 pm on September 13, 2020: contributor
    utACK. Looks fine to me.
  6. sipa commented at 7:05 pm on September 13, 2020: contributor
    utACK 5738e8622d8ba02caa984425c23c072a3f14352c
  7. real-or-random merged this on Sep 13, 2020
  8. real-or-random closed this on Sep 13, 2020

  9. 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.

  10. jasonbcox referenced this in commit 521ffb0d68 on Sep 28, 2020
  11. 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: 2024-11-22 01:15 UTC

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