This project might be open to known security vulnerabilities, which can be prevented by tightening the version range of affected dependencies. Find detailed information at the bottom.

Crate schnorrkel

Dependencies

(15 total, 10 outdated, 2 possibly insecure)

CrateRequiredLatestStatus
 aead^0.2.00.5.2out of date
 arrayref^0.3.50.3.9up to date
 arrayvec^0.5.10.7.6out of date
 curve25519-dalek ⚠️^2.04.2.0out of date
 ed25519-dalek ⚠️^1.0.0-pre.32.2.0out of date
 failure^0.1.60.1.8up to date
 getrandom^0.1.140.3.3out of date
 merlin^2.03.0.0out of date
 rand^0.7.30.9.1out of date
 rand_chacha^0.2.10.9.0out of date
 rand_core^0.5.10.9.3out of date
 serde^1.0.1011.0.219up to date
 sha2^0.8.00.10.9out of date
 subtle^2.2.12.6.1up to date
 zeroize^1.0.01.8.1up to date

Dev dependencies

(7 total, 7 outdated)

CrateRequiredLatestStatus
 bincode^1.2.02.0.1out of date
 criterion^0.3.10.6.0out of date
 hex-literal^0.2.11.0.0out of date
 rand^0.7.30.9.1out of date
 rand_chacha^0.2.10.9.0out of date
 sha2^0.8.00.10.9out of date
 sha3^0.8.20.10.8out of date

Security Vulnerabilities

ed25519-dalek: Double Public Key Signing Function Oracle Attack on `ed25519-dalek`

RUSTSEC-2022-0093

Versions of ed25519-dalek prior to v2.0 model private and public keys as separate types which can be assembled into a Keypair, and also provide APIs for serializing and deserializing 64-byte private/public keypairs.

Such APIs and serializations are inherently unsafe as the public key is one of the inputs used in the deterministic computation of the S part of the signature, but not in the R value. An adversary could somehow use the signing function as an oracle that allows arbitrary public keys as input can obtain two signatures for the same message sharing the same R and only differ on the S part.

Unfortunately, when this happens, one can easily extract the private key.

Revised public APIs in v2.0 of ed25519-dalek do NOT allow a decoupled private/public keypair as signing input, except as part of specially labeled "hazmat" APIs which are clearly labeled as being dangerous if misused.

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