Skip to content

Commit 31a7a9b

Browse files
committed
fix: use F+E mixed addition instead of F*E(1) for bus_id promotion
1 parent 0cf9d0d commit 31a7a9b

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

prover/src/lib.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,10 +438,9 @@ pub(crate) fn compute_commit_bus_offset(
438438
}
439439

440440
let alpha_sq = alpha * alpha;
441-
let bus_id = FieldElement::<F>::from(BusId::Commit as u64);
442-
// Negate once: fingerprint = z - lc = -(lc - z) but we compute z - lc directly
443-
// by precomputing z_minus_bus = z - bus_id (F×E mixed subtraction)
444-
let z_minus_bus = z - bus_id * FieldElement::<E>::one();
441+
let neg_bus_id = -FieldElement::<F>::from(BusId::Commit as u64);
442+
// z - bus_id = z + (-bus_id), using F + E mixed addition
443+
let z_minus_bus = neg_bus_id + z;
445444
let mut fingerprints: Vec<FieldElement<E>> = public_output
446445
.iter()
447446
.enumerate()

0 commit comments

Comments
 (0)