0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-15 11:36:00 -05:00
Commit graph

12 commits

Author SHA1 Message Date
Pieter Wuille
dd891e0ed5 Get rid of _t as it is POSIX reserved 2015-09-21 21:03:37 +02:00
Gregory Maxwell
912f203fc5 Eliminate a few unbraced statements that crept into the code.
Also avoids some easily avoided multiple-returns.
2015-09-21 17:21:35 +00:00
Pieter Wuille
2f77487012 Add context building benchmarks 2015-08-27 01:14:28 +02:00
Andrew Poelstra
92e53fc4c8 Implement endomorphism optimization for secp256k1_ecmult_const 2015-08-01 10:57:36 -05:00
Andrew Poelstra
ed35d43a0c Make secp256k1_scalar_add_bit conditional; make secp256k1_scalar_split_lambda_var constant time
This has the effect of making `secp256k1_scalar_mul_shift_var` constant
time in both input scalars. Keep the _var name because it is NOT constant
time in the shift amount.

As used in `secp256k1_scalar_split_lambda_var`, the shift is always
the constant 272, so this function becomes constant time, and it
loses the `_var` suffix.
2015-08-01 10:57:36 -05:00
Andrew Poelstra
91c0ce95ca Add benchmarks for ECDH and const-time multiplication 2015-08-01 10:57:36 -05:00
Pieter Wuille
3e6f1e20dc Change rfc6979 implementation to be a generic PRNG 2015-07-24 22:07:14 +02:00
Peter Dettman
55399c23f7 Further performance improvements to _ecmult_wnaf
- Initialize 'wnaf' to zeroes using memset
- Add new 'len' arg to speed up smaller scalars (mostly for endo=yes)
2015-07-13 22:46:42 +10:00
Peter Dettman
2d5a186cee Apply effective-affine trick to precomp 2015-04-30 09:25:44 -07:00
Peter Dettman
4f9791abba Effective affine addition in EC multiplication
* Make secp256k1_gej_add_var and secp256k1_gej_double return the
  Z ratio to go from a.z to r.z.
* Use these Z ratios to speed up batch point conversion to affine
  coordinates, and to speed up batch conversion of points to a
  common Z coordinate.
* Add a point addition function that takes a point with a known
  Z inverse.
* Due to secp256k1's endomorphism, all additions in the EC
  multiplication code can work on affine coordinate (with an
  implicit common Z coordinate), correcting the Z coordinate of
  the result afterwards.

Refactoring by Pieter Wuille:
* Move more global-z logic into the group code.
* Separate code for computing the odd multiples from the code to bring it
  to either storage or globalz format.
* Rename functions.
* Make all addition operations return Z ratios, and test them.
* Make the zr table format compatible with future batch chaining
  (the first entry in zr becomes the ratio between the input and the
  first output).

Original idea and code by Peter Dettman.
2015-04-30 09:23:21 -07:00
Pieter Wuille
1573a102c0 Add ability to pass extra entropy to rfc6979
Suggested by Greg Maxwell.
2015-03-23 05:39:56 -07:00
Pieter Wuille
039723d5da Benchmarks for all internal operations 2015-02-02 20:02:39 -08:00