mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-21 21:09:07 +02:00
--pre-shared-key promises that only peers holding the same key can communicate. With ML-KEM enabled the derived PQ PSK replaces it in WireGuard, but the derivation never saw it: two peers with different configured keys, or only one with a key, still agreed on the same PQ PSK and talked. A permitted peer identity, or a stolen identity key, was enough to bypass the extra secret (security review of #7098, finding F-001). Rosenpass does not have this gap because it seeds its exchange with the configured key. Mix the configured key into the HKDF keying material, so a peer without it derives a different PSK and WireGuard fails closed. It goes through the binding shared by every derivation, so bootstrap and rotation both enforce it. The library takes it as a generic option, keeping it free of WireGuard concepts.