Skip to content

ssh-key v0.7.0 - #670

Merged
tarcieri merged 1 commit into
masterfrom
ssh-key/v0.7.0
Dec 5, 2026
Merged

tarcieri merged 1 commit into
masterfrom
ssh-key/v0.7.0

Conversation

@tarcieri

@tarcieri tarcieri commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

Security

  • Reject certificates used as CA keys when decoding or signing certificates (#604)
  • Require ctutils v0.4.8, which includes constant-time mask generation and comparison fixes (#610, RUSTSEC-2026-0385)
  • Upgrade the optional rsa backend to v0.10, which fixes the upstream RSA decryption timing issue (#613, RUSTSEC-2023-0071)
  • Check that bcrypt-PBKDF rounds are in 1..=1_048_576 when reading or writing the KDF parameters and before deriving an OpenSSH encryption key (#624, #625)
  • Bound Argon2 parameters from PuTTY PPK files to 1 GiB of memory, 1024 passes, and 64 lanes before running the KDF (#626)
  • Keep private key material out of PPK parse errors by omitting the input text (#636)
  • Verify and re-encode certificates using the exact bytes signed by the CA. This preserves valid signatures over noncanonical field encodings and rejects changes to signed bytes that decode to the same value (#659)
  • Raise the curve25519-dalek minimum to v5.1 for ed25519 and mldsa44-ed25519. This fixes an arithmetic error in the x86-64 AVX-512 backend (RUSTSEC-2026-0620)

Added

  • Decode a certificate or public key after reading its algorithm name with Certificate::decode_as and public::KeyData::decode_as (#233)
  • Find, read, and write keys in a user's SSH directory with DotSsh under std (#257, #259)
  • Parse legacy ssh-rsa (RSA/SHA-1) signatures (#263)
  • Serialize and deserialize SshSig with serde, using PEM for human-readable formats and the SSH binary encoding for other formats (#264)
  • Implement core::error::Error for ssh_key::Error in no_std builds (#303)
  • Recognize the rsa-sha2-256-cert-v01@openssh.com and rsa-sha2-512-cert-v01@openssh.com certificate algorithm names (#311)
  • Verify and explicitly select legacy RSA/SHA-1 signatures with the rsa and sha1 features. The default RSA signer uses SHA-512 (#315, #323)
  • Read encrypted and unencrypted PuTTY PPK v2 and v3 private keys with PrivateKey::from_ppk under the new ppk feature (#324)
  • Implement Hash for Fingerprint (#330)
  • Preserve non-UTF-8 comments in OpenSSH private keys (#347)
  • Read and write OpenSSH public and private keys through std::io::Read and Write with read_openssh and write_openssh (#378)
  • Re-export ssh-cipher and ssh-encoding as ssh_key::cipher and ssh_key::encoding (#379)
  • Sign and verify SSHSIG messages using a precomputed hash or a streaming digest with
    the *_prehash and *_digest methods and AssociatedHashAlg (#384, #385)
  • Decode certificates embedded in public keys as KeyData::Certificate. Use certificate() or into_certificate() to extract one (#449)
  • Support ssh-mldsa44-ed25519 composite keys, signatures, and certificates, interoperable with OpenSSH 10.6 (#583)
  • Support ssh-mldsa87-p384 composite keys, signatures, and certificates from draft-ietf-sshm-composite-sigs-01 (#654)
  • Generate keys, sign, and verify with either composite algorithm without alloc. Enable them independently with mldsa44-ed25519 and mldsa87-p384 (#655, #661)

Changed

  • Certificate validity timestamps use the full SSH u64 range. The valid_after_time and valid_before_time accessors now return Option<SystemTime> (#209)
  • P-521 signing uses deterministic nonces and no longer requires operating-system randomness (#225)
  • RSA and DSA key components are private. Use their constructors and accessors in place of struct literals and field access. RSA keys also expose key_size() (#269, #274, #275)
  • Switch to Rust 2024 edition (#354)
  • Move Mpint into ssh-encoding and retain the ssh_key::Mpint re-export (#359)
  • Public and private key comment() accessors now require alloc and return &Comment. Use as_bytes(), as_str(), or as_str_lossy() to select a representation (#360)
  • Key encryption and KDF initialization accept fallible RNGs and report Error::RngFailure (#362)
  • With rsa or dsa enabled, Mpint conversions use encoding::Uint (crypto_bigint::BoxedUint) in place of num_bigint_dig::BigUint (#362)
  • File-based key readers and writers accept impl AsRef<Path> (#378, #383)
  • The std feature no longer enables std in the underlying cryptographic backends (#394)
  • Upgrade rand_core to v0.10, sec1 to v0.8, and sha1 and sha2 to v0.11 (#466, #476, #480, #481)
  • Upgrade bcrypt-pbkdf to v0.11 and the signature traits to v3 (#494, #501)
  • Replace subtle::ConstantTimeEq implementations with ctutils::CtEq (#507)
  • Upgrade hmac to v0.13 (#519)
  • Report signature errors without an underlying ssh_key::Error as Error::Signature (#523)
  • Upgrade dsa to v0.7, ed25519-dalek to v3, the NIST curve crates to v0.14, and argon2 to v0.6 (#571, #572, #573, #582)
  • Make sha2 optional and enable it by default. With defaults disabled, enable sha2 for fingerprints and certificate validation. The SSHSIG digest and prehash methods still work with an application-supplied SHA-2 implementation (#602)
  • Raise the minimum supported Rust version from 1.65 to 1.87 (#610)
  • Key and certificate Decode and decode_as implementations take &mut Decoder<impl Reader> (#618)
  • Mpint stores unsigned magnitudes of up to 16384 bits. Decoding rejects negative values and encoding writes canonical SSH integers (#622)
  • Raise the default bcrypt-PBKDF cost for new encrypted OpenSSH keys from 16 to 32 rounds (#624)
  • Reject decoded binary input larger than 128 MiB (#628)
  • Limit certificates to 256 principals when building or decoding them (#633)
  • Use ssh-encoding's decoder constructors and derives for key types, preserving their wire formats and validation (#663, #664, #666)
  • Upgrade ssh-encoding and ssh-cipher to v0.4 (#668, #669)

Removed

  • Remove the crate's separate 2048-bit RSA minimum for generation and conversion. Those operations now use the rsa backend's size policy (#412)
  • Remove Mpint::from_positive_bytes and as_positive_bytes. Use from_bytes and as_bytes for unsigned big-endian magnitudes (#622)

Fixed

  • Read OpenSSH private keys with an empty comment and no padding (#216)
  • Preserve both distinct prime factors when converting an SSH keypair to an RSA private key (#218)
  • Detect the Base64 line width when reading PEM-wrapped OpenSSH private keys (#252)
  • Accept the extra padding PuTTYgen writes on unencrypted OpenSSH private keys (#321)
  • Decode short P-521 private scalars (#351)
  • Encode a certificate held in KeyData with its certificate algorithm name exactly once (#451)
  • Handle OpenSSH's u64::MAX no-expiry sentinel in certificate system-time conversion (#504)
  • Encode the flags and counter for sk-ecdsa-sha2-nistp256@openssh.com signatures after the length-prefixed ECDSA signature (#532)
  • Restore the getrandom feature and re-export the matching getrandom crate (#539)
  • Accept repeated spaces, tabs, and leading whitespace in known_hosts entries (#619)
  • Accept ECDSA private scalars as short as 24 bytes, padding them to the curve size (#623)
  • Reject custom certificate algorithms with an empty name or domain (#629)
  • Reject trailing bytes in Signature::try_from(&[u8]) and binary SshSig deserialization with serde (#631)
  • Include the CRT coefficient iqmp when comparing RSA private keys (#635)

@tarcieri
tarcieri merged commit 665e6e9 into master Dec 5, 2026
23 checks passed
@tarcieri
tarcieri deleted the ssh-key/v0.7.0 branch December 5, 2026 04:04
This was referenced Dec 5, 2026
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