dcrd/dcrec
Dave Collins 5b1b776406
secp256k1: Harden const time field normalization.
This updates the field normalization code to better secure against the
possibility of non-constant time operations due to branch prediction and
adds several tests to ensure the new logic is sound.

The following benchmark results show that this implementation is within
the margin of error for it to not be statistically relevant and thus has
no performance impact.

name             old time/op   new time/op   delta
----------------------------------------------------------------------
FieldNormalize   22.1ns ± 1%   22.1ns ± 1%   ~     (p=0.873 n=5+5)
2020-07-14 14:16:36 -05:00
..
edwards multi: remove superfluous fmt.Sprintf 2020-03-27 16:05:30 -05:00
secp256k1 secp256k1: Harden const time field normalization. 2020-07-14 14:16:36 -05:00
common.go multi: Address some golint complaints. 2018-10-10 19:50:06 -05:00
go.mod build: Tidy module sums (go mod tidy). 2019-03-25 11:37:00 -05:00