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
6
7namespace bb::avm2 {
8
9template <typename FF_>
10template <typename ContainerOverSubrelations, typename AllEntities>
11void keccakf1600Impl<FF_>::accumulate(ContainerOverSubrelations& evals,
12 const AllEntities& in,
13 [[maybe_unused]] const RelationParameters<FF_>&,
14 [[maybe_unused]] const FF_& scaling_factor)
15{
16 using C = ColumnAndShifts;
17
18 const auto constants_MEM_TAG_U64 = FF(5);
19 const auto constants_AVM_HIGHEST_MEM_ADDRESS = FF(4294967295UL);
20 const auto constants_AVM_BITWISE_AND_OP_ID = FF(0);
21 const auto constants_AVM_BITWISE_XOR_OP_ID = FF(2);
22 const auto constants_AVM_KECCAKF1600_STATE_SIZE = FF(25);
23 const auto keccakf1600_LATCH_CONDITION = in.get(C::keccakf1600_last) + in.get(C::precomputed_first_row);
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 View = typename std::tuple_element_t<0, ContainerOverSubrelations>::View;
128 auto tmp =
129 static_cast<View>(in.get(C::keccakf1600_sel)) * (FF(1) - static_cast<View>(in.get(C::keccakf1600_sel)));
130 std::get<0>(evals) += (tmp * scaling_factor);
131 }
132 { // TRACE_CONTINUITY
133 using View = typename std::tuple_element_t<1, ContainerOverSubrelations>::View;
134 auto tmp = (FF(1) - static_cast<View>(in.get(C::precomputed_first_row))) *
135 (FF(1) - static_cast<View>(in.get(C::keccakf1600_sel))) *
136 static_cast<View>(in.get(C::keccakf1600_sel_shift));
137 std::get<1>(evals) += (tmp * scaling_factor);
138 }
139 { // SEL_NO_ERROR
140 using View = typename std::tuple_element_t<2, ContainerOverSubrelations>::View;
141 auto tmp = static_cast<View>(in.get(C::keccakf1600_sel)) *
142 ((static_cast<View>(in.get(C::keccakf1600_sel_no_error)) - FF(1)) +
143 static_cast<View>(in.get(C::keccakf1600_error)));
144 std::get<2>(evals) += (tmp * scaling_factor);
145 }
146 {
147 using View = typename std::tuple_element_t<3, ContainerOverSubrelations>::View;
148 auto tmp =
149 static_cast<View>(in.get(C::keccakf1600_start)) * (FF(1) - static_cast<View>(in.get(C::keccakf1600_start)));
150 std::get<3>(evals) += (tmp * scaling_factor);
151 }
152 {
153 using View = typename std::tuple_element_t<4, ContainerOverSubrelations>::View;
154 auto tmp =
155 static_cast<View>(in.get(C::keccakf1600_start)) * (static_cast<View>(in.get(C::keccakf1600_round)) - FF(1));
156 std::get<4>(evals) += (tmp * scaling_factor);
157 }
158 { // KECCAK_SEL_ROUND_NON_ZERO
159 using View = typename std::tuple_element_t<5, ContainerOverSubrelations>::View;
160 auto tmp = (static_cast<View>(in.get(C::keccakf1600_round)) *
161 ((FF(1) - static_cast<View>(in.get(C::keccakf1600_sel))) *
162 (FF(1) - static_cast<View>(in.get(C::keccakf1600_round_inv))) +
163 static_cast<View>(in.get(C::keccakf1600_round_inv))) -
164 static_cast<View>(in.get(C::keccakf1600_sel)));
165 std::get<5>(evals) += (tmp * scaling_factor);
166 }
167 {
168 using View = typename std::tuple_element_t<6, ContainerOverSubrelations>::View;
169 auto tmp =
170 static_cast<View>(in.get(C::keccakf1600_last)) * (FF(1) - static_cast<View>(in.get(C::keccakf1600_last)));
171 std::get<6>(evals) += (tmp * scaling_factor);
172 }
173 { // LAST_ON_ERROR
174 using View = typename std::tuple_element_t<7, ContainerOverSubrelations>::View;
175 auto tmp =
176 static_cast<View>(in.get(C::keccakf1600_error)) * (static_cast<View>(in.get(C::keccakf1600_last)) - FF(1));
177 std::get<7>(evals) += (tmp * scaling_factor);
178 }
179 { // START_AFTER_LATCH
180 using View = typename std::tuple_element_t<8, ContainerOverSubrelations>::View;
181 auto tmp = static_cast<View>(in.get(C::keccakf1600_sel_shift)) *
182 (static_cast<View>(in.get(C::keccakf1600_start_shift)) - CView(keccakf1600_LATCH_CONDITION));
183 std::get<8>(evals) += (tmp * scaling_factor);
184 }
185 { // LAST_HAS_SEL_ON
186 using View = typename std::tuple_element_t<9, ContainerOverSubrelations>::View;
187 auto tmp =
188 static_cast<View>(in.get(C::keccakf1600_last)) * (FF(1) - static_cast<View>(in.get(C::keccakf1600_sel)));
189 std::get<9>(evals) += (tmp * scaling_factor);
190 }
191 { // KECCAK_ROUND_INCREMENT
192 using View = typename std::tuple_element_t<10, ContainerOverSubrelations>::View;
193 auto tmp =
194 static_cast<View>(in.get(C::keccakf1600_sel)) * (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
195 ((static_cast<View>(in.get(C::keccakf1600_round_shift)) - static_cast<View>(in.get(C::keccakf1600_round))) -
196 FF(1));
197 std::get<10>(evals) += (tmp * scaling_factor);
198 }
199 {
200 using View = typename std::tuple_element_t<11, ContainerOverSubrelations>::View;
201 auto tmp =
202 static_cast<View>(in.get(C::keccakf1600_sel)) *
203 (static_cast<View>(in.get(C::keccakf1600_bitwise_xor_op_id)) - CView(constants_AVM_BITWISE_XOR_OP_ID));
204 std::get<11>(evals) += (tmp * scaling_factor);
205 }
206 {
207 using View = typename std::tuple_element_t<12, ContainerOverSubrelations>::View;
208 auto tmp =
209 static_cast<View>(in.get(C::keccakf1600_sel)) *
210 (static_cast<View>(in.get(C::keccakf1600_bitwise_and_op_id)) - CView(constants_AVM_BITWISE_AND_OP_ID));
211 std::get<12>(evals) += (tmp * scaling_factor);
212 }
213 {
214 using View = typename std::tuple_element_t<13, ContainerOverSubrelations>::View;
215 auto tmp = static_cast<View>(in.get(C::keccakf1600_sel)) *
216 (static_cast<View>(in.get(C::keccakf1600_tag_u64)) - CView(constants_MEM_TAG_U64));
217 std::get<13>(evals) += (tmp * scaling_factor);
218 }
219 { // THETA_XOR_ROW_MSB_0_BOOLEAN
220 using View = typename std::tuple_element_t<14, ContainerOverSubrelations>::View;
221 auto tmp = static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_0)) *
222 (FF(1) - static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_0)));
223 std::get<14>(evals) += (tmp * scaling_factor);
224 }
225 { // THETA_XOR_ROW_0_DECOMPOSITION
226 using View = typename std::tuple_element_t<15, ContainerOverSubrelations>::View;
227 auto tmp = (static_cast<View>(in.get(C::keccakf1600_theta_xor_row_0)) -
228 (FF(uint256_t{ 9223372036854775808UL, 0UL, 0UL, 0UL }) *
229 static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_0)) +
230 static_cast<View>(in.get(C::keccakf1600_theta_xor_row_low63_0))));
231 std::get<15>(evals) += (tmp * scaling_factor);
232 }
233 { // THETA_XOR_ROW_ROTL1_0
234 using View = typename std::tuple_element_t<16, ContainerOverSubrelations>::View;
235 auto tmp = (static_cast<View>(in.get(C::keccakf1600_theta_xor_row_rotl1_0)) -
236 (FF(2) * static_cast<View>(in.get(C::keccakf1600_theta_xor_row_low63_0)) +
237 static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_0))));
238 std::get<16>(evals) += (tmp * scaling_factor);
239 }
240 { // THETA_XOR_ROW_MSB_1_BOOLEAN
241 using View = typename std::tuple_element_t<17, ContainerOverSubrelations>::View;
242 auto tmp = static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_1)) *
243 (FF(1) - static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_1)));
244 std::get<17>(evals) += (tmp * scaling_factor);
245 }
246 { // THETA_XOR_ROW_1_DECOMPOSITION
247 using View = typename std::tuple_element_t<18, ContainerOverSubrelations>::View;
248 auto tmp = (static_cast<View>(in.get(C::keccakf1600_theta_xor_row_1)) -
249 (FF(uint256_t{ 9223372036854775808UL, 0UL, 0UL, 0UL }) *
250 static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_1)) +
251 static_cast<View>(in.get(C::keccakf1600_theta_xor_row_low63_1))));
252 std::get<18>(evals) += (tmp * scaling_factor);
253 }
254 { // THETA_XOR_ROW_ROTL1_1
255 using View = typename std::tuple_element_t<19, ContainerOverSubrelations>::View;
256 auto tmp = (static_cast<View>(in.get(C::keccakf1600_theta_xor_row_rotl1_1)) -
257 (FF(2) * static_cast<View>(in.get(C::keccakf1600_theta_xor_row_low63_1)) +
258 static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_1))));
259 std::get<19>(evals) += (tmp * scaling_factor);
260 }
261 { // THETA_XOR_ROW_MSB_2_BOOLEAN
262 using View = typename std::tuple_element_t<20, ContainerOverSubrelations>::View;
263 auto tmp = static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_2)) *
264 (FF(1) - static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_2)));
265 std::get<20>(evals) += (tmp * scaling_factor);
266 }
267 { // THETA_XOR_ROW_2_DECOMPOSITION
268 using View = typename std::tuple_element_t<21, ContainerOverSubrelations>::View;
269 auto tmp = (static_cast<View>(in.get(C::keccakf1600_theta_xor_row_2)) -
270 (FF(uint256_t{ 9223372036854775808UL, 0UL, 0UL, 0UL }) *
271 static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_2)) +
272 static_cast<View>(in.get(C::keccakf1600_theta_xor_row_low63_2))));
273 std::get<21>(evals) += (tmp * scaling_factor);
274 }
275 { // THETA_XOR_ROW_ROTL1_2
276 using View = typename std::tuple_element_t<22, ContainerOverSubrelations>::View;
277 auto tmp = (static_cast<View>(in.get(C::keccakf1600_theta_xor_row_rotl1_2)) -
278 (FF(2) * static_cast<View>(in.get(C::keccakf1600_theta_xor_row_low63_2)) +
279 static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_2))));
280 std::get<22>(evals) += (tmp * scaling_factor);
281 }
282 { // THETA_XOR_ROW_MSB_3_BOOLEAN
283 using View = typename std::tuple_element_t<23, ContainerOverSubrelations>::View;
284 auto tmp = static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_3)) *
285 (FF(1) - static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_3)));
286 std::get<23>(evals) += (tmp * scaling_factor);
287 }
288 { // THETA_XOR_ROW_3_DECOMPOSITION
289 using View = typename std::tuple_element_t<24, ContainerOverSubrelations>::View;
290 auto tmp = (static_cast<View>(in.get(C::keccakf1600_theta_xor_row_3)) -
291 (FF(uint256_t{ 9223372036854775808UL, 0UL, 0UL, 0UL }) *
292 static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_3)) +
293 static_cast<View>(in.get(C::keccakf1600_theta_xor_row_low63_3))));
294 std::get<24>(evals) += (tmp * scaling_factor);
295 }
296 { // THETA_XOR_ROW_ROTL1_3
297 using View = typename std::tuple_element_t<25, ContainerOverSubrelations>::View;
298 auto tmp = (static_cast<View>(in.get(C::keccakf1600_theta_xor_row_rotl1_3)) -
299 (FF(2) * static_cast<View>(in.get(C::keccakf1600_theta_xor_row_low63_3)) +
300 static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_3))));
301 std::get<25>(evals) += (tmp * scaling_factor);
302 }
303 { // THETA_XOR_ROW_MSB_4_BOOLEAN
304 using View = typename std::tuple_element_t<26, ContainerOverSubrelations>::View;
305 auto tmp = static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_4)) *
306 (FF(1) - static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_4)));
307 std::get<26>(evals) += (tmp * scaling_factor);
308 }
309 { // THETA_XOR_ROW_4_DECOMPOSITION
310 using View = typename std::tuple_element_t<27, ContainerOverSubrelations>::View;
311 auto tmp = (static_cast<View>(in.get(C::keccakf1600_theta_xor_row_4)) -
312 (FF(uint256_t{ 9223372036854775808UL, 0UL, 0UL, 0UL }) *
313 static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_4)) +
314 static_cast<View>(in.get(C::keccakf1600_theta_xor_row_low63_4))));
315 std::get<27>(evals) += (tmp * scaling_factor);
316 }
317 { // THETA_XOR_ROW_ROTL1_4
318 using View = typename std::tuple_element_t<28, ContainerOverSubrelations>::View;
319 auto tmp = (static_cast<View>(in.get(C::keccakf1600_theta_xor_row_rotl1_4)) -
320 (FF(2) * static_cast<View>(in.get(C::keccakf1600_theta_xor_row_low63_4)) +
321 static_cast<View>(in.get(C::keccakf1600_theta_xor_row_msb_4))));
322 std::get<28>(evals) += (tmp * scaling_factor);
323 }
324 { // STATE_THETA_01_DECOMPOSE
325 using View = typename std::tuple_element_t<29, ContainerOverSubrelations>::View;
326 auto tmp =
327 (static_cast<View>(in.get(C::keccakf1600_state_theta_01)) -
328 (CView(keccakf1600_POW_ROT_64_MIN_LEN_01) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_01)) +
329 static_cast<View>(in.get(C::keccakf1600_state_theta_low_01))));
330 std::get<29>(evals) += (tmp * scaling_factor);
331 }
332 { // STATE_RHO_01
333 using View = typename std::tuple_element_t<30, ContainerOverSubrelations>::View;
334 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_01)) -
335 (CView(keccakf1600_POW_ROT_LEN_01) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_01)) +
336 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_01))));
337 std::get<30>(evals) += (tmp * scaling_factor);
338 }
339 { // STATE_THETA_02_DECOMPOSE
340 using View = typename std::tuple_element_t<31, ContainerOverSubrelations>::View;
341 auto tmp =
342 (static_cast<View>(in.get(C::keccakf1600_state_theta_02)) -
343 (CView(keccakf1600_POW_ROT_64_MIN_LEN_02) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_02)) +
344 static_cast<View>(in.get(C::keccakf1600_state_theta_low_02))));
345 std::get<31>(evals) += (tmp * scaling_factor);
346 }
347 { // STATE_RHO_02
348 using View = typename std::tuple_element_t<32, ContainerOverSubrelations>::View;
349 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_02)) -
350 (CView(keccakf1600_POW_ROT_LEN_02) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_02)) +
351 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_02))));
352 std::get<32>(evals) += (tmp * scaling_factor);
353 }
354 { // STATE_THETA_03_DECOMPOSE
355 using View = typename std::tuple_element_t<33, ContainerOverSubrelations>::View;
356 auto tmp =
357 (static_cast<View>(in.get(C::keccakf1600_state_theta_03)) -
358 (CView(keccakf1600_POW_ROT_64_MIN_LEN_03) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_03)) +
359 static_cast<View>(in.get(C::keccakf1600_state_theta_low_03))));
360 std::get<33>(evals) += (tmp * scaling_factor);
361 }
362 { // STATE_RHO_03
363 using View = typename std::tuple_element_t<34, ContainerOverSubrelations>::View;
364 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_03)) -
365 (CView(keccakf1600_POW_ROT_LEN_03) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_03)) +
366 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_03))));
367 std::get<34>(evals) += (tmp * scaling_factor);
368 }
369 { // STATE_THETA_04_DECOMPOSE
370 using View = typename std::tuple_element_t<35, ContainerOverSubrelations>::View;
371 auto tmp =
372 (static_cast<View>(in.get(C::keccakf1600_state_theta_04)) -
373 (CView(keccakf1600_POW_ROT_64_MIN_LEN_04) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_04)) +
374 static_cast<View>(in.get(C::keccakf1600_state_theta_low_04))));
375 std::get<35>(evals) += (tmp * scaling_factor);
376 }
377 { // STATE_RHO_04
378 using View = typename std::tuple_element_t<36, ContainerOverSubrelations>::View;
379 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_04)) -
380 (CView(keccakf1600_POW_ROT_LEN_04) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_04)) +
381 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_04))));
382 std::get<36>(evals) += (tmp * scaling_factor);
383 }
384 { // STATE_THETA_10_DECOMPOSE
385 using View = typename std::tuple_element_t<37, ContainerOverSubrelations>::View;
386 auto tmp =
387 (static_cast<View>(in.get(C::keccakf1600_state_theta_10)) -
388 (CView(keccakf1600_POW_ROT_64_MIN_LEN_10) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_10)) +
389 static_cast<View>(in.get(C::keccakf1600_state_theta_low_10))));
390 std::get<37>(evals) += (tmp * scaling_factor);
391 }
392 { // STATE_RHO_10
393 using View = typename std::tuple_element_t<38, ContainerOverSubrelations>::View;
394 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_10)) -
395 (CView(keccakf1600_POW_ROT_LEN_10) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_10)) +
396 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_10))));
397 std::get<38>(evals) += (tmp * scaling_factor);
398 }
399 { // STATE_THETA_11_DECOMPOSE
400 using View = typename std::tuple_element_t<39, ContainerOverSubrelations>::View;
401 auto tmp =
402 (static_cast<View>(in.get(C::keccakf1600_state_theta_11)) -
403 (CView(keccakf1600_POW_ROT_64_MIN_LEN_11) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_11)) +
404 static_cast<View>(in.get(C::keccakf1600_state_theta_low_11))));
405 std::get<39>(evals) += (tmp * scaling_factor);
406 }
407 { // STATE_RHO_11
408 using View = typename std::tuple_element_t<40, ContainerOverSubrelations>::View;
409 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_11)) -
410 (CView(keccakf1600_POW_ROT_LEN_11) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_11)) +
411 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_11))));
412 std::get<40>(evals) += (tmp * scaling_factor);
413 }
414 { // STATE_THETA_12_DECOMPOSE
415 using View = typename std::tuple_element_t<41, ContainerOverSubrelations>::View;
416 auto tmp =
417 (static_cast<View>(in.get(C::keccakf1600_state_theta_12)) -
418 (CView(keccakf1600_POW_ROT_64_MIN_LEN_12) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_12)) +
419 static_cast<View>(in.get(C::keccakf1600_state_theta_low_12))));
420 std::get<41>(evals) += (tmp * scaling_factor);
421 }
422 { // STATE_RHO_12
423 using View = typename std::tuple_element_t<42, ContainerOverSubrelations>::View;
424 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_12)) -
425 (CView(keccakf1600_POW_ROT_LEN_12) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_12)) +
426 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_12))));
427 std::get<42>(evals) += (tmp * scaling_factor);
428 }
429 { // STATE_THETA_13_DECOMPOSE
430 using View = typename std::tuple_element_t<43, ContainerOverSubrelations>::View;
431 auto tmp =
432 (static_cast<View>(in.get(C::keccakf1600_state_theta_13)) -
433 (CView(keccakf1600_POW_ROT_64_MIN_LEN_13) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_13)) +
434 static_cast<View>(in.get(C::keccakf1600_state_theta_low_13))));
435 std::get<43>(evals) += (tmp * scaling_factor);
436 }
437 { // STATE_RHO_13
438 using View = typename std::tuple_element_t<44, ContainerOverSubrelations>::View;
439 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_13)) -
440 (CView(keccakf1600_POW_ROT_LEN_13) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_13)) +
441 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_13))));
442 std::get<44>(evals) += (tmp * scaling_factor);
443 }
444 { // STATE_THETA_14_DECOMPOSE
445 using View = typename std::tuple_element_t<45, ContainerOverSubrelations>::View;
446 auto tmp =
447 (static_cast<View>(in.get(C::keccakf1600_state_theta_14)) -
448 (CView(keccakf1600_POW_ROT_64_MIN_LEN_14) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_14)) +
449 static_cast<View>(in.get(C::keccakf1600_state_theta_low_14))));
450 std::get<45>(evals) += (tmp * scaling_factor);
451 }
452 { // STATE_RHO_14
453 using View = typename std::tuple_element_t<46, ContainerOverSubrelations>::View;
454 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_14)) -
455 (CView(keccakf1600_POW_ROT_LEN_14) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_14)) +
456 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_14))));
457 std::get<46>(evals) += (tmp * scaling_factor);
458 }
459 { // STATE_THETA_20_DECOMPOSE
460 using View = typename std::tuple_element_t<47, ContainerOverSubrelations>::View;
461 auto tmp =
462 (static_cast<View>(in.get(C::keccakf1600_state_theta_20)) -
463 (CView(keccakf1600_POW_ROT_64_MIN_LEN_20) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_20)) +
464 static_cast<View>(in.get(C::keccakf1600_state_theta_low_20))));
465 std::get<47>(evals) += (tmp * scaling_factor);
466 }
467 { // STATE_RHO_20
468 using View = typename std::tuple_element_t<48, ContainerOverSubrelations>::View;
469 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_20)) -
470 (CView(keccakf1600_POW_ROT_LEN_20) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_20)) +
471 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_20))));
472 std::get<48>(evals) += (tmp * scaling_factor);
473 }
474 { // STATE_THETA_21_DECOMPOSE
475 using View = typename std::tuple_element_t<49, ContainerOverSubrelations>::View;
476 auto tmp =
477 (static_cast<View>(in.get(C::keccakf1600_state_theta_21)) -
478 (CView(keccakf1600_POW_ROT_64_MIN_LEN_21) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_21)) +
479 static_cast<View>(in.get(C::keccakf1600_state_theta_low_21))));
480 std::get<49>(evals) += (tmp * scaling_factor);
481 }
482 { // STATE_RHO_21
483 using View = typename std::tuple_element_t<50, ContainerOverSubrelations>::View;
484 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_21)) -
485 (CView(keccakf1600_POW_ROT_LEN_21) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_21)) +
486 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_21))));
487 std::get<50>(evals) += (tmp * scaling_factor);
488 }
489 { // STATE_THETA_22_DECOMPOSE
490 using View = typename std::tuple_element_t<51, ContainerOverSubrelations>::View;
491 auto tmp =
492 (static_cast<View>(in.get(C::keccakf1600_state_theta_22)) -
493 (CView(keccakf1600_POW_ROT_64_MIN_LEN_22) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_22)) +
494 static_cast<View>(in.get(C::keccakf1600_state_theta_low_22))));
495 std::get<51>(evals) += (tmp * scaling_factor);
496 }
497 { // STATE_RHO_22
498 using View = typename std::tuple_element_t<52, ContainerOverSubrelations>::View;
499 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_22)) -
500 (CView(keccakf1600_POW_ROT_LEN_22) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_22)) +
501 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_22))));
502 std::get<52>(evals) += (tmp * scaling_factor);
503 }
504 { // STATE_THETA_23_DECOMPOSE
505 using View = typename std::tuple_element_t<53, ContainerOverSubrelations>::View;
506 auto tmp =
507 (static_cast<View>(in.get(C::keccakf1600_state_theta_23)) -
508 (CView(keccakf1600_POW_ROT_64_MIN_LEN_23) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_23)) +
509 static_cast<View>(in.get(C::keccakf1600_state_theta_low_23))));
510 std::get<53>(evals) += (tmp * scaling_factor);
511 }
512 { // STATE_RHO_23
513 using View = typename std::tuple_element_t<54, ContainerOverSubrelations>::View;
514 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_23)) -
515 (CView(keccakf1600_POW_ROT_LEN_23) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_23)) +
516 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_23))));
517 std::get<54>(evals) += (tmp * scaling_factor);
518 }
519 { // STATE_THETA_24_DECOMPOSE
520 using View = typename std::tuple_element_t<55, ContainerOverSubrelations>::View;
521 auto tmp =
522 (static_cast<View>(in.get(C::keccakf1600_state_theta_24)) -
523 (CView(keccakf1600_POW_ROT_64_MIN_LEN_24) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_24)) +
524 static_cast<View>(in.get(C::keccakf1600_state_theta_low_24))));
525 std::get<55>(evals) += (tmp * scaling_factor);
526 }
527 { // STATE_RHO_24
528 using View = typename std::tuple_element_t<56, ContainerOverSubrelations>::View;
529 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_24)) -
530 (CView(keccakf1600_POW_ROT_LEN_24) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_24)) +
531 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_24))));
532 std::get<56>(evals) += (tmp * scaling_factor);
533 }
534 { // STATE_THETA_30_DECOMPOSE
535 using View = typename std::tuple_element_t<57, ContainerOverSubrelations>::View;
536 auto tmp =
537 (static_cast<View>(in.get(C::keccakf1600_state_theta_30)) -
538 (CView(keccakf1600_POW_ROT_64_MIN_LEN_30) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_30)) +
539 static_cast<View>(in.get(C::keccakf1600_state_theta_low_30))));
540 std::get<57>(evals) += (tmp * scaling_factor);
541 }
542 { // STATE_RHO_30
543 using View = typename std::tuple_element_t<58, ContainerOverSubrelations>::View;
544 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_30)) -
545 (CView(keccakf1600_POW_ROT_LEN_30) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_30)) +
546 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_30))));
547 std::get<58>(evals) += (tmp * scaling_factor);
548 }
549 { // STATE_THETA_31_DECOMPOSE
550 using View = typename std::tuple_element_t<59, ContainerOverSubrelations>::View;
551 auto tmp =
552 (static_cast<View>(in.get(C::keccakf1600_state_theta_31)) -
553 (CView(keccakf1600_POW_ROT_64_MIN_LEN_31) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_31)) +
554 static_cast<View>(in.get(C::keccakf1600_state_theta_low_31))));
555 std::get<59>(evals) += (tmp * scaling_factor);
556 }
557 { // STATE_RHO_31
558 using View = typename std::tuple_element_t<60, ContainerOverSubrelations>::View;
559 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_31)) -
560 (CView(keccakf1600_POW_ROT_LEN_31) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_31)) +
561 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_31))));
562 std::get<60>(evals) += (tmp * scaling_factor);
563 }
564 { // STATE_THETA_32_DECOMPOSE
565 using View = typename std::tuple_element_t<61, ContainerOverSubrelations>::View;
566 auto tmp =
567 (static_cast<View>(in.get(C::keccakf1600_state_theta_32)) -
568 (CView(keccakf1600_POW_ROT_64_MIN_LEN_32) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_32)) +
569 static_cast<View>(in.get(C::keccakf1600_state_theta_low_32))));
570 std::get<61>(evals) += (tmp * scaling_factor);
571 }
572 { // STATE_RHO_32
573 using View = typename std::tuple_element_t<62, ContainerOverSubrelations>::View;
574 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_32)) -
575 (CView(keccakf1600_POW_ROT_LEN_32) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_32)) +
576 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_32))));
577 std::get<62>(evals) += (tmp * scaling_factor);
578 }
579 { // STATE_THETA_33_DECOMPOSE
580 using View = typename std::tuple_element_t<63, ContainerOverSubrelations>::View;
581 auto tmp =
582 (static_cast<View>(in.get(C::keccakf1600_state_theta_33)) -
583 (CView(keccakf1600_POW_ROT_64_MIN_LEN_33) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_33)) +
584 static_cast<View>(in.get(C::keccakf1600_state_theta_low_33))));
585 std::get<63>(evals) += (tmp * scaling_factor);
586 }
587 { // STATE_RHO_33
588 using View = typename std::tuple_element_t<64, ContainerOverSubrelations>::View;
589 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_33)) -
590 (CView(keccakf1600_POW_ROT_LEN_33) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_33)) +
591 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_33))));
592 std::get<64>(evals) += (tmp * scaling_factor);
593 }
594 { // STATE_THETA_34_DECOMPOSE
595 using View = typename std::tuple_element_t<65, ContainerOverSubrelations>::View;
596 auto tmp =
597 (static_cast<View>(in.get(C::keccakf1600_state_theta_34)) -
598 (CView(keccakf1600_POW_ROT_64_MIN_LEN_34) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_34)) +
599 static_cast<View>(in.get(C::keccakf1600_state_theta_low_34))));
600 std::get<65>(evals) += (tmp * scaling_factor);
601 }
602 { // STATE_RHO_34
603 using View = typename std::tuple_element_t<66, ContainerOverSubrelations>::View;
604 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_34)) -
605 (CView(keccakf1600_POW_ROT_LEN_34) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_34)) +
606 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_34))));
607 std::get<66>(evals) += (tmp * scaling_factor);
608 }
609 { // STATE_THETA_40_DECOMPOSE
610 using View = typename std::tuple_element_t<67, ContainerOverSubrelations>::View;
611 auto tmp =
612 (static_cast<View>(in.get(C::keccakf1600_state_theta_40)) -
613 (CView(keccakf1600_POW_ROT_64_MIN_LEN_40) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_40)) +
614 static_cast<View>(in.get(C::keccakf1600_state_theta_low_40))));
615 std::get<67>(evals) += (tmp * scaling_factor);
616 }
617 { // STATE_RHO_40
618 using View = typename std::tuple_element_t<68, ContainerOverSubrelations>::View;
619 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_40)) -
620 (CView(keccakf1600_POW_ROT_LEN_40) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_40)) +
621 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_40))));
622 std::get<68>(evals) += (tmp * scaling_factor);
623 }
624 { // STATE_THETA_41_DECOMPOSE
625 using View = typename std::tuple_element_t<69, ContainerOverSubrelations>::View;
626 auto tmp =
627 (static_cast<View>(in.get(C::keccakf1600_state_theta_41)) -
628 (CView(keccakf1600_POW_ROT_64_MIN_LEN_41) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_41)) +
629 static_cast<View>(in.get(C::keccakf1600_state_theta_low_41))));
630 std::get<69>(evals) += (tmp * scaling_factor);
631 }
632 { // STATE_RHO_41
633 using View = typename std::tuple_element_t<70, ContainerOverSubrelations>::View;
634 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_41)) -
635 (CView(keccakf1600_POW_ROT_LEN_41) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_41)) +
636 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_41))));
637 std::get<70>(evals) += (tmp * scaling_factor);
638 }
639 { // STATE_THETA_42_DECOMPOSE
640 using View = typename std::tuple_element_t<71, ContainerOverSubrelations>::View;
641 auto tmp =
642 (static_cast<View>(in.get(C::keccakf1600_state_theta_42)) -
643 (CView(keccakf1600_POW_ROT_64_MIN_LEN_42) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_42)) +
644 static_cast<View>(in.get(C::keccakf1600_state_theta_low_42))));
645 std::get<71>(evals) += (tmp * scaling_factor);
646 }
647 { // STATE_RHO_42
648 using View = typename std::tuple_element_t<72, ContainerOverSubrelations>::View;
649 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_42)) -
650 (CView(keccakf1600_POW_ROT_LEN_42) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_42)) +
651 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_42))));
652 std::get<72>(evals) += (tmp * scaling_factor);
653 }
654 { // STATE_THETA_43_DECOMPOSE
655 using View = typename std::tuple_element_t<73, ContainerOverSubrelations>::View;
656 auto tmp =
657 (static_cast<View>(in.get(C::keccakf1600_state_theta_43)) -
658 (CView(keccakf1600_POW_ROT_64_MIN_LEN_43) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_43)) +
659 static_cast<View>(in.get(C::keccakf1600_state_theta_low_43))));
660 std::get<73>(evals) += (tmp * scaling_factor);
661 }
662 { // STATE_RHO_43
663 using View = typename std::tuple_element_t<74, ContainerOverSubrelations>::View;
664 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_43)) -
665 (CView(keccakf1600_POW_ROT_LEN_43) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_43)) +
666 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_43))));
667 std::get<74>(evals) += (tmp * scaling_factor);
668 }
669 { // STATE_THETA_44_DECOMPOSE
670 using View = typename std::tuple_element_t<75, ContainerOverSubrelations>::View;
671 auto tmp =
672 (static_cast<View>(in.get(C::keccakf1600_state_theta_44)) -
673 (CView(keccakf1600_POW_ROT_64_MIN_LEN_44) * static_cast<View>(in.get(C::keccakf1600_state_theta_hi_44)) +
674 static_cast<View>(in.get(C::keccakf1600_state_theta_low_44))));
675 std::get<75>(evals) += (tmp * scaling_factor);
676 }
677 { // STATE_RHO_44
678 using View = typename std::tuple_element_t<76, ContainerOverSubrelations>::View;
679 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_rho_44)) -
680 (CView(keccakf1600_POW_ROT_LEN_44) * static_cast<View>(in.get(C::keccakf1600_state_theta_low_44)) +
681 static_cast<View>(in.get(C::keccakf1600_state_theta_hi_44))));
682 std::get<76>(evals) += (tmp * scaling_factor);
683 }
684 {
685 using View = typename std::tuple_element_t<77, ContainerOverSubrelations>::View;
686 auto tmp = static_cast<View>(in.get(C::keccakf1600_sel)) *
687 (static_cast<View>(in.get(C::keccakf1600_rot_len_02)) - CView(keccakf1600_ROT_LEN_02));
688 std::get<77>(evals) += (tmp * scaling_factor);
689 }
690 {
691 using View = typename std::tuple_element_t<78, ContainerOverSubrelations>::View;
692 auto tmp = static_cast<View>(in.get(C::keccakf1600_sel)) *
693 (static_cast<View>(in.get(C::keccakf1600_rot_len_04)) - CView(keccakf1600_ROT_LEN_04));
694 std::get<78>(evals) += (tmp * scaling_factor);
695 }
696 {
697 using View = typename std::tuple_element_t<79, ContainerOverSubrelations>::View;
698 auto tmp = static_cast<View>(in.get(C::keccakf1600_sel)) *
699 (static_cast<View>(in.get(C::keccakf1600_rot_len_10)) - CView(keccakf1600_ROT_LEN_10));
700 std::get<79>(evals) += (tmp * scaling_factor);
701 }
702 {
703 using View = typename std::tuple_element_t<80, ContainerOverSubrelations>::View;
704 auto tmp = static_cast<View>(in.get(C::keccakf1600_sel)) *
705 (static_cast<View>(in.get(C::keccakf1600_rot_len_12)) - CView(keccakf1600_ROT_LEN_12));
706 std::get<80>(evals) += (tmp * scaling_factor);
707 }
708 {
709 using View = typename std::tuple_element_t<81, ContainerOverSubrelations>::View;
710 auto tmp = static_cast<View>(in.get(C::keccakf1600_sel)) *
711 (static_cast<View>(in.get(C::keccakf1600_rot_len_14)) - CView(keccakf1600_ROT_LEN_14));
712 std::get<81>(evals) += (tmp * scaling_factor);
713 }
714 {
715 using View = typename std::tuple_element_t<82, ContainerOverSubrelations>::View;
716 auto tmp = static_cast<View>(in.get(C::keccakf1600_sel)) *
717 (static_cast<View>(in.get(C::keccakf1600_rot_len_21)) - CView(keccakf1600_ROT_LEN_21));
718 std::get<82>(evals) += (tmp * scaling_factor);
719 }
720 {
721 using View = typename std::tuple_element_t<83, ContainerOverSubrelations>::View;
722 auto tmp = static_cast<View>(in.get(C::keccakf1600_sel)) *
723 (static_cast<View>(in.get(C::keccakf1600_rot_len_23)) - CView(keccakf1600_ROT_LEN_23));
724 std::get<83>(evals) += (tmp * scaling_factor);
725 }
726 {
727 using View = typename std::tuple_element_t<84, ContainerOverSubrelations>::View;
728 auto tmp = static_cast<View>(in.get(C::keccakf1600_sel)) *
729 (static_cast<View>(in.get(C::keccakf1600_rot_len_30)) - CView(keccakf1600_ROT_LEN_30));
730 std::get<84>(evals) += (tmp * scaling_factor);
731 }
732 {
733 using View = typename std::tuple_element_t<85, ContainerOverSubrelations>::View;
734 auto tmp = static_cast<View>(in.get(C::keccakf1600_sel)) *
735 (static_cast<View>(in.get(C::keccakf1600_rot_len_32)) - CView(keccakf1600_ROT_LEN_32));
736 std::get<85>(evals) += (tmp * scaling_factor);
737 }
738 {
739 using View = typename std::tuple_element_t<86, ContainerOverSubrelations>::View;
740 auto tmp = static_cast<View>(in.get(C::keccakf1600_sel)) *
741 (static_cast<View>(in.get(C::keccakf1600_rot_len_33)) - CView(keccakf1600_ROT_LEN_33));
742 std::get<86>(evals) += (tmp * scaling_factor);
743 }
744 {
745 using View = typename std::tuple_element_t<87, ContainerOverSubrelations>::View;
746 auto tmp = static_cast<View>(in.get(C::keccakf1600_sel)) *
747 (static_cast<View>(in.get(C::keccakf1600_rot_len_40)) - CView(keccakf1600_ROT_LEN_40));
748 std::get<87>(evals) += (tmp * scaling_factor);
749 }
750 {
751 using View = typename std::tuple_element_t<88, ContainerOverSubrelations>::View;
752 auto tmp = static_cast<View>(in.get(C::keccakf1600_sel)) *
753 (static_cast<View>(in.get(C::keccakf1600_rot_len_41)) - CView(keccakf1600_ROT_LEN_41));
754 std::get<88>(evals) += (tmp * scaling_factor);
755 }
756 {
757 using View = typename std::tuple_element_t<89, ContainerOverSubrelations>::View;
758 auto tmp = static_cast<View>(in.get(C::keccakf1600_sel)) *
759 (static_cast<View>(in.get(C::keccakf1600_rot_len_43)) - CView(keccakf1600_ROT_LEN_43));
760 std::get<89>(evals) += (tmp * scaling_factor);
761 }
762 {
763 using View = typename std::tuple_element_t<90, ContainerOverSubrelations>::View;
764 auto tmp = static_cast<View>(in.get(C::keccakf1600_sel)) *
765 (static_cast<View>(in.get(C::keccakf1600_rot_len_44)) - CView(keccakf1600_ROT_LEN_44));
766 std::get<90>(evals) += (tmp * scaling_factor);
767 }
768 {
769 using View = typename std::tuple_element_t<91, ContainerOverSubrelations>::View;
770 auto tmp =
771 static_cast<View>(in.get(C::keccakf1600_sel)) *
772 (static_cast<View>(in.get(C::keccakf1600_rot_64_min_len_01)) - (FF(64) - CView(keccakf1600_ROT_LEN_01)));
773 std::get<91>(evals) += (tmp * scaling_factor);
774 }
775 {
776 using View = typename std::tuple_element_t<92, ContainerOverSubrelations>::View;
777 auto tmp =
778 static_cast<View>(in.get(C::keccakf1600_sel)) *
779 (static_cast<View>(in.get(C::keccakf1600_rot_64_min_len_03)) - (FF(64) - CView(keccakf1600_ROT_LEN_03)));
780 std::get<92>(evals) += (tmp * scaling_factor);
781 }
782 {
783 using View = typename std::tuple_element_t<93, ContainerOverSubrelations>::View;
784 auto tmp =
785 static_cast<View>(in.get(C::keccakf1600_sel)) *
786 (static_cast<View>(in.get(C::keccakf1600_rot_64_min_len_11)) - (FF(64) - CView(keccakf1600_ROT_LEN_11)));
787 std::get<93>(evals) += (tmp * scaling_factor);
788 }
789 {
790 using View = typename std::tuple_element_t<94, ContainerOverSubrelations>::View;
791 auto tmp =
792 static_cast<View>(in.get(C::keccakf1600_sel)) *
793 (static_cast<View>(in.get(C::keccakf1600_rot_64_min_len_13)) - (FF(64) - CView(keccakf1600_ROT_LEN_13)));
794 std::get<94>(evals) += (tmp * scaling_factor);
795 }
796 {
797 using View = typename std::tuple_element_t<95, ContainerOverSubrelations>::View;
798 auto tmp =
799 static_cast<View>(in.get(C::keccakf1600_sel)) *
800 (static_cast<View>(in.get(C::keccakf1600_rot_64_min_len_20)) - (FF(64) - CView(keccakf1600_ROT_LEN_20)));
801 std::get<95>(evals) += (tmp * scaling_factor);
802 }
803 {
804 using View = typename std::tuple_element_t<96, ContainerOverSubrelations>::View;
805 auto tmp =
806 static_cast<View>(in.get(C::keccakf1600_sel)) *
807 (static_cast<View>(in.get(C::keccakf1600_rot_64_min_len_22)) - (FF(64) - CView(keccakf1600_ROT_LEN_22)));
808 std::get<96>(evals) += (tmp * scaling_factor);
809 }
810 {
811 using View = typename std::tuple_element_t<97, ContainerOverSubrelations>::View;
812 auto tmp =
813 static_cast<View>(in.get(C::keccakf1600_sel)) *
814 (static_cast<View>(in.get(C::keccakf1600_rot_64_min_len_24)) - (FF(64) - CView(keccakf1600_ROT_LEN_24)));
815 std::get<97>(evals) += (tmp * scaling_factor);
816 }
817 {
818 using View = typename std::tuple_element_t<98, ContainerOverSubrelations>::View;
819 auto tmp =
820 static_cast<View>(in.get(C::keccakf1600_sel)) *
821 (static_cast<View>(in.get(C::keccakf1600_rot_64_min_len_31)) - (FF(64) - CView(keccakf1600_ROT_LEN_31)));
822 std::get<98>(evals) += (tmp * scaling_factor);
823 }
824 {
825 using View = typename std::tuple_element_t<99, ContainerOverSubrelations>::View;
826 auto tmp =
827 static_cast<View>(in.get(C::keccakf1600_sel)) *
828 (static_cast<View>(in.get(C::keccakf1600_rot_64_min_len_34)) - (FF(64) - CView(keccakf1600_ROT_LEN_34)));
829 std::get<99>(evals) += (tmp * scaling_factor);
830 }
831 {
832 using View = typename std::tuple_element_t<100, ContainerOverSubrelations>::View;
833 auto tmp =
834 static_cast<View>(in.get(C::keccakf1600_sel)) *
835 (static_cast<View>(in.get(C::keccakf1600_rot_64_min_len_42)) - (FF(64) - CView(keccakf1600_ROT_LEN_42)));
836 std::get<100>(evals) += (tmp * scaling_factor);
837 }
838 { // STATE_PI_NOT_00
839 using View = typename std::tuple_element_t<101, ContainerOverSubrelations>::View;
840 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_00)) -
841 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
842 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_00)));
843 std::get<101>(evals) += (tmp * scaling_factor);
844 }
845 { // STATE_PI_NOT_01
846 using View = typename std::tuple_element_t<102, ContainerOverSubrelations>::View;
847 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_01)) -
848 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
849 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_01)));
850 std::get<102>(evals) += (tmp * scaling_factor);
851 }
852 { // STATE_PI_NOT_02
853 using View = typename std::tuple_element_t<103, ContainerOverSubrelations>::View;
854 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_02)) -
855 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
856 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_02)));
857 std::get<103>(evals) += (tmp * scaling_factor);
858 }
859 { // STATE_PI_NOT_03
860 using View = typename std::tuple_element_t<104, ContainerOverSubrelations>::View;
861 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_03)) -
862 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
863 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_03)));
864 std::get<104>(evals) += (tmp * scaling_factor);
865 }
866 { // STATE_PI_NOT_04
867 using View = typename std::tuple_element_t<105, ContainerOverSubrelations>::View;
868 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_04)) -
869 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
870 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_04)));
871 std::get<105>(evals) += (tmp * scaling_factor);
872 }
873 { // STATE_PI_NOT_10
874 using View = typename std::tuple_element_t<106, ContainerOverSubrelations>::View;
875 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_10)) -
876 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
877 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_10)));
878 std::get<106>(evals) += (tmp * scaling_factor);
879 }
880 { // STATE_PI_NOT_11
881 using View = typename std::tuple_element_t<107, ContainerOverSubrelations>::View;
882 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_11)) -
883 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
884 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_11)));
885 std::get<107>(evals) += (tmp * scaling_factor);
886 }
887 { // STATE_PI_NOT_12
888 using View = typename std::tuple_element_t<108, ContainerOverSubrelations>::View;
889 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_12)) -
890 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
891 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_12)));
892 std::get<108>(evals) += (tmp * scaling_factor);
893 }
894 { // STATE_PI_NOT_13
895 using View = typename std::tuple_element_t<109, ContainerOverSubrelations>::View;
896 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_13)) -
897 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
898 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_13)));
899 std::get<109>(evals) += (tmp * scaling_factor);
900 }
901 { // STATE_PI_NOT_14
902 using View = typename std::tuple_element_t<110, ContainerOverSubrelations>::View;
903 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_14)) -
904 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
905 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_14)));
906 std::get<110>(evals) += (tmp * scaling_factor);
907 }
908 { // STATE_PI_NOT_20
909 using View = typename std::tuple_element_t<111, ContainerOverSubrelations>::View;
910 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_20)) -
911 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
912 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_20)));
913 std::get<111>(evals) += (tmp * scaling_factor);
914 }
915 { // STATE_PI_NOT_21
916 using View = typename std::tuple_element_t<112, ContainerOverSubrelations>::View;
917 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_21)) -
918 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
919 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_21)));
920 std::get<112>(evals) += (tmp * scaling_factor);
921 }
922 { // STATE_PI_NOT_22
923 using View = typename std::tuple_element_t<113, ContainerOverSubrelations>::View;
924 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_22)) -
925 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
926 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_22)));
927 std::get<113>(evals) += (tmp * scaling_factor);
928 }
929 { // STATE_PI_NOT_23
930 using View = typename std::tuple_element_t<114, ContainerOverSubrelations>::View;
931 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_23)) -
932 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
933 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_23)));
934 std::get<114>(evals) += (tmp * scaling_factor);
935 }
936 { // STATE_PI_NOT_24
937 using View = typename std::tuple_element_t<115, ContainerOverSubrelations>::View;
938 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_24)) -
939 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
940 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_24)));
941 std::get<115>(evals) += (tmp * scaling_factor);
942 }
943 { // STATE_PI_NOT_30
944 using View = typename std::tuple_element_t<116, ContainerOverSubrelations>::View;
945 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_30)) -
946 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
947 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_30)));
948 std::get<116>(evals) += (tmp * scaling_factor);
949 }
950 { // STATE_PI_NOT_31
951 using View = typename std::tuple_element_t<117, ContainerOverSubrelations>::View;
952 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_31)) -
953 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
954 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_31)));
955 std::get<117>(evals) += (tmp * scaling_factor);
956 }
957 { // STATE_PI_NOT_32
958 using View = typename std::tuple_element_t<118, ContainerOverSubrelations>::View;
959 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_32)) -
960 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
961 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_32)));
962 std::get<118>(evals) += (tmp * scaling_factor);
963 }
964 { // STATE_PI_NOT_33
965 using View = typename std::tuple_element_t<119, ContainerOverSubrelations>::View;
966 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_33)) -
967 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
968 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_33)));
969 std::get<119>(evals) += (tmp * scaling_factor);
970 }
971 { // STATE_PI_NOT_34
972 using View = typename std::tuple_element_t<120, ContainerOverSubrelations>::View;
973 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_34)) -
974 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
975 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_34)));
976 std::get<120>(evals) += (tmp * scaling_factor);
977 }
978 { // STATE_PI_NOT_40
979 using View = typename std::tuple_element_t<121, ContainerOverSubrelations>::View;
980 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_40)) -
981 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
982 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_40)));
983 std::get<121>(evals) += (tmp * scaling_factor);
984 }
985 { // STATE_PI_NOT_41
986 using View = typename std::tuple_element_t<122, ContainerOverSubrelations>::View;
987 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_41)) -
988 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
989 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_41)));
990 std::get<122>(evals) += (tmp * scaling_factor);
991 }
992 { // STATE_PI_NOT_42
993 using View = typename std::tuple_element_t<123, ContainerOverSubrelations>::View;
994 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_42)) -
995 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
996 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_42)));
997 std::get<123>(evals) += (tmp * scaling_factor);
998 }
999 { // STATE_PI_NOT_43
1000 using View = typename std::tuple_element_t<124, ContainerOverSubrelations>::View;
1001 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_43)) -
1002 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
1003 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_43)));
1004 std::get<124>(evals) += (tmp * scaling_factor);
1005 }
1006 { // STATE_PI_NOT_44
1007 using View = typename std::tuple_element_t<125, ContainerOverSubrelations>::View;
1008 auto tmp = (static_cast<View>(in.get(C::keccakf1600_state_pi_not_44)) -
1009 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) *
1010 (CView(keccakf1600_POW_64_MIN_1) - CView(keccakf1600_STATE_PI_44)));
1011 std::get<125>(evals) += (tmp * scaling_factor);
1012 }
1013 { // NEXT_STATE_IN_00
1014 using View = typename std::tuple_element_t<126, ContainerOverSubrelations>::View;
1015 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1016 (static_cast<View>(in.get(C::keccakf1600_state_in_00_shift)) -
1017 static_cast<View>(in.get(C::keccakf1600_state_iota_00)));
1018 std::get<126>(evals) += (tmp * scaling_factor);
1019 }
1020 { // NEXT_STATE_IN_01
1021 using View = typename std::tuple_element_t<127, ContainerOverSubrelations>::View;
1022 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1023 (static_cast<View>(in.get(C::keccakf1600_state_in_01_shift)) -
1024 static_cast<View>(in.get(C::keccakf1600_state_chi_01)));
1025 std::get<127>(evals) += (tmp * scaling_factor);
1026 }
1027 { // NEXT_STATE_IN_02
1028 using View = typename std::tuple_element_t<128, ContainerOverSubrelations>::View;
1029 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1030 (static_cast<View>(in.get(C::keccakf1600_state_in_02_shift)) -
1031 static_cast<View>(in.get(C::keccakf1600_state_chi_02)));
1032 std::get<128>(evals) += (tmp * scaling_factor);
1033 }
1034 { // NEXT_STATE_IN_03
1035 using View = typename std::tuple_element_t<129, ContainerOverSubrelations>::View;
1036 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1037 (static_cast<View>(in.get(C::keccakf1600_state_in_03_shift)) -
1038 static_cast<View>(in.get(C::keccakf1600_state_chi_03)));
1039 std::get<129>(evals) += (tmp * scaling_factor);
1040 }
1041 { // NEXT_STATE_IN_04
1042 using View = typename std::tuple_element_t<130, ContainerOverSubrelations>::View;
1043 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1044 (static_cast<View>(in.get(C::keccakf1600_state_in_04_shift)) -
1045 static_cast<View>(in.get(C::keccakf1600_state_chi_04)));
1046 std::get<130>(evals) += (tmp * scaling_factor);
1047 }
1048 { // NEXT_STATE_IN_10
1049 using View = typename std::tuple_element_t<131, ContainerOverSubrelations>::View;
1050 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1051 (static_cast<View>(in.get(C::keccakf1600_state_in_10_shift)) -
1052 static_cast<View>(in.get(C::keccakf1600_state_chi_10)));
1053 std::get<131>(evals) += (tmp * scaling_factor);
1054 }
1055 { // NEXT_STATE_IN_11
1056 using View = typename std::tuple_element_t<132, ContainerOverSubrelations>::View;
1057 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1058 (static_cast<View>(in.get(C::keccakf1600_state_in_11_shift)) -
1059 static_cast<View>(in.get(C::keccakf1600_state_chi_11)));
1060 std::get<132>(evals) += (tmp * scaling_factor);
1061 }
1062 { // NEXT_STATE_IN_12
1063 using View = typename std::tuple_element_t<133, ContainerOverSubrelations>::View;
1064 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1065 (static_cast<View>(in.get(C::keccakf1600_state_in_12_shift)) -
1066 static_cast<View>(in.get(C::keccakf1600_state_chi_12)));
1067 std::get<133>(evals) += (tmp * scaling_factor);
1068 }
1069 { // NEXT_STATE_IN_13
1070 using View = typename std::tuple_element_t<134, ContainerOverSubrelations>::View;
1071 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1072 (static_cast<View>(in.get(C::keccakf1600_state_in_13_shift)) -
1073 static_cast<View>(in.get(C::keccakf1600_state_chi_13)));
1074 std::get<134>(evals) += (tmp * scaling_factor);
1075 }
1076 { // NEXT_STATE_IN_14
1077 using View = typename std::tuple_element_t<135, ContainerOverSubrelations>::View;
1078 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1079 (static_cast<View>(in.get(C::keccakf1600_state_in_14_shift)) -
1080 static_cast<View>(in.get(C::keccakf1600_state_chi_14)));
1081 std::get<135>(evals) += (tmp * scaling_factor);
1082 }
1083 { // NEXT_STATE_IN_20
1084 using View = typename std::tuple_element_t<136, ContainerOverSubrelations>::View;
1085 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1086 (static_cast<View>(in.get(C::keccakf1600_state_in_20_shift)) -
1087 static_cast<View>(in.get(C::keccakf1600_state_chi_20)));
1088 std::get<136>(evals) += (tmp * scaling_factor);
1089 }
1090 { // NEXT_STATE_IN_21
1091 using View = typename std::tuple_element_t<137, ContainerOverSubrelations>::View;
1092 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1093 (static_cast<View>(in.get(C::keccakf1600_state_in_21_shift)) -
1094 static_cast<View>(in.get(C::keccakf1600_state_chi_21)));
1095 std::get<137>(evals) += (tmp * scaling_factor);
1096 }
1097 { // NEXT_STATE_IN_22
1098 using View = typename std::tuple_element_t<138, ContainerOverSubrelations>::View;
1099 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1100 (static_cast<View>(in.get(C::keccakf1600_state_in_22_shift)) -
1101 static_cast<View>(in.get(C::keccakf1600_state_chi_22)));
1102 std::get<138>(evals) += (tmp * scaling_factor);
1103 }
1104 { // NEXT_STATE_IN_23
1105 using View = typename std::tuple_element_t<139, ContainerOverSubrelations>::View;
1106 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1107 (static_cast<View>(in.get(C::keccakf1600_state_in_23_shift)) -
1108 static_cast<View>(in.get(C::keccakf1600_state_chi_23)));
1109 std::get<139>(evals) += (tmp * scaling_factor);
1110 }
1111 { // NEXT_STATE_IN_24
1112 using View = typename std::tuple_element_t<140, ContainerOverSubrelations>::View;
1113 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1114 (static_cast<View>(in.get(C::keccakf1600_state_in_24_shift)) -
1115 static_cast<View>(in.get(C::keccakf1600_state_chi_24)));
1116 std::get<140>(evals) += (tmp * scaling_factor);
1117 }
1118 { // NEXT_STATE_IN_30
1119 using View = typename std::tuple_element_t<141, ContainerOverSubrelations>::View;
1120 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1121 (static_cast<View>(in.get(C::keccakf1600_state_in_30_shift)) -
1122 static_cast<View>(in.get(C::keccakf1600_state_chi_30)));
1123 std::get<141>(evals) += (tmp * scaling_factor);
1124 }
1125 { // NEXT_STATE_IN_31
1126 using View = typename std::tuple_element_t<142, ContainerOverSubrelations>::View;
1127 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1128 (static_cast<View>(in.get(C::keccakf1600_state_in_31_shift)) -
1129 static_cast<View>(in.get(C::keccakf1600_state_chi_31)));
1130 std::get<142>(evals) += (tmp * scaling_factor);
1131 }
1132 { // NEXT_STATE_IN_32
1133 using View = typename std::tuple_element_t<143, ContainerOverSubrelations>::View;
1134 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1135 (static_cast<View>(in.get(C::keccakf1600_state_in_32_shift)) -
1136 static_cast<View>(in.get(C::keccakf1600_state_chi_32)));
1137 std::get<143>(evals) += (tmp * scaling_factor);
1138 }
1139 { // NEXT_STATE_IN_33
1140 using View = typename std::tuple_element_t<144, ContainerOverSubrelations>::View;
1141 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1142 (static_cast<View>(in.get(C::keccakf1600_state_in_33_shift)) -
1143 static_cast<View>(in.get(C::keccakf1600_state_chi_33)));
1144 std::get<144>(evals) += (tmp * scaling_factor);
1145 }
1146 { // NEXT_STATE_IN_34
1147 using View = typename std::tuple_element_t<145, ContainerOverSubrelations>::View;
1148 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1149 (static_cast<View>(in.get(C::keccakf1600_state_in_34_shift)) -
1150 static_cast<View>(in.get(C::keccakf1600_state_chi_34)));
1151 std::get<145>(evals) += (tmp * scaling_factor);
1152 }
1153 { // NEXT_STATE_IN_40
1154 using View = typename std::tuple_element_t<146, ContainerOverSubrelations>::View;
1155 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1156 (static_cast<View>(in.get(C::keccakf1600_state_in_40_shift)) -
1157 static_cast<View>(in.get(C::keccakf1600_state_chi_40)));
1158 std::get<146>(evals) += (tmp * scaling_factor);
1159 }
1160 { // NEXT_STATE_IN_41
1161 using View = typename std::tuple_element_t<147, ContainerOverSubrelations>::View;
1162 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1163 (static_cast<View>(in.get(C::keccakf1600_state_in_41_shift)) -
1164 static_cast<View>(in.get(C::keccakf1600_state_chi_41)));
1165 std::get<147>(evals) += (tmp * scaling_factor);
1166 }
1167 { // NEXT_STATE_IN_42
1168 using View = typename std::tuple_element_t<148, ContainerOverSubrelations>::View;
1169 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1170 (static_cast<View>(in.get(C::keccakf1600_state_in_42_shift)) -
1171 static_cast<View>(in.get(C::keccakf1600_state_chi_42)));
1172 std::get<148>(evals) += (tmp * scaling_factor);
1173 }
1174 { // NEXT_STATE_IN_43
1175 using View = typename std::tuple_element_t<149, ContainerOverSubrelations>::View;
1176 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1177 (static_cast<View>(in.get(C::keccakf1600_state_in_43_shift)) -
1178 static_cast<View>(in.get(C::keccakf1600_state_chi_43)));
1179 std::get<149>(evals) += (tmp * scaling_factor);
1180 }
1181 { // NEXT_STATE_IN_44
1182 using View = typename std::tuple_element_t<150, ContainerOverSubrelations>::View;
1183 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1184 (static_cast<View>(in.get(C::keccakf1600_state_in_44_shift)) -
1185 static_cast<View>(in.get(C::keccakf1600_state_chi_44)));
1186 std::get<150>(evals) += (tmp * scaling_factor);
1187 }
1188 {
1189 using View = typename std::tuple_element_t<151, ContainerOverSubrelations>::View;
1190 auto tmp = static_cast<View>(in.get(C::keccakf1600_start)) *
1191 (static_cast<View>(in.get(C::keccakf1600_highest_slice_address)) -
1192 CView(keccakf1600_HIGHEST_SLICE_ADDRESS));
1193 std::get<151>(evals) += (tmp * scaling_factor);
1194 }
1195 { // ERROR
1196 using View = typename std::tuple_element_t<152, ContainerOverSubrelations>::View;
1197 auto tmp = (static_cast<View>(in.get(C::keccakf1600_error)) -
1198 (FF(1) - (FF(1) - static_cast<View>(in.get(C::keccakf1600_src_out_of_range_error))) *
1199 (FF(1) - static_cast<View>(in.get(C::keccakf1600_dst_out_of_range_error))) *
1200 (FF(1) - static_cast<View>(in.get(C::keccakf1600_tag_error)))));
1201 std::get<152>(evals) += (tmp * scaling_factor);
1202 }
1203 { // DST_ADDR_PROPAGATION
1204 using View = typename std::tuple_element_t<153, ContainerOverSubrelations>::View;
1205 auto tmp =
1206 (FF(1) - CView(keccakf1600_LATCH_CONDITION)) * (static_cast<View>(in.get(C::keccakf1600_dst_addr_shift)) -
1207 static_cast<View>(in.get(C::keccakf1600_dst_addr)));
1208 std::get<153>(evals) += (tmp * scaling_factor);
1209 }
1210 { // CLK_PROPAGATION
1211 using View = typename std::tuple_element_t<154, ContainerOverSubrelations>::View;
1212 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) * (static_cast<View>(in.get(C::keccakf1600_clk_shift)) -
1213 static_cast<View>(in.get(C::keccakf1600_clk)));
1214 std::get<154>(evals) += (tmp * scaling_factor);
1215 }
1216 { // SPACE_ID_PROPAGATION
1217 using View = typename std::tuple_element_t<155, ContainerOverSubrelations>::View;
1218 auto tmp =
1219 (FF(1) - CView(keccakf1600_LATCH_CONDITION)) * (static_cast<View>(in.get(C::keccakf1600_space_id_shift)) -
1220 static_cast<View>(in.get(C::keccakf1600_space_id)));
1221 std::get<155>(evals) += (tmp * scaling_factor);
1222 }
1223 { // SEL_NO_ERROR_PROPAGATION
1224 using View = typename std::tuple_element_t<156, ContainerOverSubrelations>::View;
1225 auto tmp = (FF(1) - CView(keccakf1600_LATCH_CONDITION)) *
1226 (static_cast<View>(in.get(C::keccakf1600_sel_no_error_shift)) -
1227 static_cast<View>(in.get(C::keccakf1600_sel_no_error)));
1228 std::get<156>(evals) += (tmp * scaling_factor);
1229 }
1230 { // SEL_SLICE_READ
1231 using View = typename std::tuple_element_t<157, ContainerOverSubrelations>::View;
1232 auto tmp = (static_cast<View>(in.get(C::keccakf1600_sel_slice_read)) -
1233 static_cast<View>(in.get(C::keccakf1600_start)) *
1234 (FF(1) - static_cast<View>(in.get(C::keccakf1600_src_out_of_range_error))) *
1235 (FF(1) - static_cast<View>(in.get(C::keccakf1600_dst_out_of_range_error))));
1236 std::get<157>(evals) += (tmp * scaling_factor);
1237 }
1238 { // SEL_SLICE_WRITE
1239 using View = typename std::tuple_element_t<158, ContainerOverSubrelations>::View;
1240 auto tmp =
1241 (static_cast<View>(in.get(C::keccakf1600_sel_slice_write)) -
1242 static_cast<View>(in.get(C::keccakf1600_sel_no_error)) * static_cast<View>(in.get(C::keccakf1600_last)));
1243 std::get<158>(evals) += (tmp * scaling_factor);
1244 }
1245}
1246
1247} // namespace bb::avm2
static void accumulate(ContainerOverSubrelations &evals, const AllEntities &in, const RelationParameters< FF > &, const FF &scaling_factor)
ColumnAndShifts
Definition columns.hpp:34
AvmFlavorSettings::FF FF
Definition field.hpp:10
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
#define CView(v)
Container for parameters used by the grand product (permutation, lookup) Honk relations.