Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(aztec-nr): clarify in comments that nullifier computation does not need to include siloed note-hash for protocol security #2667

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions noir-projects/aztec-nr/aztec/src/note/utils.nr
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ pub fn compute_note_hash_for_consumption<Note, N>(note: Note) -> Field where Not
// contract address and then nonce. This hash will match the existing leaf in the private
// data tree, so the kernel can just perform a membership check directly on this hash/leaf.
compute_unique_siloed_note_hash(note)
// IMPORTANT NOTE ON REDUNDANT SILOING BY CONTRACT ADDRESS: The note hash computed above is
// "siloed" by contract address. When a note hash is computed solely for the purpose of
// nullification, it is not strictly necessary to silo the note hash before computing
// its nullifier. In other words, it is NOT NECESSARY for protocol security that a nullifier
// be computed from a siloed note hash. After all, persistable note hashes and nullifiers are
// siloed by the kernel circuit. That being said, the siloed note hash computed above CAN be
// used for nullifier computation, and this achieves the (arguably unnecessary) property that
// nullifiers are computed from a note hash's fully-computed private data tree leaf.
}
}

Expand Down
Loading