cosmos-sdk/crypto
John Kemp aa37ae9e74
feat: Low-s normalization for ecdsa secp256r1 signing (#9738)
* added low-s normalization to ecdsa secp256r1 signing

* go fmt fixes

* removed else block as golint required

* implement raw signature encoding for secp256r1

* move the creation of signature to after the check for sig string length

* fake commit to re-run checks? (move the creation of signature to after the check for sig string length)

* added a signature test for high s signature that requires sig validation to fail after the valid signature was mutated by extracting and scalar negating its s value

* reordered code to prevent mutated message from being used in sig verify

* added test for successful high_s signature with the ecdsa portion of the publicKey

* Remove comment for self-explanatory code.

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* Missing quote

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* Apply minor suggestions from code review

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* normalize comments for godoc

* refactored p256Order functions as private vars

* Div -> Rsh optimizing time for division

* resolve two code coverage issues; fix some small review issues

* test using private signatureRaw function instead of copying code. Added tests to improve code coverage

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2021-07-27 14:14:05 -04:00
..
codec crypto: add secp256r1 (#8559) 2021-03-04 12:29:48 +00:00
hd crypto/hd: make DerivePrivateKeyForPath error and not panic on trailing slashes (#8607) 2021-02-17 10:30:04 +00:00
keyring feat!: key rename cli command (#9601) 2021-07-19 15:20:27 +00:00
keys feat: Low-s normalization for ecdsa secp256r1 signing (#9738) 2021-07-27 14:14:05 -04:00
ledger codec: Rename codec and marshaler interfaces (#9226) 2021-04-29 10:46:22 +00:00
types crypto/types: optimize compact bit array one count (#9216) 2021-04-30 21:08:14 +00:00
armor.go codec: Rename codec and marshaler interfaces (#9226) 2021-04-29 10:46:22 +00:00
armor_test.go all: skip noisy/faulty benchmarks + add b.ReportAllocs for every benchmark (#8856) 2021-03-11 15:59:13 +00:00
bcrypt_readme.md merge crypto/keys/mintkey into crypto/ (#5880) 2020-03-27 10:24:19 +01:00