Skip to content

ssh-key: accept undersized mpints in ECDSA signatures - #291

Merged
tarcieri merged 4 commits into
RustCrypto:masterfrom
mkeeter:ecdsa-short-mpint
Sep 5, 2024
Merged

tarcieri merged 4 commits into
RustCrypto:masterfrom
mkeeter:ecdsa-short-mpint

Conversation

@mkeeter

@mkeeter mkeeter commented Aug 29, 2024

Copy link
Copy Markdown
Contributor

Leading zeros must be stripped from mpint values (per RFC 4251), meaning it's possible to see "short" mpint values when using them to construct signatures.

These values must be padded with leading zeros before being used in pXYZ::ecdsa::Signature, which expect exact-size arrays.

See #290 for details.

@mkeeter
mkeeter force-pushed the ecdsa-short-mpint branch from 48bce59 to 65a8c4a Compare August 29, 2024 13:41
@mkeeter
mkeeter force-pushed the ecdsa-short-mpint branch from 65a8c4a to 394b6e1 Compare August 29, 2024 13:52
@mkeeter mkeeter changed the title Accept undersized mpints in ECDSA signatures ssh-key: accept undersized mpints in ECDSA signatures Aug 29, 2024
Comment thread ssh-key/src/signature.rs Outdated
Comment thread ssh-key/src/signature.rs Outdated
@tarcieri
tarcieri merged commit f28658e into RustCrypto:master Sep 5, 2024
@mkeeter

mkeeter commented Sep 5, 2024

Copy link
Copy Markdown
Contributor Author

Thanks for merging this and #289 !

Are you planning to make a new patch release of ssh-key with these changes? I'd appreciate being able to bump my dependency to get the bug fixes.

@tarcieri

tarcieri commented Sep 5, 2024

Copy link
Copy Markdown
Member

The master branch is targeting development, i.e. v0.7.0-pre, so I can't easily cut a release

mkeeter added a commit to oxidecomputer/SSH that referenced this pull request Oct 4, 2024
labbott added a commit to oxidecomputer/sshauth that referenced this pull request Oct 8, 2024
mkeeter added a commit to oxidecomputer/SSH that referenced this pull request Oct 15, 2024
mkeeter added a commit to oxidecomputer/SSH that referenced this pull request Oct 15, 2024
mkeeter added a commit to oxidecomputer/SSH that referenced this pull request Oct 15, 2024
tarcieri pushed a commit that referenced this pull request Oct 15, 2024
@tarcieri tarcieri mentioned this pull request Oct 15, 2024
labbott added a commit to oxidecomputer/sshauth that referenced this pull request Oct 17, 2024
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.

2 participants