Increase sparsity of pippenger fixed window naf representation #513

pull jonasnick wants to merge 4 commits into bitcoin-core:master from jonasnick:wnaf_fixed-zeros changing 2 files +92 −32
  1. jonasnick commented at 6:21 PM on March 1, 2018: contributor

    Fixes #506

  2. Increase sparsity of pippenger fixed window naf representation 6dbb007869
  3. jonasnick commented at 7:57 PM on March 1, 2018: contributor

    ecmult_multi pippenger speedup

    without endo:    2 points 11%,     pippenger threshold (160 points) 0.74%
    with endo:       2 points 10%,     pippenger threshold (88 points)  2.1%    
    
  4. Don't invert scalar in wnaf_fixed when it is even because a caller might
    intentionally give a scalar with many leading zeros.
    96f68a0afc
  5. Fix bug in wnaf_fixed where the wnaf array is not completely zeroed when given a 0 scalar. 9e36d1bfe2
  6. Don't touch leading zeros in wnaf_fixed. ec0a7b3ae3
  7. jonasnick commented at 3:06 PM on March 23, 2018: contributor

    Added wnaf_fixed bugfix and two commits that further increase sparsity. Now it's possible to use precomputation with pippenger similar to using the endomorphism: split a scalar, point pair (s, G) into (s1, ..., sn, G, ..., Gn) where all si have 256 -256/n leading zeros and s1*G + ... + sn*Gn = s*G.

    With 128 points and n=8 this gives a speedup of 6% over endomorphism (13% over non-endo). See https://github.com/jonasnick/secp256k1/blob/bench_ecmult_precomp/src/bench_ecmult_precomp.c#L138 for the benchmarking and splitting code.

  8. sipa commented at 1:26 AM on March 27, 2018: contributor

    Lightly tested ACK ec0a7b3ae3a09bd2ffbbeec83abe6c5042ce4a56

  9. apoelstra commented at 2:49 PM on March 27, 2018: contributor

    Let me test it with the BP code before merging.

  10. apoelstra commented at 8:59 PM on March 27, 2018: contributor

    ACK

  11. sipa merged this on Apr 5, 2018
  12. sipa closed this on Apr 5, 2018

  13. sipa referenced this in commit dbc3ddd5e2 on Apr 5, 2018

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-04-14 15:15 UTC

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