This project contains known security vulnerabilities. Find detailed information at the bottom.

Crate pgp

Dependencies

(66 total, 16 outdated, 2 insecure)

CrateRequiredLatestStatus
 base64>=0.21.7, <0.230.22.1up to date
 buffer-redux^1.0.01.1.0up to date
 bitfields^1.0.01.0.3up to date
 bytes^1.11.11.11.1up to date
 byteorder^1.41.5.0up to date
 derive_builder^0.20.00.20.2up to date
 hex^0.40.4.3up to date
 nom^8.08.0.0up to date
 log^0.4.220.4.29up to date
 smallvec^1.10.01.15.1up to date
 derive_more^2.0.12.1.1up to date
 memchr^2.82.8.0up to date
 snafu^0.8.50.9.0out of date
 flate2^1.1.11.1.9up to date
 bzip2^0.6.00.6.1up to date
 aes^0.8.40.8.4up to date
 aead^0.50.5.2up to date
 argon2^0.50.5.3up to date
 block-padding^0.30.4.2out of date
 blowfish^0.90.9.1up to date
 camellia^0.10.1.0up to date
 cast5^0.110.11.1up to date
 cfb-mode^0.8.20.8.2up to date
 cipher^0.4.20.5.1out of date
 const-oid^0.9.60.10.2out of date
 crc24^0.1.60.1.6up to date
 curve25519-dalek^4.1.34.1.3up to date
 des^0.80.8.1up to date
 digest^0.10.70.11.2out of date
 dsa^0.6.30.6.3up to date
 ecdsa^0.16.90.16.9up to date
 ed25519-dalek^2.1.12.2.0up to date
 elliptic-curve^0.130.13.8up to date
 generic-array^0.14.61.3.5out of date
 idea^0.50.5.1up to date
 md-5^0.10.50.11.0out of date
 num_enum>=0.5.7, <0.80.7.6up to date
 num-traits^0.2.190.2.19up to date
 p256^0.130.13.2up to date
 p384^0.130.13.1up to date
 p521^0.130.13.3up to date
 k256^0.130.13.4up to date
 rand^0.8.50.10.0out of date
 ripemd^0.1.30.2.0out of date
 rsa ⚠️^0.9.100.9.10insecure
 sha1^0.10.60.11.0out of date
 sha1-asm^0.5.30.5.3up to date
 sha1-checked^0.100.10.0up to date
 sha2^0.10.60.11.0out of date
 sha3^0.10.80.11.0out of date
 signature^2.22.2.0up to date
 twofish^0.70.7.1up to date
 zeroize^1.81.8.2up to date
 getrandom^0.20.4.2out of date
 hkdf^0.12.40.13.0out of date
 aes-gcm^0.10.30.10.3up to date
 eax^0.5.00.5.0up to date
 ocb3^0.10.1.0up to date
 aes-kw^0.2.10.2.1up to date
 cx448^0.1.10.1.1up to date
 num-bigint-dig^0.8.60.9.1out of date
 x25519-dalek^2.0.12.0.1up to date
 ml-kem^0.2.10.2.3up to date
 ml-dsa ⚠️^0.0.40.0.4insecure
 slh-dsa^0.0.30.1.0out of date
 replace_with^0.1.80.1.8up to date

Dev dependencies

(16 total, 5 outdated)

CrateRequiredLatestStatus
 glob^0.30.3.3up to date
 hex-literal^0.41.1.0out of date
 pretty_assertions^11.4.1up to date
 pretty_env_logger^0.50.5.0up to date
 rand_chacha^0.30.10.0out of date
 rand_xorshift^0.30.5.0out of date
 rayon^1.101.11.0up to date
 serde^1.0.2171.0.228up to date
 serde_json^1.0.471.0.149up to date
 criterion^0.50.8.2out of date
 tempfile^3.14.03.27.0up to date
 proptest^1.6.01.11.0up to date
 proptest-derive^0.5.10.8.0out of date
 escape_string^0.1.20.1.2up to date
 regex^1.71.12.3up to date
 testresult^0.4.10.4.1up to date

Security Vulnerabilities

rsa: Marvin Attack: potential key recovery through timing sidechannels

RUSTSEC-2023-0071

Impact

Due to a non-constant-time implementation, information about the private key is leaked through timing information which is observable over the network. An attacker may be able to use that information to recover the key.

Patches

No patch is yet available, however work is underway to migrate to a fully constant-time implementation.

Workarounds

The only currently available workaround is to avoid using the rsa crate in settings where attackers are able to observe timing information, e.g. local use on a non-compromised computer is fine.

References

This vulnerability was discovered as part of the "Marvin Attack", which revealed several implementations of RSA including OpenSSL had not properly mitigated timing sidechannel attacks.

ml-dsa: Timing side-channel in ML-DSA decomposition

RUSTSEC-2025-0144

Summary

A timing side-channel was discovered in the Decompose algorithm which is used during ML-DSA signing to generate hints for the signature.

Details

The analysis was performed using a constant-time analyzer that examines compiled assembly code for instructions with data-dependent timing behavior. The analyzer flags:

  • UDIV/SDIV instructions: Hardware division instructions have early termination optimizations where execution time depends on operand values.

The decompose function used a hardware division instruction to compute r1.0 / TwoGamma2::U32. This function is called during signing through high_bits() and low_bits(), which process values derived from secret key components:

  • (&w - &cs2).low_bits() where cs2 is derived from secret key component s2
  • Hint::new() calls high_bits() on values derived from secret key component t0

Original Code:

fn decompose<TwoGamma2: Unsigned>(self) -> (Elem, Elem) {
    // ...
    let mut r1 = r_plus - r0;
    r1.0 /= TwoGamma2::U32;  // Variable-time division on secret-derived data
    (r1, r0)
}

Impact

The dividend (r1.0) is derived from secret key material. An attacker with precise timing measurements could extract information about the signing key by observing timing variations in the division operation.

Mitigation

Integer division was replaced with a constant-time Barrett reduction.