|
16 | 16 | #show: book-page(chip.name) |
17 | 17 | #let keccak = raw(chip.name) |
18 | 18 |
|
19 | | -The #keccak chip applies the keccak permutation $kappa$ to a given memory range. |
| 19 | +The #keccak chip applies the keccak permutation $kappa$ to a given memory range; |
| 20 | +other aspects of keccak hashing (such as repeated permutation invocation, |
| 21 | +input padding and state initialization) fall outside the scope of this accelerator. |
20 | 22 |
|
21 | 23 | This permutation $kappa: FF_2^1600 -> FF_2^1600$ operates on 1600 bits and is composed of 24 applications of round-permutation $Lambda: FF_2^1600 times NN -> FF_2^1600$, where the additional parameter is the round constant. |
22 | 24 | $Lambda$ is defined as the composition $iota compose chi compose pi compose rho compose theta$, where only $iota$ depends on the round constant. |
23 | 25 | #footnote("More details on the KECCAK permutation: FIPS 202, NIST, " + link("https://csrc.nist.gov/pubs/fips/202/final")) |
24 | 26 |
|
25 | | -The keccak accelerator comprises two chips: a core chip that interacts with the memory, and a round chip that applies the round permutation. |
| 27 | +The keccak accelerator comprises two chips: a core chip that interacts with the memory --- loading the input and writing the output, and a round chip that applies the round permutation. |
26 | 28 |
|
27 | 29 |
|
28 | 30 | = Core chip |
@@ -63,11 +65,17 @@ The #keccak table can be padded to the next power of two with the following valu |
63 | 65 | The #keccak_rnd chip is comprised of #nr_variables variables that are expressed using #nr_columns columns and leverages #nr_interactions interaction(s): |
64 | 66 | #render_chip_variable_table(round_chip, config) |
65 | 67 |
|
| 68 | +#strong("Note on " + raw("start") + ".") |
| 69 | +`start` contains the state to which the permutation should be applied. |
| 70 | +It's three-dimensional array mimics the specification's three-dimensional state |
| 71 | +#footnote("FIPS 202, NIST, Section 3.1 (" + link("https://csrc.nist.gov/pubs/fips/202/final") + ")") |
| 72 | +and orders the bits as prescribed. |
| 73 | +#footnote("FIPS 202, NIST, Section B.1, Algorithm 10 (" + link("https://csrc.nist.gov/pubs/fips/202/final") + ")") |
66 | 74 |
|
67 | 75 | #strong("Note on " + raw("rnc") + " and " + raw("rbc") + ".") |
68 | 76 | Rho rotates every lane by a rotation offset in $[0, 64)$. |
69 | 77 | These offsets are identical for every round. |
70 | | -#footnote("See FIPS 202, NIST, Table 2 on page 13 for the exact offsets (" + link("https://csrc.nist.gov/pubs/fips/202/final") + ")") |
| 78 | +#footnote("FIPS 202, NIST, page 13, Table 2 (" + link("https://csrc.nist.gov/pubs/fips/202/final") + ")") |
71 | 79 | We decompose each offset in three components: the lower nibble (4 bits) are represented by `rnc`, while the upper two bits are represented by as `Bit`s in `rbc`. |
72 | 80 | That is, $#`rho_offset[x][y]` = #`rnc[x][y]` + 16 dot #`rbc[x][y][0]` + 32 dot #`rbc[x][y][1]`$. |
73 | 81 |
|
|
0 commit comments