Skip to content

Commit 60c6a32

Browse files
committed
comments uncovering my lies
1 parent 20a2605 commit 60c6a32

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

noir-projects/aztec-nr/aztec/src/event/event_interface.nr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,17 @@ where
162162
// oracle which we don't use for anything besides its side effects, therefore this is safe to call.
163163
unsafe { emit_offchain_message(ciphertext, recipient) };
164164
} else {
165-
// When delivering through the private log stream, tagging is used so we must prefix the ciphertext with a tag.
165+
// Safety: Despite being called CONSTRAINED_ONCHAIN, this delivery mode is currently NOT fully constrained.
166+
// The tag prefixing is unconstrained, meaning a malicious sender could manipulate the tag to prevent
167+
// recipient decryption. This is a significant security risk that needs to be addressed.
168+
// TODO(#14565): Implement proper constrained tag prefixing to make this truly CONSTRAINED_ONCHAIN
166169
let log_content = prefix_with_tag(ciphertext, recipient);
167170

168171
context.emit_private_log(log_content, log_content.len());
169172
}
170173
}
171174

172-
// TODO: rename to emit_event_in_public
175+
// TODO(benesjan): rename to emit_event_in_public
173176
pub fn emit_event_in_public_log<Event>(event: Event, context: &mut PublicContext)
174177
where
175178
Event: EventInterface + Serialize,

noir-projects/aztec-nr/aztec/src/messages/logs/utils.nr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use crate::oracle::notes::{
33
};
44
use dep::protocol_types::address::AztecAddress;
55

6+
// TODO(#14565): Add constrained tagging
67
pub(crate) fn prefix_with_tag<let L: u32>(
78
log_without_tag: [Field; L],
89
recipient: AztecAddress,

0 commit comments

Comments
 (0)