diff --git a/crypto/signature_cgo.go b/crypto/signature_cgo.go index d06b53a5e0..381d8a1bbc 100644 --- a/crypto/signature_cgo.go +++ b/crypto/signature_cgo.go @@ -27,7 +27,7 @@ import ( "github.com/ethereum/go-ethereum/crypto/secp256k1" ) -// Ecrecover returns the public key that created the given signature. +// Ecrecover returns the uncompressed public key that created the given signature. func Ecrecover(hash, sig []byte) ([]byte, error) { return secp256k1.RecoverPubkey(hash, sig) } @@ -61,7 +61,7 @@ func Sign(hash []byte, prv *ecdsa.PrivateKey) (sig []byte, err error) { } // VerifySignature checks that the given public key created signature over hash. -// The public key should be in compressed (33 bytes) or uncompressed (64 bytes) format. +// The public key should be in compressed (33 bytes) or uncompressed (65 bytes) format. // The signature should have the 64 byte [R || S] format. func VerifySignature(pubkey, hash, signature []byte) bool { return secp256k1.VerifySignature(pubkey, hash, signature) diff --git a/crypto/signature_nocgo.go b/crypto/signature_nocgo.go index abee9d4880..17fd613b21 100644 --- a/crypto/signature_nocgo.go +++ b/crypto/signature_nocgo.go @@ -28,7 +28,7 @@ import ( "github.com/btcsuite/btcd/btcec" ) -// Ecrecover returns the public key that created the given signature. +// Ecrecover returns the uncompressed public key that created the given signature. func Ecrecover(hash, sig []byte) ([]byte, error) { pub, err := SigToPub(hash, sig) if err != nil {