Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
keccakf1600_impl.hpp
Go to the documentation of this file.
1// AUTOGENERATED FILE
2#pragma once
3
5
6namespace bb::avm2 {
7
8template <typename FF_>
9template <typename ContainerOverSubrelations, typename AllEntities>
10void keccakf1600Impl<FF_>::accumulate(ContainerOverSubrelations& evals,
11 const AllEntities& in,
12 [[maybe_unused]] const RelationParameters<FF_>&,
13 [[maybe_unused]] const FF_& scaling_factor)
14{
15 using C = ColumnAndShifts;
16
17 PROFILE_THIS_NAME("accumulate/keccakf1600");
18
19 const auto constants_MEM_TAG_U64 = FF(5);
20 const auto constants_AVM_HIGHEST_MEM_ADDRESS = FF(4294967295UL);
21 const auto constants_AVM_BITWISE_AND_OP_ID = FF(0);
22 const auto constants_AVM_BITWISE_XOR_OP_ID = FF(2);
23 const auto constants_AVM_KECCAKF1600_STATE_SIZE = FF(25);
24 const auto keccakf1600_ROT_LEN_01 = FF(36);
25 const auto keccakf1600_POW_ROT_LEN_01 = FF(68719476736UL);
26 const auto keccakf1600_POW_ROT_64_MIN_LEN_01 = FF(268435456);
27 const auto keccakf1600_ROT_LEN_02 = FF(3);
28 const auto keccakf1600_POW_ROT_LEN_02 = FF(8);
29 const auto keccakf1600_POW_ROT_64_MIN_LEN_02 = FF(2305843009213693952UL);
30 const auto keccakf1600_ROT_LEN_03 = FF(41);
31 const auto keccakf1600_POW_ROT_LEN_03 = FF(2199023255552UL);
32 const auto keccakf1600_POW_ROT_64_MIN_LEN_03 = FF(8388608);
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);
125
126 {
127 using Accumulator = typename std::tuple_element_t<0, ContainerOverSubrelations>;
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);
131 }
132 { // SEL_NO_ERROR
133 using Accumulator = typename std::tuple_element_t<1, ContainerOverSubrelations>;
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);
138 }
139 {
140 using Accumulator = typename std::tuple_element_t<2, ContainerOverSubrelations>;
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);
144 }
145 {
146 using Accumulator = typename std::tuple_element_t<3, ContainerOverSubrelations>;
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);
150 }
151 { // KECCAK_SEL_ROUND_NON_ZERO
152 using Accumulator = typename std::tuple_element_t<4, ContainerOverSubrelations>;
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);
159 }
160 { // KECCAK_ROUND_INCREMENT
161 using Accumulator = typename std::tuple_element_t<5, ContainerOverSubrelations>;
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);
166 }
167 {
168 using Accumulator = typename std::tuple_element_t<6, ContainerOverSubrelations>;
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);
172 }
173 {
174 using Accumulator = typename std::tuple_element_t<7, ContainerOverSubrelations>;
175 auto 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);
179 }
180 {
181 using Accumulator = typename std::tuple_element_t<8, ContainerOverSubrelations>;
182 auto 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);
186 }
187 {
188 using Accumulator = typename std::tuple_element_t<9, ContainerOverSubrelations>;
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);
192 }
193 { // THETA_XOR_ROW_MSB_0_BOOLEAN
194 using Accumulator = typename std::tuple_element_t<10, ContainerOverSubrelations>;
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;
197 std::get<10>(evals) += typename Accumulator::View(tmp);
198 }
199 { // THETA_XOR_ROW_0_DECOMPOSITION
200 using Accumulator = typename std::tuple_element_t<11, ContainerOverSubrelations>;
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;
205 std::get<11>(evals) += typename Accumulator::View(tmp);
206 }
207 { // THETA_XOR_ROW_ROTL1_0
208 using Accumulator = typename std::tuple_element_t<12, ContainerOverSubrelations>;
209 auto tmp =
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;
213 std::get<12>(evals) += typename Accumulator::View(tmp);
214 }
215 { // THETA_XOR_ROW_MSB_1_BOOLEAN
216 using Accumulator = typename std::tuple_element_t<13, ContainerOverSubrelations>;
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;
219 std::get<13>(evals) += typename Accumulator::View(tmp);
220 }
221 { // THETA_XOR_ROW_1_DECOMPOSITION
222 using Accumulator = typename std::tuple_element_t<14, ContainerOverSubrelations>;
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;
227 std::get<14>(evals) += typename Accumulator::View(tmp);
228 }
229 { // THETA_XOR_ROW_ROTL1_1
230 using Accumulator = typename std::tuple_element_t<15, ContainerOverSubrelations>;
231 auto tmp =
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;
235 std::get<15>(evals) += typename Accumulator::View(tmp);
236 }
237 { // THETA_XOR_ROW_MSB_2_BOOLEAN
238 using Accumulator = typename std::tuple_element_t<16, ContainerOverSubrelations>;
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;
241 std::get<16>(evals) += typename Accumulator::View(tmp);
242 }
243 { // THETA_XOR_ROW_2_DECOMPOSITION
244 using Accumulator = typename std::tuple_element_t<17, ContainerOverSubrelations>;
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;
249 std::get<17>(evals) += typename Accumulator::View(tmp);
250 }
251 { // THETA_XOR_ROW_ROTL1_2
252 using Accumulator = typename std::tuple_element_t<18, ContainerOverSubrelations>;
253 auto tmp =
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;
257 std::get<18>(evals) += typename Accumulator::View(tmp);
258 }
259 { // THETA_XOR_ROW_MSB_3_BOOLEAN
260 using Accumulator = typename std::tuple_element_t<19, ContainerOverSubrelations>;
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;
263 std::get<19>(evals) += typename Accumulator::View(tmp);
264 }
265 { // THETA_XOR_ROW_3_DECOMPOSITION
266 using Accumulator = typename std::tuple_element_t<20, ContainerOverSubrelations>;
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;
271 std::get<20>(evals) += typename Accumulator::View(tmp);
272 }
273 { // THETA_XOR_ROW_ROTL1_3
274 using Accumulator = typename std::tuple_element_t<21, ContainerOverSubrelations>;
275 auto tmp =
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;
279 std::get<21>(evals) += typename Accumulator::View(tmp);
280 }
281 { // THETA_XOR_ROW_MSB_4_BOOLEAN
282 using Accumulator = typename std::tuple_element_t<22, ContainerOverSubrelations>;
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;
285 std::get<22>(evals) += typename Accumulator::View(tmp);
286 }
287 { // THETA_XOR_ROW_4_DECOMPOSITION
288 using Accumulator = typename std::tuple_element_t<23, ContainerOverSubrelations>;
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;
293 std::get<23>(evals) += typename Accumulator::View(tmp);
294 }
295 { // THETA_XOR_ROW_ROTL1_4
296 using Accumulator = typename std::tuple_element_t<24, ContainerOverSubrelations>;
297 auto tmp =
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;
301 std::get<24>(evals) += typename Accumulator::View(tmp);
302 }
303 { // STATE_THETA_01_DECOMPOSE
304 using Accumulator = typename std::tuple_element_t<25, ContainerOverSubrelations>;
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;
309 std::get<25>(evals) += typename Accumulator::View(tmp);
310 }
311 { // STATE_RHO_01
312 using Accumulator = typename std::tuple_element_t<26, ContainerOverSubrelations>;
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;
317 std::get<26>(evals) += typename Accumulator::View(tmp);
318 }
319 { // STATE_THETA_02_DECOMPOSE
320 using Accumulator = typename std::tuple_element_t<27, ContainerOverSubrelations>;
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;
325 std::get<27>(evals) += typename Accumulator::View(tmp);
326 }
327 { // STATE_RHO_02
328 using Accumulator = typename std::tuple_element_t<28, ContainerOverSubrelations>;
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;
333 std::get<28>(evals) += typename Accumulator::View(tmp);
334 }
335 { // STATE_THETA_03_DECOMPOSE
336 using Accumulator = typename std::tuple_element_t<29, ContainerOverSubrelations>;
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;
341 std::get<29>(evals) += typename Accumulator::View(tmp);
342 }
343 { // STATE_RHO_03
344 using Accumulator = typename std::tuple_element_t<30, ContainerOverSubrelations>;
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;
349 std::get<30>(evals) += typename Accumulator::View(tmp);
350 }
351 { // STATE_THETA_04_DECOMPOSE
352 using Accumulator = typename std::tuple_element_t<31, ContainerOverSubrelations>;
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;
357 std::get<31>(evals) += typename Accumulator::View(tmp);
358 }
359 { // STATE_RHO_04
360 using Accumulator = typename std::tuple_element_t<32, ContainerOverSubrelations>;
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;
365 std::get<32>(evals) += typename Accumulator::View(tmp);
366 }
367 { // STATE_THETA_10_DECOMPOSE
368 using Accumulator = typename std::tuple_element_t<33, ContainerOverSubrelations>;
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;
373 std::get<33>(evals) += typename Accumulator::View(tmp);
374 }
375 { // STATE_RHO_10
376 using Accumulator = typename std::tuple_element_t<34, ContainerOverSubrelations>;
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;
381 std::get<34>(evals) += typename Accumulator::View(tmp);
382 }
383 { // STATE_THETA_11_DECOMPOSE
384 using Accumulator = typename std::tuple_element_t<35, ContainerOverSubrelations>;
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;
389 std::get<35>(evals) += typename Accumulator::View(tmp);
390 }
391 { // STATE_RHO_11
392 using Accumulator = typename std::tuple_element_t<36, ContainerOverSubrelations>;
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;
397 std::get<36>(evals) += typename Accumulator::View(tmp);
398 }
399 { // STATE_THETA_12_DECOMPOSE
400 using Accumulator = typename std::tuple_element_t<37, ContainerOverSubrelations>;
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;
405 std::get<37>(evals) += typename Accumulator::View(tmp);
406 }
407 { // STATE_RHO_12
408 using Accumulator = typename std::tuple_element_t<38, ContainerOverSubrelations>;
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;
413 std::get<38>(evals) += typename Accumulator::View(tmp);
414 }
415 { // STATE_THETA_13_DECOMPOSE
416 using Accumulator = typename std::tuple_element_t<39, ContainerOverSubrelations>;
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;
421 std::get<39>(evals) += typename Accumulator::View(tmp);
422 }
423 { // STATE_RHO_13
424 using Accumulator = typename std::tuple_element_t<40, ContainerOverSubrelations>;
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;
429 std::get<40>(evals) += typename Accumulator::View(tmp);
430 }
431 { // STATE_THETA_14_DECOMPOSE
432 using Accumulator = typename std::tuple_element_t<41, ContainerOverSubrelations>;
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;
437 std::get<41>(evals) += typename Accumulator::View(tmp);
438 }
439 { // STATE_RHO_14
440 using Accumulator = typename std::tuple_element_t<42, ContainerOverSubrelations>;
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;
445 std::get<42>(evals) += typename Accumulator::View(tmp);
446 }
447 { // STATE_THETA_20_DECOMPOSE
448 using Accumulator = typename std::tuple_element_t<43, ContainerOverSubrelations>;
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;
453 std::get<43>(evals) += typename Accumulator::View(tmp);
454 }
455 { // STATE_RHO_20
456 using Accumulator = typename std::tuple_element_t<44, ContainerOverSubrelations>;
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;
461 std::get<44>(evals) += typename Accumulator::View(tmp);
462 }
463 { // STATE_THETA_21_DECOMPOSE
464 using Accumulator = typename std::tuple_element_t<45, ContainerOverSubrelations>;
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;
469 std::get<45>(evals) += typename Accumulator::View(tmp);
470 }
471 { // STATE_RHO_21
472 using Accumulator = typename std::tuple_element_t<46, ContainerOverSubrelations>;
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;
477 std::get<46>(evals) += typename Accumulator::View(tmp);
478 }
479 { // STATE_THETA_22_DECOMPOSE
480 using Accumulator = typename std::tuple_element_t<47, ContainerOverSubrelations>;
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;
485 std::get<47>(evals) += typename Accumulator::View(tmp);
486 }
487 { // STATE_RHO_22
488 using Accumulator = typename std::tuple_element_t<48, ContainerOverSubrelations>;
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;
493 std::get<48>(evals) += typename Accumulator::View(tmp);
494 }
495 { // STATE_THETA_23_DECOMPOSE
496 using Accumulator = typename std::tuple_element_t<49, ContainerOverSubrelations>;
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;
501 std::get<49>(evals) += typename Accumulator::View(tmp);
502 }
503 { // STATE_RHO_23
504 using Accumulator = typename std::tuple_element_t<50, ContainerOverSubrelations>;
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;
509 std::get<50>(evals) += typename Accumulator::View(tmp);
510 }
511 { // STATE_THETA_24_DECOMPOSE
512 using Accumulator = typename std::tuple_element_t<51, ContainerOverSubrelations>;
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;
517 std::get<51>(evals) += typename Accumulator::View(tmp);
518 }
519 { // STATE_RHO_24
520 using Accumulator = typename std::tuple_element_t<52, ContainerOverSubrelations>;
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;
525 std::get<52>(evals) += typename Accumulator::View(tmp);
526 }
527 { // STATE_THETA_30_DECOMPOSE
528 using Accumulator = typename std::tuple_element_t<53, ContainerOverSubrelations>;
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;
533 std::get<53>(evals) += typename Accumulator::View(tmp);
534 }
535 { // STATE_RHO_30
536 using Accumulator = typename std::tuple_element_t<54, ContainerOverSubrelations>;
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;
541 std::get<54>(evals) += typename Accumulator::View(tmp);
542 }
543 { // STATE_THETA_31_DECOMPOSE
544 using Accumulator = typename std::tuple_element_t<55, ContainerOverSubrelations>;
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;
549 std::get<55>(evals) += typename Accumulator::View(tmp);
550 }
551 { // STATE_RHO_31
552 using Accumulator = typename std::tuple_element_t<56, ContainerOverSubrelations>;
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;
557 std::get<56>(evals) += typename Accumulator::View(tmp);
558 }
559 { // STATE_THETA_32_DECOMPOSE
560 using Accumulator = typename std::tuple_element_t<57, ContainerOverSubrelations>;
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;
565 std::get<57>(evals) += typename Accumulator::View(tmp);
566 }
567 { // STATE_RHO_32
568 using Accumulator = typename std::tuple_element_t<58, ContainerOverSubrelations>;
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;
573 std::get<58>(evals) += typename Accumulator::View(tmp);
574 }
575 { // STATE_THETA_33_DECOMPOSE
576 using Accumulator = typename std::tuple_element_t<59, ContainerOverSubrelations>;
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;
581 std::get<59>(evals) += typename Accumulator::View(tmp);
582 }
583 { // STATE_RHO_33
584 using Accumulator = typename std::tuple_element_t<60, ContainerOverSubrelations>;
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;
589 std::get<60>(evals) += typename Accumulator::View(tmp);
590 }
591 { // STATE_THETA_34_DECOMPOSE
592 using Accumulator = typename std::tuple_element_t<61, ContainerOverSubrelations>;
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;
597 std::get<61>(evals) += typename Accumulator::View(tmp);
598 }
599 { // STATE_RHO_34
600 using Accumulator = typename std::tuple_element_t<62, ContainerOverSubrelations>;
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;
605 std::get<62>(evals) += typename Accumulator::View(tmp);
606 }
607 { // STATE_THETA_40_DECOMPOSE
608 using Accumulator = typename std::tuple_element_t<63, ContainerOverSubrelations>;
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;
613 std::get<63>(evals) += typename Accumulator::View(tmp);
614 }
615 { // STATE_RHO_40
616 using Accumulator = typename std::tuple_element_t<64, ContainerOverSubrelations>;
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;
621 std::get<64>(evals) += typename Accumulator::View(tmp);
622 }
623 { // STATE_THETA_41_DECOMPOSE
624 using Accumulator = typename std::tuple_element_t<65, ContainerOverSubrelations>;
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;
629 std::get<65>(evals) += typename Accumulator::View(tmp);
630 }
631 { // STATE_RHO_41
632 using Accumulator = typename std::tuple_element_t<66, ContainerOverSubrelations>;
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;
637 std::get<66>(evals) += typename Accumulator::View(tmp);
638 }
639 { // STATE_THETA_42_DECOMPOSE
640 using Accumulator = typename std::tuple_element_t<67, ContainerOverSubrelations>;
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;
645 std::get<67>(evals) += typename Accumulator::View(tmp);
646 }
647 { // STATE_RHO_42
648 using Accumulator = typename std::tuple_element_t<68, ContainerOverSubrelations>;
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;
653 std::get<68>(evals) += typename Accumulator::View(tmp);
654 }
655 { // STATE_THETA_43_DECOMPOSE
656 using Accumulator = typename std::tuple_element_t<69, ContainerOverSubrelations>;
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;
661 std::get<69>(evals) += typename Accumulator::View(tmp);
662 }
663 { // STATE_RHO_43
664 using Accumulator = typename std::tuple_element_t<70, ContainerOverSubrelations>;
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;
669 std::get<70>(evals) += typename Accumulator::View(tmp);
670 }
671 { // STATE_THETA_44_DECOMPOSE
672 using Accumulator = typename std::tuple_element_t<71, ContainerOverSubrelations>;
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;
677 std::get<71>(evals) += typename Accumulator::View(tmp);
678 }
679 { // STATE_RHO_44
680 using Accumulator = typename std::tuple_element_t<72, ContainerOverSubrelations>;
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;
685 std::get<72>(evals) += typename Accumulator::View(tmp);
686 }
687 {
688 using Accumulator = typename std::tuple_element_t<73, ContainerOverSubrelations>;
689 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_02) - keccakf1600_ROT_LEN_02);
690 tmp *= scaling_factor;
691 std::get<73>(evals) += typename Accumulator::View(tmp);
692 }
693 {
694 using Accumulator = typename std::tuple_element_t<74, ContainerOverSubrelations>;
695 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_04) - keccakf1600_ROT_LEN_04);
696 tmp *= scaling_factor;
697 std::get<74>(evals) += typename Accumulator::View(tmp);
698 }
699 {
700 using Accumulator = typename std::tuple_element_t<75, ContainerOverSubrelations>;
701 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_10) - keccakf1600_ROT_LEN_10);
702 tmp *= scaling_factor;
703 std::get<75>(evals) += typename Accumulator::View(tmp);
704 }
705 {
706 using Accumulator = typename std::tuple_element_t<76, ContainerOverSubrelations>;
707 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_12) - keccakf1600_ROT_LEN_12);
708 tmp *= scaling_factor;
709 std::get<76>(evals) += typename Accumulator::View(tmp);
710 }
711 {
712 using Accumulator = typename std::tuple_element_t<77, ContainerOverSubrelations>;
713 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_14) - keccakf1600_ROT_LEN_14);
714 tmp *= scaling_factor;
715 std::get<77>(evals) += typename Accumulator::View(tmp);
716 }
717 {
718 using Accumulator = typename std::tuple_element_t<78, ContainerOverSubrelations>;
719 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_21) - keccakf1600_ROT_LEN_21);
720 tmp *= scaling_factor;
721 std::get<78>(evals) += typename Accumulator::View(tmp);
722 }
723 {
724 using Accumulator = typename std::tuple_element_t<79, ContainerOverSubrelations>;
725 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_23) - keccakf1600_ROT_LEN_23);
726 tmp *= scaling_factor;
727 std::get<79>(evals) += typename Accumulator::View(tmp);
728 }
729 {
730 using Accumulator = typename std::tuple_element_t<80, ContainerOverSubrelations>;
731 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_30) - keccakf1600_ROT_LEN_30);
732 tmp *= scaling_factor;
733 std::get<80>(evals) += typename Accumulator::View(tmp);
734 }
735 {
736 using Accumulator = typename std::tuple_element_t<81, ContainerOverSubrelations>;
737 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_32) - keccakf1600_ROT_LEN_32);
738 tmp *= scaling_factor;
739 std::get<81>(evals) += typename Accumulator::View(tmp);
740 }
741 {
742 using Accumulator = typename std::tuple_element_t<82, ContainerOverSubrelations>;
743 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_33) - keccakf1600_ROT_LEN_33);
744 tmp *= scaling_factor;
745 std::get<82>(evals) += typename Accumulator::View(tmp);
746 }
747 {
748 using Accumulator = typename std::tuple_element_t<83, ContainerOverSubrelations>;
749 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_40) - keccakf1600_ROT_LEN_40);
750 tmp *= scaling_factor;
751 std::get<83>(evals) += typename Accumulator::View(tmp);
752 }
753 {
754 using Accumulator = typename std::tuple_element_t<84, ContainerOverSubrelations>;
755 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_41) - keccakf1600_ROT_LEN_41);
756 tmp *= scaling_factor;
757 std::get<84>(evals) += typename Accumulator::View(tmp);
758 }
759 {
760 using Accumulator = typename std::tuple_element_t<85, ContainerOverSubrelations>;
761 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_43) - keccakf1600_ROT_LEN_43);
762 tmp *= scaling_factor;
763 std::get<85>(evals) += typename Accumulator::View(tmp);
764 }
765 {
766 using Accumulator = typename std::tuple_element_t<86, ContainerOverSubrelations>;
767 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_rot_len_44) - keccakf1600_ROT_LEN_44);
768 tmp *= scaling_factor;
769 std::get<86>(evals) += typename Accumulator::View(tmp);
770 }
771 {
772 using Accumulator = typename std::tuple_element_t<87, ContainerOverSubrelations>;
773 auto tmp =
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;
776 std::get<87>(evals) += typename Accumulator::View(tmp);
777 }
778 {
779 using Accumulator = typename std::tuple_element_t<88, ContainerOverSubrelations>;
780 auto tmp =
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;
783 std::get<88>(evals) += typename Accumulator::View(tmp);
784 }
785 {
786 using Accumulator = typename std::tuple_element_t<89, ContainerOverSubrelations>;
787 auto tmp =
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;
790 std::get<89>(evals) += typename Accumulator::View(tmp);
791 }
792 {
793 using Accumulator = typename std::tuple_element_t<90, ContainerOverSubrelations>;
794 auto tmp =
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;
797 std::get<90>(evals) += typename Accumulator::View(tmp);
798 }
799 {
800 using Accumulator = typename std::tuple_element_t<91, ContainerOverSubrelations>;
801 auto tmp =
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;
804 std::get<91>(evals) += typename Accumulator::View(tmp);
805 }
806 {
807 using Accumulator = typename std::tuple_element_t<92, ContainerOverSubrelations>;
808 auto tmp =
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;
811 std::get<92>(evals) += typename Accumulator::View(tmp);
812 }
813 {
814 using Accumulator = typename std::tuple_element_t<93, ContainerOverSubrelations>;
815 auto tmp =
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;
818 std::get<93>(evals) += typename Accumulator::View(tmp);
819 }
820 {
821 using Accumulator = typename std::tuple_element_t<94, ContainerOverSubrelations>;
822 auto tmp =
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;
825 std::get<94>(evals) += typename Accumulator::View(tmp);
826 }
827 {
828 using Accumulator = typename std::tuple_element_t<95, ContainerOverSubrelations>;
829 auto tmp =
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;
832 std::get<95>(evals) += typename Accumulator::View(tmp);
833 }
834 {
835 using Accumulator = typename std::tuple_element_t<96, ContainerOverSubrelations>;
836 auto tmp =
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;
839 std::get<96>(evals) += typename Accumulator::View(tmp);
840 }
841 { // STATE_PI_NOT_00
842 using Accumulator = typename std::tuple_element_t<97, ContainerOverSubrelations>;
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;
846 std::get<97>(evals) += typename Accumulator::View(tmp);
847 }
848 { // STATE_PI_NOT_01
849 using Accumulator = typename std::tuple_element_t<98, ContainerOverSubrelations>;
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;
853 std::get<98>(evals) += typename Accumulator::View(tmp);
854 }
855 { // STATE_PI_NOT_02
856 using Accumulator = typename std::tuple_element_t<99, ContainerOverSubrelations>;
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;
860 std::get<99>(evals) += typename Accumulator::View(tmp);
861 }
862 { // STATE_PI_NOT_03
863 using Accumulator = typename std::tuple_element_t<100, ContainerOverSubrelations>;
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;
867 std::get<100>(evals) += typename Accumulator::View(tmp);
868 }
869 { // STATE_PI_NOT_04
870 using Accumulator = typename std::tuple_element_t<101, ContainerOverSubrelations>;
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;
874 std::get<101>(evals) += typename Accumulator::View(tmp);
875 }
876 { // STATE_PI_NOT_10
877 using Accumulator = typename std::tuple_element_t<102, ContainerOverSubrelations>;
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;
881 std::get<102>(evals) += typename Accumulator::View(tmp);
882 }
883 { // STATE_PI_NOT_11
884 using Accumulator = typename std::tuple_element_t<103, ContainerOverSubrelations>;
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;
888 std::get<103>(evals) += typename Accumulator::View(tmp);
889 }
890 { // STATE_PI_NOT_12
891 using Accumulator = typename std::tuple_element_t<104, ContainerOverSubrelations>;
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;
895 std::get<104>(evals) += typename Accumulator::View(tmp);
896 }
897 { // STATE_PI_NOT_13
898 using Accumulator = typename std::tuple_element_t<105, ContainerOverSubrelations>;
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;
902 std::get<105>(evals) += typename Accumulator::View(tmp);
903 }
904 { // STATE_PI_NOT_14
905 using Accumulator = typename std::tuple_element_t<106, ContainerOverSubrelations>;
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;
909 std::get<106>(evals) += typename Accumulator::View(tmp);
910 }
911 { // STATE_PI_NOT_20
912 using Accumulator = typename std::tuple_element_t<107, ContainerOverSubrelations>;
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;
916 std::get<107>(evals) += typename Accumulator::View(tmp);
917 }
918 { // STATE_PI_NOT_21
919 using Accumulator = typename std::tuple_element_t<108, ContainerOverSubrelations>;
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;
923 std::get<108>(evals) += typename Accumulator::View(tmp);
924 }
925 { // STATE_PI_NOT_22
926 using Accumulator = typename std::tuple_element_t<109, ContainerOverSubrelations>;
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;
930 std::get<109>(evals) += typename Accumulator::View(tmp);
931 }
932 { // STATE_PI_NOT_23
933 using Accumulator = typename std::tuple_element_t<110, ContainerOverSubrelations>;
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;
937 std::get<110>(evals) += typename Accumulator::View(tmp);
938 }
939 { // STATE_PI_NOT_24
940 using Accumulator = typename std::tuple_element_t<111, ContainerOverSubrelations>;
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;
944 std::get<111>(evals) += typename Accumulator::View(tmp);
945 }
946 { // STATE_PI_NOT_30
947 using Accumulator = typename std::tuple_element_t<112, ContainerOverSubrelations>;
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;
951 std::get<112>(evals) += typename Accumulator::View(tmp);
952 }
953 { // STATE_PI_NOT_31
954 using Accumulator = typename std::tuple_element_t<113, ContainerOverSubrelations>;
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;
958 std::get<113>(evals) += typename Accumulator::View(tmp);
959 }
960 { // STATE_PI_NOT_32
961 using Accumulator = typename std::tuple_element_t<114, ContainerOverSubrelations>;
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;
965 std::get<114>(evals) += typename Accumulator::View(tmp);
966 }
967 { // STATE_PI_NOT_33
968 using Accumulator = typename std::tuple_element_t<115, ContainerOverSubrelations>;
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;
972 std::get<115>(evals) += typename Accumulator::View(tmp);
973 }
974 { // STATE_PI_NOT_34
975 using Accumulator = typename std::tuple_element_t<116, ContainerOverSubrelations>;
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;
979 std::get<116>(evals) += typename Accumulator::View(tmp);
980 }
981 { // STATE_PI_NOT_40
982 using Accumulator = typename std::tuple_element_t<117, ContainerOverSubrelations>;
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;
986 std::get<117>(evals) += typename Accumulator::View(tmp);
987 }
988 { // STATE_PI_NOT_41
989 using Accumulator = typename std::tuple_element_t<118, ContainerOverSubrelations>;
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;
993 std::get<118>(evals) += typename Accumulator::View(tmp);
994 }
995 { // STATE_PI_NOT_42
996 using Accumulator = typename std::tuple_element_t<119, ContainerOverSubrelations>;
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;
1000 std::get<119>(evals) += typename Accumulator::View(tmp);
1001 }
1002 { // STATE_PI_NOT_43
1003 using Accumulator = typename std::tuple_element_t<120, ContainerOverSubrelations>;
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;
1007 std::get<120>(evals) += typename Accumulator::View(tmp);
1008 }
1009 { // STATE_PI_NOT_44
1010 using Accumulator = typename std::tuple_element_t<121, ContainerOverSubrelations>;
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;
1014 std::get<121>(evals) += typename Accumulator::View(tmp);
1015 }
1016 { // NEXT_STATE_IN_00
1017 using Accumulator = typename std::tuple_element_t<122, ContainerOverSubrelations>;
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;
1021 std::get<122>(evals) += typename Accumulator::View(tmp);
1022 }
1023 { // NEXT_STATE_IN_01
1024 using Accumulator = typename std::tuple_element_t<123, ContainerOverSubrelations>;
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;
1028 std::get<123>(evals) += typename Accumulator::View(tmp);
1029 }
1030 { // NEXT_STATE_IN_02
1031 using Accumulator = typename std::tuple_element_t<124, ContainerOverSubrelations>;
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;
1035 std::get<124>(evals) += typename Accumulator::View(tmp);
1036 }
1037 { // NEXT_STATE_IN_03
1038 using Accumulator = typename std::tuple_element_t<125, ContainerOverSubrelations>;
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;
1042 std::get<125>(evals) += typename Accumulator::View(tmp);
1043 }
1044 { // NEXT_STATE_IN_04
1045 using Accumulator = typename std::tuple_element_t<126, ContainerOverSubrelations>;
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;
1049 std::get<126>(evals) += typename Accumulator::View(tmp);
1050 }
1051 { // NEXT_STATE_IN_10
1052 using Accumulator = typename std::tuple_element_t<127, ContainerOverSubrelations>;
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;
1056 std::get<127>(evals) += typename Accumulator::View(tmp);
1057 }
1058 { // NEXT_STATE_IN_11
1059 using Accumulator = typename std::tuple_element_t<128, ContainerOverSubrelations>;
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;
1063 std::get<128>(evals) += typename Accumulator::View(tmp);
1064 }
1065 { // NEXT_STATE_IN_12
1066 using Accumulator = typename std::tuple_element_t<129, ContainerOverSubrelations>;
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;
1070 std::get<129>(evals) += typename Accumulator::View(tmp);
1071 }
1072 { // NEXT_STATE_IN_13
1073 using Accumulator = typename std::tuple_element_t<130, ContainerOverSubrelations>;
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;
1077 std::get<130>(evals) += typename Accumulator::View(tmp);
1078 }
1079 { // NEXT_STATE_IN_14
1080 using Accumulator = typename std::tuple_element_t<131, ContainerOverSubrelations>;
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;
1084 std::get<131>(evals) += typename Accumulator::View(tmp);
1085 }
1086 { // NEXT_STATE_IN_20
1087 using Accumulator = typename std::tuple_element_t<132, ContainerOverSubrelations>;
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;
1091 std::get<132>(evals) += typename Accumulator::View(tmp);
1092 }
1093 { // NEXT_STATE_IN_21
1094 using Accumulator = typename std::tuple_element_t<133, ContainerOverSubrelations>;
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;
1098 std::get<133>(evals) += typename Accumulator::View(tmp);
1099 }
1100 { // NEXT_STATE_IN_22
1101 using Accumulator = typename std::tuple_element_t<134, ContainerOverSubrelations>;
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;
1105 std::get<134>(evals) += typename Accumulator::View(tmp);
1106 }
1107 { // NEXT_STATE_IN_23
1108 using Accumulator = typename std::tuple_element_t<135, ContainerOverSubrelations>;
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;
1112 std::get<135>(evals) += typename Accumulator::View(tmp);
1113 }
1114 { // NEXT_STATE_IN_24
1115 using Accumulator = typename std::tuple_element_t<136, ContainerOverSubrelations>;
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;
1119 std::get<136>(evals) += typename Accumulator::View(tmp);
1120 }
1121 { // NEXT_STATE_IN_30
1122 using Accumulator = typename std::tuple_element_t<137, ContainerOverSubrelations>;
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;
1126 std::get<137>(evals) += typename Accumulator::View(tmp);
1127 }
1128 { // NEXT_STATE_IN_31
1129 using Accumulator = typename std::tuple_element_t<138, ContainerOverSubrelations>;
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;
1133 std::get<138>(evals) += typename Accumulator::View(tmp);
1134 }
1135 { // NEXT_STATE_IN_32
1136 using Accumulator = typename std::tuple_element_t<139, ContainerOverSubrelations>;
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;
1140 std::get<139>(evals) += typename Accumulator::View(tmp);
1141 }
1142 { // NEXT_STATE_IN_33
1143 using Accumulator = typename std::tuple_element_t<140, ContainerOverSubrelations>;
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;
1147 std::get<140>(evals) += typename Accumulator::View(tmp);
1148 }
1149 { // NEXT_STATE_IN_34
1150 using Accumulator = typename std::tuple_element_t<141, ContainerOverSubrelations>;
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;
1154 std::get<141>(evals) += typename Accumulator::View(tmp);
1155 }
1156 { // NEXT_STATE_IN_40
1157 using Accumulator = typename std::tuple_element_t<142, ContainerOverSubrelations>;
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;
1161 std::get<142>(evals) += typename Accumulator::View(tmp);
1162 }
1163 { // NEXT_STATE_IN_41
1164 using Accumulator = typename std::tuple_element_t<143, ContainerOverSubrelations>;
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;
1168 std::get<143>(evals) += typename Accumulator::View(tmp);
1169 }
1170 { // NEXT_STATE_IN_42
1171 using Accumulator = typename std::tuple_element_t<144, ContainerOverSubrelations>;
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;
1175 std::get<144>(evals) += typename Accumulator::View(tmp);
1176 }
1177 { // NEXT_STATE_IN_43
1178 using Accumulator = typename std::tuple_element_t<145, ContainerOverSubrelations>;
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;
1182 std::get<145>(evals) += typename Accumulator::View(tmp);
1183 }
1184 { // NEXT_STATE_IN_44
1185 using Accumulator = typename std::tuple_element_t<146, ContainerOverSubrelations>;
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;
1189 std::get<146>(evals) += typename Accumulator::View(tmp);
1190 }
1191 { // SRC_OUT_OF_RANGE_ERROR_BOOLEAN
1192 using Accumulator = typename std::tuple_element_t<147, ContainerOverSubrelations>;
1193 auto tmp =
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;
1196 std::get<147>(evals) += typename Accumulator::View(tmp);
1197 }
1198 { // DST_OUT_OF_RANGE_ERROR_BOOLEAN
1199 using Accumulator = typename std::tuple_element_t<148, ContainerOverSubrelations>;
1200 auto tmp =
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;
1203 std::get<148>(evals) += typename Accumulator::View(tmp);
1204 }
1205 { // SRC_OUT_OF_RANGE_TOGGLE
1206 using Accumulator = typename std::tuple_element_t<149, ContainerOverSubrelations>;
1207 auto tmp =
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;
1213 std::get<149>(evals) += typename Accumulator::View(tmp);
1214 }
1215 { // DST_OUT_OF_RANGE_TOGGLE
1216 using Accumulator = typename std::tuple_element_t<150, ContainerOverSubrelations>;
1217 auto tmp =
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;
1223 std::get<150>(evals) += typename Accumulator::View(tmp);
1224 }
1225 {
1226 using Accumulator = typename std::tuple_element_t<151, ContainerOverSubrelations>;
1227 auto tmp = in.get(C::keccakf1600_sel) * (in.get(C::keccakf1600_thirty_two) - FF(32));
1228 tmp *= scaling_factor;
1229 std::get<151>(evals) += typename Accumulator::View(tmp);
1230 }
1231 { // ERROR
1232 using Accumulator = typename std::tuple_element_t<152, ContainerOverSubrelations>;
1233 auto tmp =
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;
1238 std::get<152>(evals) += typename Accumulator::View(tmp);
1239 }
1240 { // DST_ADDR_PROPAGATION
1241 using Accumulator = typename std::tuple_element_t<153, ContainerOverSubrelations>;
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;
1245 std::get<153>(evals) += typename Accumulator::View(tmp);
1246 }
1247 { // CLK_PROPAGATION
1248 using Accumulator = typename std::tuple_element_t<154, ContainerOverSubrelations>;
1249 auto tmp =
1250 (FF(1) - in.get(C::keccakf1600_last)) * (in.get(C::keccakf1600_clk_shift) - in.get(C::keccakf1600_clk));
1251 tmp *= scaling_factor;
1252 std::get<154>(evals) += typename Accumulator::View(tmp);
1253 }
1254 { // SPACE_ID_PROPAGATION
1255 using Accumulator = typename std::tuple_element_t<155, ContainerOverSubrelations>;
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;
1259 std::get<155>(evals) += typename Accumulator::View(tmp);
1260 }
1261 { // SEL_NO_ERROR_PROPAGATION
1262 using Accumulator = typename std::tuple_element_t<156, ContainerOverSubrelations>;
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;
1266 std::get<156>(evals) += typename Accumulator::View(tmp);
1267 }
1268 { // SEL_SLICE_READ
1269 using Accumulator = typename std::tuple_element_t<157, ContainerOverSubrelations>;
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;
1274 std::get<157>(evals) += typename Accumulator::View(tmp);
1275 }
1276 { // SEL_SLICE_WRITE
1277 using Accumulator = typename std::tuple_element_t<158, ContainerOverSubrelations>;
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;
1281 std::get<158>(evals) += typename Accumulator::View(tmp);
1282 }
1283}
1284
1285} // namespace bb::avm2
static void accumulate(ContainerOverSubrelations &evals, const AllEntities &in, const RelationParameters< FF > &, const FF &scaling_factor)
ColumnAndShifts
Definition columns.hpp:35
AvmFlavorSettings::FF FF
Definition field.hpp:10
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
#define PROFILE_THIS_NAME(name)
Definition op_count.hpp:16
Container for parameters used by the grand product (permutation, lookup) Honk relations.