mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
crypto/ecies: remove redundant on-curve check in Decrypt
crypto/elliptic already checks whether the input is a valid curve point since Go 1.5.
This commit is contained in:
parent
c8d0688920
commit
623f49af8a
1 changed files with 0 additions and 3 deletions
|
|
@ -108,9 +108,6 @@ func (prv *PrivateKey) Decrypt(c, s1, s2 []byte) (m []byte, err error) {
|
|||
if R.X == nil {
|
||||
return nil, ErrInvalidPublicKey
|
||||
}
|
||||
if !R.Curve.IsOnCurve(R.X, R.Y) {
|
||||
return nil, ErrInvalidCurve
|
||||
}
|
||||
|
||||
z, err := prv.GenerateShared(R, params.KeyLen, params.KeyLen)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue