unstale

cargo / rsa

rsa

What changed in rsa 0.10, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-12.

22 breaking6 security3 deprecations13 new APIs and options2 performance3 behavior and defaults5 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.3.0 on npm

rsa 0.1054 changes

Breaking changes 22

  • The public API replaces BigUint with BoxedUint; modulus and prime-factor types are now NonZero<BoxedUint> and Odd<BoxedUint>.

    0.10.0release notes

  • PKCS#1/PKCS#8/SPKI support is gated on the default-enabled encoding feature; std no longer implicitly enables encoding dependencies.

    0.10.0release notes

  • Key generation enforces a 1024-bit minimum; default public-key construction and decoding also enforce that minimum.

    0.10.0release notes

  • The minimum supported Rust version is 1.87.

    0.10.0release notes

  • The nightly feature has been removed.

    0.10.0release notes

  • Oaep is generic over its digest type instead of using DynDigest.

    0.10.0release notes

  • The separate pem feature is removed; PEM support is included with encoding.

    0.10.0release notes

  • Signatures are stored as byte strings, preserving their encoded width.

    0.10.0release notes

  • Invalid PKCS#1 v1.5 padding returns deterministic synthetic plaintext instead of a padding error, avoiding a sidechannel.

    0.10.0release notes

  • PKCS#1 v1.5 encryption and signatures now require the opt-in pkcs1v15 feature.

    0.10.0release notes

  • The deprecated *_with_prefix constructors have been removed.

    0.10.0release notes

  • The deprecated new_raw constructor has been removed.

    0.10.0release notes

  • Construction rejects factors less than or equal to one, even or repeated factors, and private exponents greater than or equal to the modulus.

    0.10.0release notes

  • Adds construction for unbalanced two-prime keys; ordinary constructors now reject these keys.

    0.10.0release notes

  • Pss is generic over its digest type instead of using DynDigest.

    0.10.0release notes

  • PSS now follows RFC 8017 encoded-message width rules, including moduli with bit lengths congruent to 1 modulo 8.

    0.10.0release notes

  • Salt lengths that cannot be represented by the AlgorithmIdentifier encoder are rejected instead of truncated.

    0.10.0release notes

  • SigningKey now applies blinding by default.

    0.10.0release notes

  • The project now uses the Rust 2024 edition.

    0.10.0release notes

  • The optional sha2 feature is removed because SHA-2 support is always enabled.

    0.10.0release notes

  • Signature decoding is limited to 1024 bytes by default, with an API for specifying an explicit limit.

    0.10.0release notes

  • The u64_digit feature has been removed.

    0.10.0release notes

Security 6

  • Private-key components are redacted from Debug output.

    0.10.0release notes

  • Cryptographic operations, including OAEP decryption, now honor explicitly configured larger-key construction limits.

    0.10.0release notes

  • Stored secret-prime Montgomery parameters are zeroized.

    0.10.0release notes

  • Private-key operations are hardened following draft-irtf-cfrg-rsa-guidance.

    0.10.0release notes

  • Deprecated in favor of pss::SigningKey, which now applies blinding by default.

    0.10.0release notes

  • Undersized encoded messages and overflowing salt lengths return verification errors instead of panicking.

    0.10.0release notes

Deprecations 3

  • Renames RsaPrivateKey to PrivateKey while retaining the old name as a deprecated alias.

    0.10.0release notes

  • Deprecated in favor of PublicKey::new_with_size_limits.

    0.10.0release notes

  • Renames RsaPublicKey to PublicKey while retaining the old name as a deprecated alias.

    0.10.0release notes

New APIs and options 13

  • Error now implements Clone and core::error::Error.

    0.10.0release notes

  • Adds a crypto_common::Generate implementation and re-export for generating 3072-bit keys with public exponent 65537.

    0.10.0release notes

  • Multipart signing trait implementations are available for PKCS#1 v1.5 and PSS.

    0.10.0release notes

  • PSS keys can be decoded from PKCS#8/SPKI, including id-RSASSA-PSS algorithm identifiers.

    0.10.0release notes

  • Adds algorithm-specific inherent methods for OAEP encryption/decryption and PKCS#1 v1.5/PSS signing and verification, including prehash and explicit-RNG variants.

    0.10.0release notes

  • Adds an accessor for obtaining a public key from a private key.

    0.10.0release notes

  • Adds large-exponent component construction behind the hazmat feature.

    0.10.0release notes

  • Adds salt-length access and opt-in automatic salt-length detection through new_with_auto_salt_len.

    0.10.0release notes

  • Adds public-key construction with explicit size limits.

    0.10.0release notes

  • Adds modulus and exponent serialization helpers.

    0.10.0release notes

  • Adds explicit maximum-length control for signature decoding.

    0.10.0release notes

  • Fallible RNGs are accepted and their failures are propagated as errors.

    0.10.0release notes

  • Adds signature conversion from BitStringRef for PKCS#1 v1.5 and PSS signatures.

    0.10.0release notes

Performance 2

  • Exponentiation is bounded to the public exponent's bit length to improve encryption and verification performance.

    0.10.0release notes

  • A redundant allocation is removed during OAEP decryption.

    0.10.0release notes

Behavior and default changes 3

  • The default maximum public-key modulus size is raised to 8192 bits.

    0.10.0release notes

  • getrandom is enabled by default, and default decryption and signing paths use the system RNG for blinding.

    0.10.0release notes

  • OAEP accepts arbitrary byte strings as labels.

    0.10.0release notes

Fixes and other changes 5

  • Zero blinding factors are retried instead of replaced with one.

    0.10.0release notes

  • Size limits are enforced against the modulus's actual bit length rather than its storage precision.

    0.10.0release notes

  • SigningKey::from now uses the digest prefix consistently with new.

    0.10.0release notes

  • VerifyingKey::from now uses the digest prefix consistently with new.

    0.10.0release notes

  • CRT precomputation errors are propagated from private-key constructors.

    0.10.0release notes