From 07072c9a96508f2eac1579e002e039389f2c386f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bene=C5=A1?= Date: Fri, 25 Oct 2024 15:22:35 -0600 Subject: [PATCH] Apply suggestions from code review --- noir-projects/aztec-nr/aztec/src/encrypted_logs/payload.nr | 4 ++-- noir-projects/aztec-nr/aztec/src/macros/notes/mod.nr | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/noir-projects/aztec-nr/aztec/src/encrypted_logs/payload.nr b/noir-projects/aztec-nr/aztec/src/encrypted_logs/payload.nr index 9c36bbc7c8ac..f1d1278d0ef6 100644 --- a/noir-projects/aztec-nr/aztec/src/encrypted_logs/payload.nr +++ b/noir-projects/aztec-nr/aztec/src/encrypted_logs/payload.nr @@ -74,7 +74,7 @@ fn compute_private_log_payload( } // Current unoptimized size of the encrypted log - // empty_prefix (prefix_length bytes) + // empty_prefix (1 byte) // incoming_tag (32 bytes) // outgoing_tag (32 bytes) // eph_pk (32 bytes) @@ -95,7 +95,7 @@ fn fr_to_fq(r: Field) -> Scalar { } fn generate_ephemeral_key_pair() -> (Scalar, Point) { - // @todo Need to draw randomness from the full domain of Fq not only Fr + offset += 48 * 2; // We use the randomness to preserve the privacy of both the sender and recipient via encryption, so a malicious // sender could use non-random values to reveal the plaintext. But they already know it themselves anyway, and so // the recipient already trusts them to not disclose this information. We can therefore assume that the sender will diff --git a/noir-projects/aztec-nr/aztec/src/macros/notes/mod.nr b/noir-projects/aztec-nr/aztec/src/macros/notes/mod.nr index ba6c37f4ea33..df1ea4af2f11 100644 --- a/noir-projects/aztec-nr/aztec/src/macros/notes/mod.nr +++ b/noir-projects/aztec-nr/aztec/src/macros/notes/mod.nr @@ -716,7 +716,7 @@ comptime fn generate_finalization_payload( // We load the setup log from storage let setup_log_fields: [Field; $setup_log_field_length] = self.context.storage_read(self.setup_log_slot); - // We convert the lof from fields to bytes + // We convert the log from fields to bytes let setup_log: [u8; $setup_log_byte_length] = aztec::utils::bytes::fields_to_bytes(setup_log_fields); // First byte should be zero as the number of public values is populated in public