You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/keccak.typ
+13-12Lines changed: 13 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,14 @@
15
15
#show: book-page(chip.name)
16
16
#letkeccak= raw(chip.name)
17
17
18
-
The #keccak chip applies the keccak permutation.
18
+
The #keccak chip applies the keccak permutation $kappa$ to a given memory range.
19
+
20
+
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 timesNN -> FF_2^1600$, where the additional parameter is the round constant.
21
+
$Lambda$ is defined as the composition $iotacomposechicomposepicomposerhocomposetheta$, where only $iota$ depends on the round constant.
22
+
#footnote("More details on the KECCAK permutation: FIPS 202, NIST, "+link("https://csrc.nist.gov/pubs/fips/202/final"))
23
+
24
+
The keccak accelerator comprises two chips: a core chip that interacts with the memory, and a round chip that applies the round permutation.
25
+
19
26
20
27
= Core chip
21
28
== Columns
@@ -25,27 +32,21 @@ The #keccak chip applies the keccak permutation.
25
32
The #keccak chip is comprised of #nr_variables variables that are expressed using #nr_columns columns:
26
33
#render_chip_variable_table(chip, config)
27
34
28
-
== Assumptions
29
-
30
-
// #render_chip_assumptions(chip, config)
31
-
32
35
== Constraints
33
36
In this VM, we assign syscall number -2 to the #keccak accelerator.
34
37
The chip therefore contributes the following interaction to the lookup-argument:
The address containing the state to be permuted are passed in as argument `A0 = x10`.
38
-
This address is read into `addr`, from which `state_ptr` --- the collection of pointers to all lanes of the state --- is derived.
39
-
The state is then read into `input_state`, while the `output_state` is written back to the indicated address.
40
+
The address containing the state to be permuted is passed in as argument `A0 = x10`.
41
+
The following constraints describe that this address is read into `addr` (@keccak:c:read_addr), from which `state_ptr` --- the collection of pointers to all lanes of the state --- is derived (@keccak:c:state_ptr).
42
+
The state is then read into `input_state`, while the `output_state` is written back to the indicated address (@keccack:c:load_store_state).
0 commit comments