Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
lookups_sha256.hpp
Go to the documentation of this file.
1// AUTOGENERATED FILE
2#pragma once
3
4#include <cstddef>
5#include <string_view>
6#include <tuple>
7
8#include "../columns.hpp"
11
12namespace bb::avm2 {
13
15
17 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_W_LHS";
18 static constexpr std::string_view RELATION_NAME = "sha256";
19 static constexpr size_t LOOKUP_TUPLE_SIZE = 1;
20 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
21 static constexpr Column DST_SELECTOR = Column::precomputed_sel_range_8;
22 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_w_lhs_counts;
23 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_w_lhs_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
25 ColumnAndShifts::sha256_computed_w_lhs
26 };
27 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::precomputed_idx };
28};
29
31template <typename FF_>
33
35
37 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_W_RHS";
38 static constexpr std::string_view RELATION_NAME = "sha256";
39 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
40 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
41 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
42 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_w_rhs_counts;
43 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_w_rhs_inv;
44 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
45 ColumnAndShifts::sha256_two_pow_32,
46 ColumnAndShifts::sha256_computed_w_rhs,
47 ColumnAndShifts::sha256_sel_compute_w
48 };
49 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
50 ColumnAndShifts::gt_input_b,
51 ColumnAndShifts::gt_res };
52};
53
55template <typename FF_>
57
59
61 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_W_7";
62 static constexpr std::string_view RELATION_NAME = "sha256";
63 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
64 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
65 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
66 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_w_7_counts;
67 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_w_7_inv;
68 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
69 ColumnAndShifts::sha256_two_pow_7, ColumnAndShifts::sha256_rhs_w_7, ColumnAndShifts::sha256_sel_compute_w
70 };
71 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
72 ColumnAndShifts::gt_input_b,
73 ColumnAndShifts::gt_res };
74};
75
77template <typename FF_>
79
81
83 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_W_18";
84 static constexpr std::string_view RELATION_NAME = "sha256";
85 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
86 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
87 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
88 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_w_18_counts;
89 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_w_18_inv;
90 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
91 ColumnAndShifts::sha256_two_pow_18, ColumnAndShifts::sha256_rhs_w_18, ColumnAndShifts::sha256_sel_compute_w
92 };
93 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
94 ColumnAndShifts::gt_input_b,
95 ColumnAndShifts::gt_res };
96};
97
99template <typename FF_>
101
103
105 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_W_3";
106 static constexpr std::string_view RELATION_NAME = "sha256";
107 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
108 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
109 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
110 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_w_3_counts;
111 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_w_3_inv;
112 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
113 ColumnAndShifts::sha256_two_pow_3, ColumnAndShifts::sha256_rhs_w_3, ColumnAndShifts::sha256_sel_compute_w
114 };
115 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
116 ColumnAndShifts::gt_input_b,
117 ColumnAndShifts::gt_res };
118};
119
121template <typename FF_>
123
125
127 static constexpr std::string_view NAME = "LOOKUP_SHA256_W_S_0_XOR_0";
128 static constexpr std::string_view RELATION_NAME = "sha256";
129 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
130 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
131 static constexpr Column DST_SELECTOR = Column::bitwise_start_sha256;
132 static constexpr Column COUNTS = Column::lookup_sha256_w_s_0_xor_0_counts;
133 static constexpr Column INVERSES = Column::lookup_sha256_w_s_0_xor_0_inv;
134 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
135 ColumnAndShifts::sha256_w_15_rotr_7,
136 ColumnAndShifts::sha256_w_15_rotr_18,
137 ColumnAndShifts::sha256_w_15_rotr_7_xor_w_15_rotr_18,
138 ColumnAndShifts::sha256_xor_op_id,
139 ColumnAndShifts::sha256_u32_tag
140 };
141 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::bitwise_acc_ia,
142 ColumnAndShifts::bitwise_acc_ib,
143 ColumnAndShifts::bitwise_acc_ic,
144 ColumnAndShifts::bitwise_op_id,
145 ColumnAndShifts::bitwise_tag_a };
146};
147
149template <typename FF_>
151
153
155 static constexpr std::string_view NAME = "LOOKUP_SHA256_W_S_0_XOR_1";
156 static constexpr std::string_view RELATION_NAME = "sha256";
157 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
158 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
159 static constexpr Column DST_SELECTOR = Column::bitwise_start_sha256;
160 static constexpr Column COUNTS = Column::lookup_sha256_w_s_0_xor_1_counts;
161 static constexpr Column INVERSES = Column::lookup_sha256_w_s_0_xor_1_inv;
162 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
163 ColumnAndShifts::sha256_w_15_rotr_7_xor_w_15_rotr_18,
164 ColumnAndShifts::sha256_lhs_w_3,
165 ColumnAndShifts::sha256_w_s_0,
166 ColumnAndShifts::sha256_xor_op_id,
167 ColumnAndShifts::sha256_u32_tag
168 };
169 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::bitwise_acc_ia,
170 ColumnAndShifts::bitwise_acc_ib,
171 ColumnAndShifts::bitwise_acc_ic,
172 ColumnAndShifts::bitwise_op_id,
173 ColumnAndShifts::bitwise_tag_a };
174};
175
177template <typename FF_>
179
181
183 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_W_17";
184 static constexpr std::string_view RELATION_NAME = "sha256";
185 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
186 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
187 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
188 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_w_17_counts;
189 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_w_17_inv;
190 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
191 ColumnAndShifts::sha256_two_pow_17, ColumnAndShifts::sha256_rhs_w_17, ColumnAndShifts::sha256_sel_compute_w
192 };
193 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
194 ColumnAndShifts::gt_input_b,
195 ColumnAndShifts::gt_res };
196};
197
199template <typename FF_>
201
203
205 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_W_19";
206 static constexpr std::string_view RELATION_NAME = "sha256";
207 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
208 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
209 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
210 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_w_19_counts;
211 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_w_19_inv;
212 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
213 ColumnAndShifts::sha256_two_pow_19, ColumnAndShifts::sha256_rhs_w_19, ColumnAndShifts::sha256_sel_compute_w
214 };
215 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
216 ColumnAndShifts::gt_input_b,
217 ColumnAndShifts::gt_res };
218};
219
221template <typename FF_>
223
225
227 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_W_10";
228 static constexpr std::string_view RELATION_NAME = "sha256";
229 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
230 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
231 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
232 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_w_10_counts;
233 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_w_10_inv;
234 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
235 ColumnAndShifts::sha256_two_pow_10, ColumnAndShifts::sha256_rhs_w_10, ColumnAndShifts::sha256_sel_compute_w
236 };
237 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
238 ColumnAndShifts::gt_input_b,
239 ColumnAndShifts::gt_res };
240};
241
243template <typename FF_>
245
247
249 static constexpr std::string_view NAME = "LOOKUP_SHA256_W_S_1_XOR_0";
250 static constexpr std::string_view RELATION_NAME = "sha256";
251 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
252 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
253 static constexpr Column DST_SELECTOR = Column::bitwise_start_sha256;
254 static constexpr Column COUNTS = Column::lookup_sha256_w_s_1_xor_0_counts;
255 static constexpr Column INVERSES = Column::lookup_sha256_w_s_1_xor_0_inv;
256 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
257 ColumnAndShifts::sha256_w_2_rotr_17,
258 ColumnAndShifts::sha256_w_2_rotr_19,
259 ColumnAndShifts::sha256_w_2_rotr_17_xor_w_2_rotr_19,
260 ColumnAndShifts::sha256_xor_op_id,
261 ColumnAndShifts::sha256_u32_tag
262 };
263 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::bitwise_acc_ia,
264 ColumnAndShifts::bitwise_acc_ib,
265 ColumnAndShifts::bitwise_acc_ic,
266 ColumnAndShifts::bitwise_op_id,
267 ColumnAndShifts::bitwise_tag_a };
268};
269
271template <typename FF_>
273
275
277 static constexpr std::string_view NAME = "LOOKUP_SHA256_W_S_1_XOR_1";
278 static constexpr std::string_view RELATION_NAME = "sha256";
279 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
280 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
281 static constexpr Column DST_SELECTOR = Column::bitwise_start_sha256;
282 static constexpr Column COUNTS = Column::lookup_sha256_w_s_1_xor_1_counts;
283 static constexpr Column INVERSES = Column::lookup_sha256_w_s_1_xor_1_inv;
284 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
285 ColumnAndShifts::sha256_w_2_rotr_17_xor_w_2_rotr_19,
286 ColumnAndShifts::sha256_lhs_w_10,
287 ColumnAndShifts::sha256_w_s_1,
288 ColumnAndShifts::sha256_xor_op_id,
289 ColumnAndShifts::sha256_u32_tag
290 };
291 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::bitwise_acc_ia,
292 ColumnAndShifts::bitwise_acc_ib,
293 ColumnAndShifts::bitwise_acc_ic,
294 ColumnAndShifts::bitwise_op_id,
295 ColumnAndShifts::bitwise_tag_a };
296};
297
299template <typename FF_>
301
303
305 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_E_6";
306 static constexpr std::string_view RELATION_NAME = "sha256";
307 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
308 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
309 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
310 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_e_6_counts;
311 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_e_6_inv;
312 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
313 ColumnAndShifts::sha256_two_pow_6, ColumnAndShifts::sha256_rhs_e_6, ColumnAndShifts::sha256_perform_round
314 };
315 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
316 ColumnAndShifts::gt_input_b,
317 ColumnAndShifts::gt_res };
318};
319
321template <typename FF_>
323
325
327 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_E_11";
328 static constexpr std::string_view RELATION_NAME = "sha256";
329 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
330 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
331 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
332 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_e_11_counts;
333 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_e_11_inv;
334 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
335 ColumnAndShifts::sha256_two_pow_11, ColumnAndShifts::sha256_rhs_e_11, ColumnAndShifts::sha256_perform_round
336 };
337 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
338 ColumnAndShifts::gt_input_b,
339 ColumnAndShifts::gt_res };
340};
341
343template <typename FF_>
345
347
349 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_E_25";
350 static constexpr std::string_view RELATION_NAME = "sha256";
351 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
352 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
353 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
354 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_e_25_counts;
355 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_e_25_inv;
356 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
357 ColumnAndShifts::sha256_two_pow_25, ColumnAndShifts::sha256_rhs_e_25, ColumnAndShifts::sha256_perform_round
358 };
359 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
360 ColumnAndShifts::gt_input_b,
361 ColumnAndShifts::gt_res };
362};
363
365template <typename FF_>
367
369
371 static constexpr std::string_view NAME = "LOOKUP_SHA256_S_1_XOR_0";
372 static constexpr std::string_view RELATION_NAME = "sha256";
373 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
374 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
375 static constexpr Column DST_SELECTOR = Column::bitwise_start_sha256;
376 static constexpr Column COUNTS = Column::lookup_sha256_s_1_xor_0_counts;
377 static constexpr Column INVERSES = Column::lookup_sha256_s_1_xor_0_inv;
378 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
379 ColumnAndShifts::sha256_e_rotr_6,
380 ColumnAndShifts::sha256_e_rotr_11,
381 ColumnAndShifts::sha256_e_rotr_6_xor_e_rotr_11,
382 ColumnAndShifts::sha256_xor_op_id,
383 ColumnAndShifts::sha256_u32_tag
384 };
385 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::bitwise_acc_ia,
386 ColumnAndShifts::bitwise_acc_ib,
387 ColumnAndShifts::bitwise_acc_ic,
388 ColumnAndShifts::bitwise_op_id,
389 ColumnAndShifts::bitwise_tag_a };
390};
391
393template <typename FF_>
395
397
399 static constexpr std::string_view NAME = "LOOKUP_SHA256_S_1_XOR_1";
400 static constexpr std::string_view RELATION_NAME = "sha256";
401 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
402 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
403 static constexpr Column DST_SELECTOR = Column::bitwise_start_sha256;
404 static constexpr Column COUNTS = Column::lookup_sha256_s_1_xor_1_counts;
405 static constexpr Column INVERSES = Column::lookup_sha256_s_1_xor_1_inv;
406 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
407 ColumnAndShifts::sha256_e_rotr_6_xor_e_rotr_11,
408 ColumnAndShifts::sha256_e_rotr_25,
409 ColumnAndShifts::sha256_s_1,
410 ColumnAndShifts::sha256_xor_op_id,
411 ColumnAndShifts::sha256_u32_tag
412 };
413 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::bitwise_acc_ia,
414 ColumnAndShifts::bitwise_acc_ib,
415 ColumnAndShifts::bitwise_acc_ic,
416 ColumnAndShifts::bitwise_op_id,
417 ColumnAndShifts::bitwise_tag_a };
418};
419
421template <typename FF_>
423
425
427 static constexpr std::string_view NAME = "LOOKUP_SHA256_CH_AND_0";
428 static constexpr std::string_view RELATION_NAME = "sha256";
429 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
430 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
431 static constexpr Column DST_SELECTOR = Column::bitwise_start_sha256;
432 static constexpr Column COUNTS = Column::lookup_sha256_ch_and_0_counts;
433 static constexpr Column INVERSES = Column::lookup_sha256_ch_and_0_inv;
434 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::sha256_e,
435 ColumnAndShifts::sha256_f,
436 ColumnAndShifts::sha256_e_and_f,
437 ColumnAndShifts::sha256_and_op_id,
438 ColumnAndShifts::sha256_u32_tag };
439 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::bitwise_acc_ia,
440 ColumnAndShifts::bitwise_acc_ib,
441 ColumnAndShifts::bitwise_acc_ic,
442 ColumnAndShifts::bitwise_op_id,
443 ColumnAndShifts::bitwise_tag_a };
444};
445
447template <typename FF_>
449
451
453 static constexpr std::string_view NAME = "LOOKUP_SHA256_CH_AND_1";
454 static constexpr std::string_view RELATION_NAME = "sha256";
455 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
456 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
457 static constexpr Column DST_SELECTOR = Column::bitwise_start_sha256;
458 static constexpr Column COUNTS = Column::lookup_sha256_ch_and_1_counts;
459 static constexpr Column INVERSES = Column::lookup_sha256_ch_and_1_inv;
460 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::sha256_not_e,
461 ColumnAndShifts::sha256_g,
462 ColumnAndShifts::sha256_not_e_and_g,
463 ColumnAndShifts::sha256_and_op_id,
464 ColumnAndShifts::sha256_u32_tag };
465 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::bitwise_acc_ia,
466 ColumnAndShifts::bitwise_acc_ib,
467 ColumnAndShifts::bitwise_acc_ic,
468 ColumnAndShifts::bitwise_op_id,
469 ColumnAndShifts::bitwise_tag_a };
470};
471
473template <typename FF_>
475
477
479 static constexpr std::string_view NAME = "LOOKUP_SHA256_CH_XOR";
480 static constexpr std::string_view RELATION_NAME = "sha256";
481 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
482 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
483 static constexpr Column DST_SELECTOR = Column::bitwise_start_sha256;
484 static constexpr Column COUNTS = Column::lookup_sha256_ch_xor_counts;
485 static constexpr Column INVERSES = Column::lookup_sha256_ch_xor_inv;
486 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::sha256_e_and_f,
487 ColumnAndShifts::sha256_not_e_and_g,
488 ColumnAndShifts::sha256_ch,
489 ColumnAndShifts::sha256_xor_op_id,
490 ColumnAndShifts::sha256_u32_tag };
491 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::bitwise_acc_ia,
492 ColumnAndShifts::bitwise_acc_ib,
493 ColumnAndShifts::bitwise_acc_ic,
494 ColumnAndShifts::bitwise_op_id,
495 ColumnAndShifts::bitwise_tag_a };
496};
497
500
502
504 static constexpr std::string_view NAME = "LOOKUP_SHA256_ROUND_CONSTANT";
505 static constexpr std::string_view RELATION_NAME = "sha256";
506 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
507 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
508 static constexpr Column DST_SELECTOR = Column::precomputed_sel_sha256_compression;
509 static constexpr Column COUNTS = Column::lookup_sha256_round_constant_counts;
510 static constexpr Column INVERSES = Column::lookup_sha256_round_constant_inv;
511 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
512 ColumnAndShifts::sha256_round_count, ColumnAndShifts::sha256_round_constant
513 };
514 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
515 ColumnAndShifts::precomputed_idx, ColumnAndShifts::precomputed_sha256_compression_round_constant
516 };
517};
518
520template <typename FF_>
522
524
526 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_A_2";
527 static constexpr std::string_view RELATION_NAME = "sha256";
528 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
529 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
530 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
531 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_a_2_counts;
532 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_a_2_inv;
533 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
534 ColumnAndShifts::sha256_two_pow_2, ColumnAndShifts::sha256_rhs_a_2, ColumnAndShifts::sha256_perform_round
535 };
536 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
537 ColumnAndShifts::gt_input_b,
538 ColumnAndShifts::gt_res };
539};
540
542template <typename FF_>
544
546
548 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_A_13";
549 static constexpr std::string_view RELATION_NAME = "sha256";
550 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
551 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
552 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
553 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_a_13_counts;
554 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_a_13_inv;
555 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
556 ColumnAndShifts::sha256_two_pow_13, ColumnAndShifts::sha256_rhs_a_13, ColumnAndShifts::sha256_perform_round
557 };
558 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
559 ColumnAndShifts::gt_input_b,
560 ColumnAndShifts::gt_res };
561};
562
564template <typename FF_>
566
568
570 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_A_22";
571 static constexpr std::string_view RELATION_NAME = "sha256";
572 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
573 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
574 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
575 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_a_22_counts;
576 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_a_22_inv;
577 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
578 ColumnAndShifts::sha256_two_pow_22, ColumnAndShifts::sha256_rhs_a_22, ColumnAndShifts::sha256_perform_round
579 };
580 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
581 ColumnAndShifts::gt_input_b,
582 ColumnAndShifts::gt_res };
583};
584
586template <typename FF_>
588
590
592 static constexpr std::string_view NAME = "LOOKUP_SHA256_S_0_XOR_0";
593 static constexpr std::string_view RELATION_NAME = "sha256";
594 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
595 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
596 static constexpr Column DST_SELECTOR = Column::bitwise_start_sha256;
597 static constexpr Column COUNTS = Column::lookup_sha256_s_0_xor_0_counts;
598 static constexpr Column INVERSES = Column::lookup_sha256_s_0_xor_0_inv;
599 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
600 ColumnAndShifts::sha256_a_rotr_2,
601 ColumnAndShifts::sha256_a_rotr_13,
602 ColumnAndShifts::sha256_a_rotr_2_xor_a_rotr_13,
603 ColumnAndShifts::sha256_xor_op_id,
604 ColumnAndShifts::sha256_u32_tag
605 };
606 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::bitwise_acc_ia,
607 ColumnAndShifts::bitwise_acc_ib,
608 ColumnAndShifts::bitwise_acc_ic,
609 ColumnAndShifts::bitwise_op_id,
610 ColumnAndShifts::bitwise_tag_a };
611};
612
614template <typename FF_>
616
618
620 static constexpr std::string_view NAME = "LOOKUP_SHA256_S_0_XOR_1";
621 static constexpr std::string_view RELATION_NAME = "sha256";
622 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
623 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
624 static constexpr Column DST_SELECTOR = Column::bitwise_start_sha256;
625 static constexpr Column COUNTS = Column::lookup_sha256_s_0_xor_1_counts;
626 static constexpr Column INVERSES = Column::lookup_sha256_s_0_xor_1_inv;
627 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
628 ColumnAndShifts::sha256_a_rotr_2_xor_a_rotr_13,
629 ColumnAndShifts::sha256_a_rotr_22,
630 ColumnAndShifts::sha256_s_0,
631 ColumnAndShifts::sha256_xor_op_id,
632 ColumnAndShifts::sha256_u32_tag
633 };
634 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::bitwise_acc_ia,
635 ColumnAndShifts::bitwise_acc_ib,
636 ColumnAndShifts::bitwise_acc_ic,
637 ColumnAndShifts::bitwise_op_id,
638 ColumnAndShifts::bitwise_tag_a };
639};
640
642template <typename FF_>
644
646
648 static constexpr std::string_view NAME = "LOOKUP_SHA256_MAJ_AND_0";
649 static constexpr std::string_view RELATION_NAME = "sha256";
650 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
651 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
652 static constexpr Column DST_SELECTOR = Column::bitwise_start_sha256;
653 static constexpr Column COUNTS = Column::lookup_sha256_maj_and_0_counts;
654 static constexpr Column INVERSES = Column::lookup_sha256_maj_and_0_inv;
655 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::sha256_a,
656 ColumnAndShifts::sha256_b,
657 ColumnAndShifts::sha256_a_and_b,
658 ColumnAndShifts::sha256_and_op_id,
659 ColumnAndShifts::sha256_u32_tag };
660 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::bitwise_acc_ia,
661 ColumnAndShifts::bitwise_acc_ib,
662 ColumnAndShifts::bitwise_acc_ic,
663 ColumnAndShifts::bitwise_op_id,
664 ColumnAndShifts::bitwise_tag_a };
665};
666
668template <typename FF_>
670
672
674 static constexpr std::string_view NAME = "LOOKUP_SHA256_MAJ_AND_1";
675 static constexpr std::string_view RELATION_NAME = "sha256";
676 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
677 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
678 static constexpr Column DST_SELECTOR = Column::bitwise_start_sha256;
679 static constexpr Column COUNTS = Column::lookup_sha256_maj_and_1_counts;
680 static constexpr Column INVERSES = Column::lookup_sha256_maj_and_1_inv;
681 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::sha256_a,
682 ColumnAndShifts::sha256_c,
683 ColumnAndShifts::sha256_a_and_c,
684 ColumnAndShifts::sha256_and_op_id,
685 ColumnAndShifts::sha256_u32_tag };
686 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::bitwise_acc_ia,
687 ColumnAndShifts::bitwise_acc_ib,
688 ColumnAndShifts::bitwise_acc_ic,
689 ColumnAndShifts::bitwise_op_id,
690 ColumnAndShifts::bitwise_tag_a };
691};
692
694template <typename FF_>
696
698
700 static constexpr std::string_view NAME = "LOOKUP_SHA256_MAJ_AND_2";
701 static constexpr std::string_view RELATION_NAME = "sha256";
702 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
703 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
704 static constexpr Column DST_SELECTOR = Column::bitwise_start_sha256;
705 static constexpr Column COUNTS = Column::lookup_sha256_maj_and_2_counts;
706 static constexpr Column INVERSES = Column::lookup_sha256_maj_and_2_inv;
707 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::sha256_b,
708 ColumnAndShifts::sha256_c,
709 ColumnAndShifts::sha256_b_and_c,
710 ColumnAndShifts::sha256_and_op_id,
711 ColumnAndShifts::sha256_u32_tag };
712 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::bitwise_acc_ia,
713 ColumnAndShifts::bitwise_acc_ib,
714 ColumnAndShifts::bitwise_acc_ic,
715 ColumnAndShifts::bitwise_op_id,
716 ColumnAndShifts::bitwise_tag_a };
717};
718
720template <typename FF_>
722
724
726 static constexpr std::string_view NAME = "LOOKUP_SHA256_MAJ_XOR_0";
727 static constexpr std::string_view RELATION_NAME = "sha256";
728 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
729 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
730 static constexpr Column DST_SELECTOR = Column::bitwise_start_sha256;
731 static constexpr Column COUNTS = Column::lookup_sha256_maj_xor_0_counts;
732 static constexpr Column INVERSES = Column::lookup_sha256_maj_xor_0_inv;
733 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
734 ColumnAndShifts::sha256_a_and_b,
735 ColumnAndShifts::sha256_a_and_c,
736 ColumnAndShifts::sha256_a_and_b_xor_a_and_c,
737 ColumnAndShifts::sha256_xor_op_id,
738 ColumnAndShifts::sha256_u32_tag
739 };
740 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::bitwise_acc_ia,
741 ColumnAndShifts::bitwise_acc_ib,
742 ColumnAndShifts::bitwise_acc_ic,
743 ColumnAndShifts::bitwise_op_id,
744 ColumnAndShifts::bitwise_tag_a };
745};
746
748template <typename FF_>
750
752
754 static constexpr std::string_view NAME = "LOOKUP_SHA256_MAJ_XOR_1";
755 static constexpr std::string_view RELATION_NAME = "sha256";
756 static constexpr size_t LOOKUP_TUPLE_SIZE = 5;
757 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
758 static constexpr Column DST_SELECTOR = Column::bitwise_start_sha256;
759 static constexpr Column COUNTS = Column::lookup_sha256_maj_xor_1_counts;
760 static constexpr Column INVERSES = Column::lookup_sha256_maj_xor_1_inv;
761 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
762 ColumnAndShifts::sha256_a_and_b_xor_a_and_c,
763 ColumnAndShifts::sha256_b_and_c,
764 ColumnAndShifts::sha256_maj,
765 ColumnAndShifts::sha256_xor_op_id,
766 ColumnAndShifts::sha256_u32_tag
767 };
768 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::bitwise_acc_ia,
769 ColumnAndShifts::bitwise_acc_ib,
770 ColumnAndShifts::bitwise_acc_ic,
771 ColumnAndShifts::bitwise_op_id,
772 ColumnAndShifts::bitwise_tag_a };
773};
774
776template <typename FF_>
778
780
782 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_NEXT_A_LHS";
783 static constexpr std::string_view RELATION_NAME = "sha256";
784 static constexpr size_t LOOKUP_TUPLE_SIZE = 1;
785 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
786 static constexpr Column DST_SELECTOR = Column::precomputed_sel_range_8;
787 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_next_a_lhs_counts;
788 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_next_a_lhs_inv;
789 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
790 ColumnAndShifts::sha256_next_a_lhs
791 };
792 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::precomputed_idx };
793};
794
796template <typename FF_>
799
801
803 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_NEXT_A_RHS";
804 static constexpr std::string_view RELATION_NAME = "sha256";
805 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
806 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
807 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
808 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_next_a_rhs_counts;
809 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_next_a_rhs_inv;
810 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
811 ColumnAndShifts::sha256_two_pow_32, ColumnAndShifts::sha256_next_a_rhs, ColumnAndShifts::sha256_perform_round
812 };
813 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
814 ColumnAndShifts::gt_input_b,
815 ColumnAndShifts::gt_res };
816};
817
819template <typename FF_>
822
824
826 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_NEXT_E_LHS";
827 static constexpr std::string_view RELATION_NAME = "sha256";
828 static constexpr size_t LOOKUP_TUPLE_SIZE = 1;
829 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
830 static constexpr Column DST_SELECTOR = Column::precomputed_sel_range_8;
831 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_next_e_lhs_counts;
832 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_next_e_lhs_inv;
833 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
834 ColumnAndShifts::sha256_next_e_lhs
835 };
836 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::precomputed_idx };
837};
838
840template <typename FF_>
843
845
847 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_NEXT_E_RHS";
848 static constexpr std::string_view RELATION_NAME = "sha256";
849 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
850 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
851 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
852 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_next_e_rhs_counts;
853 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_next_e_rhs_inv;
854 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
855 ColumnAndShifts::sha256_two_pow_32, ColumnAndShifts::sha256_next_e_rhs, ColumnAndShifts::sha256_perform_round
856 };
857 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
858 ColumnAndShifts::gt_input_b,
859 ColumnAndShifts::gt_res };
860};
861
863template <typename FF_>
866
868
870 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_A_RHS";
871 static constexpr std::string_view RELATION_NAME = "sha256";
872 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
873 static constexpr Column SRC_SELECTOR = Column::sha256_last;
874 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
875 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_a_rhs_counts;
876 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_a_rhs_inv;
877 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
878 ColumnAndShifts::sha256_two_pow_32, ColumnAndShifts::sha256_output_a_rhs, ColumnAndShifts::sha256_last
879 };
880 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
881 ColumnAndShifts::gt_input_b,
882 ColumnAndShifts::gt_res };
883};
884
886template <typename FF_>
888
890
892 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_B_RHS";
893 static constexpr std::string_view RELATION_NAME = "sha256";
894 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
895 static constexpr Column SRC_SELECTOR = Column::sha256_last;
896 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
897 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_b_rhs_counts;
898 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_b_rhs_inv;
899 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
900 ColumnAndShifts::sha256_two_pow_32, ColumnAndShifts::sha256_output_b_rhs, ColumnAndShifts::sha256_last
901 };
902 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
903 ColumnAndShifts::gt_input_b,
904 ColumnAndShifts::gt_res };
905};
906
908template <typename FF_>
910
912
914 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_C_RHS";
915 static constexpr std::string_view RELATION_NAME = "sha256";
916 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
917 static constexpr Column SRC_SELECTOR = Column::sha256_last;
918 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
919 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_c_rhs_counts;
920 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_c_rhs_inv;
921 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
922 ColumnAndShifts::sha256_two_pow_32, ColumnAndShifts::sha256_output_c_rhs, ColumnAndShifts::sha256_last
923 };
924 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
925 ColumnAndShifts::gt_input_b,
926 ColumnAndShifts::gt_res };
927};
928
930template <typename FF_>
932
934
936 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_D_RHS";
937 static constexpr std::string_view RELATION_NAME = "sha256";
938 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
939 static constexpr Column SRC_SELECTOR = Column::sha256_last;
940 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
941 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_d_rhs_counts;
942 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_d_rhs_inv;
943 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
944 ColumnAndShifts::sha256_two_pow_32, ColumnAndShifts::sha256_output_d_rhs, ColumnAndShifts::sha256_last
945 };
946 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
947 ColumnAndShifts::gt_input_b,
948 ColumnAndShifts::gt_res };
949};
950
952template <typename FF_>
954
956
958 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_E_RHS";
959 static constexpr std::string_view RELATION_NAME = "sha256";
960 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
961 static constexpr Column SRC_SELECTOR = Column::sha256_last;
962 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
963 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_e_rhs_counts;
964 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_e_rhs_inv;
965 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
966 ColumnAndShifts::sha256_two_pow_32, ColumnAndShifts::sha256_output_e_rhs, ColumnAndShifts::sha256_last
967 };
968 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
969 ColumnAndShifts::gt_input_b,
970 ColumnAndShifts::gt_res };
971};
972
974template <typename FF_>
976
978
980 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_F_RHS";
981 static constexpr std::string_view RELATION_NAME = "sha256";
982 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
983 static constexpr Column SRC_SELECTOR = Column::sha256_last;
984 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
985 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_f_rhs_counts;
986 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_f_rhs_inv;
987 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
988 ColumnAndShifts::sha256_two_pow_32, ColumnAndShifts::sha256_output_f_rhs, ColumnAndShifts::sha256_last
989 };
990 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
991 ColumnAndShifts::gt_input_b,
992 ColumnAndShifts::gt_res };
993};
994
996template <typename FF_>
998
1000
1002 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_G_RHS";
1003 static constexpr std::string_view RELATION_NAME = "sha256";
1004 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
1005 static constexpr Column SRC_SELECTOR = Column::sha256_last;
1006 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
1007 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_g_rhs_counts;
1008 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_g_rhs_inv;
1009 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
1010 ColumnAndShifts::sha256_two_pow_32, ColumnAndShifts::sha256_output_g_rhs, ColumnAndShifts::sha256_last
1011 };
1012 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
1013 ColumnAndShifts::gt_input_b,
1014 ColumnAndShifts::gt_res };
1015};
1016
1018template <typename FF_>
1020
1022
1024 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_H_RHS";
1025 static constexpr std::string_view RELATION_NAME = "sha256";
1026 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
1027 static constexpr Column SRC_SELECTOR = Column::sha256_last;
1028 static constexpr Column DST_SELECTOR = Column::gt_sel_sha256;
1029 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_h_rhs_counts;
1030 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_h_rhs_inv;
1031 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
1032 ColumnAndShifts::sha256_two_pow_32, ColumnAndShifts::sha256_output_h_rhs, ColumnAndShifts::sha256_last
1033 };
1034 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
1035 ColumnAndShifts::gt_input_b,
1036 ColumnAndShifts::gt_res };
1037};
1038
1040template <typename FF_>
1042
1043} // namespace bb::avm2
Settings to be passed ot GenericLookupRelationImpl.
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view NAME
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS