test: frozen v1 golden vectors for PSKs and the sealed format (QA A-10, A-38)

This commit is contained in:
2026-11-25 07:42:27 +01:00
parent 6233c8244e
commit 91b84459b0
2 changed files with 51 additions and 3 deletions
+4 -3
View File
@@ -197,9 +197,10 @@ fn every_context_byte_changes_the_secret() {
}
}
/// QA A-15: the attacker knows both public keys and plays the initiator without the initiator's
/// secret key. She can make ct_IR (she knows ss_IR), but she cannot decapsulate ct_RI, which the
/// responder encapsulated to the real initiator. So she cannot compute the responder's PSK.
/// QA A-15, through the public API: an attacker who plays the initiator without its secret key
/// can send ct_IR, but cannot finish: ct_RI is encapsulated to the real initiator. (The API cannot
/// express her full knowledge, so this alone would pass even with a one-direction schedule; the
/// test that fails then is `src/binding_tests.rs`, checked by reintroducing that bug.)
#[test]
fn an_impersonated_initiator_cannot_compute_the_psk() {
let i = SecretKey::from_seed(SEED_I); // the real initiator, whom the attacker impersonates