Skip to main content

Module shared_challenge

Module shared_challenge 

Source
Expand description

Shared-challenge sampling across constraint families.

With multiple field families active (one Q[X] family over a sampled prime $q_0$, plus one F_q[X] family per declared prime $q_1, \ldots, q_n$), every protocol-level challenge is sampled once as an integer in $[0, q^)$ — where $q^ := \min(q_0, q_1, \ldots, q_n)$ — and then projected into each family’s field via the family’s config. Because each shared integer is strictly less than every $q_i$, the per-family projection is a type cast: all families see the same integer value, just typed in different fields.

The functions in this module are independent of the MultiDegreeSumcheck / IdealCheck / CombinedPolyResolver / etc. interfaces: they produce Vec<F> (one entry per family). The caller distributes the per-family lifts to the appropriate sub-protocol invocations.

Functions§

compute_q_star_idx
Compute the index of $q^* := \min$ in prime_cfgs (the family whose modulus is smallest).
sample_shared_field_challenge
Sample one shared integer challenge in $[0, q^*)$ from the transcript and return it lifted into each per-family field.
sample_shared_field_challenges
Sample n shared integer challenges in $[0, q^*)$ and return the result as a per-family matrix: outer length prime_cfgs.len(), inner length n. Entry [i][k] is the $k$-th shared integer typed in $F_{q_i}$.