From f895cbd91d278ceb0e963ae4eba22b7685e04067 Mon Sep 17 00:00:00 2001 From: Georgio Nicolas Date: Mon, 14 Jul 2025 23:30:43 +0200 Subject: [PATCH] add hazard note! --- nym-outfox/src/format.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nym-outfox/src/format.rs b/nym-outfox/src/format.rs index b912d3de02..6cb137823e 100644 --- a/nym-outfox/src/format.rs +++ b/nym-outfox/src/format.rs @@ -256,6 +256,9 @@ impl MixStageParameters { buffer[self.routing_data_range()].copy_from_slice(routing_data); // Perform the AEAD + + // HAZARD: ENCRYPTION WITH EMPTY NONCES AND NO AD!! + let header_aead_key = ChaCha20Poly1305::new_from_slice(&shared_key)?; let nonce = [0u8; 12]; @@ -294,6 +297,8 @@ impl MixStageParameters { // Compute the AEAD and check the Tag, if wrong return Err let header_aead_key = ChaCha20Poly1305::new_from_slice(&shared_key)?; + + // HAZARD: ENCRYPTION WITH EMPTY NONCES AND NO AD!! let nonce = [0; 12]; let tag_bytes = buffer[self.tag_range()].to_vec();