File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
noir-projects/aztec-nr/aztec/src Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff 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
173176pub fn emit_event_in_public_log <Event >(event : Event , context : &mut PublicContext )
174177where
175178 Event : EventInterface + Serialize ,
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ use crate::oracle::notes::{
33};
44use dep::protocol_types::address::AztecAddress ;
55
6+ // TODO(#14565): Add constrained tagging
67pub (crate ) fn prefix_with_tag <let L : u32 >(
78 log_without_tag : [Field ; L ],
89 recipient : AztecAddress ,
You can’t perform that action at this time.
0 commit comments