Skip to content

Commit d246350

Browse files
committed
spec/keccak: ref to sections in FIPS202 on state endianness
1 parent 4a8ca72 commit d246350

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

spec/keccak.typ

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@
1616
#show: book-page(chip.name)
1717
#let keccak = raw(chip.name)
1818

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.
2022

2123
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.
2224
$Lambda$ is defined as the composition $iota compose chi compose pi compose rho compose theta$, where only $iota$ depends on the round constant.
2325
#footnote("More details on the KECCAK permutation: FIPS 202, NIST, " + link("https://csrc.nist.gov/pubs/fips/202/final"))
2426

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.
2628

2729

2830
= Core chip
@@ -63,11 +65,17 @@ The #keccak table can be padded to the next power of two with the following valu
6365
The #keccak_rnd chip is comprised of #nr_variables variables that are expressed using #nr_columns columns and leverages #nr_interactions interaction(s):
6466
#render_chip_variable_table(round_chip, config)
6567

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") + ")")
6674

6775
#strong("Note on " + raw("rnc") + " and " + raw("rbc") + ".")
6876
Rho rotates every lane by a rotation offset in $[0, 64)$.
6977
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") + ")")
7179
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`.
7280
That is, $#`rho_offset[x][y]` = #`rnc[x][y]` + 16 dot #`rbc[x][y][0]` + 32 dot #`rbc[x][y][1]`$.
7381

0 commit comments

Comments
 (0)