Skip to content

Commit 9b12362

Browse files
jschneider-benschdjc
authored andcommitted
Add advisory for hpke-rs-rust-crypto
1 parent 7b29575 commit 9b12362

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
```toml
2+
[advisory]
3+
id = "RUSTSEC-0000-0000"
4+
package = "hpke-rs-rust-crypto"
5+
date = "2026-02-04"
6+
aliases = ["GHSA-g433-pq76-6cmf"]
7+
url = "https://github.com/cryspen/hpke-rs/pull/124"
8+
9+
[affected.functions]
10+
"hpke_rs_rust_crypto::HpkeRustCrypto::dh" = [ "<= 0.5.0" ]
11+
12+
[versions]
13+
patched = [">= 0.6.0"]
14+
```
15+
16+
# Missing Check for All-Zero X25519 Shared Secret
17+
18+
Computing an X25519 shared secret with
19+
`x25519_dalek::StaticSecret::diffie_hellman` does not include the
20+
check that the key exchange was contributory, i.e. does not ensure on
21+
its own that the resulting shared secret is non-zero.
22+
23+
## Impact
24+
RFC 9180 mandates that implementations of HPKE must check for all zero
25+
Diffie-Hellman shared secrets and abort if so.
26+
27+
Applications using hpke-rs with the RustCryto provider would not
28+
perform this check allowing for non-contributive Diffie-Hellman shared
29+
secrets. Applications using hpke-rs with the libcrux provider are not
30+
affected.
31+
32+
## Mitigation
33+
Starting with version `0.6.0`, an error will be returned when
34+
the computed Diffie-Hellman shared secret is all-zero.

0 commit comments

Comments
 (0)