Skip to content

Commit 0624a30

Browse files
committed
Update proof_sch
Signed-off-by: Denis Varlakov <denis@dfns.co>
1 parent b2241cd commit 0624a30

File tree

1 file changed

+197
-62
lines changed

1 file changed

+197
-62
lines changed

spec/main.tex

+197-62
Original file line numberDiff line numberDiff line change
@@ -1265,95 +1265,230 @@ \subsubsection{Non-Interactive Version of the Proof}
12651265

12661266
\subsection{$\proof{fac}$: No Small Factor Proof}
12671267
The prover and verifier agree on shared state $\state$, auxiliary data $R_j=(N_j, s_j, t_j)$ with $s_j, t_j \in {\mathbb Z}_{N_j}^*$, and a security level~$L$.
1268-
For this proof, the prover and verifier have common input~$N_i$, and the prover additionally has primes $2^\ell < p, q < \pm 2^\ell \cdot \sqrt{N_i}$ with $N_i=pq$.
1268+
For this proof, the prover and verifier have common input~$N_i$, and the prover additionally has primes $2^\ell < p, q < 2^\ell \cdot \sqrt{N_i}$ with $N_i=pq$.
12691269
In all the cases where this proof is used in the protocol, the verifier knows the factorization of $N_j$ (and hence knows~$\sk_j$).
12701270

12711271
% \item Proof guarantees: $p_0, q_0 > 2^\ell$
12721272
% \item Implicit constraints: $2^{2\ell + \varepsilon} \approx \sqrt{N_0}$ \jnote{Would be good to formalize exactly what this means} \nnote{I aped it from the paper. It seems they mention it to reconcile the fact that sometimes they mention this proof with $2^l$ as the lower limit, and sometimes with $2^l \sqrt{N_0}$ as the upper - this way they are the same (not taking $\epsilon$ into account)}
12731273

12741274

12751275
\subsubsection{Interactive Version of the Proof}
1276-
\begin{enumerate}
1277-
\item In the first round of the protocol, the prover does the following:
1278-
1279-
\begin{itemize}
1280-
\item The prover samples the following values:
1281-
1282-
$\alpha, \beta \gets \pm \left(2^{\ell + \varepsilon} \sqrt{N_i}\right)$ \\
1283-
$\mu, \nu \gets \pm \left(2^{\ell} N_j\right)$ \\
1284-
$\sigma \gets \pm \left(2^{\ell} N_i N_j\right)$ \\
1285-
$r \gets \pm \left(2^{\ell + \varepsilon} N_i N_j\right)$ \\
1286-
$x, y \gets \pm \left(2^{\ell + \varepsilon} N_j\right)$.
12871276

