Skip to content

Commit

Permalink
PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
plafer committed Jan 10, 2025
1 parent 868bf1e commit 90a979e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
3 changes: 1 addition & 2 deletions air/src/constraints/chiplets/memory/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@ fn enforce_values<E: FieldElement>(
let f3 = frame.idx1_next() * frame.idx0_next();

let c_i = |f_i| {
// when we are operating on elements, z_i is set to 1 for all `i` which are not being
// accessed; otherwise it is set to 0.
// z_i is set to 1 when we are operating on elements but not the i-th element
let z_i = binary_not(frame.is_word_access_next()) * binary_not(f_i);
let is_read_next = frame.is_read_next();

Expand Down
4 changes: 2 additions & 2 deletions assembly/src/assembler/instruction/mem_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ pub fn local_to_absolute_addr(
));
}

// If a single local value is being accessed, then the index can take the full range
// [0, num_proc_locals - 1]. Otherwise, the index can take the range [0, num_proc_locals - 4]
// If a single local value is being accessed, then the index can take the full range
// [0, num_proc_locals - 1]. Otherwise, the index can take the range [0, num_proc_locals - 4]
// to account for the fact that a full word is being accessed.
let max = if is_single {
num_proc_locals - 1
Expand Down
12 changes: 6 additions & 6 deletions stdlib/asm/crypto/dsa/rpo_falcon512.masm
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ end
#! Input: [c_ptr, MSG, NONCE1, NONCE0, ...]
#! Output: [...]
#!
#! Cycles: 1327
#! Cycles: ~1400
export.hash_to_point.8
# Move pointer out of the way
movdn.12
Expand Down Expand Up @@ -118,7 +118,7 @@ end
#! Input: [tau1, tau0, tau_ptr, ...]
#! Output: [tau_ptr + 513*4, ...]
#!
#! Cycles: 8323
#! Cycles: ~8900
export.powers_of_tau

# 1) Save tau^0 i.e. (0, 1)
Expand Down Expand Up @@ -150,7 +150,7 @@ end
#! Input: [ptr, ...]
#! Output: [...]
#!
#! Cycles: 2607
#! Cycles: ~3100
export.set_to_zero
padw
repeat.512
Expand Down Expand Up @@ -484,7 +484,7 @@ end
#! Input: [pi_ptr, ...]
#! Output: [norm_sq(s1), ...]
#!
#! Cycles: 58888
#! Cycles: 59000
export.compute_s1_norm_sq
repeat.128
# 1) Load the next 4 * 3 coefficients
Expand Down Expand Up @@ -561,7 +561,7 @@ end
#! Input: [s2_ptr, ...]
#! Output: [norm_sq(s2), ...]
#!
#! Cycles: 13322
#! Cycles: ~13500
export.compute_s2_norm_sq
repeat.128
padw
Expand Down Expand Up @@ -592,7 +592,7 @@ end
#! Input: [PK, MSG, ...]
#! Output: [...]
#!
#! Cycles: ~ 92029
#! Cycles: ~ 90400
export.verify.6660

# 1) Generate a Falcon signature using the secret key associated to PK on message MSG.
Expand Down

0 comments on commit 90a979e

Please sign in to comment.