From be87aefe300b52347f41fe957478d13129007a2d Mon Sep 17 00:00:00 2001 From: Thorkil Vaerge Date: Tue, 28 May 2024 17:43:18 +0200 Subject: [PATCH] fix(ZK): Ensure ZK from quotient segment openings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since we open quotient codeword in `NUM_QUOTIENT_SEGMENTS` many points, we need to add this many randomizers to keep the proofs zero-knowledge. Credit goes to Ulrich Haböck (@ulrich-haboeck) and Al-Kindi (@Al-Kindi-0). Co-authored-by: Alan Szepieniec --- triton-vm/src/stark.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/triton-vm/src/stark.rs b/triton-vm/src/stark.rs index 0e54cee4a..360981030 100644 --- a/triton-vm/src/stark.rs +++ b/triton-vm/src/stark.rs @@ -88,8 +88,9 @@ impl Stark { let num_collinearity_checks = security_level / log2_of_fri_expansion_factor; let num_out_of_domain_rows = 2; - let num_trace_randomizers = - num_collinearity_checks + num_out_of_domain_rows * x_field_element::EXTENSION_DEGREE; + let num_trace_randomizers = num_collinearity_checks + + num_out_of_domain_rows * x_field_element::EXTENSION_DEGREE + + NUM_QUOTIENT_SEGMENTS * x_field_element::EXTENSION_DEGREE; Stark { security_level,