Skip to content

Commit d67dd0b

Browse files
Thegaramlightclientrjl493456442
authored
fix: use aes blocksize (#1269)
* crypto/ecies: use aes blocksize Co-authored-by: Gary Rong <[email protected]> * bump version --------- Co-authored-by: lightclient <[email protected]> Co-authored-by: Gary Rong <[email protected]>
1 parent cf46806 commit d67dd0b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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:

params/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
const (
2525
VersionMajor = 5 // Major version component of the current release
2626
VersionMinor = 10 // Minor version component of the current release
27-
VersionPatch = 1 // Patch version component of the current release
27+
VersionPatch = 2 // Patch version component of the current release
2828
VersionMeta = "mainnet" // Version metadata to append to the version string
2929
)
3030

0 commit comments

Comments
 (0)