aboutsummaryrefslogtreecommitdiff
path: root/test/codegen/memops.go
diff options
context:
space:
mode:
authorFilippo Valsorda <filippo@golang.org>2020-03-17 20:34:51 -0400
committerFilippo Valsorda <filippo@golang.org>2020-03-23 17:56:24 +0000
commit5c9bd499e103709a181f7a1a895d221ae6e7ffc8 (patch)
tree38942a3590c3aeec0ee44736f4ffbfd1d3414e24 /test/codegen/memops.go
parent24925c7ed9da15fe780d0d2fce21bbaa707e8751 (diff)
downloadgo-5c9bd499e103709a181f7a1a895d221ae6e7ffc8.tar.xz
crypto/rsa,crypto/ecdsa,crypto/ed25519: implement PublicKey.Equal
This makes all modern public keys in the standard library implement a common interface (below) that can be used by applications for better type safety and allows for checking that public (and private keys via Public()) are equivalent. interface { Equal(crypto.PublicKey) bool } Equality for ECDSA keys is complicated, we take a strict interpretation that works for all secure applications (the ones not using the unfortunate non-constant time CurveParams implementation) and fails closed otherwise. Tests in separate files to make them x_tests and avoid an import loop with crypto/x509. Fixes #21704 Change-Id: Id5379c96384a11c5afde0614955360e7470bb1c4 Reviewed-on: https://go-review.googlesource.com/c/go/+/223754 Reviewed-by: Katie Hockman <katie@golang.org>
Diffstat (limited to 'test/codegen/memops.go')
0 files changed, 0 insertions, 0 deletions