diff --git a/aztec/src/encrypted_logs/header.nr b/aztec/src/encrypted_logs/header.nr index 64a8e09..05428f2 100644 --- a/aztec/src/encrypted_logs/header.nr +++ b/aztec/src/encrypted_logs/header.nr @@ -32,7 +32,7 @@ impl EncryptedLogHeader { } let input: [u8; 32] = self.address.to_field().to_be_bytes(); - aes128_encrypt(input, iv, sym_key).as_array() + aes128_encrypt(input, iv, sym_key) } } diff --git a/aztec/src/encrypted_logs/payload.nr b/aztec/src/encrypted_logs/payload.nr index 1b396ef..440cebd 100644 --- a/aztec/src/encrypted_logs/payload.nr +++ b/aztec/src/encrypted_logs/payload.nr @@ -207,7 +207,7 @@ pub fn compute_incoming_body_ciphertext( plaintext: [u8; P], eph_sk: Scalar, address_point: AddressPoint, -) -> [u8] { +) -> [u8; P + 16 - P % 16] { let full_key = derive_aes_secret(eph_sk, address_point.to_point()); let mut sym_key = [0; 16]; let mut iv = [0; 16]; diff --git a/aztec/src/macros/events/mod.nr b/aztec/src/macros/events/mod.nr index 1fc3671..204bca4 100644 --- a/aztec/src/macros/events/mod.nr +++ b/aztec/src/macros/events/mod.nr @@ -20,7 +20,7 @@ comptime fn generate_event_interface(s: StructDefinition) -> Quoted { buffer[i] = event_type_id_bytes[i]; } - let serialized_event = self.serialize(); + let serialized_event = Serialize::<$content_len>::serialize(self); for i in 0..serialized_event.len() { let bytes: [u8; 32] = serialized_event[i].to_be_bytes();