mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-08 20:40:31 +00:00
book: Render gtab and invtab as matrices
This commit is contained in:
parent
b148c34c10
commit
6717594c46
1 changed files with 12 additions and 7 deletions
|
|
@ -269,13 +269,18 @@ Let $x_3 = uv^2, x_2 = x_3^{2^8}, x_1 = x_2^{2^8}, x_0 = x_1^{2^8}.$
|
||||||
|
|
||||||
#### Precompute the following tables:
|
#### Precompute the following tables:
|
||||||
$$
|
$$
|
||||||
\begin{array}{l}
|
gtab = \begin{bmatrix}
|
||||||
gtab[0] = g^0, g^1, ..., g^{255} \\
|
g^0 & g^1 & ... & g^{255} \\
|
||||||
gtab[1] = (g^{2^8})^0, (g^{2^8})^1, ..., (g^{2^8})^{255} \\
|
(g^{2^8})^0 & (g^{2^8})^1 & ... & (g^{2^8})^{255} \\
|
||||||
gtab[2] = (g^{2^{16}})^0, (g^{2^{16}})^1, ..., (g^{2^{16}})^{255} \\
|
(g^{2^{16}})^0 & (g^{2^{16}})^1 & ... & (g^{2^{16}})^{255} \\
|
||||||
gtab[3] = (g^{2^{24}})^0, (g^{2^{24}})^1, ..., (g^{2^{24}})^{255} \\
|
(g^{2^{24}})^0 & (g^{2^{24}})^1 & ... & (g^{2^{24}})^{255}
|
||||||
invtab = (g^{2^{-24}})^0, (g^{2^{-24}})^1, ..., (g^{2^{-24}})^{255} \\
|
\end{bmatrix}
|
||||||
\end{array}
|
$$
|
||||||
|
|
||||||
|
$$
|
||||||
|
invtab = \begin{bmatrix}
|
||||||
|
(g^{2^{-24}})^0 & (g^{2^{-24}})^1 & ... & (g^{2^{-24}})^{255}
|
||||||
|
\end{bmatrix}
|
||||||
$$
|
$$
|
||||||
|
|
||||||
### i = 0, 1
|
### i = 0, 1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue