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

Crate unc-crypto

Dependencies

(21 total, 10 outdated, 1 insecure, 1 possibly insecure)

CrateRequiredLatestStatus
 blake2^0.9.10.10.6out of date
 borsh^1.0.01.5.3up to date
 bs58^0.40.5.1out of date
 c2-chacha^0.30.3.3up to date
 curve25519-dalek ⚠️^4.1.14.1.3maybe insecure
 derive_more^0.99.91.0.0out of date
 ed25519-dalek^2.1.02.1.1up to date
 hex^0.4.20.4.3up to date
 once_cell^1.13.11.20.2up to date
 primitive-types^0.100.13.1out of date
 rand^0.70.8.5out of date
 rsa ⚠️^0.9.60.9.7insecure
 rsa-export^0.3.30.3.3up to date
 secp256k1^0.27.00.30.0out of date
 serde^1.0.1361.0.216up to date
 serde_json^1.0.681.0.134up to date
 unc-stdx^0.5.10.12.2out of date
 subtle^2.22.6.1up to date
 thiserror^1.0.302.0.9out of date
 unc-account-id^0.1.00.7.2out of date
 unc-config-utils^0.5.10.12.2out of date

Dev dependencies

(4 total, 2 outdated)

CrateRequiredLatestStatus
 bolero^0.10.00.12.0out of date
 hex-literal^0.20.4.1out of date
 sha2^0.100.10.8up to date
 tempfile^3.33.14.0up 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.

curve25519-dalek: Timing variability in `curve25519-dalek`'s `Scalar29::sub`/`Scalar52::sub`

RUSTSEC-2024-0344

Timing variability of any kind is problematic when working with potentially secret values such as elliptic curve scalars, and such issues can potentially leak private keys and other secrets. Such a problem was recently discovered in curve25519-dalek.

The Scalar29::sub (32-bit) and Scalar52::sub (64-bit) functions contained usage of a mask value inside a loop where LLVM saw an opportunity to insert a branch instruction (jns on x86) to conditionally bypass this code section when the mask value is set to zero as can be seen in godbolt:

A similar problem was recently discovered in the Kyber reference implementation:

https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/hqbtIGFKIpU/m/cnE3pbueBgAJ

As discussed on that thread, one portable solution, which is also used in this PR, is to introduce a volatile read as an optimization barrier, which prevents the compiler from optimizing it away.

The fix can be validated in godbolt here:

The problem was discovered and the solution independently verified by Alexander Wagner [email protected] and Lea Themint [email protected] using their DATA tool:

https://github.com/Fraunhofer-AISEC/DATA