Skip to content

Validate public key length before ed25519 verify - #86

Merged
aricart merged 3 commits into
mainfrom
daniele/check-public-key-len
Jun 2, 2026
Merged

Validate public key length before ed25519 verify#86
aricart merged 3 commits into
mainfrom
daniele/check-public-key-len

Conversation

@aricart

@aricart aricart commented Jun 2, 2026

Copy link
Copy Markdown
Member

Prevents ed25519.Verify from panicking on malformed public keys.

  • validate public key length before ed25519 verify (FromPublicKey, IsValidPublicKey, pub.Verify)
  • validate decoded seed length in DecodeSeed / FromSeed

Ported from ConnectEverything/nkeys-private#1 (author @sciascid).

sciascid and others added 3 commits June 2, 2026 08:08
This prevents ed25519.Verify from panicking on malformed public keys.
staticcheck@latest (v0.7.0) requires go >= 1.25; CI install step failed under go 1.24 with GOTOOLCHAIN=local.
@aricart
aricart requested a review from neilalexander June 2, 2026 13:18

@neilalexander neilalexander left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 26822247924

Coverage increased (+0.7%) to 81.096%

Details

  • Coverage increased (+0.7%) from the base build.
  • Patch coverage: 21 of 21 lines across 3 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 529
Covered Lines: 429
Line Coverage: 81.1%
Coverage Strength: 43.79 hits per line

💛 - Coveralls

@aricart
aricart merged commit d071bc9 into main Jun 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants