aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/ecdsa/ecdsa.go
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2020-03-23 20:38:00 +0000
committerBryan C. Mills <bcmills@google.com>2020-03-23 21:15:27 +0000
commitfb2a6343defa5259df3032fef771057843e799ce (patch)
treea63a9e3cc24c7bccca8d55bc1526b6bbb498f80a /src/crypto/ecdsa/ecdsa.go
parent5b897ec0171ba92d01c63ed442fab733fe195775 (diff)
downloadgo-fb2a6343defa5259df3032fef771057843e799ce.tar.gz
go-fb2a6343defa5259df3032fef771057843e799ce.zip
Revert "crypto/rsa,crypto/ecdsa,crypto/ed25519: implement PublicKey.Equal"
This reverts CL 223754. Reason for revert: new tests are failing on all longtest builders. Change-Id: I2257d106c132f3a02c0af6b20061d4f9a8093c4f Reviewed-on: https://go-review.googlesource.com/c/go/+/225077 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Katie Hockman <katie@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/crypto/ecdsa/ecdsa.go')
-rw-r--r--src/crypto/ecdsa/ecdsa.go18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/crypto/ecdsa/ecdsa.go b/src/crypto/ecdsa/ecdsa.go
index 189399d126..744182aac2 100644
--- a/src/crypto/ecdsa/ecdsa.go
+++ b/src/crypto/ecdsa/ecdsa.go
@@ -62,24 +62,6 @@ type PublicKey struct {
X, Y *big.Int
}
-// Equal reports whether pub and x have the same value.
-//
-// Two keys are only considered to have the same value if they have the same Curve value.
-// Note that for example elliptic.P256() and elliptic.P256().Params() are different
-// values, as the latter is a generic not constant time implementation.
-func (pub *PublicKey) Equal(x crypto.PublicKey) bool {
- xx, ok := x.(*PublicKey)
- if !ok {
- return false
- }
- return pub.X.Cmp(xx.X) == 0 && pub.Y.Cmp(xx.Y) == 0 &&
- // Standard library Curve implementations are singletons, so this check
- // will work for those. Other Curves might be equivalent even if not
- // singletons, but there is no definitive way to check for that, and
- // better to err on the side of safety.
- pub.Curve == xx.Curve
-}
-
// PrivateKey represents an ECDSA private key.
type PrivateKey struct {
PublicKey