28 C::keccakf1600_state_in_00,
29 C::keccakf1600_state_in_01,
30 C::keccakf1600_state_in_02,
31 C::keccakf1600_state_in_03,
32 C::keccakf1600_state_in_04,
35 C::keccakf1600_state_in_10,
36 C::keccakf1600_state_in_11,
37 C::keccakf1600_state_in_12,
38 C::keccakf1600_state_in_13,
39 C::keccakf1600_state_in_14,
42 C::keccakf1600_state_in_20,
43 C::keccakf1600_state_in_21,
44 C::keccakf1600_state_in_22,
45 C::keccakf1600_state_in_23,
46 C::keccakf1600_state_in_24,
49 C::keccakf1600_state_in_30,
50 C::keccakf1600_state_in_31,
51 C::keccakf1600_state_in_32,
52 C::keccakf1600_state_in_33,
53 C::keccakf1600_state_in_34,
56 C::keccakf1600_state_in_40,
57 C::keccakf1600_state_in_41,
58 C::keccakf1600_state_in_42,
59 C::keccakf1600_state_in_43,
60 C::keccakf1600_state_in_44,
69 C::keccakf1600_theta_xor_01,
70 C::keccakf1600_theta_xor_02,
71 C::keccakf1600_theta_xor_03,
72 C::keccakf1600_theta_xor_row_0,
75 C::keccakf1600_theta_xor_11,
76 C::keccakf1600_theta_xor_12,
77 C::keccakf1600_theta_xor_13,
78 C::keccakf1600_theta_xor_row_1,
81 C::keccakf1600_theta_xor_21,
82 C::keccakf1600_theta_xor_22,
83 C::keccakf1600_theta_xor_23,
84 C::keccakf1600_theta_xor_row_2,
87 C::keccakf1600_theta_xor_31,
88 C::keccakf1600_theta_xor_32,
89 C::keccakf1600_theta_xor_33,
90 C::keccakf1600_theta_xor_row_3,
93 C::keccakf1600_theta_xor_41,
94 C::keccakf1600_theta_xor_42,
95 C::keccakf1600_theta_xor_43,
96 C::keccakf1600_theta_xor_row_4,
104 C::keccakf1600_theta_xor_row_rotl1_0,
105 C::keccakf1600_theta_xor_row_rotl1_1,
106 C::keccakf1600_theta_xor_row_rotl1_2,
107 C::keccakf1600_theta_xor_row_rotl1_3,
108 C::keccakf1600_theta_xor_row_rotl1_4,
115 C::keccakf1600_theta_xor_row_msb_0,
116 C::keccakf1600_theta_xor_row_msb_1,
117 C::keccakf1600_theta_xor_row_msb_2,
118 C::keccakf1600_theta_xor_row_msb_3,
119 C::keccakf1600_theta_xor_row_msb_4,
126 C::keccakf1600_theta_xor_row_low63_0,
127 C::keccakf1600_theta_xor_row_low63_1,
128 C::keccakf1600_theta_xor_row_low63_2,
129 C::keccakf1600_theta_xor_row_low63_3,
130 C::keccakf1600_theta_xor_row_low63_4,
137 C::keccakf1600_theta_combined_xor_0,
138 C::keccakf1600_theta_combined_xor_1,
139 C::keccakf1600_theta_combined_xor_2,
140 C::keccakf1600_theta_combined_xor_3,
141 C::keccakf1600_theta_combined_xor_4,
149 C::keccakf1600_state_theta_00,
150 C::keccakf1600_state_theta_01,
151 C::keccakf1600_state_theta_02,
152 C::keccakf1600_state_theta_03,
153 C::keccakf1600_state_theta_04,
156 C::keccakf1600_state_theta_10,
157 C::keccakf1600_state_theta_11,
158 C::keccakf1600_state_theta_12,
159 C::keccakf1600_state_theta_13,
160 C::keccakf1600_state_theta_14,
163 C::keccakf1600_state_theta_20,
164 C::keccakf1600_state_theta_21,
165 C::keccakf1600_state_theta_22,
166 C::keccakf1600_state_theta_23,
167 C::keccakf1600_state_theta_24,
170 C::keccakf1600_state_theta_30,
171 C::keccakf1600_state_theta_31,
172 C::keccakf1600_state_theta_32,
173 C::keccakf1600_state_theta_33,
174 C::keccakf1600_state_theta_34,
177 C::keccakf1600_state_theta_40,
178 C::keccakf1600_state_theta_41,
179 C::keccakf1600_state_theta_42,
180 C::keccakf1600_state_theta_43,
181 C::keccakf1600_state_theta_44,
190 C::keccakf1600_state_theta_hi_01, C::keccakf1600_state_theta_hi_02, C::keccakf1600_state_theta_hi_03,
191 C::keccakf1600_state_theta_hi_04, C::keccakf1600_state_theta_hi_10, C::keccakf1600_state_theta_hi_11,
192 C::keccakf1600_state_theta_hi_12, C::keccakf1600_state_theta_hi_13, C::keccakf1600_state_theta_hi_14,
193 C::keccakf1600_state_theta_hi_20, C::keccakf1600_state_theta_hi_21, C::keccakf1600_state_theta_hi_22,
194 C::keccakf1600_state_theta_hi_23, C::keccakf1600_state_theta_hi_24, C::keccakf1600_state_theta_hi_30,
195 C::keccakf1600_state_theta_hi_31, C::keccakf1600_state_theta_hi_32, C::keccakf1600_state_theta_hi_33,
196 C::keccakf1600_state_theta_hi_34, C::keccakf1600_state_theta_hi_40, C::keccakf1600_state_theta_hi_41,
197 C::keccakf1600_state_theta_hi_42, C::keccakf1600_state_theta_hi_43, C::keccakf1600_state_theta_hi_44,
205 C::keccakf1600_state_theta_low_01, C::keccakf1600_state_theta_low_02, C::keccakf1600_state_theta_low_03,
206 C::keccakf1600_state_theta_low_04, C::keccakf1600_state_theta_low_10, C::keccakf1600_state_theta_low_11,
207 C::keccakf1600_state_theta_low_12, C::keccakf1600_state_theta_low_13, C::keccakf1600_state_theta_low_14,
208 C::keccakf1600_state_theta_low_20, C::keccakf1600_state_theta_low_21, C::keccakf1600_state_theta_low_22,
209 C::keccakf1600_state_theta_low_23, C::keccakf1600_state_theta_low_24, C::keccakf1600_state_theta_low_30,
210 C::keccakf1600_state_theta_low_31, C::keccakf1600_state_theta_low_32, C::keccakf1600_state_theta_low_33,
211 C::keccakf1600_state_theta_low_34, C::keccakf1600_state_theta_low_40, C::keccakf1600_state_theta_low_41,
212 C::keccakf1600_state_theta_low_42, C::keccakf1600_state_theta_low_43, C::keccakf1600_state_theta_low_44,
220 C::keccakf1600_state_rho_01, C::keccakf1600_state_rho_02, C::keccakf1600_state_rho_03,
221 C::keccakf1600_state_rho_04, C::keccakf1600_state_rho_10, C::keccakf1600_state_rho_11,
222 C::keccakf1600_state_rho_12, C::keccakf1600_state_rho_13, C::keccakf1600_state_rho_14,
223 C::keccakf1600_state_rho_20, C::keccakf1600_state_rho_21, C::keccakf1600_state_rho_22,
224 C::keccakf1600_state_rho_23, C::keccakf1600_state_rho_24, C::keccakf1600_state_rho_30,
225 C::keccakf1600_state_rho_31, C::keccakf1600_state_rho_32, C::keccakf1600_state_rho_33,
226 C::keccakf1600_state_rho_34, C::keccakf1600_state_rho_40, C::keccakf1600_state_rho_41,
227 C::keccakf1600_state_rho_42, C::keccakf1600_state_rho_43, C::keccakf1600_state_rho_44,
235 C::keccakf1600_rot_64_min_len_01, C::keccakf1600_rot_len_02, C::keccakf1600_rot_64_min_len_03,
236 C::keccakf1600_rot_len_04, C::keccakf1600_rot_len_10, C::keccakf1600_rot_64_min_len_11,
237 C::keccakf1600_rot_len_12, C::keccakf1600_rot_64_min_len_13, C::keccakf1600_rot_len_14,
238 C::keccakf1600_rot_64_min_len_20, C::keccakf1600_rot_len_21, C::keccakf1600_rot_64_min_len_22,
239 C::keccakf1600_rot_len_23, C::keccakf1600_rot_64_min_len_24, C::keccakf1600_rot_len_30,
240 C::keccakf1600_rot_64_min_len_31, C::keccakf1600_rot_len_32, C::keccakf1600_rot_len_33,
241 C::keccakf1600_rot_64_min_len_34, C::keccakf1600_rot_len_40, C::keccakf1600_rot_len_41,
242 C::keccakf1600_rot_64_min_len_42, C::keccakf1600_rot_len_43, C::keccakf1600_rot_len_44,
250 C::keccakf1600_state_pi_not_00,
251 C::keccakf1600_state_pi_not_01,
252 C::keccakf1600_state_pi_not_02,
253 C::keccakf1600_state_pi_not_03,
254 C::keccakf1600_state_pi_not_04,
257 C::keccakf1600_state_pi_not_10,
258 C::keccakf1600_state_pi_not_11,
259 C::keccakf1600_state_pi_not_12,
260 C::keccakf1600_state_pi_not_13,
261 C::keccakf1600_state_pi_not_14,
264 C::keccakf1600_state_pi_not_20,
265 C::keccakf1600_state_pi_not_21,
266 C::keccakf1600_state_pi_not_22,
267 C::keccakf1600_state_pi_not_23,
268 C::keccakf1600_state_pi_not_24,
271 C::keccakf1600_state_pi_not_30,
272 C::keccakf1600_state_pi_not_31,
273 C::keccakf1600_state_pi_not_32,
274 C::keccakf1600_state_pi_not_33,
275 C::keccakf1600_state_pi_not_34,
278 C::keccakf1600_state_pi_not_40,
279 C::keccakf1600_state_pi_not_41,
280 C::keccakf1600_state_pi_not_42,
281 C::keccakf1600_state_pi_not_43,
282 C::keccakf1600_state_pi_not_44,
291 C::keccakf1600_state_pi_and_00,
292 C::keccakf1600_state_pi_and_01,
293 C::keccakf1600_state_pi_and_02,
294 C::keccakf1600_state_pi_and_03,
295 C::keccakf1600_state_pi_and_04,
298 C::keccakf1600_state_pi_and_10,
299 C::keccakf1600_state_pi_and_11,
300 C::keccakf1600_state_pi_and_12,
301 C::keccakf1600_state_pi_and_13,
302 C::keccakf1600_state_pi_and_14,
305 C::keccakf1600_state_pi_and_20,
306 C::keccakf1600_state_pi_and_21,
307 C::keccakf1600_state_pi_and_22,
308 C::keccakf1600_state_pi_and_23,
309 C::keccakf1600_state_pi_and_24,
312 C::keccakf1600_state_pi_and_30,
313 C::keccakf1600_state_pi_and_31,
314 C::keccakf1600_state_pi_and_32,
315 C::keccakf1600_state_pi_and_33,
316 C::keccakf1600_state_pi_and_34,
319 C::keccakf1600_state_pi_and_40,
320 C::keccakf1600_state_pi_and_41,
321 C::keccakf1600_state_pi_and_42,
322 C::keccakf1600_state_pi_and_43,
323 C::keccakf1600_state_pi_and_44,
332 C::keccakf1600_state_chi_00,
333 C::keccakf1600_state_chi_01,
334 C::keccakf1600_state_chi_02,
335 C::keccakf1600_state_chi_03,
336 C::keccakf1600_state_chi_04,
339 C::keccakf1600_state_chi_10,
340 C::keccakf1600_state_chi_11,
341 C::keccakf1600_state_chi_12,
342 C::keccakf1600_state_chi_13,
343 C::keccakf1600_state_chi_14,
346 C::keccakf1600_state_chi_20,
347 C::keccakf1600_state_chi_21,
348 C::keccakf1600_state_chi_22,
349 C::keccakf1600_state_chi_23,
350 C::keccakf1600_state_chi_24,
353 C::keccakf1600_state_chi_30,
354 C::keccakf1600_state_chi_31,
355 C::keccakf1600_state_chi_32,
356 C::keccakf1600_state_chi_33,
357 C::keccakf1600_state_chi_34,
360 C::keccakf1600_state_chi_40,
361 C::keccakf1600_state_chi_41,
362 C::keccakf1600_state_chi_42,
363 C::keccakf1600_state_chi_43,
364 C::keccakf1600_state_chi_44,
372 C::keccak_memory_val_0_, C::keccak_memory_val_1_, C::keccak_memory_val_2_, C::keccak_memory_val_3_,
373 C::keccak_memory_val_4_, C::keccak_memory_val_5_, C::keccak_memory_val_6_, C::keccak_memory_val_7_,
374 C::keccak_memory_val_8_, C::keccak_memory_val_9_, C::keccak_memory_val_10_, C::keccak_memory_val_11_,
375 C::keccak_memory_val_12_, C::keccak_memory_val_13_, C::keccak_memory_val_14_, C::keccak_memory_val_15_,
376 C::keccak_memory_val_16_, C::keccak_memory_val_17_, C::keccak_memory_val_18_, C::keccak_memory_val_19_,
377 C::keccak_memory_val_20_, C::keccak_memory_val_21_, C::keccak_memory_val_22_, C::keccak_memory_val_23_,
378 C::keccak_memory_val_24_,
383const FF& get_precomputed_inverse(
size_t index)
388 inverses.at(i) =
FF(i);
394 return precomputed_inverses.at(
index);
406 single_tag_errors.fill(
false);
417 for (
size_t i = 0; i < 5; i++) {
418 for (
size_t j = 0; j < 5; j++) {
427 const auto& mem_val =
event.src_mem_values[k];
428 slice_ff[k] = mem_val.as_ff();
429 tags[k] = mem_val.get_tag();
431 single_tag_errors.at(k) =
true;
439 tag_errors.fill(single_tag_errors.at(num_rows - 1));
443 for (
size_t i = 0; i < num_rows; i++) {
448 { C::keccak_memory_sel, 1 },
449 { C::keccak_memory_clk,
event.execution_clk },
450 { C::keccak_memory_ctr, i + 1 },
451 { C::keccak_memory_ctr_inv, get_precomputed_inverse(i + 1) },
452 { C::keccak_memory_state_size_min_ctr_inv,
454 { C::keccak_memory_start_read, (i == 0 && !
write) ? 1 : 0 },
455 { C::keccak_memory_start_write, (i == 0 &&
write) ? 1 : 0 },
458 { C::keccak_memory_rw,
write ? 1 : 0 },
459 { C::keccak_memory_addr, addr + i },
460 { C::keccak_memory_space_id,
event.space_id },
461 { C::keccak_memory_tag,
static_cast<uint8_t
>(tags[i]) },
462 { C::keccak_memory_tag_min_u64_inv,
463 single_tag_errors.at(i)
464 ? (
FF(
static_cast<uint8_t
>(tags[i])) -
FF(
static_cast<uint8_t
>(
MemoryTag::U64))).invert()
466 { C::keccak_memory_single_tag_error, single_tag_errors.at(i) ? 1 : 0 },
467 { C::keccak_memory_tag_error, tag_errors.at(i) ? 1 : 0 },
472 for (
size_t j = i; j < num_rows; j++) {
473 trace.set(MEM_VAL_COLS.at(j - i), row, slice_ff[j]);
486 if (!events.empty()) {
487 trace.set(C::keccakf1600_last, 0, 1);
493 for (
const auto&
event : events) {
494 const bool out_of_range =
event.src_out_of_range ||
event.dst_out_of_range;
495 const bool error = out_of_range ||
event.tag_error;
498 const auto& round_data =
event.rounds[round_idx];
503 { C::keccakf1600_sel, 1 },
504 { C::keccakf1600_clk,
event.execution_clk },
508 { C::keccakf1600_round, round_idx + 1 },
515 for (
size_t k = 1; k < 25; k++) {
516 const size_t i = k / 5;
517 const size_t j = k % 5;
519 const auto value = rotation_len <= 32 ? rotation_len : 64 - rotation_len;
520 trace.set(RHO_ROTATION_LEN_COLS.at(k - 1), row,
value);
525 if (round_idx == 0) {
528 { C::keccakf1600_start, 1 },
529 { C::keccakf1600_highest_slice_address, HIGHEST_SLICE_ADDRESS },
530 { C::keccakf1600_src_addr,
event.src_addr },
531 { C::keccakf1600_src_out_of_range_error,
event.src_out_of_range ? 1 : 0 },
532 { C::keccakf1600_dst_out_of_range_error,
event.dst_out_of_range ? 1 : 0 },
533 { C::keccakf1600_tag_error,
event.tag_error ? 1 : 0 },
534 { C::keccakf1600_sel_slice_read, out_of_range ? 0 : 1 },
535 { C::keccakf1600_error, error ? 1 : 0 },
536 { C::keccakf1600_last,
544 { C::keccakf1600_last, 1 },
545 { C::keccakf1600_sel_slice_write, error ? 0 : 1 },
553 { C::keccakf1600_dst_addr,
event.dst_addr },
554 { C::keccakf1600_sel_no_error, error ? 0 : 1 },
555 { C::keccakf1600_space_id,
event.space_id },
556 { C::keccakf1600_round_inv, get_precomputed_inverse(round_idx + 1) },
561 if (!out_of_range &&
event.tag_error && round_idx == 0) {
563 const size_t i = k % 5;
564 const size_t j = k / 5;
567 trace.set(STATE_IN_COLS[i][j], row,
event.src_mem_values[k]);
574 for (
size_t i = 0; i < 5; i++) {
575 for (
size_t j = 0; j < 5; j++) {
576 trace.set(STATE_IN_COLS[i][j], row, round_data.state[i][j]);
581 for (
size_t i = 0; i < 5; i++) {
582 for (
size_t j = 0; j < 4; j++) {
583 trace.set(THETA_XOR_COLS[i][j], row, round_data.theta_xor[i][j]);
590 for (
size_t i = 0; i < 5; i++) {
591 const auto theta_xor_row_rotl1 = round_data.theta_xor_row_rotl1[i];
592 const auto theta_xor_row_msb = theta_xor_row_rotl1 & 1;
593 const auto theta_xor_row_low63 = theta_xor_row_rotl1 >> 1;
597 { THETA_XOR_ROW_ROTL1_COLS[i], theta_xor_row_rotl1 },
598 { THETA_XOR_ROW_MSB_COLS[i], theta_xor_row_msb },
599 { THETA_XOR_ROW_LOW63_COLS[i], theta_xor_row_low63 },
600 { THETA_COMBINED_XOR_COLS[i], round_data.theta_combined_xor[i] },
605 for (
size_t i = 0; i < 5; i++) {
606 for (
size_t j = 0; j < 5; j++) {
607 trace.set(STATE_THETA_COLS[i][j], row, round_data.state_theta[i][j]);
616 for (
size_t k = 1; k < 25; k++) {
617 const size_t i = k / 5;
618 const size_t j = k % 5;
620 const auto state_theta_val = round_data.state_theta[i][j];
621 const auto state_theta_hi = state_theta_val >> low_num_bits;
622 const auto state_theta_low = state_theta_val & ((1ULL << low_num_bits) - 1);
626 { STATE_THETA_HI_COLS[k - 1], state_theta_hi },
627 { STATE_THETA_LOW_COLS[k - 1], state_theta_low },
628 { STATE_RHO_COLS[k - 1], round_data.state_rho[i][j] },
633 for (
size_t i = 0; i < 5; i++) {
634 for (
size_t j = 0; j < 5; j++) {
637 { STATE_PI_NOT_COLS[i][j], round_data.state_pi_not[i][j] },
638 { STATE_PI_AND_COLS[i][j], round_data.state_pi_and[i][j] },
639 { STATE_CHI_COLS[i][j], round_data.state_chi[i][j] },
645 trace.set(C::keccakf1600_state_iota_00, row, round_data.state_iota_00);
658 if (!events.empty()) {
661 { C::keccak_memory_last, 1 },
662 { C::keccak_memory_ctr_end, 1 },
667 for (
const auto&
event : events) {
670 if (!
event.src_out_of_range && !
event.dst_out_of_range) {
674 if (!
event.tag_error) {
685 .add<lookup_keccakf1600_theta_xor_02_settings, InteractionType::LookupSequential>(Column::bitwise_start)
687 .add<lookup_keccakf1600_theta_xor_row_0_settings, InteractionType::LookupSequential>(Column::bitwise_start)
689 .add<lookup_keccakf1600_theta_xor_12_settings, InteractionType::LookupSequential>(Column::bitwise_start)
691 .add<lookup_keccakf1600_theta_xor_row_1_settings, InteractionType::LookupSequential>(Column::bitwise_start)
693 .add<lookup_keccakf1600_theta_xor_22_settings, InteractionType::LookupSequential>(Column::bitwise_start)
695 .add<lookup_keccakf1600_theta_xor_row_2_settings, InteractionType::LookupSequential>(Column::bitwise_start)
697 .add<lookup_keccakf1600_theta_xor_32_settings, InteractionType::LookupSequential>(Column::bitwise_start)
699 .add<lookup_keccakf1600_theta_xor_row_3_settings, InteractionType::LookupSequential>(Column::bitwise_start)
701 .add<lookup_keccakf1600_theta_xor_42_settings, InteractionType::LookupSequential>(Column::bitwise_start)
703 .add<lookup_keccakf1600_theta_xor_row_4_settings, InteractionType::LookupSequential>(Column::bitwise_start)
706 .add<lookup_keccakf1600_theta_combined_xor_1_settings, InteractionType::LookupSequential>(Column::bitwise_start)
708 .add<lookup_keccakf1600_theta_combined_xor_3_settings, InteractionType::LookupSequential>(Column::bitwise_start)
711 .add<lookup_keccakf1600_state_theta_00_settings, InteractionType::LookupSequential>(Column::bitwise_start)
713 .add<lookup_keccakf1600_state_theta_02_settings, InteractionType::LookupSequential>(Column::bitwise_start)
715 .add<lookup_keccakf1600_state_theta_04_settings, InteractionType::LookupSequential>(Column::bitwise_start)
717 .add<lookup_keccakf1600_state_theta_11_settings, InteractionType::LookupSequential>(Column::bitwise_start)
719 .add<lookup_keccakf1600_state_theta_13_settings, InteractionType::LookupSequential>(Column::bitwise_start)
721 .add<lookup_keccakf1600_state_theta_20_settings, InteractionType::LookupSequential>(Column::bitwise_start)
723 .add<lookup_keccakf1600_state_theta_22_settings, InteractionType::LookupSequential>(Column::bitwise_start)
725 .add<lookup_keccakf1600_state_theta_24_settings, InteractionType::LookupSequential>(Column::bitwise_start)
727 .add<lookup_keccakf1600_state_theta_31_settings, InteractionType::LookupSequential>(Column::bitwise_start)
729 .add<lookup_keccakf1600_state_theta_33_settings, InteractionType::LookupSequential>(Column::bitwise_start)
731 .add<lookup_keccakf1600_state_theta_40_settings, InteractionType::LookupSequential>(Column::bitwise_start)
733 .add<lookup_keccakf1600_state_theta_42_settings, InteractionType::LookupSequential>(Column::bitwise_start)
735 .add<lookup_keccakf1600_state_theta_44_settings, InteractionType::LookupSequential>(Column::bitwise_start)
738 .add<lookup_keccakf1600_theta_limb_02_range_settings, InteractionType::LookupGeneric>(Column::range_check_sel)
740 .add<lookup_keccakf1600_theta_limb_04_range_settings, InteractionType::LookupGeneric>(Column::range_check_sel)
742 .add<lookup_keccakf1600_theta_limb_11_range_settings, InteractionType::LookupGeneric>(Column::range_check_sel)
744 .add<lookup_keccakf1600_theta_limb_13_range_settings, InteractionType::LookupGeneric>(Column::range_check_sel)
746 .add<lookup_keccakf1600_theta_limb_20_range_settings, InteractionType::LookupGeneric>(Column::range_check_sel)
748 .add<lookup_keccakf1600_theta_limb_22_range_settings, InteractionType::LookupGeneric>(Column::range_check_sel)
750 .add<lookup_keccakf1600_theta_limb_24_range_settings, InteractionType::LookupGeneric>(Column::range_check_sel)
752 .add<lookup_keccakf1600_theta_limb_31_range_settings, InteractionType::LookupGeneric>(Column::range_check_sel)
754 .add<lookup_keccakf1600_theta_limb_33_range_settings, InteractionType::LookupGeneric>(Column::range_check_sel)
756 .add<lookup_keccakf1600_theta_limb_40_range_settings, InteractionType::LookupGeneric>(Column::range_check_sel)
758 .add<lookup_keccakf1600_theta_limb_42_range_settings, InteractionType::LookupGeneric>(Column::range_check_sel)
760 .add<lookup_keccakf1600_theta_limb_44_range_settings, InteractionType::LookupGeneric>(Column::range_check_sel)
763 .add<lookup_keccakf1600_state_pi_and_01_settings, InteractionType::LookupSequential>(Column::bitwise_start)
765 .add<lookup_keccakf1600_state_pi_and_03_settings, InteractionType::LookupSequential>(Column::bitwise_start)
767 .add<lookup_keccakf1600_state_pi_and_10_settings, InteractionType::LookupSequential>(Column::bitwise_start)
769 .add<lookup_keccakf1600_state_pi_and_12_settings, InteractionType::LookupSequential>(Column::bitwise_start)
771 .add<lookup_keccakf1600_state_pi_and_14_settings, InteractionType::LookupSequential>(Column::bitwise_start)
773 .add<lookup_keccakf1600_state_pi_and_21_settings, InteractionType::LookupSequential>(Column::bitwise_start)
775 .add<lookup_keccakf1600_state_pi_and_23_settings, InteractionType::LookupSequential>(Column::bitwise_start)
777 .add<lookup_keccakf1600_state_pi_and_30_settings, InteractionType::LookupSequential>(Column::bitwise_start)
779 .add<lookup_keccakf1600_state_pi_and_32_settings, InteractionType::LookupSequential>(Column::bitwise_start)
781 .add<lookup_keccakf1600_state_pi_and_34_settings, InteractionType::LookupSequential>(Column::bitwise_start)
783 .add<lookup_keccakf1600_state_pi_and_41_settings, InteractionType::LookupSequential>(Column::bitwise_start)
785 .add<lookup_keccakf1600_state_pi_and_43_settings, InteractionType::LookupSequential>(Column::bitwise_start)
788 .add<lookup_keccakf1600_state_chi_00_settings, InteractionType::LookupSequential>(Column::bitwise_start)
790 .add<lookup_keccakf1600_state_chi_02_settings, InteractionType::LookupSequential>(Column::bitwise_start)
792 .add<lookup_keccakf1600_state_chi_04_settings, InteractionType::LookupSequential>(Column::bitwise_start)
794 .add<lookup_keccakf1600_state_chi_11_settings, InteractionType::LookupSequential>(Column::bitwise_start)
796 .add<lookup_keccakf1600_state_chi_13_settings, InteractionType::LookupSequential>(Column::bitwise_start)
798 .add<lookup_keccakf1600_state_chi_20_settings, InteractionType::LookupSequential>(Column::bitwise_start)
800 .add<lookup_keccakf1600_state_chi_22_settings, InteractionType::LookupSequential>(Column::bitwise_start)
802 .add<lookup_keccakf1600_state_chi_24_settings, InteractionType::LookupSequential>(Column::bitwise_start)
804 .add<lookup_keccakf1600_state_chi_31_settings, InteractionType::LookupSequential>(Column::bitwise_start)
806 .add<lookup_keccakf1600_state_chi_33_settings, InteractionType::LookupSequential>(Column::bitwise_start)
808 .add<lookup_keccakf1600_state_chi_40_settings, InteractionType::LookupSequential>(Column::bitwise_start)
810 .add<lookup_keccakf1600_state_chi_42_settings, InteractionType::LookupSequential>(Column::bitwise_start)
812 .add<lookup_keccakf1600_state_chi_44_settings, InteractionType::LookupSequential>(Column::bitwise_start)
816 .add<lookup_keccakf1600_round_cst_settings, InteractionType::LookupIntoIndexedByClk>()
819 .add<perm_keccakf1600_write_to_slice_settings, InteractionType::Permutation>()
824 .add<lookup_keccakf1600_dst_out_of_range_toggle_settings, InteractionType::LookupGeneric>(Column::gt_sel);
#define AVM_KECCAKF1600_STATE_SIZE
#define AVM_HIGHEST_MEM_ADDRESS
#define AVM_KECCAKF1600_NUM_ROUNDS
std::vector< Event > Container
InteractionDefinition & add(auto &&... args)
void process_memory_slices(const simulation::EventEmitterInterface< simulation::KeccakF1600Event >::Container &events, TraceContainer &trace)
static const InteractionDefinition interactions
void process_single_slice(const simulation::KeccakF1600Event &event, bool write, uint32_t &row, TraceContainer &trace)
void process_permutation(const simulation::EventEmitterInterface< simulation::KeccakF1600Event >::Container &events, TraceContainer &trace)
constexpr std::array< uint64_t, 24 > keccak_round_constants
constexpr std::array< std::array< uint8_t, 5 >, 5 > keccak_rotation_len
lookup_settings< lookup_keccakf1600_theta_xor_23_settings_ > lookup_keccakf1600_theta_xor_23_settings
lookup_settings< lookup_keccakf1600_theta_limb_10_range_settings_ > lookup_keccakf1600_theta_limb_10_range_settings
lookup_settings< lookup_keccakf1600_state_theta_34_settings_ > lookup_keccakf1600_state_theta_34_settings
lookup_settings< lookup_keccakf1600_theta_limb_12_range_settings_ > lookup_keccakf1600_theta_limb_12_range_settings
lookup_settings< lookup_keccakf1600_state_theta_32_settings_ > lookup_keccakf1600_state_theta_32_settings
lookup_settings< lookup_keccakf1600_theta_limb_01_range_settings_ > lookup_keccakf1600_theta_limb_01_range_settings
permutation_settings< perm_keccakf1600_read_to_slice_settings_ > perm_keccakf1600_read_to_slice_settings
lookup_settings< lookup_keccakf1600_theta_xor_31_settings_ > lookup_keccakf1600_theta_xor_31_settings
lookup_settings< lookup_keccakf1600_theta_xor_13_settings_ > lookup_keccakf1600_theta_xor_13_settings
lookup_settings< lookup_keccakf1600_theta_xor_03_settings_ > lookup_keccakf1600_theta_xor_03_settings
lookup_settings< lookup_keccakf1600_state_theta_03_settings_ > lookup_keccakf1600_state_theta_03_settings
lookup_settings< lookup_keccakf1600_theta_limb_30_range_settings_ > lookup_keccakf1600_theta_limb_30_range_settings
lookup_settings< lookup_keccakf1600_state_pi_and_11_settings_ > lookup_keccakf1600_state_pi_and_11_settings
lookup_settings< lookup_keccakf1600_state_theta_21_settings_ > lookup_keccakf1600_state_theta_21_settings
lookup_settings< lookup_keccakf1600_state_chi_41_settings_ > lookup_keccakf1600_state_chi_41_settings
lookup_settings< lookup_keccakf1600_state_chi_23_settings_ > lookup_keccakf1600_state_chi_23_settings
lookup_settings< lookup_keccakf1600_theta_limb_21_range_settings_ > lookup_keccakf1600_theta_limb_21_range_settings
lookup_settings< lookup_keccakf1600_state_pi_and_20_settings_ > lookup_keccakf1600_state_pi_and_20_settings
lookup_settings< lookup_keccakf1600_state_chi_43_settings_ > lookup_keccakf1600_state_chi_43_settings
lookup_settings< lookup_keccakf1600_state_chi_03_settings_ > lookup_keccakf1600_state_chi_03_settings
lookup_settings< lookup_keccakf1600_theta_limb_43_range_settings_ > lookup_keccakf1600_theta_limb_43_range_settings
lookup_settings< lookup_keccakf1600_state_pi_and_31_settings_ > lookup_keccakf1600_state_pi_and_31_settings
lookup_settings< lookup_keccakf1600_state_theta_01_settings_ > lookup_keccakf1600_state_theta_01_settings
lookup_settings< lookup_keccakf1600_state_chi_01_settings_ > lookup_keccakf1600_state_chi_01_settings
lookup_settings< lookup_keccakf1600_theta_combined_xor_2_settings_ > lookup_keccakf1600_theta_combined_xor_2_settings
lookup_settings< lookup_keccakf1600_state_pi_and_02_settings_ > lookup_keccakf1600_state_pi_and_02_settings
lookup_settings< lookup_keccakf1600_state_chi_21_settings_ > lookup_keccakf1600_state_chi_21_settings
lookup_settings< lookup_keccakf1600_state_chi_34_settings_ > lookup_keccakf1600_state_chi_34_settings
lookup_settings< lookup_keccakf1600_state_theta_43_settings_ > lookup_keccakf1600_state_theta_43_settings
lookup_settings< lookup_keccakf1600_state_iota_00_settings_ > lookup_keccakf1600_state_iota_00_settings
lookup_settings< lookup_keccakf1600_state_chi_12_settings_ > lookup_keccakf1600_state_chi_12_settings
lookup_settings< lookup_keccakf1600_state_chi_32_settings_ > lookup_keccakf1600_state_chi_32_settings
lookup_settings< lookup_keccakf1600_theta_limb_34_range_settings_ > lookup_keccakf1600_theta_limb_34_range_settings
lookup_settings< lookup_keccakf1600_state_pi_and_22_settings_ > lookup_keccakf1600_state_pi_and_22_settings
lookup_settings< lookup_keccakf1600_theta_xor_21_settings_ > lookup_keccakf1600_theta_xor_21_settings
lookup_settings< lookup_keccakf1600_theta_limb_14_range_settings_ > lookup_keccakf1600_theta_limb_14_range_settings
lookup_settings< lookup_keccakf1600_theta_limb_32_range_settings_ > lookup_keccakf1600_theta_limb_32_range_settings
lookup_settings< lookup_keccakf1600_theta_combined_xor_4_settings_ > lookup_keccakf1600_theta_combined_xor_4_settings
lookup_settings< lookup_keccakf1600_state_theta_14_settings_ > lookup_keccakf1600_state_theta_14_settings
lookup_settings< lookup_keccakf1600_theta_xor_41_settings_ > lookup_keccakf1600_theta_xor_41_settings
lookup_settings< lookup_keccakf1600_state_pi_and_24_settings_ > lookup_keccakf1600_state_pi_and_24_settings
lookup_settings< lookup_keccakf1600_theta_xor_43_settings_ > lookup_keccakf1600_theta_xor_43_settings
lookup_settings< lookup_keccakf1600_state_pi_and_13_settings_ > lookup_keccakf1600_state_pi_and_13_settings
lookup_settings< lookup_keccakf1600_theta_combined_xor_0_settings_ > lookup_keccakf1600_theta_combined_xor_0_settings
lookup_settings< lookup_keccakf1600_state_theta_23_settings_ > lookup_keccakf1600_state_theta_23_settings
lookup_settings< lookup_keccakf1600_state_pi_and_04_settings_ > lookup_keccakf1600_state_pi_and_04_settings
lookup_settings< lookup_keccakf1600_theta_limb_41_range_settings_ > lookup_keccakf1600_theta_limb_41_range_settings
lookup_settings< lookup_keccakf1600_state_theta_30_settings_ > lookup_keccakf1600_state_theta_30_settings
lookup_settings< lookup_keccakf1600_theta_xor_33_settings_ > lookup_keccakf1600_theta_xor_33_settings
lookup_settings< lookup_keccakf1600_theta_limb_03_range_settings_ > lookup_keccakf1600_theta_limb_03_range_settings
lookup_settings< lookup_keccakf1600_state_pi_and_00_settings_ > lookup_keccakf1600_state_pi_and_00_settings
lookup_settings< lookup_keccakf1600_state_theta_10_settings_ > lookup_keccakf1600_state_theta_10_settings
lookup_settings< lookup_keccakf1600_state_theta_41_settings_ > lookup_keccakf1600_state_theta_41_settings
lookup_settings< lookup_keccakf1600_state_chi_10_settings_ > lookup_keccakf1600_state_chi_10_settings
lookup_settings< lookup_keccakf1600_theta_xor_01_settings_ > lookup_keccakf1600_theta_xor_01_settings
lookup_settings< lookup_keccakf1600_state_chi_14_settings_ > lookup_keccakf1600_state_chi_14_settings
lookup_settings< lookup_keccakf1600_state_pi_and_42_settings_ > lookup_keccakf1600_state_pi_and_42_settings
lookup_settings< lookup_keccakf1600_state_pi_and_44_settings_ > lookup_keccakf1600_state_pi_and_44_settings
lookup_settings< lookup_keccakf1600_src_out_of_range_toggle_settings_ > lookup_keccakf1600_src_out_of_range_toggle_settings
lookup_settings< lookup_keccakf1600_state_theta_12_settings_ > lookup_keccakf1600_state_theta_12_settings
lookup_settings< lookup_keccakf1600_state_pi_and_33_settings_ > lookup_keccakf1600_state_pi_and_33_settings
lookup_settings< lookup_keccakf1600_theta_limb_23_range_settings_ > lookup_keccakf1600_theta_limb_23_range_settings
lookup_settings< lookup_keccakf1600_state_chi_30_settings_ > lookup_keccakf1600_state_chi_30_settings
lookup_settings< lookup_keccakf1600_state_pi_and_40_settings_ > lookup_keccakf1600_state_pi_and_40_settings
lookup_settings< lookup_keccakf1600_theta_xor_11_settings_ > lookup_keccakf1600_theta_xor_11_settings
void write(std::vector< uint8_t > &buf, Chonk::VerificationKey const &vk)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
simulation::PublicDataTreeReadWriteEvent event
static void batch_invert(C &coeffs) noexcept