Summary
Clatter's pre‑2.2.0 post‑quantum Noise handshake implementation allowed PSK-based patterns that violated the Noise Protocol Framework's PSK validity rules.
Under certain *_psk0 patterns, PSK-derived keys could be used without proper randomization from ephemeral randomness, weakening confidentiality guarantees and potentially enabling catastrophic key reuse in real-world deployments.
Affected context
This vulnerability affects Rust applications that use Clatter's post-quantum Noise handshakes and rely on pre-shared keys for additional security.
It specifically concerns default and custom handshake patterns that:
- Use
*_psk0post-quantum patterns (e.g.,noise_pqkk_psk0,noise_pqkn_psk0,noise_pqnk_psk0,noise_pqnn_psk0) or similar hybrids - Expect Noise PSK processing to strictly follow Section 9.3 of the Noise Protocol Framework
- Depend on the library to enforce protocol-valid construction of handshake patterns
Environments with long-lived PSKs, high-value data, or long-term secrecy requirements are at particular risk, especially where key reuse and traffic analysis are realistic threats.
Exploit preconditions
- Attack surface: Any communication channel using Clatter's affected post-quantum Noise PSK patterns, including embedded, no_std, and constrained devices.
- Required attacker capability: Ability to observe or manipulate traffic over time, exploit weakened key derivation, or leverage protocol analysis; the attacker does not necessarily need code execution on either endpoint.
- Trigger point: Use of an offending post-quantum
*_psk0handshake pattern where PSK-derived keys are used for encryption without sufficient randomization from fresh ephemeral values. - Why exploitation is possible: Because the protocol implementation allowed PSK processing that violated Noise's PSK validity rule, some session keys could be insufficiently randomized and potentially reused or become linkable, weakening the expected cryptographic security and forward secrecy properties.
Why this happens
The core issue is an incorrect enforcement of protocol-level cryptographic invariants rather than a low-level primitive failure.
Clatter's implementation permitted handshake patterns that were formally disallowed by the Noise Protocol Framework's PSK validity rules (Section 9.3).
Specifically, some post-quantum PSK handshakes allowed PSK-derived material to be used for encryption without proper mixing with strong, self-chosen ephemeral randomness.
This maps to CWE-327: Use of a Broken or Risky Cryptographic Algorithm, in the sense of assembling a cryptographic protocol in a way that does not meet its design assumptions.
By not preventing invalid PSK placement in handshake patterns, the library enabled constructions where:
- Key derivation did not fully align with the Noise threat model
- Certain sessions could end up with lower entropy or predictable relationships between keys
Such protocol misuse can result in key reuse across sessions or predictable key structure, which in turn undermines confidentiality and some forward secrecy expectations.
Potential impact
- Session keys may be less random than expected, weakening confidentiality guarantees.
- Catastrophic key reuse may occur across sessions using the same PSK and pattern.
- Long-term traffic could become more vulnerable to cryptanalytic attacks or correlation.
- Handshakes may no longer meet the advertised Noise security properties (e.g., forward secrecy or resistance to active attackers).
- High-value applications relying on post-quantum handshakes for strong confidentiality may face elevated risk of sensitive data exposure.
General mitigation guidance
Effective mitigation focuses on enforcing protocol-compliant handshakes and reducing reliance on fragile PSK constructions:
- Prefer handshake patterns that are explicitly compliant with the Noise Protocol Framework's PSK rules and avoid custom PSK placements without expert review.
- Avoid using
*_psk0post-quantum patterns and instead use PSK positions and patterns that are documented as valid and secure. - Treat PSKs as highly sensitive long-term credentials: minimize their reuse across contexts and avoid combining them with experimental or non-standard patterns.
- Introduce runtime validation or configuration-layer checks to reject handshake patterns that violate the Noise PSK validity constraints.
- Apply defense in depth by limiting the exposure of PSKs (e.g., hardware-backed secrets, strict access controls) and avoiding assumptions that the protocol will "fix" poor key management practices.
- Where design permits, favor patterns that derive strong session keys from both authenticated static keys and high-quality ephemeral randomness rather than heavily relying on PSKs.
How teams detect issues like this
Detection is centered on configuration and protocol design review rather than simple signature-based scanning:
- Static analysis / config linting: Check for the use of post-quantum
*_psk0patterns or equivalent custom patterns that place PSKs in disallowed positions. - Code review practices: During security review, explicitly verify that all Noise handshake patterns used in the codebase are:
- Drawn from vetted, documented patterns
- Compliant with the Noise PSK validity rules
- Not altered in ways that circumvent protocol guidance
- Library-level enforcement: Enable or implement runtime checks in the cryptographic library to validate handshake patterns at construction time, rejecting invalid PSK placement.
- Automated tooling: Integrate cryptographic configuration auditors or protocol linters (where available) into CI/CD pipelines to flag risky or non-standard handshake definitions.

