CircleSTARK
Motivation
There is a trade-off between selecting finite fields that allow for:
Efficient Arithmetic Implementations: Smaller prime fields, particularly those of special forms like Mersenne primes, enable faster arithmetic operations on standard hardware architectures.
Efficient FFT Support: Fields need to have smooth multiplicative groups with large two-adic subgroups to support efficient FFTs, which are crucial for STARKs' encoding processes.
One of the most efficient fields for arithmetic seem to be Mersenne fields, defined by primes of the form . In particular, the prime enables very efficient arithmetic on 32-bit architectures. Since , a widened product encoded as is trivially reduced to a much smaller quantity, . However, as , the multiplicative group lacks two-adic subgroups, which are useful for efficient Cooley-Tukey Fast Fourier Transforms (FFTs).
Circle Group
For , a complex extension field can be defined as:
For , has a solution since by Legendre Symbol: . This means that is a quadratic residue and can be written as making not a field.
The unit circle over is the algebraic set , or in complex representation:
where denotes the conjugate of .
Lemma 1 (Unit circle group). Let be a prime field with . Then the unit circle group equals the group of -th roots of unity in , and has order .
Proof: Notice that so . Therefore, which means is set of all -th roots of unity. Since is divisible by , the unit circle group must be the unique subgroup of order .
Group Operations
The points of form a group with the group operation:
Notice that this equation resembles the and formulas and is equivalent to rotation over the unit circle.
The group has as its identity element, and for any , we shall call
the translation(rotation) by .
The squaring map with respect to the group operation is the quadratic map
and group inverses are given by the degree-one map

So you can think of as doubling the angle it forms with the -axis and as a reflection by the -axis.
Twin-coset and Standard Position Coset
First, Figure 2 shows how the subgroups would look like in the circle group.

Taking a coset of a subgroup means that each point in the subgroup will be rotated by the same amount.
Definition Let be a cyclic subgroup of of size for . Any disjoint union with is called twin-coset of size .
Remark Twin-coset maps to itself under inverse, since

Definition In the exceptional case that a twin-coset of subgroup is again a coset of the subgroup , we call a standard position coset. Lemma 3 If is a twin-coset of size then its image is a twin-coset of size . In addition, if is a standard position coset, so is .

Lemma 3 from the paper. If is a twin-coset of size then its image is a twin-coset of size . In addition, if is a standard position coset, so is .
Proof: and if is a standard position coset, then , which means is also a standard position coset.
Space of Polynomials
Definition Let be an extension field of . Over the circle curve, for any even integer we define as the space of all bi-variate polynomials with coefficients in , and of total degree at most ,
For a circle STARK the bi-variate polynomials from are what low-degree extensions are for classical univariate proofs. The crucial properties of are:
rotation invariance, which is needed for the next-neighbour relation and efficient encoding
good separability, leading to maximum distance separable codes.
Vanishing Polynomial
Definition Let be a subset of of even size , where . We call any non-zero polynomial from , which evaluates to zero over a vanishing polynomial of the set . Decomposing into pairs of points and taking the product of linear functions going through these pairs,
shows that vanishing polynomials do exist.
Given a twin-coset , using Lemma 3, we can see will result in a twin-coset of size 2. In other words, it is in the form of for some . We therefore may take
with where is the projection onto the x-axis.
And when is a standard position coset, its image is again a standard position coset and thus (see Figure 4, rightmost image). In this case and can be evaluated by only field operations (2 addition and 1 multiplication in each step).
Definition The circle code with values in and evaluation domain , is linear code with code words from the space:
Circle FFT
Definition 1 from the paper. (CFFT-friendly prime). Any prime for which is divisible by for sufficiently large , will be called CFFT-friendly, and any such is a supported order, and a supported domain size.
Definition 4 from the paper. For any integer from the interval , let denote its bit representation. The FFT-basis of order is the family of polynomials:
Consider bi-variate polynomials modulo : . Here so we can replace all by and hence, all polynomials in can be represented with polynomials with .
This means can be represented as canonical form:
And we can calculate and by:
(-folding) First step aka :
More intuitively, is taking the average of and while is the difference between them divided by .

(-folding) Next step:
This step is repeated recursively until we get constant functions of the form:
These make up a constant , for each in the interval , where .

In Figure 6, suddenly has only 4 points. This is because actually has only 4 evaluation points and is only parametrized by . It is visualized on a circle for easier group operation visualization. To elaborate:
is the average of and .
is the average of and .
But where did come from? It denotes , while is since because they are from a standard position coset.
Theorem 2 Let be a CFFT-friendly prime supporting the order , take a twin-coset of size . Given a function over with values in an extension field of , the above described algorithm outputs the coefficients , , with respect to the FFT basis , so that evaluates to over .
Low degree test over the Circle
Protocol 1 (Circle FRI). Let be a standard position coset of size , where and , and let be the circle code with rate , where . For given proximity parameter , the interactive oracle proof of a function being -close to the circle code , consists of a commit phase and a subsequent query phase, which are as follows.
COMMIT phase:
(Decomposition) The prover compute the decomposition of into with and . It sends and commitment to to the verifier.
(-folding) For :
The verifier picks uniformly random and sends it to the prover.
The prover commits to a function (In the case of an honest prover, where
(-folding) For to :
The verifier picks uniformly random and sends it to the prover.
The prover commits to a function . (In the case of an honest prover, where
where .
The prover sends a value in plain.
QUERY phase: (executed by the Verifier)
Repeat times where is the number of times you want to query to achieve target soundness:
Pick uniformly at random.
(-folding) For :
Query at and . Compute
Compute
Query at and check if
(-folding) For :
Calculate
Query at . (the value at is queried in the previous round)
Compute
Query at and check if
ACCEPT if all checks passed. REJECT otherwise
Batch Circle FRI
Protocol 2 (batch Circle FRI). Under the same assumptions as Protocol 1, the interactive oracle proof for a batch of functions having correlated -agreement to a codeword from , is as follows. In the first step, given a random challenge from the verifier, the prover computes the values of the linear combination:
over . Now, both prover and verifier run Protocol 1 on , with its query phase extended by a check of the batching at each of the queries.
CircleSTARK
In circle STARK, the trace domain is the standard position coset of a cyclic and proper subgroup of the circle curve , of size , with , and the trace is organised column-wise , each placed over the domain in the usual manner, using the group translation by a generator of for the timeline. The trace columns are interpolated by polynomials
of total degree at most , meaning that (actually, they are from the FFT-space , and these polynomials are subject to set of constraints, say
for , holding over the entire domain , where is a predefined selector polynomial.
Each constraint is a polynomial
of total degree at most the maximum number of twin-coset of size , and the degree in the selector variable is at most .
Definition. The evaluation domain is a standard position coset , of at least double the size of trace domain . The polynomials in the circle STARK will be generally committed by their values over this domain.
Lemma 2 from the paper. Let be a CFFT-friendly prime supporting the order , and denote the subgroup of order for . Then any subset of which is invariant under and can be decomposed into twin-cosets of size , for any . In particular for a standard position coset of size ,
where is an element from of order .
IOP for AIR
Now, once we have all these, the interactive oracle proof for the satisfiability of the AIR can be constructed as follows:
In the first round, the prover computes the values of its trace polynomials over the evaluation domain using its decomposition into twin-cosets and shares their oracles denoted by
with their verifier.
In the second round, the verifier sends random challenge , drawn uniformly from a suitably large extension field of , which is used to reduce the constraint polynomials into a single one:
which should hold over trace domain . To prove this, the vanishing polynomial over , , is computed so the composite constraint polynomial can now be written as:
To keep with the degree bound imposed by the size of , the quotient needs to be split into polynomials :
Recall that has dimension. On the other hand, the quotient is computed by value from those of over a union of twin-cosets of size . Thus the union is one point too small to uniquely determine a polynomial from . In our decomposition, this missing point is characterized by an additional scalar multiple of the vanishing polynomial of .
Then, the prover sets up the oracles
for their values over the evaluation domain , and sends them, together with , to the verifier.
Having all oracles in place, the next step is DEEP ALI, which reduces satisfiability of the constraints to a low-degree test on single-point quotients. (In lose terms, this step turns low-degree test into a polynomial commitment scheme.)
In this step, the verifier responds with a random point . In return, the prover opens the values for each as well as of at . Eventually, both prover and verifier engage in a low-degree test for the real and imaginary parts of the DEEP quotients:
Conclusion
The initial implementation of CircleFFT demonstrated a performance improvement by a factor of 1.4 in a single-threaded setup. Building on this foundation, Starknet’s next-generation prover, Stwo (“STARK Two”), is designed to enhance and eventually replace the current prover, Stone (“STARK One”).

Written by Batzorig Zorigoo from A41
Last updated