Skip to content

fix(ssh): reject ECDSA private keys with a too-small scalar - #49

Merged
timweri merged 1 commit into
mainfrom
fix/ecdsa-short-scalar
Sep 25, 2026
Merged

timweri merged 1 commit into
mainfrom
fix/ecdsa-short-scalar

Conversation

@timweri

@timweri timweri commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

ECDSA signing now rejects private keys whose scalar is at most half the curve order's size (16 bytes on P-256, 24 on P-384), matching OpenSSH's check. A new P-256 test key with scalar 2^128-1 confirms signing fails, while the existing short-scalar keys from #47 still sign.

@timweri
timweri force-pushed the fix/ecdsa-short-scalar branch from cd8634d to f2f5826 Compare September 25, 2026 03:03
@timweri timweri changed the title Fix/ecdsa short scalar fix(ssh): reject ECDSA private keys with a too-small scalar Sep 25, 2026
@timweri
timweri marked this pull request as ready for review September 25, 2026 03:09
@timweri
timweri merged commit 42bb6a1 into main Sep 25, 2026
5 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.

1 participant