Skip to content

Commit

Permalink
fix: Poseidon spec's sparse-factorization w vector (#1278)
Browse files Browse the repository at this point in the history
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
Co-authored-by: Ian Davis <jungziege@gmail.com>
  • Loading branch information
3 people authored Nov 1, 2024
1 parent cb7f4c5 commit 3a17120
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions content/algorithms/crypto/poseidon.md
Original file line number Diff line number Diff line change
Expand Up @@ -706,14 +706,10 @@ $\overline{\underline{\Function \textsf{sparse\_factorize}(m \typecolon \Zp^{[t
0 & m_{t - 1, 1} & \dots & m_{t - 1, t - 1}
\end{bmatrix} \\~
\\
\line{3} \wb \typecolon \Zp^{[t - 1 {\times} 1]} = \hat{m}_{\ast, 0} = \begin{bmatrix}
\hat{m}_{0, 0} \\
\line{3} \wb \typecolon \Zp^{[t - 1 {\times} 1]} = m_{1 \dotdot, 0} = \begin{bmatrix}
m_{1, 0} \\
\vdots \\
\hat{m}_{t - 2, 0}
\end{bmatrix} = m_{1 \dotdot, 1} = \begin{bmatrix}
m_{1, 1} \\
\vdots \\
m_{t - 1, 1}
m_{t - 1, 0}
\end{bmatrix} \\~
\\
\line{4} \hat\wb \typecolon \Zp^{[t - 1 {\times} 1]} = \hat{m}^{\neg 1} {\times} \hso \wb = \begin{bmatrix}
Expand All @@ -738,7 +734,7 @@ $\overline{\underline{\Function \textsf{sparse\_factorize}(m \typecolon \Zp^{[t
**Algorithm Comments:**\
**Line 1.** $\hat{m}$ is a submatrix of $m$ which excludes $m$'s first row and first column.\
**Line 2.** $m'$ is a copy of $m$ where $m$'s first row and first column have been replaced with $[1, 0, \dots, 0]$.\
**Line 3.** $\wb$ is a column vector which is the first column of $\hat{m}$ or the second column of $m$ excluding the first row's value.\
**Line 3.** $\wb$ is a column vector whose values are the first column of $m$ excluding $m$'s first row.
**Line 4.** $\hat\wb$ is the matrix-column vector product of $\hat{m}^{\neg 1}$ and $\wb$.\
**Line 5.** $m''$ is a sparse matrix whose first row is the first row of $m$, remaining first column is $\hat\wb$, and remaining entries are the identity matrix.

Expand Down

0 comments on commit 3a17120

Please sign in to comment.