Skip to content

ssh-key: allow ECDSA keys shorter than the modulus size - #623

Merged
tarcieri merged 1 commit into
masterfrom
ssh-key/short-ecdsa-keys
Nov 10, 2026
Merged

tarcieri merged 1 commit into
masterfrom
ssh-key/short-ecdsa-keys

Conversation

@tarcieri

Copy link
Copy Markdown
Member

Allows private scalars as small as 192-bits (following elliptic_curve::SecretKey::MIN_SIZE, padding them with zeros if they're smaller than the modulus size.

Also includes regression tests.

Closes #620

Allows private scalars as small as 192-bits (following
`elliptic_curve::SecretKey::MIN_SIZE`, padding them with zeros if
they're smaller than the modulus size.

Also includes regression tests.

Closes #620
@tarcieri
tarcieri merged commit 95619db into master Nov 10, 2026
17 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.

ssh-key: OpenSSH P-256 keys with a 31-byte private scalar fail with "length invalid"

1 participant