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

Crate pgp

Dependencies

(68 total, 34 outdated, 1 insecure, 1 possibly insecure)

CrateRequiredLatestStatus
 aead^0.50.6.1out of date
 aes^0.8.40.9.1out of date
 aes-gcm^0.10.30.11.0out of date
 aes-kw^0.2.10.3.1out of date
 argon2^0.50.5.3up to date
 base64>=0.21.7, <0.230.22.1up to date
 bitfields^1.0.03.0.0out of date
 block-padding^0.30.4.2out of date
 blowfish^0.90.10.0out of date
 buffer-redux^1.0.01.1.0up to date
 byteorder^1.41.5.0up to date
 bytes^1.11.11.12.0up to date
 bzip2^0.6.00.6.1up to date
 camellia^0.10.2.1out of date
 cast5^0.110.12.0out of date
 cfb-mode^0.8.20.9.1out of date
 cipher^0.4.20.5.2out 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
 cx448^0.1.10.1.1up to date
 derive_builder^0.20.00.20.2up to date
 derive_more^2.0.12.1.1up to date
 des^0.80.9.0out of date
 digest^0.10.70.11.3out of date
 dsa^0.6.30.7.0out of date
 eax^0.5.00.5.0up to date
 ecdsa^0.16.90.17.0out of date
 ed25519-dalek^2.1.12.2.0up to date
 elliptic-curve^0.130.14.1out of date
 flate2^1.1.11.1.9up to date
 generic-array^0.14.61.4.3out of date
 getrandom^0.20.4.3out of date
 hex^0.40.4.3up to date
 hkdf^0.12.40.13.0out of date
 idea^0.50.6.0out of date
 k256^0.130.13.4up to date
 log^0.4.220.4.33up to date
 md-5^0.10.50.11.0out of date
 memchr^2.82.8.2up to date
 ml-dsa ⚠️^0.0.40.1.1out of date
 ml-kem^0.2.10.3.2out of date
 nom^8.08.0.0up to date
 num-bigint-dig^0.8.60.9.1out of date
 num-traits^0.2.190.2.19up to date
 num_enum>=0.5.7, <0.80.7.6up to date
 ocb3^0.10.1.0up to date
 p256^0.130.14.0out of date
 p384^0.130.13.1up to date
 p521^0.130.13.3up to date
 rand^0.8.60.10.2out of date
 replace_with^0.1.80.1.8up to 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.12.0out of date
 signature^2.23.0.0out of date
 slh-dsa^0.0.30.1.0out of date
 smallvec^1.10.01.15.2up to date
 snafu^0.9.00.9.1up to date
 subtle^2.6.12.6.1up to date
 twofish^0.70.8.0out of date
 web-time^1.11.1.0up to date
 x25519-dalek^2.0.12.0.1up to date
 zeroize^1.81.9.0up to date

Dev dependencies

(16 total, 4 outdated)

CrateRequiredLatestStatus
 criterion^0.50.8.2out of date
 escape_string^0.1.20.1.2up to date
 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
 proptest^1.6.01.11.0up to date
 proptest-derive^0.8.00.8.0up to date
 rand_chacha^0.30.10.0out of date
 rand_xorshift^0.30.5.0out of date
 rayon^1.101.12.0up to date
 regex^1.121.12.4up to date
 serde^1.0.2171.0.228up to date
 serde_json^1.0.471.0.150up to date
 tempfile^3.27.03.27.0up 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.