Skip to content

Commit 3e99e65

Browse files
lightclientrjl493456442
authored andcommitted
fix: use aes blocksize
Co-Authored-By: Gary Rong <garyrong0905@gmail.com>
1 parent ed259a4 commit 3e99e65

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
@@ -285,7 +285,7 @@ func (prv *PrivateKey) Decrypt(c, s1, s2 []byte) (m []byte, err error) {
285285
switch c[0] {
286286
case 2, 3, 4:
287287
rLen = (prv.PublicKey.Curve.Params().BitSize + 7) / 4
288-
if len(c) < (rLen + hLen + 1) {
288+
if len(c) < (rLen + hLen + params.BlockSize) {
289289
return nil, ErrInvalidMessage
290290
}
291291
default:

0 commit comments

Comments
 (0)