This contains several commits, first some that introduce new functionality (and tests) for scalar, and then several steps of switching the actual logic from secp256k1_num_t based operations to secp256k1_scalar_t based one. For initialization, modular inverses, lambda splitting and tests, the num module is still used for now.
Switch all EC and ECDSA logic from num to scalar. #117
pull sipa wants to merge 9 commits into bitcoin-core:master from sipa:nonum changing 21 files +618 −491-
sipa commented at 7:46 PM on November 26, 2014: contributor
-
sipa commented at 7:47 PM on November 26, 2014: contributor
Oh, it's also a tiny bit faster, it seems...
- sipa force-pushed on Nov 26, 2014
-
gmaxwell commented at 12:57 AM on November 27, 2014: contributor
I have my fuzz testing running on this now. So far, so good, at least it passes all the test cases I previously generated.
- sipa force-pushed on Nov 27, 2014
- sipa cross-referenced this on Nov 28, 2014 from issue Make the num module optional by sipa
- sipa force-pushed on Nov 30, 2014
- sipa force-pushed on Nov 30, 2014
-
Add secp256k1_scalar_add_bit 5213207856
-
Generalize secp256k1_scalar_get_bits 1e6c77c321
-
Switch wnaf splitting from num-based to scalar-based 0b73059709
-
b5c9ee756f
Make test_point_times_order test meaningful again
As wnaf splitting is scalar based, multiplying with the order directly would be reduced to multiplication with zero before even converting to wnaf.
-
Add secp256k1_scalar_inverse_var which delegates to GMP d1502eb459
-
6794be6080
Add scalar splitting functions
Which currently delegate to the lambda-splitter in group.
-
Switch all EC/ECDSA logic from num to scalar f24041d6aa
-
4285a98722
Move lambda-splitting code to scalar.
It's not really an operation on group elements.
-
Remove unused num functions c76be9efa0
- sipa force-pushed on Nov 30, 2014
-
gmaxwell commented at 9:31 AM on December 1, 2014: contributor
ACK.
- sipa merged this on Dec 1, 2014
- sipa closed this on Dec 1, 2014
- sipa referenced this in commit e2e8a362ad on Dec 1, 2014