mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
crypto/ecies: use aes blocksize
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
This commit is contained in:
parent
fdfd1235ac
commit
638741b082
1 changed files with 1 additions and 1 deletions
|
|
@ -290,7 +290,7 @@ func (prv *PrivateKey) Decrypt(c, s1, s2 []byte) (m []byte, err error) {
|
|||
switch c[0] {
|
||||
case 2, 3, 4:
|
||||
rLen = (prv.PublicKey.Curve.Params().BitSize + 7) / 4
|
||||
if len(c) < (rLen + hLen + 1) {
|
||||
if len(c) < (rLen + hLen + params.BlockSize) {
|
||||
return nil, ErrInvalidMessage
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in a new issue