Skip to content

Commit

Permalink
Merge branch 'master' into issue/499
Browse files Browse the repository at this point in the history
  • Loading branch information
developerfred authored Jan 5, 2020
2 parents aa8a3fd + 6b2928e commit f823427
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions crypto/secp256k1/public.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,7 @@ func PublicKeyFromBytes(keyBytes []byte) (crypto.PublicKey, error) {

// ECIES returns an ECIES representation of the public key.
func (pk PublicKey) ECIES() (*ecies.PublicKey, error) {
rpk, err := ethcrypto.UnmarshalPubkey(append([]byte{byte(4)}, pk.Bytes()...))
if err != nil {
return nil, errors.WithMessage(err, "could not convert pk")
}

return ecies.ImportECDSAPublic(rpk), nil
return ecies.ImportECDSAPublic(&pk.ecdsa), nil
}

func (pk PublicKey) ECDSA() *ecdsa.PublicKey {
Expand Down

0 comments on commit f823427

Please sign in to comment.