diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-08 19:07:30 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-08 19:07:30 +0800 |
commit | 6284604b52e075e454e61f2933cadaaf9ded364b (patch) | |
tree | 611bf434b6729ad9bfcbd805ca203b559ab65f91 /crypto | |
parent | a953f3ec971fc6aebd28fed78d44778107ee4033 (diff) | |
parent | 7c0a18edb58c46a68bdf524dc2bf3e7edf61dba2 (diff) | |
download | dexon-6284604b52e075e454e61f2933cadaaf9ded364b.tar.gz dexon-6284604b52e075e454e61f2933cadaaf9ded364b.tar.zst dexon-6284604b52e075e454e61f2933cadaaf9ded364b.zip |
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/ecies/ecies.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/ecies/ecies.go b/crypto/ecies/ecies.go index 18952fc0b..812545631 100644 --- a/crypto/ecies/ecies.go +++ b/crypto/ecies/ecies.go @@ -303,6 +303,10 @@ func (prv *PrivateKey) Decrypt(rand io.Reader, c, s1, s2 []byte) (m []byte, err err = ErrInvalidPublicKey return } + if !R.Curve.IsOnCurve(R.X, R.Y) { + err = ErrInvalidCurve + return + } z, err := prv.GenerateShared(R, params.KeyLen, params.KeyLen) if err != nil { |