neo-go/pkg/crypto/keys
Roman Khimov f0fbe9f6c9 crypto: drop home-grown elliptic crypto, use crypto/elliptic
As NEO uses P256 we can use standard crypto/elliptic library for almost
everything, the only exception being decompression of the Y coordinate. For
some reason the standard library only supports uncompressed format in its
Marshal()/Unmarshal() functions. elliptic.P256() is known to have
constant-time implementation, so it fixes #245 (and the decompression using
big.Int operates on public key, so nobody really cares about that part being
constant-time).

New decompress function is inspired by
https://stackoverflow.com/questions/46283760, even though the previous one
really did the same thing just in a little less obvious way.
2019-09-05 12:33:27 +03:00
..
nep2.go *: add/fix godoc comments to satisfy golint 2019-09-03 17:57:51 +03:00
nep2_test.go keys: simplify tests with assert package 2019-08-27 17:46:01 +03:00
private_key.go crypto: drop home-grown elliptic crypto, use crypto/elliptic 2019-09-05 12:33:27 +03:00
private_key_test.go keys: simplify tests with assert package 2019-08-27 17:46:01 +03:00
publickey.go crypto: drop home-grown elliptic crypto, use crypto/elliptic 2019-09-05 12:33:27 +03:00
publickey_test.go crypto: drop home-grown elliptic crypto, use crypto/elliptic 2019-09-05 12:33:27 +03:00
sign_verify_test.go keys: simplify tests with assert package 2019-08-27 17:46:01 +03:00
wif.go *: add/fix godoc comments to satisfy golint 2019-09-03 17:57:51 +03:00
wif_test.go keys: simplify tests with assert package 2019-08-27 17:46:01 +03:00