Skip to content

Commit 638741b

Browse files
lightclientrjl493456442
authored andcommitted
crypto/ecies: use aes blocksize
Co-authored-by: Gary Rong <[email protected]>
1 parent fdfd123 commit 638741b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crypto/ecies/ecies.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ func (prv *PrivateKey) Decrypt(c, s1, s2 []byte) (m []byte, err error) {
290290
switch c[0] {
291291
case 2, 3, 4:
292292
rLen = (prv.PublicKey.Curve.Params().BitSize + 7) / 4
293-
if len(c) < (rLen + hLen + 1) {
293+
if len(c) < (rLen + hLen + params.BlockSize) {
294294
return nil, ErrInvalidMessage
295295
}
296296
default:

0 commit comments

Comments
 (0)