33 const auto keccakf1600_ROT_LEN_04 =
FF(18);
34 const auto keccakf1600_POW_ROT_LEN_04 =
FF(262144);
35 const auto keccakf1600_POW_ROT_64_MIN_LEN_04 =
FF(70368744177664UL);
36 const auto keccakf1600_ROT_LEN_10 =
FF(1);
37 const auto keccakf1600_POW_ROT_LEN_10 =
FF(2);
38 const auto keccakf1600_POW_ROT_64_MIN_LEN_10 =
FF(
uint256_t{ 9223372036854775808UL, 0UL, 0UL, 0UL });
39 const auto keccakf1600_ROT_LEN_11 =
FF(44);
40 const auto keccakf1600_POW_ROT_LEN_11 =
FF(17592186044416UL);
41 const auto keccakf1600_POW_ROT_64_MIN_LEN_11 =
FF(1048576);
42 const auto keccakf1600_ROT_LEN_12 =
FF(10);
43 const auto keccakf1600_POW_ROT_LEN_12 =
FF(1024);
44 const auto keccakf1600_POW_ROT_64_MIN_LEN_12 =
FF(18014398509481984UL);
45 const auto keccakf1600_ROT_LEN_13 =
FF(45);
46 const auto keccakf1600_POW_ROT_LEN_13 =
FF(35184372088832UL);
47 const auto keccakf1600_POW_ROT_64_MIN_LEN_13 =
FF(524288);
48 const auto keccakf1600_ROT_LEN_14 =
FF(2);
49 const auto keccakf1600_POW_ROT_LEN_14 =
FF(4);
50 const auto keccakf1600_POW_ROT_64_MIN_LEN_14 =
FF(4611686018427387904UL);
51 const auto keccakf1600_ROT_LEN_20 =
FF(62);
52 const auto keccakf1600_POW_ROT_LEN_20 =
FF(4611686018427387904UL);
53 const auto keccakf1600_POW_ROT_64_MIN_LEN_20 =
FF(4);
54 const auto keccakf1600_ROT_LEN_21 =
FF(6);
55 const auto keccakf1600_POW_ROT_LEN_21 =
FF(64);
56 const auto keccakf1600_POW_ROT_64_MIN_LEN_21 =
FF(288230376151711744UL);
57 const auto keccakf1600_ROT_LEN_22 =
FF(43);
58 const auto keccakf1600_POW_ROT_LEN_22 =
FF(8796093022208UL);
59 const auto keccakf1600_POW_ROT_64_MIN_LEN_22 =
FF(2097152);
60 const auto keccakf1600_ROT_LEN_23 =
FF(15);
61 const auto keccakf1600_POW_ROT_LEN_23 =
FF(32768);
62 const auto keccakf1600_POW_ROT_64_MIN_LEN_23 =
FF(562949953421312UL);
63 const auto keccakf1600_ROT_LEN_24 =
FF(61);
64 const auto keccakf1600_POW_ROT_LEN_24 =
FF(2305843009213693952UL);
65 const auto keccakf1600_POW_ROT_64_MIN_LEN_24 =
FF(8);
66 const auto keccakf1600_ROT_LEN_30 =
FF(28);
67 const auto keccakf1600_POW_ROT_LEN_30 =
FF(268435456);
68 const auto keccakf1600_POW_ROT_64_MIN_LEN_30 =
FF(68719476736UL);
69 const auto keccakf1600_ROT_LEN_31 =
FF(55);
70 const auto keccakf1600_POW_ROT_LEN_31 =
FF(36028797018963968UL);
71 const auto keccakf1600_POW_ROT_64_MIN_LEN_31 =
FF(512);
72 const auto keccakf1600_ROT_LEN_32 =
FF(25);
73 const auto keccakf1600_POW_ROT_LEN_32 =
FF(33554432);
74 const auto keccakf1600_POW_ROT_64_MIN_LEN_32 =
FF(549755813888UL);
75 const auto keccakf1600_ROT_LEN_33 =
FF(21);
76 const auto keccakf1600_POW_ROT_LEN_33 =
FF(2097152);
77 const auto keccakf1600_POW_ROT_64_MIN_LEN_33 =
FF(8796093022208UL);
78 const auto keccakf1600_ROT_LEN_34 =
FF(56);
79 const auto keccakf1600_POW_ROT_LEN_34 =
FF(72057594037927936UL);
80 const auto keccakf1600_POW_ROT_64_MIN_LEN_34 =
FF(256);
81 const auto keccakf1600_ROT_LEN_40 =
FF(27);
82 const auto keccakf1600_POW_ROT_LEN_40 =
FF(134217728);
83 const auto keccakf1600_POW_ROT_64_MIN_LEN_40 =
FF(137438953472UL);
84 const auto keccakf1600_ROT_LEN_41 =
FF(20);
85 const auto keccakf1600_POW_ROT_LEN_41 =
FF(1048576);
86 const auto keccakf1600_POW_ROT_64_MIN_LEN_41 =
FF(17592186044416UL);
87 const auto keccakf1600_ROT_LEN_42 =
FF(39);
88 const auto keccakf1600_POW_ROT_LEN_42 =
FF(549755813888UL);
89 const auto keccakf1600_POW_ROT_64_MIN_LEN_42 =
FF(33554432);
90 const auto keccakf1600_ROT_LEN_43 =
FF(8);
91 const auto keccakf1600_POW_ROT_LEN_43 =
FF(256);
92 const auto keccakf1600_POW_ROT_64_MIN_LEN_43 =
FF(72057594037927936UL);
93 const auto keccakf1600_ROT_LEN_44 =
FF(14);
94 const auto keccakf1600_POW_ROT_LEN_44 =
FF(16384);
95 const auto keccakf1600_POW_ROT_64_MIN_LEN_44 =
FF(1125899906842624UL);
96 const auto keccakf1600_STATE_RHO_00 = in.get(C::keccakf1600_state_theta_00);
97 const auto keccakf1600_STATE_PI_00 = keccakf1600_STATE_RHO_00;
98 const auto keccakf1600_STATE_PI_01 = in.get(C::keccakf1600_state_rho_30);
99 const auto keccakf1600_STATE_PI_02 = in.get(C::keccakf1600_state_rho_10);
100 const auto keccakf1600_STATE_PI_03 = in.get(C::keccakf1600_state_rho_40);
101 const auto keccakf1600_STATE_PI_04 = in.get(C::keccakf1600_state_rho_20);
102 const auto keccakf1600_STATE_PI_10 = in.get(C::keccakf1600_state_rho_11);
103 const auto keccakf1600_STATE_PI_11 = in.get(C::keccakf1600_state_rho_41);
104 const auto keccakf1600_STATE_PI_12 = in.get(C::keccakf1600_state_rho_21);
105 const auto keccakf1600_STATE_PI_13 = in.get(C::keccakf1600_state_rho_01);
106 const auto keccakf1600_STATE_PI_14 = in.get(C::keccakf1600_state_rho_31);
107 const auto keccakf1600_STATE_PI_20 = in.get(C::keccakf1600_state_rho_22);
108 const auto keccakf1600_STATE_PI_21 = in.get(C::keccakf1600_state_rho_02);
109 const auto keccakf1600_STATE_PI_22 = in.get(C::keccakf1600_state_rho_32);
110 const auto keccakf1600_STATE_PI_23 = in.get(C::keccakf1600_state_rho_12);
111 const auto keccakf1600_STATE_PI_24 = in.get(C::keccakf1600_state_rho_42);
112 const auto keccakf1600_STATE_PI_30 = in.get(C::keccakf1600_state_rho_33);
113 const auto keccakf1600_STATE_PI_31 = in.get(C::keccakf1600_state_rho_13);
114 const auto keccakf1600_STATE_PI_32 = in.get(C::keccakf1600_state_rho_43);
115 const auto keccakf1600_STATE_PI_33 = in.get(C::keccakf1600_state_rho_23);
116 const auto keccakf1600_STATE_PI_34 = in.get(C::keccakf1600_state_rho_03);
117 const auto keccakf1600_STATE_PI_40 = in.get(C::keccakf1600_state_rho_44);
118 const auto keccakf1600_STATE_PI_41 = in.get(C::keccakf1600_state_rho_24);
119 const auto keccakf1600_STATE_PI_42 = in.get(C::keccakf1600_state_rho_04);
120 const auto keccakf1600_STATE_PI_43 = in.get(C::keccakf1600_state_rho_34);
121 const auto keccakf1600_STATE_PI_44 = in.get(C::keccakf1600_state_rho_14);
122 const auto keccakf1600_POW_64_MIN_1 =
FF(
uint256_t{ 18446744073709551615UL, 0UL, 0UL, 0UL });
123 const auto keccakf1600_HIGHEST_SLICE_ADDRESS =
124 (constants_AVM_HIGHEST_MEM_ADDRESS - constants_AVM_KECCAKF1600_STATE_SIZE) +
FF(1);
128 auto tmp = in.get(C::keccakf1600_sel) * (
FF(1) - in.get(C::keccakf1600_sel));
129 tmp *= scaling_factor;
130 std::get<0>(evals) +=
typename Accumulator::View(tmp);
134 auto tmp = in.get(C::keccakf1600_start) *
135 ((in.get(C::keccakf1600_sel_no_error) -
FF(1)) + in.get(C::keccakf1600_error));
136 tmp *= scaling_factor;
137 std::get<1>(evals) +=
typename Accumulator::View(tmp);
141 auto tmp = in.get(C::keccakf1600_start) * (
FF(1) - in.get(C::keccakf1600_start));
142 tmp *= scaling_factor;
143 std::get<2>(evals) +=
typename Accumulator::View(tmp);
147 auto tmp = in.get(C::keccakf1600_start) * (in.get(C::keccakf1600_round) -
FF(1));
148 tmp *= scaling_factor;
149 std::get<3>(evals) +=
typename Accumulator::View(tmp);
153 auto tmp = (in.get(C::keccakf1600_round) *
154 ((
FF(1) - in.get(C::keccakf1600_sel)) * (
FF(1) - in.get(C::keccakf1600_round_inv)) +
155 in.get(C::keccakf1600_round_inv)) -
156 in.get(C::keccakf1600_sel));
157 tmp *= scaling_factor;
158 std::get<4>(evals) +=
typename Accumulator::View(tmp);
162 auto tmp = in.get(C::keccakf1600_sel) * (
FF(1) - in.get(C::keccakf1600_last)) *
163 ((in.get(C::keccakf1600_round_shift) - in.get(C::keccakf1600_round)) -
FF(1));
164 tmp *= scaling_factor;
165 std::get<5>(evals) +=
typename Accumulator::View(tmp);
169 auto tmp = in.get(C::keccakf1600_last) * (
FF(1) - in.get(C::keccakf1600_last));
170 tmp *= scaling_factor;
171 std::get<6>(evals) +=
typename Accumulator::View(tmp);
176 in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_bitwise_xor_op_id) - constants_AVM_BITWISE_XOR_OP_ID);
177 tmp *= scaling_factor;
178 std::get<7>(evals) +=
typename Accumulator::View(tmp);
183 in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_bitwise_and_op_id) - constants_AVM_BITWISE_AND_OP_ID);
184 tmp *= scaling_factor;
185 std::get<8>(evals) +=
typename Accumulator::View(tmp);
189 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_tag_u64) - constants_MEM_TAG_U64);
190 tmp *= scaling_factor;
191 std::get<9>(evals) +=
typename Accumulator::View(tmp);
195 auto tmp = in.get(C::keccakf1600_theta_xor_row_msb_0) * (
FF(1) - in.get(C::keccakf1600_theta_xor_row_msb_0));
196 tmp *= scaling_factor;
201 auto tmp = (in.get(C::keccakf1600_theta_xor_row_0) - (
FF(
uint256_t{ 9223372036854775808UL, 0UL, 0UL, 0UL }) *
202 in.get(C::keccakf1600_theta_xor_row_msb_0) +
203 in.get(C::keccakf1600_theta_xor_row_low63_0)));
204 tmp *= scaling_factor;
210 (in.get(C::keccakf1600_theta_xor_row_rotl1_0) -
211 (
FF(2) * in.get(C::keccakf1600_theta_xor_row_low63_0) + in.get(C::keccakf1600_theta_xor_row_msb_0)));
212 tmp *= scaling_factor;
217 auto tmp = in.get(C::keccakf1600_theta_xor_row_msb_1) * (
FF(1) - in.get(C::keccakf1600_theta_xor_row_msb_1));
218 tmp *= scaling_factor;
223 auto tmp = (in.get(C::keccakf1600_theta_xor_row_1) - (
FF(
uint256_t{ 9223372036854775808UL, 0UL, 0UL, 0UL }) *
224 in.get(C::keccakf1600_theta_xor_row_msb_1) +
225 in.get(C::keccakf1600_theta_xor_row_low63_1)));
226 tmp *= scaling_factor;
232 (in.get(C::keccakf1600_theta_xor_row_rotl1_1) -
233 (
FF(2) * in.get(C::keccakf1600_theta_xor_row_low63_1) + in.get(C::keccakf1600_theta_xor_row_msb_1)));
234 tmp *= scaling_factor;
239 auto tmp = in.get(C::keccakf1600_theta_xor_row_msb_2) * (
FF(1) - in.get(C::keccakf1600_theta_xor_row_msb_2));
240 tmp *= scaling_factor;
245 auto tmp = (in.get(C::keccakf1600_theta_xor_row_2) - (
FF(
uint256_t{ 9223372036854775808UL, 0UL, 0UL, 0UL }) *
246 in.get(C::keccakf1600_theta_xor_row_msb_2) +
247 in.get(C::keccakf1600_theta_xor_row_low63_2)));
248 tmp *= scaling_factor;
254 (in.get(C::keccakf1600_theta_xor_row_rotl1_2) -
255 (
FF(2) * in.get(C::keccakf1600_theta_xor_row_low63_2) + in.get(C::keccakf1600_theta_xor_row_msb_2)));
256 tmp *= scaling_factor;
261 auto tmp = in.get(C::keccakf1600_theta_xor_row_msb_3) * (
FF(1) - in.get(C::keccakf1600_theta_xor_row_msb_3));
262 tmp *= scaling_factor;
267 auto tmp = (in.get(C::keccakf1600_theta_xor_row_3) - (
FF(
uint256_t{ 9223372036854775808UL, 0UL, 0UL, 0UL }) *
268 in.get(C::keccakf1600_theta_xor_row_msb_3) +
269 in.get(C::keccakf1600_theta_xor_row_low63_3)));
270 tmp *= scaling_factor;
276 (in.get(C::keccakf1600_theta_xor_row_rotl1_3) -
277 (
FF(2) * in.get(C::keccakf1600_theta_xor_row_low63_3) + in.get(C::keccakf1600_theta_xor_row_msb_3)));
278 tmp *= scaling_factor;
283 auto tmp = in.get(C::keccakf1600_theta_xor_row_msb_4) * (
FF(1) - in.get(C::keccakf1600_theta_xor_row_msb_4));
284 tmp *= scaling_factor;
289 auto tmp = (in.get(C::keccakf1600_theta_xor_row_4) - (
FF(
uint256_t{ 9223372036854775808UL, 0UL, 0UL, 0UL }) *
290 in.get(C::keccakf1600_theta_xor_row_msb_4) +
291 in.get(C::keccakf1600_theta_xor_row_low63_4)));
292 tmp *= scaling_factor;
298 (in.get(C::keccakf1600_theta_xor_row_rotl1_4) -
299 (
FF(2) * in.get(C::keccakf1600_theta_xor_row_low63_4) + in.get(C::keccakf1600_theta_xor_row_msb_4)));
300 tmp *= scaling_factor;
305 auto tmp = (in.get(C::keccakf1600_state_theta_01) -
306 (keccakf1600_POW_ROT_64_MIN_LEN_01 * in.get(C::keccakf1600_state_theta_hi_01) +
307 in.get(C::keccakf1600_state_theta_low_01)));
308 tmp *= scaling_factor;
313 auto tmp = (in.get(C::keccakf1600_state_rho_01) -
314 (keccakf1600_POW_ROT_LEN_01 * in.get(C::keccakf1600_state_theta_low_01) +
315 in.get(C::keccakf1600_state_theta_hi_01)));
316 tmp *= scaling_factor;
321 auto tmp = (in.get(C::keccakf1600_state_theta_02) -
322 (keccakf1600_POW_ROT_64_MIN_LEN_02 * in.get(C::keccakf1600_state_theta_hi_02) +
323 in.get(C::keccakf1600_state_theta_low_02)));
324 tmp *= scaling_factor;
329 auto tmp = (in.get(C::keccakf1600_state_rho_02) -
330 (keccakf1600_POW_ROT_LEN_02 * in.get(C::keccakf1600_state_theta_low_02) +
331 in.get(C::keccakf1600_state_theta_hi_02)));
332 tmp *= scaling_factor;
337 auto tmp = (in.get(C::keccakf1600_state_theta_03) -
338 (keccakf1600_POW_ROT_64_MIN_LEN_03 * in.get(C::keccakf1600_state_theta_hi_03) +
339 in.get(C::keccakf1600_state_theta_low_03)));
340 tmp *= scaling_factor;
345 auto tmp = (in.get(C::keccakf1600_state_rho_03) -
346 (keccakf1600_POW_ROT_LEN_03 * in.get(C::keccakf1600_state_theta_low_03) +
347 in.get(C::keccakf1600_state_theta_hi_03)));
348 tmp *= scaling_factor;
353 auto tmp = (in.get(C::keccakf1600_state_theta_04) -
354 (keccakf1600_POW_ROT_64_MIN_LEN_04 * in.get(C::keccakf1600_state_theta_hi_04) +
355 in.get(C::keccakf1600_state_theta_low_04)));
356 tmp *= scaling_factor;
361 auto tmp = (in.get(C::keccakf1600_state_rho_04) -
362 (keccakf1600_POW_ROT_LEN_04 * in.get(C::keccakf1600_state_theta_low_04) +
363 in.get(C::keccakf1600_state_theta_hi_04)));
364 tmp *= scaling_factor;
369 auto tmp = (in.get(C::keccakf1600_state_theta_10) -
370 (keccakf1600_POW_ROT_64_MIN_LEN_10 * in.get(C::keccakf1600_state_theta_hi_10) +
371 in.get(C::keccakf1600_state_theta_low_10)));
372 tmp *= scaling_factor;
377 auto tmp = (in.get(C::keccakf1600_state_rho_10) -
378 (keccakf1600_POW_ROT_LEN_10 * in.get(C::keccakf1600_state_theta_low_10) +
379 in.get(C::keccakf1600_state_theta_hi_10)));
380 tmp *= scaling_factor;
385 auto tmp = (in.get(C::keccakf1600_state_theta_11) -
386 (keccakf1600_POW_ROT_64_MIN_LEN_11 * in.get(C::keccakf1600_state_theta_hi_11) +
387 in.get(C::keccakf1600_state_theta_low_11)));
388 tmp *= scaling_factor;
393 auto tmp = (in.get(C::keccakf1600_state_rho_11) -
394 (keccakf1600_POW_ROT_LEN_11 * in.get(C::keccakf1600_state_theta_low_11) +
395 in.get(C::keccakf1600_state_theta_hi_11)));
396 tmp *= scaling_factor;
401 auto tmp = (in.get(C::keccakf1600_state_theta_12) -
402 (keccakf1600_POW_ROT_64_MIN_LEN_12 * in.get(C::keccakf1600_state_theta_hi_12) +
403 in.get(C::keccakf1600_state_theta_low_12)));
404 tmp *= scaling_factor;
409 auto tmp = (in.get(C::keccakf1600_state_rho_12) -
410 (keccakf1600_POW_ROT_LEN_12 * in.get(C::keccakf1600_state_theta_low_12) +
411 in.get(C::keccakf1600_state_theta_hi_12)));
412 tmp *= scaling_factor;
417 auto tmp = (in.get(C::keccakf1600_state_theta_13) -
418 (keccakf1600_POW_ROT_64_MIN_LEN_13 * in.get(C::keccakf1600_state_theta_hi_13) +
419 in.get(C::keccakf1600_state_theta_low_13)));
420 tmp *= scaling_factor;
425 auto tmp = (in.get(C::keccakf1600_state_rho_13) -
426 (keccakf1600_POW_ROT_LEN_13 * in.get(C::keccakf1600_state_theta_low_13) +
427 in.get(C::keccakf1600_state_theta_hi_13)));
428 tmp *= scaling_factor;
433 auto tmp = (in.get(C::keccakf1600_state_theta_14) -
434 (keccakf1600_POW_ROT_64_MIN_LEN_14 * in.get(C::keccakf1600_state_theta_hi_14) +
435 in.get(C::keccakf1600_state_theta_low_14)));
436 tmp *= scaling_factor;
441 auto tmp = (in.get(C::keccakf1600_state_rho_14) -
442 (keccakf1600_POW_ROT_LEN_14 * in.get(C::keccakf1600_state_theta_low_14) +
443 in.get(C::keccakf1600_state_theta_hi_14)));
444 tmp *= scaling_factor;
449 auto tmp = (in.get(C::keccakf1600_state_theta_20) -
450 (keccakf1600_POW_ROT_64_MIN_LEN_20 * in.get(C::keccakf1600_state_theta_hi_20) +
451 in.get(C::keccakf1600_state_theta_low_20)));
452 tmp *= scaling_factor;
457 auto tmp = (in.get(C::keccakf1600_state_rho_20) -
458 (keccakf1600_POW_ROT_LEN_20 * in.get(C::keccakf1600_state_theta_low_20) +
459 in.get(C::keccakf1600_state_theta_hi_20)));
460 tmp *= scaling_factor;
465 auto tmp = (in.get(C::keccakf1600_state_theta_21) -
466 (keccakf1600_POW_ROT_64_MIN_LEN_21 * in.get(C::keccakf1600_state_theta_hi_21) +
467 in.get(C::keccakf1600_state_theta_low_21)));
468 tmp *= scaling_factor;
473 auto tmp = (in.get(C::keccakf1600_state_rho_21) -
474 (keccakf1600_POW_ROT_LEN_21 * in.get(C::keccakf1600_state_theta_low_21) +
475 in.get(C::keccakf1600_state_theta_hi_21)));
476 tmp *= scaling_factor;
481 auto tmp = (in.get(C::keccakf1600_state_theta_22) -
482 (keccakf1600_POW_ROT_64_MIN_LEN_22 * in.get(C::keccakf1600_state_theta_hi_22) +
483 in.get(C::keccakf1600_state_theta_low_22)));
484 tmp *= scaling_factor;
489 auto tmp = (in.get(C::keccakf1600_state_rho_22) -
490 (keccakf1600_POW_ROT_LEN_22 * in.get(C::keccakf1600_state_theta_low_22) +
491 in.get(C::keccakf1600_state_theta_hi_22)));
492 tmp *= scaling_factor;
497 auto tmp = (in.get(C::keccakf1600_state_theta_23) -
498 (keccakf1600_POW_ROT_64_MIN_LEN_23 * in.get(C::keccakf1600_state_theta_hi_23) +
499 in.get(C::keccakf1600_state_theta_low_23)));
500 tmp *= scaling_factor;
505 auto tmp = (in.get(C::keccakf1600_state_rho_23) -
506 (keccakf1600_POW_ROT_LEN_23 * in.get(C::keccakf1600_state_theta_low_23) +
507 in.get(C::keccakf1600_state_theta_hi_23)));
508 tmp *= scaling_factor;
513 auto tmp = (in.get(C::keccakf1600_state_theta_24) -
514 (keccakf1600_POW_ROT_64_MIN_LEN_24 * in.get(C::keccakf1600_state_theta_hi_24) +
515 in.get(C::keccakf1600_state_theta_low_24)));
516 tmp *= scaling_factor;
521 auto tmp = (in.get(C::keccakf1600_state_rho_24) -
522 (keccakf1600_POW_ROT_LEN_24 * in.get(C::keccakf1600_state_theta_low_24) +
523 in.get(C::keccakf1600_state_theta_hi_24)));
524 tmp *= scaling_factor;
529 auto tmp = (in.get(C::keccakf1600_state_theta_30) -
530 (keccakf1600_POW_ROT_64_MIN_LEN_30 * in.get(C::keccakf1600_state_theta_hi_30) +
531 in.get(C::keccakf1600_state_theta_low_30)));
532 tmp *= scaling_factor;
537 auto tmp = (in.get(C::keccakf1600_state_rho_30) -
538 (keccakf1600_POW_ROT_LEN_30 * in.get(C::keccakf1600_state_theta_low_30) +
539 in.get(C::keccakf1600_state_theta_hi_30)));
540 tmp *= scaling_factor;
545 auto tmp = (in.get(C::keccakf1600_state_theta_31) -
546 (keccakf1600_POW_ROT_64_MIN_LEN_31 * in.get(C::keccakf1600_state_theta_hi_31) +
547 in.get(C::keccakf1600_state_theta_low_31)));
548 tmp *= scaling_factor;
553 auto tmp = (in.get(C::keccakf1600_state_rho_31) -
554 (keccakf1600_POW_ROT_LEN_31 * in.get(C::keccakf1600_state_theta_low_31) +
555 in.get(C::keccakf1600_state_theta_hi_31)));
556 tmp *= scaling_factor;
561 auto tmp = (in.get(C::keccakf1600_state_theta_32) -
562 (keccakf1600_POW_ROT_64_MIN_LEN_32 * in.get(C::keccakf1600_state_theta_hi_32) +
563 in.get(C::keccakf1600_state_theta_low_32)));
564 tmp *= scaling_factor;
569 auto tmp = (in.get(C::keccakf1600_state_rho_32) -
570 (keccakf1600_POW_ROT_LEN_32 * in.get(C::keccakf1600_state_theta_low_32) +
571 in.get(C::keccakf1600_state_theta_hi_32)));
572 tmp *= scaling_factor;
577 auto tmp = (in.get(C::keccakf1600_state_theta_33) -
578 (keccakf1600_POW_ROT_64_MIN_LEN_33 * in.get(C::keccakf1600_state_theta_hi_33) +
579 in.get(C::keccakf1600_state_theta_low_33)));
580 tmp *= scaling_factor;
585 auto tmp = (in.get(C::keccakf1600_state_rho_33) -
586 (keccakf1600_POW_ROT_LEN_33 * in.get(C::keccakf1600_state_theta_low_33) +
587 in.get(C::keccakf1600_state_theta_hi_33)));
588 tmp *= scaling_factor;
593 auto tmp = (in.get(C::keccakf1600_state_theta_34) -
594 (keccakf1600_POW_ROT_64_MIN_LEN_34 * in.get(C::keccakf1600_state_theta_hi_34) +
595 in.get(C::keccakf1600_state_theta_low_34)));
596 tmp *= scaling_factor;
601 auto tmp = (in.get(C::keccakf1600_state_rho_34) -
602 (keccakf1600_POW_ROT_LEN_34 * in.get(C::keccakf1600_state_theta_low_34) +
603 in.get(C::keccakf1600_state_theta_hi_34)));
604 tmp *= scaling_factor;
609 auto tmp = (in.get(C::keccakf1600_state_theta_40) -
610 (keccakf1600_POW_ROT_64_MIN_LEN_40 * in.get(C::keccakf1600_state_theta_hi_40) +
611 in.get(C::keccakf1600_state_theta_low_40)));
612 tmp *= scaling_factor;
617 auto tmp = (in.get(C::keccakf1600_state_rho_40) -
618 (keccakf1600_POW_ROT_LEN_40 * in.get(C::keccakf1600_state_theta_low_40) +
619 in.get(C::keccakf1600_state_theta_hi_40)));
620 tmp *= scaling_factor;
625 auto tmp = (in.get(C::keccakf1600_state_theta_41) -
626 (keccakf1600_POW_ROT_64_MIN_LEN_41 * in.get(C::keccakf1600_state_theta_hi_41) +
627 in.get(C::keccakf1600_state_theta_low_41)));
628 tmp *= scaling_factor;
633 auto tmp = (in.get(C::keccakf1600_state_rho_41) -
634 (keccakf1600_POW_ROT_LEN_41 * in.get(C::keccakf1600_state_theta_low_41) +
635 in.get(C::keccakf1600_state_theta_hi_41)));
636 tmp *= scaling_factor;
641 auto tmp = (in.get(C::keccakf1600_state_theta_42) -
642 (keccakf1600_POW_ROT_64_MIN_LEN_42 * in.get(C::keccakf1600_state_theta_hi_42) +
643 in.get(C::keccakf1600_state_theta_low_42)));
644 tmp *= scaling_factor;
649 auto tmp = (in.get(C::keccakf1600_state_rho_42) -
650 (keccakf1600_POW_ROT_LEN_42 * in.get(C::keccakf1600_state_theta_low_42) +
651 in.get(C::keccakf1600_state_theta_hi_42)));
652 tmp *= scaling_factor;
657 auto tmp = (in.get(C::keccakf1600_state_theta_43) -
658 (keccakf1600_POW_ROT_64_MIN_LEN_43 * in.get(C::keccakf1600_state_theta_hi_43) +
659 in.get(C::keccakf1600_state_theta_low_43)));
660 tmp *= scaling_factor;
665 auto tmp = (in.get(C::keccakf1600_state_rho_43) -
666 (keccakf1600_POW_ROT_LEN_43 * in.get(C::keccakf1600_state_theta_low_43) +
667 in.get(C::keccakf1600_state_theta_hi_43)));
668 tmp *= scaling_factor;
673 auto tmp = (in.get(C::keccakf1600_state_theta_44) -
674 (keccakf1600_POW_ROT_64_MIN_LEN_44 * in.get(C::keccakf1600_state_theta_hi_44) +
675 in.get(C::keccakf1600_state_theta_low_44)));
676 tmp *= scaling_factor;
681 auto tmp = (in.get(C::keccakf1600_state_rho_44) -
682 (keccakf1600_POW_ROT_LEN_44 * in.get(C::keccakf1600_state_theta_low_44) +
683 in.get(C::keccakf1600_state_theta_hi_44)));
684 tmp *= scaling_factor;
689 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_02) - keccakf1600_ROT_LEN_02);
690 tmp *= scaling_factor;
695 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_04) - keccakf1600_ROT_LEN_04);
696 tmp *= scaling_factor;
701 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_10) - keccakf1600_ROT_LEN_10);
702 tmp *= scaling_factor;
707 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_12) - keccakf1600_ROT_LEN_12);
708 tmp *= scaling_factor;
713 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_14) - keccakf1600_ROT_LEN_14);
714 tmp *= scaling_factor;
719 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_21) - keccakf1600_ROT_LEN_21);
720 tmp *= scaling_factor;
725 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_23) - keccakf1600_ROT_LEN_23);
726 tmp *= scaling_factor;
731 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_30) - keccakf1600_ROT_LEN_30);
732 tmp *= scaling_factor;
737 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_32) - keccakf1600_ROT_LEN_32);
738 tmp *= scaling_factor;
743 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_33) - keccakf1600_ROT_LEN_33);
744 tmp *= scaling_factor;
749 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_40) - keccakf1600_ROT_LEN_40);
750 tmp *= scaling_factor;
755 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_41) - keccakf1600_ROT_LEN_41);
756 tmp *= scaling_factor;
761 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_43) - keccakf1600_ROT_LEN_43);
762 tmp *= scaling_factor;
767 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_44) - keccakf1600_ROT_LEN_44);
768 tmp *= scaling_factor;
774 in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_64_min_len_01) - (
FF(64) - keccakf1600_ROT_LEN_01));
775 tmp *= scaling_factor;
781 in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_64_min_len_03) - (
FF(64) - keccakf1600_ROT_LEN_03));
782 tmp *= scaling_factor;
788 in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_64_min_len_11) - (
FF(64) - keccakf1600_ROT_LEN_11));
789 tmp *= scaling_factor;
795 in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_64_min_len_13) - (
FF(64) - keccakf1600_ROT_LEN_13));
796 tmp *= scaling_factor;
802 in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_64_min_len_20) - (
FF(64) - keccakf1600_ROT_LEN_20));
803 tmp *= scaling_factor;
809 in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_64_min_len_22) - (
FF(64) - keccakf1600_ROT_LEN_22));
810 tmp *= scaling_factor;
816 in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_64_min_len_24) - (
FF(64) - keccakf1600_ROT_LEN_24));
817 tmp *= scaling_factor;
823 in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_64_min_len_31) - (
FF(64) - keccakf1600_ROT_LEN_31));
824 tmp *= scaling_factor;
830 in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_64_min_len_34) - (
FF(64) - keccakf1600_ROT_LEN_34));
831 tmp *= scaling_factor;
837 in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_64_min_len_42) - (
FF(64) - keccakf1600_ROT_LEN_42));
838 tmp *= scaling_factor;
843 auto tmp = (in.get(C::keccakf1600_state_pi_not_00) -
844 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_00));
845 tmp *= scaling_factor;
850 auto tmp = (in.get(C::keccakf1600_state_pi_not_01) -
851 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_01));
852 tmp *= scaling_factor;
857 auto tmp = (in.get(C::keccakf1600_state_pi_not_02) -
858 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_02));
859 tmp *= scaling_factor;
864 auto tmp = (in.get(C::keccakf1600_state_pi_not_03) -
865 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_03));
866 tmp *= scaling_factor;
871 auto tmp = (in.get(C::keccakf1600_state_pi_not_04) -
872 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_04));
873 tmp *= scaling_factor;
878 auto tmp = (in.get(C::keccakf1600_state_pi_not_10) -
879 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_10));
880 tmp *= scaling_factor;
885 auto tmp = (in.get(C::keccakf1600_state_pi_not_11) -
886 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_11));
887 tmp *= scaling_factor;
892 auto tmp = (in.get(C::keccakf1600_state_pi_not_12) -
893 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_12));
894 tmp *= scaling_factor;
899 auto tmp = (in.get(C::keccakf1600_state_pi_not_13) -
900 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_13));
901 tmp *= scaling_factor;
906 auto tmp = (in.get(C::keccakf1600_state_pi_not_14) -
907 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_14));
908 tmp *= scaling_factor;
913 auto tmp = (in.get(C::keccakf1600_state_pi_not_20) -
914 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_20));
915 tmp *= scaling_factor;
920 auto tmp = (in.get(C::keccakf1600_state_pi_not_21) -
921 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_21));
922 tmp *= scaling_factor;
927 auto tmp = (in.get(C::keccakf1600_state_pi_not_22) -
928 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_22));
929 tmp *= scaling_factor;
934 auto tmp = (in.get(C::keccakf1600_state_pi_not_23) -
935 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_23));
936 tmp *= scaling_factor;
941 auto tmp = (in.get(C::keccakf1600_state_pi_not_24) -
942 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_24));
943 tmp *= scaling_factor;
948 auto tmp = (in.get(C::keccakf1600_state_pi_not_30) -
949 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_30));
950 tmp *= scaling_factor;
955 auto tmp = (in.get(C::keccakf1600_state_pi_not_31) -
956 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_31));
957 tmp *= scaling_factor;
962 auto tmp = (in.get(C::keccakf1600_state_pi_not_32) -
963 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_32));
964 tmp *= scaling_factor;
969 auto tmp = (in.get(C::keccakf1600_state_pi_not_33) -
970 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_33));
971 tmp *= scaling_factor;
976 auto tmp = (in.get(C::keccakf1600_state_pi_not_34) -
977 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_34));
978 tmp *= scaling_factor;
983 auto tmp = (in.get(C::keccakf1600_state_pi_not_40) -
984 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_40));
985 tmp *= scaling_factor;
990 auto tmp = (in.get(C::keccakf1600_state_pi_not_41) -
991 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_41));
992 tmp *= scaling_factor;
997 auto tmp = (in.get(C::keccakf1600_state_pi_not_42) -
998 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_42));
999 tmp *= scaling_factor;
1004 auto tmp = (in.get(C::keccakf1600_state_pi_not_43) -
1005 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_43));
1006 tmp *= scaling_factor;
1011 auto tmp = (in.get(C::keccakf1600_state_pi_not_44) -
1012 in.get(C::keccakf1600_sel_no_error) * (keccakf1600_POW_64_MIN_1 - keccakf1600_STATE_PI_44));
1013 tmp *= scaling_factor;
1018 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1019 (in.get(C::keccakf1600_state_in_00_shift) - in.get(C::keccakf1600_state_iota_00));
1020 tmp *= scaling_factor;
1025 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1026 (in.get(C::keccakf1600_state_in_01_shift) - in.get(C::keccakf1600_state_chi_01));
1027 tmp *= scaling_factor;
1032 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1033 (in.get(C::keccakf1600_state_in_02_shift) - in.get(C::keccakf1600_state_chi_02));
1034 tmp *= scaling_factor;
1039 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1040 (in.get(C::keccakf1600_state_in_03_shift) - in.get(C::keccakf1600_state_chi_03));
1041 tmp *= scaling_factor;
1046 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1047 (in.get(C::keccakf1600_state_in_04_shift) - in.get(C::keccakf1600_state_chi_04));
1048 tmp *= scaling_factor;
1053 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1054 (in.get(C::keccakf1600_state_in_10_shift) - in.get(C::keccakf1600_state_chi_10));
1055 tmp *= scaling_factor;
1060 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1061 (in.get(C::keccakf1600_state_in_11_shift) - in.get(C::keccakf1600_state_chi_11));
1062 tmp *= scaling_factor;
1067 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1068 (in.get(C::keccakf1600_state_in_12_shift) - in.get(C::keccakf1600_state_chi_12));
1069 tmp *= scaling_factor;
1074 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1075 (in.get(C::keccakf1600_state_in_13_shift) - in.get(C::keccakf1600_state_chi_13));
1076 tmp *= scaling_factor;
1081 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1082 (in.get(C::keccakf1600_state_in_14_shift) - in.get(C::keccakf1600_state_chi_14));
1083 tmp *= scaling_factor;
1088 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1089 (in.get(C::keccakf1600_state_in_20_shift) - in.get(C::keccakf1600_state_chi_20));
1090 tmp *= scaling_factor;
1095 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1096 (in.get(C::keccakf1600_state_in_21_shift) - in.get(C::keccakf1600_state_chi_21));
1097 tmp *= scaling_factor;
1102 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1103 (in.get(C::keccakf1600_state_in_22_shift) - in.get(C::keccakf1600_state_chi_22));
1104 tmp *= scaling_factor;
1109 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1110 (in.get(C::keccakf1600_state_in_23_shift) - in.get(C::keccakf1600_state_chi_23));
1111 tmp *= scaling_factor;
1116 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1117 (in.get(C::keccakf1600_state_in_24_shift) - in.get(C::keccakf1600_state_chi_24));
1118 tmp *= scaling_factor;
1123 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1124 (in.get(C::keccakf1600_state_in_30_shift) - in.get(C::keccakf1600_state_chi_30));
1125 tmp *= scaling_factor;
1130 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1131 (in.get(C::keccakf1600_state_in_31_shift) - in.get(C::keccakf1600_state_chi_31));
1132 tmp *= scaling_factor;
1137 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1138 (in.get(C::keccakf1600_state_in_32_shift) - in.get(C::keccakf1600_state_chi_32));
1139 tmp *= scaling_factor;
1144 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1145 (in.get(C::keccakf1600_state_in_33_shift) - in.get(C::keccakf1600_state_chi_33));
1146 tmp *= scaling_factor;
1151 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1152 (in.get(C::keccakf1600_state_in_34_shift) - in.get(C::keccakf1600_state_chi_34));
1153 tmp *= scaling_factor;
1158 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1159 (in.get(C::keccakf1600_state_in_40_shift) - in.get(C::keccakf1600_state_chi_40));
1160 tmp *= scaling_factor;
1165 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1166 (in.get(C::keccakf1600_state_in_41_shift) - in.get(C::keccakf1600_state_chi_41));
1167 tmp *= scaling_factor;
1172 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1173 (in.get(C::keccakf1600_state_in_42_shift) - in.get(C::keccakf1600_state_chi_42));
1174 tmp *= scaling_factor;
1179 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1180 (in.get(C::keccakf1600_state_in_43_shift) - in.get(C::keccakf1600_state_chi_43));
1181 tmp *= scaling_factor;
1186 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1187 (in.get(C::keccakf1600_state_in_44_shift) - in.get(C::keccakf1600_state_chi_44));
1188 tmp *= scaling_factor;
1194 in.get(C::keccakf1600_src_out_of_range_error) * (
FF(1) - in.get(C::keccakf1600_src_out_of_range_error));
1195 tmp *= scaling_factor;
1201 in.get(C::keccakf1600_dst_out_of_range_error) * (
FF(1) - in.get(C::keccakf1600_dst_out_of_range_error));
1202 tmp *= scaling_factor;
1208 (in.get(C::keccakf1600_src_abs_diff) -
1209 in.get(C::keccakf1600_start) * ((
FF(2) * in.get(C::keccakf1600_src_out_of_range_error) -
FF(1)) *
1210 (in.get(C::keccakf1600_src_addr) - keccakf1600_HIGHEST_SLICE_ADDRESS) -
1211 in.get(C::keccakf1600_src_out_of_range_error)));
1212 tmp *= scaling_factor;
1218 (in.get(C::keccakf1600_dst_abs_diff) -
1219 in.get(C::keccakf1600_start) * ((
FF(2) * in.get(C::keccakf1600_dst_out_of_range_error) -
FF(1)) *
1220 (in.get(C::keccakf1600_dst_addr) - keccakf1600_HIGHEST_SLICE_ADDRESS) -
1221 in.get(C::keccakf1600_dst_out_of_range_error)));
1222 tmp *= scaling_factor;
1227 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_thirty_two) -
FF(32));
1228 tmp *= scaling_factor;
1234 (in.get(C::keccakf1600_error) - (
FF(1) - (
FF(1) - in.get(C::keccakf1600_src_out_of_range_error)) *
1235 (
FF(1) - in.get(C::keccakf1600_dst_out_of_range_error)) *
1236 (
FF(1) - in.get(C::keccakf1600_tag_error))));
1237 tmp *= scaling_factor;
1242 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1243 (in.get(C::keccakf1600_dst_addr_shift) - in.get(C::keccakf1600_dst_addr));
1244 tmp *= scaling_factor;
1250 (
FF(1) - in.get(C::keccakf1600_last)) * (in.get(C::keccakf1600_clk_shift) - in.get(C::keccakf1600_clk));
1251 tmp *= scaling_factor;
1256 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1257 (in.get(C::keccakf1600_space_id_shift) - in.get(C::keccakf1600_space_id));
1258 tmp *= scaling_factor;
1263 auto tmp = (
FF(1) - in.get(C::keccakf1600_last)) *
1264 (in.get(C::keccakf1600_sel_no_error_shift) - in.get(C::keccakf1600_sel_no_error));
1265 tmp *= scaling_factor;
1270 auto tmp = (in.get(C::keccakf1600_sel_slice_read) -
1271 in.get(C::keccakf1600_start) * (
FF(1) - in.get(C::keccakf1600_src_out_of_range_error)) *
1272 (
FF(1) - in.get(C::keccakf1600_dst_out_of_range_error)));
1273 tmp *= scaling_factor;
1278 auto tmp = (in.get(C::keccakf1600_sel_slice_write) -
1279 in.get(C::keccakf1600_sel_no_error) * in.get(C::keccakf1600_last));
1280 tmp *= scaling_factor;