1288-
\item The prover then computes:
1289-
\begin{itemize}
1290-
\item $P = s_j^{p} t_j^\mu \bmod N_j$
1291-
\item $Q = s_j^{q} t_j^\nu \bmod N_j$
1292-
\item $A = s_j^\alpha t_j^x \bmod N_j$
1293-
\item $B = s_j^\beta t_j^y \bmod N_j$
1294-
\item $T = Q^\alpha t_j^r \bmod N_j$.
1295-
\end{itemize}
1296-
Note that $P,Q,A,B$ are computed using fixed-base multiexponentiations. %(It is also possible to express computation of $T$ as a fixed-base multiexponentiation $T=(s^qt^\nu)^\alpha \cdot t^r = s^{q\alpha}t^{\nu\alpha+r} \bmod N_j$ and then use multiexp preprocessing, but I'm not sure this will be a net win.)
1297-
\item The prover sends the first message $(P, Q, A, B, T, \sigma)$
1298-
and also maintains local (secret) state $(\alpha, \beta, \mu, \nu, r, x, y)$.
1299-
\end{itemize}
1277+
\begin{description}
13001278

1301-
\item The verifier chooses $e \leftarrow \pm Q$ and sends $e$ to the prover.
1279+
\item
1280+
\begin{inlineAlgorithm}
1281+
\algoName{$\commit{fac}^L(R_j, N_i) \to ((P, Q, A, B, T, \sigma), (\alpha, \beta, \mu, \nu, r, x, y))$}
1282+
\algoInputsList{
1283+
\item security level $L = (\ell, \varepsilon, \dots)$,
1284+
\item auxiliary data $R_j = (N_j, s_j, t_j) \in \Z^3$,
1285+
\item public data $N_i \in \Z$
1286+
}
1287+
\algoOutputsList{
1288+
\item public commitment $(P, Q, A, B, T, \sigma) \in \Z^6$,
1289+
\item secret nonce $(\alpha, \beta, \mu, \nu, r, x, y) \in \Z^7$
1290+
}
1291+
\begin{algorithmic}[1]
1292+
\State $\alpha, \beta \gets \pm \left(2^{\ell + \varepsilon} \sqrt{N_i}\right)$
1293+
\State $\mu, \nu \gets \pm \left(2^{\ell} N_j\right)$
1294+
\State $\sigma \gets \pm \left(2^{\ell} N_i N_j\right)$
1295+
\State $r \gets \pm \left(2^{\ell + \varepsilon} N_i N_j\right)$
1296+
\State $x, y \gets \pm \left(2^{\ell + \varepsilon} N_j\right)$
1297+
\State
1298+
\State $P = s_j^{p} t_j^\mu \bmod N_j$
1299+
\State $Q = s_j^{q} t_j^\nu \bmod N_j$
1300+
\State $A = s_j^\alpha t_j^x \bmod N_j$
1301+
\State $B = s_j^\beta t_j^y \bmod N_j$
1302+
\Comment{$P,Q,A,B$ are computed using fixed-base multiexp}
1303+
\State $T = Q^\alpha t_j^r \bmod N_j$
1304+
\State
1305+
\State \Return $((P, Q, A, B, T, \sigma), (\alpha, \beta, \mu, \nu, r, x, y))$
1306+
\end{algorithmic}
1307+
\end{inlineAlgorithm}
13021308

1303-
\item On input $N_i$, the challenge $e$, and local state that includes $(p, q)$, $\sigma$, and
1304-
$(\alpha, \beta, \mu, \nu, r, x, y)$, the prover computes: \\
1305-
$z_1 = \alpha + ep$ \\
1306-
$z_2 = \beta + eq$ \\
1307-
$w_1 = x + e\mu$ \\
1308-
$w_2 = y + e\nu$ \\
1309-
$v = r + e \cdot (\sigma - \nu p)$,
1309+
\item
1310+
\begin{inlineAlgorithm}
1311+
\algoName{$\challenge{fac}^L() \to e$}
1312+
\algoInputs{security level $L \in (Q, \dots)$}
1313+
\algoOutputs{challenge $e \in \pm Q$}
1314+
\begin{algorithmic}[1]
1315+
\State $e \gets \pm Q$
1316+
\State \Return $e$
1317+
\end{algorithmic}
1318+
\end{inlineAlgorithm}
13101319

1311-
and sends $(z_1, z_2, w_1, w_2, v)$ to the verifier.
1320+
\item
1321+
\begin{inlineAlgorithm}
1322+
\algoName{$\prove{fac}(
1323+
e;
1324+
(p, q),
1325+
(\alpha, \beta, \mu, \nu, r, x, y)
1326+
) \to (z_1, z_2, w_1, w_2, v)$}
1327+
\algoInputsList{
1328+
\item challenge $e \in \Z$,
1329+
\item secret data: primes $p, q \in \Z^2$,
1330+
\item secret commitment nonce: $(\alpha, \beta, \mu, \nu, r, x, y) \in \Z^7$
1331+
}
1332+
\algoOutputs{proof $(z_1, z_2, w_1, w_2, v) \in \Z^5$}
1333+
\begin{algorithmic}[1]
1334+
\State $z_1 = \alpha + ep$
1335+
\State $z_2 = \beta + eq$
1336+
\State $w_1 = x + e\mu$
1337+
\State $w_2 = y + e\nu$
1338+
\State $v = r + e \cdot (\sigma - \nu p)$
1339+
\State \Return $(z_1, z_2, w_1, w_2, v)$
1340+
\end{algorithmic}
1341+
\end{inlineAlgorithm}
13121342

1313-
\item Given $N_i$, initial message $(P, Q, A, B, T, \sigma)$, challenge $e$, and response $(z_1, z_2, w_1, w_2, v)$, the verifier accepts if and only if the following are true: \begin{itemize}
1314-
\item $s_j^{z_1} t_j^{w_1} = A \cdot P^e \bmod N_j$
1315-
\item $s_j^{z_2} t_j^{w_2} = B \cdot Q^e \bmod N_j$
1316-
\item $Q^{z_1} t_j^{v} = T \cdot (s_j^{N_i} t_j^\sigma)^e \bmod N_j$
1317-
\item $z_1 \in \pm \left(2^{\ell + \varepsilon} \sqrt{N_i}\right)$
1318-
\item $z_2 \in \pm \left(2^{\ell + \varepsilon} \sqrt{N_i}\right)$.
1319-
\end{itemize}
1320-
Note that the 1st and 2nd checks involve fixed-base multiexponentiations.
1343+
\item
1344+
\begin{inlineAlgorithm}
1345+
\algoName{$\verify{fac}^L(
1346+
R_j,
1347+
N_i,
1348+
(P, Q, A, B, T, \sigma),
1349+
e,
1350+
(z_1, z_2, w_1, w_2, v)
1351+
)$}
1352+
\algoInputsList{
1353+
\item auxiliary data $R_j = (N_j, s_j, t_j) \in \Z^3$,
1354+
\item public data $N_i \in \Z$,
1355+
\item commitment $(P, Q, A, B, T, \sigma) \in \Z^6$,
1356+
\item challenge $e \in \Z$,
1357+
\item proof $(z_1, z_2, w_1, w_2, v) \in \Z^5$
1358+
}
1359+
\algoOutputs{aborts if proof is invalid}
1360+
\begin{algorithmic}[1]
1361+
\State $s_j^{z_1} t_j^{w_1} \? = A \cdot P^e \bmod N_j$
1362+
\State $s_j^{z_2} t_j^{w_2} \? = B \cdot Q^e \bmod N_j$
1363+
\Comment{This and previous expressions involve fixed-base multiexp}
1364+
\State $Q^{z_1} t_j^{v} \? = T \cdot (s_j^{N_i} t_j^\sigma)^e \bmod N_j$
1365+
\State $z_1 \? \in \pm \left(2^{\ell + \varepsilon} \sqrt{N_i}\right)$
1366+
\State $z_2 \? \in \pm \left(2^{\ell + \varepsilon} \sqrt{N_i}\right)$
1367+
\end{algorithmic}
1368+
\end{inlineAlgorithm}
13211369

1322-
\end{enumerate}
1370+
\end{description}
13231371

13241372
\subsubsection{Non-Interactive Version of the Proof}
13251373

1326-
\begin{itemize}
1327-
\item We deterministically derive a challenge from inputs that include shared $\state$, the auxiliary data~$R_j$, the common input~$N_i$, and the initial protocol message~$(P, Q, A, B, T, \sigma)$.
1328-
We write the resulting function as
1329-
$e=\challengeni{fac}^{L} (\state, R_j, N_i, (P, Q, A, B, T, \sigma))$.
1330-
1331-
1374+
\begin{description}
13321375

1333-
\item A proof is computed as follows: compute initial message $(P, Q, A, B, T, \sigma)$ as described above; compute $e=\challengeni{fac}^{L} (\state, R_j, N_i, (P, Q, A, B, T, \sigma))$; next compute $(z_1, z_2, w_1, w_2, v)$ as described above, using challenge~$e$. Output the proof $((P, Q, A, B, T, \sigma), (z_1, z_2, w_1, w_2, v))$. We write the resulting function as $\proveni{fac}^{L}(\state, R_j, N_i, (p_i, q_i))$.
1376+
\item
1377+
\begin{inlineAlgorithm}
1378+
\algoName{$\proveni{fac}^L(\state, R_j, N_i; (p, q))
1379+
\to ((P, Q, A, B, T, \sigma); (z_1, z_2, w_1, w_2, v))$}
1380+
\algoInputsList{
1381+
\item security level $L = (Q, \dots)$,
1382+
\item shared $\state \in \Bit^*$,
1383+
\item auxiliary data $R_j$,
1384+
\item public data $N_i \in \Z$,
1385+
\item secret data: primes $p, q \in \Z^2$
1386+
}
1387+
\algoOutputsList{
1388+
\item commitment $(P, Q, A, B, T, \sigma) \in \Z^6$,
1389+
\item proof $(z_1, z_2, w_1, w_2, v) \in \Z^5$
1390+
}
1391+
\begin{algorithmic}[1]
1392+
\State $((P, Q, A, B, T, \sigma), (\alpha, \beta, \mu, \nu, r, x, y))
1393+
\gets \commit{fac}^L(R_j, N_i)$
1394+
\State $e \in \pm Q = \challengeni{fac}^L(\state, R_j, N_i, (P, Q, A, B, T, \sigma))$
1395+
\State $(z_1, z_2, w_1, w_2, v) = \prove{fac}(
1396+
e;
1397+
(p, q),
1398+
(\alpha, \beta, \mu, \nu, r, x, y)
1399+
)$
1400+
\State \Return $((P, Q, A, B, T, \sigma), (z_1, z_2, w_1, w_2, v))$
1401+
\end{algorithmic}
1402+
\end{inlineAlgorithm}
13341403

1335-
\item A party verifies a proof $\phi=((P, Q, A, B, T, \sigma), (z_1, z_2, w_1, w_2, v))$ by first computing \[e=\challengeni{fac}^{L} (\state, R_j, N_i, (P, Q, A, B, T, \sigma))\] and then verifying as described above, using the challenge~$e$. We write the resulting function as $\verifyni{fac}^{L}(\state, R_j, N_i, \phi)$.
1404+
\item
1405+
\begin{inlineAlgorithm}
1406+
\algoName{$\proveni{fac}^L(\state, R_j, N_i, ((P, Q, A, B, T, \sigma), (z_1, z_2, w_1, w_2, v)))$}
1407+
\algoInputsList{
1408+
\item security level $L = (Q, \dots)$,
1409+
\item shared $\state \in \Bit^*$,
1410+
\item auxiliary data $R_j$,
1411+
\item public data $N_i \in \Z$,
1412+
\item non-interactive proof, consisting of:
1413+
\begin{itemize}
1414+
\item commitment $(P, Q, A, B, T, \sigma) \in \Z^6$,
1415+
\item proof $(z_1, z_2, w_1, w_2, v) \in \Z^5$
13361416
\end{itemize}
1417+
}
1418+
\algoOutputs{aborts if proof is invalid}
1419+
\begin{algorithmic}[1]
1420+
\State $e \in \pm Q = \challengeni{fac}^L(\state, R_j, N_i, (P, Q, A, B, T, \sigma))$
1421+
\State Assert $\verify{fac}^L(
1422+
R_j,
1423+
N_i,
1424+
(P, Q, A, B, T, \sigma),
1425+
e,
1426+
(z_1, z_2, w_1, w_2, v)
1427+
)$
1428+
\end{algorithmic}
1429+
\end{inlineAlgorithm}
13371430

1431+
\end{description}
13381432

13391433
\subsection{\proof{sch}: Schnorr Proof of Knowledge}
13401434
We describe the standard Schnorr proof of knowledge, and also set up notation that we will use in what follows.
1341-
\begin{itemize}
1342-
\item $\commit{sch}() \to (A; \alpha)$ \\
1343-
$\alpha \gets \Z_q \\
1344-
A = \alpha \cdot G$ \\
1345-
return $(A, \alpha)$
13461435

1347-
\item $\challenge{sch}() \to e$ \\
1348-
return $e \gets \Z_q$
1436+
\begin{description}
13491437

1350-
\item $\prove{sch}(\alpha, e, x) \to z$ \\
1351-
return $z = \alpha + e x \bmod q$
1438+
\item
1439+
\begin{inlineAlgorithm}
1440+
\algoName{$\commit{sch}() \to (A; \alpha)$}
1441+
\algoInputs{—}
1442+
\algoOutputs{public commitment $A \in \E$ and secret nonce $\alpha \in \Z_q$}
1443+
\begin{algorithmic}[1]
1444+
\State $\alpha \gets \Z_q$
1445+
\State $A = \alpha \cdot G$
1446+
\State \Return $(A; \alpha)$
1447+
\end{algorithmic}
1448+
\end{inlineAlgorithm}
13521449

1353-
\item $\verify{sch}(z, A, e, X)$ \\
1354-
accept iff $z \cdot G = A + e \cdot X$.
1355-
\end{itemize}
1450+
\item
1451+
\begin{inlineAlgorithm}
1452+
\algoName{$\challenge{sch}() \to e$}
1453+
\algoInputs{—}
1454+
\algoOutputs{challenge $e \in \Z_q$}
1455+
\begin{algorithmic}[1]
1456+
\State $e \gets \Z_q$
1457+
\State \Return $e$
1458+
\end{algorithmic}
1459+
\end{inlineAlgorithm}
1460+
1461+
\item
1462+
\begin{inlineAlgorithm}
1463+
\algoName{$\prove{sch}(e; \alpha, x) \to z$}
1464+
\algoInputsList{
1465+
\item challenge $e \in \Z_q$,
1466+
\item secret commitment nonce $\alpha \in \Z_q$,
1467+
\item secret data: $x \in \Z_q$
1468+
}
1469+
\algoOutputs{proof $z \in \Z_q$}
1470+
\begin{algorithmic}[1]
1471+
\State $z = \alpha + e x \bmod q$
1472+
\State \Return $z$
1473+
\end{algorithmic}
1474+
\end{inlineAlgorithm}
13561475

1476+
\item
1477+
\begin{inlineAlgorithm}
1478+
\algoName{$\verify{sch}(X, A, e, z)$}
1479+
\algoInputsList{
1480+
\item public data $X \in \E$,
1481+
\item public commitment $A \in \E$,
1482+
\item challenge $e \in \Z_q$,
1483+
\item proof $z \in \Z_q$
1484+
}
1485+
\algoOutputs{aborts if proof is invalid}
1486+
\begin{algorithmic}[1]
1487+
\State $z \cdot G \? = A + e \cdot X$
1488+
\end{algorithmic}
1489+
\end{inlineAlgorithm}
1490+
1491+
\end{description}
13571492

13581493
\section{Threshold Protocols}
13591494

0 commit comments

Comments
 (0)