Commit 1461eb16 authored by Steven Allen's avatar Steven Allen

fix: use fallback comparison for ed25519 keys

parent 33faefeb
...@@ -68,7 +68,7 @@ func (k *Ed25519PrivateKey) pubKeyBytes() []byte { ...@@ -68,7 +68,7 @@ func (k *Ed25519PrivateKey) pubKeyBytes() []byte {
func (k *Ed25519PrivateKey) Equals(o Key) bool { func (k *Ed25519PrivateKey) Equals(o Key) bool {
edk, ok := o.(*Ed25519PrivateKey) edk, ok := o.(*Ed25519PrivateKey)
if !ok { if !ok {
return false return basicEquals(k, o)
} }
return subtle.ConstantTimeCompare(k.k, edk.k) == 1 return subtle.ConstantTimeCompare(k.k, edk.k) == 1
...@@ -103,7 +103,7 @@ func (k *Ed25519PublicKey) Raw() ([]byte, error) { ...@@ -103,7 +103,7 @@ func (k *Ed25519PublicKey) Raw() ([]byte, error) {
func (k *Ed25519PublicKey) Equals(o Key) bool { func (k *Ed25519PublicKey) Equals(o Key) bool {
edk, ok := o.(*Ed25519PublicKey) edk, ok := o.(*Ed25519PublicKey)
if !ok { if !ok {
return false return basicEquals(k, o)
} }
return bytes.Equal(k.k, edk.k) return bytes.Equal(k.k, edk.k)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment