Skip to content

Commit dfb162a

Browse files
committed
docs: publish generalized ring-switching .tex source
1 parent c308034 commit dfb162a

3 files changed

Lines changed: 160 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Ring Switching Note PDF
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths:
7+
- 'misc/ring-switching.tex'
8+
- '.github/workflows/ring-switching.yml'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
14+
concurrency:
15+
group: ring-switching-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build-pdf:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Compile LaTeX
24+
uses: xu-cheng/latex-action@v3
25+
with:
26+
working_directory: misc
27+
root_file: ring-switching.tex
28+
- name: Publish PDF as release asset
29+
if: github.event_name != 'pull_request'
30+
uses: softprops/action-gh-release@v2
31+
with:
32+
tag_name: ring-switching-latest
33+
name: Latest ring switching note PDF
34+
body: Auto-built from `misc/ring-switching.tex` on every push to `main`.
35+
make_latest: false
36+
files: misc/ring-switching.pdf
-160 KB
Binary file not shown.

misc/ring-switching.tex

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
\documentclass[11pt]{article}
2+
\usepackage[margin=1in]{geometry}
3+
\usepackage{amsmath,amssymb}
4+
\usepackage{xcolor}
5+
\usepackage[colorlinks=true,linkcolor=blue!50!black,citecolor=blue!50!black,urlcolor=blue!50!black]{hyperref}
6+
7+
\newcommand{\F}{\mathbb{F}}
8+
\newcommand{\eq}{\mathrm{eq}}
9+
\newcommand{\pkd}{\mathrm{packed}}
10+
11+
\title{\textbf{Ring switching, generalized}}
12+
13+
\author{}
14+
\date{}
15+
16+
\begin{document}
17+
\maketitle
18+
\vspace{-3em}
19+
\begin{center}
20+
How to transform a PCS for $\F_{2^f}$ into a PCS for $\F_{2^e}$, for arbitrary $e$ and $f$.
21+
\end{center}
22+
23+
\paragraph{Goal.} We want $f$ \emph{bit}-valued multilinears $P_1,\dots,P_f:\{0,1\}^m\to\{0,1\}$ over the same $m$ variables, to be committed through a dense PCS over the \emph{packing} field $\F_{2^f}$ (if we can commit to bits, we can trivially commit in any extension). The evaluation claims, however, arrive over a \emph{different} field: at an opening point $r\in\F_{2^e}^m$ we are given $P_i(r)=\alpha_i\in\F_{2^e}$. Ring switching~\cite{DP26} packs the $f$ polynomials into one $\F_{2^f}$-dense polynomial and reduces the $f$ claims to a single claim on it. The two extension degrees, $f$ (packing) and $e$ (opening), are unrelated (not necessarily a sub-field / extension-field).
24+
25+
\paragraph{Packing.} Fix an $\F_2$-basis $\{b^{F}_i\}_{i=1}^f$ of $\F_{2^f}$. Consider the multilinear polynomial:
26+
\[
27+
P_\pkd(y)=\sum_{i=1}^f P_i(y)\,b^{F}_i,\qquad y\in\{0,1\}^m,
28+
\]
29+
dense over $\F_{2^f}$, which we commit to.
30+
31+
\paragraph{Reduction.} The claims share a \emph{common} point $r\in\F_{2^e}^m$; each is
32+
\[
33+
\alpha_i=P_i(r)=\sum_{y\in\{0,1\}^m}\eq(r,y)\,P_i(y),
34+
\]
35+
with bits $P_i(y)$ and weights $\eq(r,y)\in\F_{2^e}$. Fix an $\F_2$-basis $\{b^{E}_w\}_{w=1}^e$ of the \emph{opening} field $\F_{2^e}$ and expand the weights, $\eq(r,y)=\sum_{w=1}^e A(y,w)\,b^{E}_w$, with $A:\{0,1\}^m\times[e]\to\F_2$ public, multilinear in $y$ for each fixed $w$, with efficiently computable MLE (see \nameref{section:eval_B} below). Substituting and pulling out the basis,
36+
\[
37+
\alpha_i=\sum_{w=1}^eb^{E}_w\underbrace{\sum_{y\in\{0,1\}^m}A(y,w)\,P_i(y)}_{\in\,\F_2},
38+
\]
39+
so the $w$-th $\F_2$-coordinate of $\alpha_i$ is $\alpha_{w,i}=\sum_{y\in\{0,1\}^m}A(y,w)\,P_i(y)$. Now recombine \emph{across $i$} with the \emph{packing} basis $\{b^{F}_i\}$: define, for each $w \in \{1,\dots,e\}$,
40+
\[
41+
t_w:=\sum_{i=1}^f\alpha_{w,i}\,b^{F}_i=\sum_{y\in\{0,1\}^m}A(y,w)\underbrace{\sum_{i=1}^fP_i(y)\,b^{F}_i}_{=\,P_\pkd(y)}=\sum_{y\in\{0,1\}^m}A(y,w)\,P_\pkd(y)\ \in\ \F_{2^f}
42+
\]
43+
one claim per $w$, now purely about the packed polynomial $P_\pkd$ over $\F_{2^f}$ and public $A$. Batch these $e$ claims with powers of a random $\gamma\leftarrow\F_{2^f}$ into a single sumcheck on $\sum_{y\in\{0,1\}^m}B(y)\,P_\pkd(y)=\sum_{w=1}^e\gamma^w t_w$, with $B(y)=\sum_{w=1}^e\gamma^w A(y,w)$. Its output is the packed claim $P_\pkd(r')=\alpha'$ at a point $r'\in\F_{2^f}^m$ (plus a $B(r')$ the verifier computes itself). Done.
44+
45+
\paragraph{Soundness.} Suppose the input is wrong: $\alpha_i\neq P_i(r)$ for some $i$, against the committed $P_\pkd$. Then the reduction outputs a correct packed claim $P_\pkd(r')=\alpha'$ with probability at most
46+
\[
47+
\underbrace{\frac{e}{2^f}}_{\text{batching}}\;+\;\underbrace{\frac{2m}{2^f}}_{\text{sumcheck}}\;=\;\frac{2m+e}{2^f},
48+
\]
49+
50+
Proof:
51+
52+
\begin{enumerate}
53+
\item The map $(\alpha_i)_{i=1}^f\mapsto(t_w)_{w=1}^e$ is a \emph{bijection} $\F_{2^e}^f\to\F_{2^f}^e$. So a wrong input forces, with certainty, $t_w\neq\sum_{y\in\{0,1\}^m}A(y,w)\,P_\pkd(y)$ for some $w$.
54+
\item By Schwartz--Zippel, $\sum_{w=1}^e\gamma^w t_w$ then differs from $\sum_{y\in\{0,1\}^m}B(y)\,P_\pkd(y)$ except with probability $\le e/2^f$ over $\gamma\leftarrow\F_{2^f}$.
55+
\item Sumcheck started from this false value (summand of degree $2$, over $m$ variables) ends at a correct claim $P_\pkd(r')=\alpha'$ with probability $\le 2m/2^f$.
56+
\end{enumerate}
57+
58+
\phantomsection
59+
\section*{Evaluating $B$}
60+
\label{section:eval_B}
61+
62+
It remains to compute $B(r')$, where $B(y)=\sum_{w=1}^e\gamma^w A(y,w)$ and $A(y,w)\in\F_2$ is the $w$-th coordinate of $\eq(r,y)$, i.e.\ $\eq(r,y)=\sum_{w=1}^e A(y,w)\,b^E_w$. Following~\cite{Flock}, this gives $B$ a closed form on the hypercube. Let $\Phi:\F_{2^e}\to\F_{2^f}$ be the $\F_2$-linear map with $\Phi(b^E_w)=\gamma^w$. For every $y\in\{0,1\}^m$:
63+
\[
64+
\Phi\big(\eq(r,y)\big)=\Phi\Big(\sum_{w=1}^e A(y,w)\,b^E_w\Big)=\sum_{w=1}^e A(y,w)\,\Phi(b^E_w)=\sum_{w=1}^e A(y,w)\,\gamma^w=B(y).
65+
\]
66+
So on the hypercube $B$ is ``compute $\eq(r,y)\in\F_{2^e}$, then apply $\Phi$''.
67+
68+
\paragraph{Closed form.} Two elementary facts do all the work.
69+
70+
\emph{Fact 1 ($\eq$ in characteristic $2$).} In each factor of $\eq$ the two $x_jy_j$ terms cancel:
71+
\[
72+
\eq(x,y)=\prod_{j=1}^m\bigl(x_jy_j+(1+x_j)(1+y_j)\bigr)=\prod_{j=1}^m(1+x_j+y_j).
73+
\]
74+
75+
\emph{Fact 2 (linear maps are sums of squarings).} View $\Phi$ as mapping into $L=\F_{2^{\mathrm{lcm}(e,f)}}$, the smallest field containing both $\F_{2^e}$ and $\F_{2^f}$ (for $e=f$: $L=\F_{2^e}$, nothing to embed). Squaring is additive in characteristic $2$, so any \emph{linearized polynomial}~\cite{WikiLinPoly}
76+
\[
77+
a\;\mapsto\;c_0\,a+c_1\,a^2+c_2\,a^4+\dots+c_{e-1}\,a^{2^{e-1}},\qquad c_k\in L,
78+
\]
79+
is an $\F_2$-linear map $\F_{2^e}\to L$. We claim $\Phi$ is of this form, and find the $c_k$ by writing out what $\Phi$ must do on the basis, $\Phi(b^E_w)=\gamma^w$:
80+
\[
81+
\sum_{k=0}^{e-1}\bigl(b^E_w\bigr)^{2^k}c_k=\gamma^w,\qquad w=1,\dots,e:
82+
\]
83+
$e$ linear equations in the $e$ unknowns $c_k$. The coefficient matrix $\bigl((b^E_w)^{2^k}\bigr)_{w,k}$ is a \emph{Moore matrix}, invertible exactly because the $b^E_w$ are $\F_2$-linearly independent~\cite{WikiMoore}, so the $c_k$ exist and are unique; the resulting linearized polynomial agrees with $\Phi$ on an $\F_2$-basis, hence (both being $\F_2$-linear) everywhere. The matrix depends only on the basis, not on $\gamma$: invert it once and for all; each reduction then reads off its $(c_k)_{k<e}$ by one matrix-vector product, $O(e^2)$ multiplications.
84+
85+
Now compute. Squaring respects sums and products and fixes bits ($y_j^2=y_j$), so on the hypercube, by Fact~1,
86+
\[
87+
\eq(r,y)^{2^k}=\prod_{j=1}^m(1+r_j+y_j)^{2^k}=\prod_{j=1}^m\bigl(1+r_j^{2^k}+y_j\bigr)=\eq\bigl(r^{2^k},y\bigr),
88+
\qquad r^{2^k}:=\bigl(r_1^{2^k},\dots,r_m^{2^k}\bigr).
89+
\]
90+
Since $B$ is multilinear, evaluating it at $r'$ and expanding with Fact~2:
91+
\[
92+
B(r')=\sum_{y\in\{0,1\}^m}B(y)\,\eq(r',y)
93+
=\sum_{y\in\{0,1\}^m}\Phi\bigl(\eq(r,y)\bigr)\,\eq(r',y)
94+
=\sum_{k<e}c_k\sum_{y\in\{0,1\}^m}\eq\bigl(r^{2^k},y\bigr)\,\eq(r',y).
95+
\]
96+
The inner sum evaluates, at $r'$, the multilinear extension of $y\mapsto\eq(r^{2^k},y)$, which is $\eq(r^{2^k},\cdot\,)$ itself. So it collapses to $\eq(r^{2^k},r')$, and by Fact~1 again:
97+
\[
98+
\boxed{\ \
99+
B(r') \;=\; \sum_{k<e}\, c_k \prod_{j=1}^m
100+
\bigl( 1 + r_j^{2^k} + r'_j \bigr).
101+
\ \ }
102+
\]
103+
104+
\paragraph{Cost.} Level $k$ needs one squaring per coordinate (to get $r_j^{2^k}$ from $r_j^{2^{k-1}}$) and one $m$-factor product: $O(em)$ multiplications in $L$, on top of the $O(e^2)$ for the $c_k$: plain field arithmetic throughout, no bit decompositions.
105+
106+
\section*{Remarks}
107+
108+
\begin{enumerate}
109+
\item \emph{Small $\F_{2^f}$.} If $2^f$ is too small for the error $(2m+e)/2^f$, sample $\gamma$ (and run the sumcheck) in an extension $L\supseteq\F_{2^f}$: the error becomes $(2m+e)/|L|$, and $P_\pkd$ is just opened at $r'\in L^m$.
110+
\item \emph{Any field.} Nothing uses characteristic $2$: replace $\F_2$ by any field $K$ and $\F_{2^f},\F_{2^e}$ by degree-$f$ and degree-$e$ extensions of $K$; the reduction still works, and efficient algorithms for evaluating $B$ exist in general too.
111+
\end{enumerate}
112+
113+
\section*{Credits}
114+
115+
The idea of generalizing Ring-Switching, originally described in \cite{DP26}, to arbitrary extension degrees (non necessarily powers of two), comes from Lev Soukhanov, \textit{[[alloc]init]}.
116+
117+
\begin{thebibliography}{9}
118+
\bibitem{DP26} Benjamin E. Diamond and Jim Posen. Polylogarithmic proofs for multilinears over binary towers. In \emph{Advances in Cryptology -- EUROCRYPT 2026}, pages 3--32. Springer, 2026.
119+
\bibitem{Flock} Benedikt B\"unz, Ron Rothblum, and William Wang. Flock: Fast proving for batch Boolean computations. Cryptology ePrint Archive, Paper 2026/1329, 2026. \url{https://eprint.iacr.org/2026/1329}.
120+
\bibitem{WikiLinPoly} Wikipedia. Linearised polynomial. \url{https://en.wikipedia.org/wiki/Linearised_polynomial}.
121+
\bibitem{WikiMoore} Wikipedia. Moore matrix. \url{https://en.wikipedia.org/wiki/Moore_matrix}.
122+
\end{thebibliography}
123+
124+
\end{document}

0 commit comments

Comments
 (0)