neoneo-go/pkg/crypto/keys
Roman Khimov 217d7bdf44 keys: add equality benchmark
Go 1.15 provides native (*ecdsa.PublicKey).Equal method, but we can't drop our
own Equal because the types are different and there is still code using our
Equal (forcing it to convert types is counterproductive), while changing
(*PublicKey).Equal to use (*ecdsa.PublicKey).Equal internally with some kind of

  (*ecdsa.PublicKey)(p).Equal((*ecdsa.PublicKey)(key))

slows it down:

name           old time/op    new time/op    delta
PublicEqual-8    14.9ns ± 1%    18.4ns ± 2%  +23.55%  (p=0.000 n=9+10)

name           old alloc/op   new alloc/op   delta
PublicEqual-8     0.00B          0.00B          ~     (all equal)

name           old allocs/op  new allocs/op  delta
PublicEqual-8      0.00           0.00          ~     (all equal)

So leave it as is, but add this micro-bench. Refs. #1319.
2021-08-25 15:18:26 +03:00
..
aes256.go crypto: internalize aes functions into the keys package 2019-12-25 11:25:05 +03:00
doc.go *: add more package-specific documentation 2021-03-19 16:18:45 +03:00
nep2.go crypto: allow to provide non-default scrypt parameters 2021-06-11 15:22:28 +03:00
nep2_test.go crypto: allow to provide non-default scrypt parameters 2021-06-11 15:22:28 +03:00
private_key.go keys: simplify code a bit 2021-06-17 21:55:00 +03:00
private_key_test.go keys: allow to create keys on arbitrary curve 2020-12-03 14:06:35 +03:00
publickey.go crypto/keys: enforce length in PublicKey.DecodeBytes() 2021-08-13 10:38:09 +03:00
publickey_test.go keys: add equality benchmark 2021-08-25 15:18:26 +03:00
sign_verify_test.go keys: don't panic if signature has invalid size 2020-10-07 10:04:19 +03:00
wif.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
wif_test.go crypto: add invalid testcase 2019-11-29 11:03:03 +03:00