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 = 2;
40 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
41 static constexpr Column DST_SELECTOR = Column::range_check_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_computed_w_rhs, ColumnAndShifts::sha256_rng_chk_32
46 };
47 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
48 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
49 };
50};
51
53template <typename FF_>
55
57
59 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_W_7";
60 static constexpr std::string_view RELATION_NAME = "sha256";
61 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
62 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
63 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
64 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_w_7_counts;
65 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_w_7_inv;
66 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::sha256_rhs_w_7,
67 ColumnAndShifts::sha256_rng_chk_7 };
68 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
69 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
70 };
71};
72
74template <typename FF_>
76
78
80 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_W_18";
81 static constexpr std::string_view RELATION_NAME = "sha256";
82 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
83 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
84 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
85 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_w_18_counts;
86 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_w_18_inv;
87 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
88 ColumnAndShifts::sha256_rhs_w_18, ColumnAndShifts::sha256_rng_chk_18
89 };
90 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
91 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
92 };
93};
94
96template <typename FF_>
98
100
102 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_W_3";
103 static constexpr std::string_view RELATION_NAME = "sha256";
104 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
105 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
106 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
107 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_w_3_counts;
108 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_w_3_inv;
109 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::sha256_rhs_w_3,
110 ColumnAndShifts::sha256_rng_chk_3 };
111 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
112 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
113 };
114};
115
117template <typename FF_>
119
121
123 static constexpr std::string_view NAME = "LOOKUP_SHA256_W_S_0_XOR_0";
124 static constexpr std::string_view RELATION_NAME = "sha256";
125 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
126 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
127 static constexpr Column DST_SELECTOR = Column::bitwise_sel_sha256;
128 static constexpr Column COUNTS = Column::lookup_sha256_w_s_0_xor_0_counts;
129 static constexpr Column INVERSES = Column::lookup_sha256_w_s_0_xor_0_inv;
130 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
131 ColumnAndShifts::sha256_w_15_rotr_7,
132 ColumnAndShifts::sha256_w_15_rotr_18,
133 ColumnAndShifts::sha256_w_15_rotr_7_xor_w_15_rotr_18,
134 ColumnAndShifts::sha256_xor_op_id,
135 ColumnAndShifts::sha256_u32_tag,
136 ColumnAndShifts::sha256_u32_tag
137 };
138 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
139 ColumnAndShifts::bitwise_ia, ColumnAndShifts::bitwise_ib, ColumnAndShifts::bitwise_ic,
140 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_tag_b
141 };
142};
143
145template <typename FF_>
147
149
151 static constexpr std::string_view NAME = "LOOKUP_SHA256_W_S_0_XOR_1";
152 static constexpr std::string_view RELATION_NAME = "sha256";
153 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
154 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
155 static constexpr Column DST_SELECTOR = Column::bitwise_sel_sha256;
156 static constexpr Column COUNTS = Column::lookup_sha256_w_s_0_xor_1_counts;
157 static constexpr Column INVERSES = Column::lookup_sha256_w_s_0_xor_1_inv;
158 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
159 ColumnAndShifts::sha256_w_15_rotr_7_xor_w_15_rotr_18,
160 ColumnAndShifts::sha256_lhs_w_3,
161 ColumnAndShifts::sha256_w_s_0,
162 ColumnAndShifts::sha256_xor_op_id,
163 ColumnAndShifts::sha256_u32_tag,
164 ColumnAndShifts::sha256_u32_tag
165 };
166 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
167 ColumnAndShifts::bitwise_ia, ColumnAndShifts::bitwise_ib, ColumnAndShifts::bitwise_ic,
168 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_tag_b
169 };
170};
171
173template <typename FF_>
175
177
179 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_W_17";
180 static constexpr std::string_view RELATION_NAME = "sha256";
181 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
182 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
183 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
184 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_w_17_counts;
185 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_w_17_inv;
186 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
187 ColumnAndShifts::sha256_rhs_w_17, ColumnAndShifts::sha256_rng_chk_17
188 };
189 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
190 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
191 };
192};
193
195template <typename FF_>
197
199
201 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_W_19";
202 static constexpr std::string_view RELATION_NAME = "sha256";
203 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
204 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
205 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
206 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_w_19_counts;
207 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_w_19_inv;
208 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
209 ColumnAndShifts::sha256_rhs_w_19, ColumnAndShifts::sha256_rng_chk_19
210 };
211 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
212 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
213 };
214};
215
217template <typename FF_>
219
221
223 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_W_10";
224 static constexpr std::string_view RELATION_NAME = "sha256";
225 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
226 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
227 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
228 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_w_10_counts;
229 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_w_10_inv;
230 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
231 ColumnAndShifts::sha256_rhs_w_10, ColumnAndShifts::sha256_rng_chk_10
232 };
233 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
234 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
235 };
236};
237
239template <typename FF_>
241
243
245 static constexpr std::string_view NAME = "LOOKUP_SHA256_W_S_1_XOR_0";
246 static constexpr std::string_view RELATION_NAME = "sha256";
247 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
248 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
249 static constexpr Column DST_SELECTOR = Column::bitwise_sel_sha256;
250 static constexpr Column COUNTS = Column::lookup_sha256_w_s_1_xor_0_counts;
251 static constexpr Column INVERSES = Column::lookup_sha256_w_s_1_xor_0_inv;
252 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
253 ColumnAndShifts::sha256_w_2_rotr_17,
254 ColumnAndShifts::sha256_w_2_rotr_19,
255 ColumnAndShifts::sha256_w_2_rotr_17_xor_w_2_rotr_19,
256 ColumnAndShifts::sha256_xor_op_id,
257 ColumnAndShifts::sha256_u32_tag,
258 ColumnAndShifts::sha256_u32_tag
259 };
260 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
261 ColumnAndShifts::bitwise_ia, ColumnAndShifts::bitwise_ib, ColumnAndShifts::bitwise_ic,
262 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_tag_b
263 };
264};
265
267template <typename FF_>
269
271
273 static constexpr std::string_view NAME = "LOOKUP_SHA256_W_S_1_XOR_1";
274 static constexpr std::string_view RELATION_NAME = "sha256";
275 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
276 static constexpr Column SRC_SELECTOR = Column::sha256_sel_compute_w;
277 static constexpr Column DST_SELECTOR = Column::bitwise_sel_sha256;
278 static constexpr Column COUNTS = Column::lookup_sha256_w_s_1_xor_1_counts;
279 static constexpr Column INVERSES = Column::lookup_sha256_w_s_1_xor_1_inv;
280 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
281 ColumnAndShifts::sha256_w_2_rotr_17_xor_w_2_rotr_19,
282 ColumnAndShifts::sha256_lhs_w_10,
283 ColumnAndShifts::sha256_w_s_1,
284 ColumnAndShifts::sha256_xor_op_id,
285 ColumnAndShifts::sha256_u32_tag,
286 ColumnAndShifts::sha256_u32_tag
287 };
288 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
289 ColumnAndShifts::bitwise_ia, ColumnAndShifts::bitwise_ib, ColumnAndShifts::bitwise_ic,
290 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_tag_b
291 };
292};
293
295template <typename FF_>
297
299
301 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_E_6";
302 static constexpr std::string_view RELATION_NAME = "sha256";
303 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
304 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
305 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
306 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_e_6_counts;
307 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_e_6_inv;
308 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::sha256_rhs_e_6,
309 ColumnAndShifts::sha256_rng_chk_6 };
310 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
311 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
312 };
313};
314
316template <typename FF_>
318
320
322 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_E_11";
323 static constexpr std::string_view RELATION_NAME = "sha256";
324 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
325 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
326 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
327 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_e_11_counts;
328 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_e_11_inv;
329 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
330 ColumnAndShifts::sha256_rhs_e_11, ColumnAndShifts::sha256_rng_chk_11
331 };
332 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
333 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
334 };
335};
336
338template <typename FF_>
340
342
344 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_E_25";
345 static constexpr std::string_view RELATION_NAME = "sha256";
346 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
347 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
348 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
349 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_e_25_counts;
350 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_e_25_inv;
351 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
352 ColumnAndShifts::sha256_rhs_e_25, ColumnAndShifts::sha256_rng_chk_25
353 };
354 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
355 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
356 };
357};
358
360template <typename FF_>
362
364
366 static constexpr std::string_view NAME = "LOOKUP_SHA256_S_1_XOR_0";
367 static constexpr std::string_view RELATION_NAME = "sha256";
368 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
369 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
370 static constexpr Column DST_SELECTOR = Column::bitwise_sel_sha256;
371 static constexpr Column COUNTS = Column::lookup_sha256_s_1_xor_0_counts;
372 static constexpr Column INVERSES = Column::lookup_sha256_s_1_xor_0_inv;
373 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
374 ColumnAndShifts::sha256_e_rotr_6,
375 ColumnAndShifts::sha256_e_rotr_11,
376 ColumnAndShifts::sha256_e_rotr_6_xor_e_rotr_11,
377 ColumnAndShifts::sha256_xor_op_id,
378 ColumnAndShifts::sha256_u32_tag,
379 ColumnAndShifts::sha256_u32_tag
380 };
381 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
382 ColumnAndShifts::bitwise_ia, ColumnAndShifts::bitwise_ib, ColumnAndShifts::bitwise_ic,
383 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_tag_b
384 };
385};
386
388template <typename FF_>
390
392
394 static constexpr std::string_view NAME = "LOOKUP_SHA256_S_1_XOR_1";
395 static constexpr std::string_view RELATION_NAME = "sha256";
396 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
397 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
398 static constexpr Column DST_SELECTOR = Column::bitwise_sel_sha256;
399 static constexpr Column COUNTS = Column::lookup_sha256_s_1_xor_1_counts;
400 static constexpr Column INVERSES = Column::lookup_sha256_s_1_xor_1_inv;
401 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
402 ColumnAndShifts::sha256_e_rotr_6_xor_e_rotr_11,
403 ColumnAndShifts::sha256_e_rotr_25,
404 ColumnAndShifts::sha256_s_1,
405 ColumnAndShifts::sha256_xor_op_id,
406 ColumnAndShifts::sha256_u32_tag,
407 ColumnAndShifts::sha256_u32_tag
408 };
409 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
410 ColumnAndShifts::bitwise_ia, ColumnAndShifts::bitwise_ib, ColumnAndShifts::bitwise_ic,
411 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_tag_b
412 };
413};
414
416template <typename FF_>
418
420
422 static constexpr std::string_view NAME = "LOOKUP_SHA256_CH_AND_0";
423 static constexpr std::string_view RELATION_NAME = "sha256";
424 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
425 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
426 static constexpr Column DST_SELECTOR = Column::bitwise_sel_sha256;
427 static constexpr Column COUNTS = Column::lookup_sha256_ch_and_0_counts;
428 static constexpr Column INVERSES = Column::lookup_sha256_ch_and_0_inv;
429 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
430 ColumnAndShifts::sha256_e, ColumnAndShifts::sha256_f, ColumnAndShifts::sha256_e_and_f,
431 ColumnAndShifts::sha256_and_op_id, ColumnAndShifts::sha256_u32_tag, ColumnAndShifts::sha256_u32_tag
432 };
433 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
434 ColumnAndShifts::bitwise_ia, ColumnAndShifts::bitwise_ib, ColumnAndShifts::bitwise_ic,
435 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_tag_b
436 };
437};
438
440template <typename FF_>
442
444
446 static constexpr std::string_view NAME = "LOOKUP_SHA256_CH_AND_1";
447 static constexpr std::string_view RELATION_NAME = "sha256";
448 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
449 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
450 static constexpr Column DST_SELECTOR = Column::bitwise_sel_sha256;
451 static constexpr Column COUNTS = Column::lookup_sha256_ch_and_1_counts;
452 static constexpr Column INVERSES = Column::lookup_sha256_ch_and_1_inv;
453 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
454 ColumnAndShifts::sha256_not_e, ColumnAndShifts::sha256_g, ColumnAndShifts::sha256_not_e_and_g,
455 ColumnAndShifts::sha256_and_op_id, ColumnAndShifts::sha256_u32_tag, ColumnAndShifts::sha256_u32_tag
456 };
457 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
458 ColumnAndShifts::bitwise_ia, ColumnAndShifts::bitwise_ib, ColumnAndShifts::bitwise_ic,
459 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_tag_b
460 };
461};
462
464template <typename FF_>
466
468
470 static constexpr std::string_view NAME = "LOOKUP_SHA256_CH_XOR";
471 static constexpr std::string_view RELATION_NAME = "sha256";
472 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
473 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
474 static constexpr Column DST_SELECTOR = Column::bitwise_sel_sha256;
475 static constexpr Column COUNTS = Column::lookup_sha256_ch_xor_counts;
476 static constexpr Column INVERSES = Column::lookup_sha256_ch_xor_inv;
477 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
478 ColumnAndShifts::sha256_e_and_f, ColumnAndShifts::sha256_not_e_and_g, ColumnAndShifts::sha256_ch,
479 ColumnAndShifts::sha256_xor_op_id, ColumnAndShifts::sha256_u32_tag, ColumnAndShifts::sha256_u32_tag
480 };
481 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
482 ColumnAndShifts::bitwise_ia, ColumnAndShifts::bitwise_ib, ColumnAndShifts::bitwise_ic,
483 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_tag_b
484 };
485};
486
489
491
493 static constexpr std::string_view NAME = "LOOKUP_SHA256_ROUND_CONSTANT";
494 static constexpr std::string_view RELATION_NAME = "sha256";
495 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
496 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
497 static constexpr Column DST_SELECTOR = Column::precomputed_sel_sha256_compression;
498 static constexpr Column COUNTS = Column::lookup_sha256_round_constant_counts;
499 static constexpr Column INVERSES = Column::lookup_sha256_round_constant_inv;
500 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
501 ColumnAndShifts::sha256_round_count, ColumnAndShifts::sha256_round_constant
502 };
503 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
504 ColumnAndShifts::precomputed_idx, ColumnAndShifts::precomputed_sha256_compression_round_constant
505 };
506};
507
509template <typename FF_>
511
513
515 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_A_2";
516 static constexpr std::string_view RELATION_NAME = "sha256";
517 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
518 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
519 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
520 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_a_2_counts;
521 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_a_2_inv;
522 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::sha256_rhs_a_2,
523 ColumnAndShifts::sha256_rng_chk_2 };
524 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
525 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
526 };
527};
528
530template <typename FF_>
532
534
536 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_A_13";
537 static constexpr std::string_view RELATION_NAME = "sha256";
538 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
539 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
540 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
541 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_a_13_counts;
542 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_a_13_inv;
543 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
544 ColumnAndShifts::sha256_rhs_a_13, ColumnAndShifts::sha256_rng_chk_13
545 };
546 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
547 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
548 };
549};
550
552template <typename FF_>
554
556
558 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_RHS_A_22";
559 static constexpr std::string_view RELATION_NAME = "sha256";
560 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
561 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
562 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
563 static constexpr Column COUNTS = Column::lookup_sha256_range_rhs_a_22_counts;
564 static constexpr Column INVERSES = Column::lookup_sha256_range_rhs_a_22_inv;
565 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
566 ColumnAndShifts::sha256_rhs_a_22, ColumnAndShifts::sha256_rng_chk_22
567 };
568 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
569 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
570 };
571};
572
574template <typename FF_>
576
578
580 static constexpr std::string_view NAME = "LOOKUP_SHA256_S_0_XOR_0";
581 static constexpr std::string_view RELATION_NAME = "sha256";
582 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
583 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
584 static constexpr Column DST_SELECTOR = Column::bitwise_sel_sha256;
585 static constexpr Column COUNTS = Column::lookup_sha256_s_0_xor_0_counts;
586 static constexpr Column INVERSES = Column::lookup_sha256_s_0_xor_0_inv;
587 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
588 ColumnAndShifts::sha256_a_rotr_2,
589 ColumnAndShifts::sha256_a_rotr_13,
590 ColumnAndShifts::sha256_a_rotr_2_xor_a_rotr_13,
591 ColumnAndShifts::sha256_xor_op_id,
592 ColumnAndShifts::sha256_u32_tag,
593 ColumnAndShifts::sha256_u32_tag
594 };
595 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
596 ColumnAndShifts::bitwise_ia, ColumnAndShifts::bitwise_ib, ColumnAndShifts::bitwise_ic,
597 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_tag_b
598 };
599};
600
602template <typename FF_>
604
606
608 static constexpr std::string_view NAME = "LOOKUP_SHA256_S_0_XOR_1";
609 static constexpr std::string_view RELATION_NAME = "sha256";
610 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
611 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
612 static constexpr Column DST_SELECTOR = Column::bitwise_sel_sha256;
613 static constexpr Column COUNTS = Column::lookup_sha256_s_0_xor_1_counts;
614 static constexpr Column INVERSES = Column::lookup_sha256_s_0_xor_1_inv;
615 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
616 ColumnAndShifts::sha256_a_rotr_2_xor_a_rotr_13,
617 ColumnAndShifts::sha256_a_rotr_22,
618 ColumnAndShifts::sha256_s_0,
619 ColumnAndShifts::sha256_xor_op_id,
620 ColumnAndShifts::sha256_u32_tag,
621 ColumnAndShifts::sha256_u32_tag
622 };
623 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
624 ColumnAndShifts::bitwise_ia, ColumnAndShifts::bitwise_ib, ColumnAndShifts::bitwise_ic,
625 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_tag_b
626 };
627};
628
630template <typename FF_>
632
634
636 static constexpr std::string_view NAME = "LOOKUP_SHA256_MAJ_AND_0";
637 static constexpr std::string_view RELATION_NAME = "sha256";
638 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
639 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
640 static constexpr Column DST_SELECTOR = Column::bitwise_sel_sha256;
641 static constexpr Column COUNTS = Column::lookup_sha256_maj_and_0_counts;
642 static constexpr Column INVERSES = Column::lookup_sha256_maj_and_0_inv;
643 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
644 ColumnAndShifts::sha256_a, ColumnAndShifts::sha256_b, ColumnAndShifts::sha256_a_and_b,
645 ColumnAndShifts::sha256_and_op_id, ColumnAndShifts::sha256_u32_tag, ColumnAndShifts::sha256_u32_tag
646 };
647 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
648 ColumnAndShifts::bitwise_ia, ColumnAndShifts::bitwise_ib, ColumnAndShifts::bitwise_ic,
649 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_tag_b
650 };
651};
652
654template <typename FF_>
656
658
660 static constexpr std::string_view NAME = "LOOKUP_SHA256_MAJ_AND_1";
661 static constexpr std::string_view RELATION_NAME = "sha256";
662 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
663 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
664 static constexpr Column DST_SELECTOR = Column::bitwise_sel_sha256;
665 static constexpr Column COUNTS = Column::lookup_sha256_maj_and_1_counts;
666 static constexpr Column INVERSES = Column::lookup_sha256_maj_and_1_inv;
667 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
668 ColumnAndShifts::sha256_a, ColumnAndShifts::sha256_c, ColumnAndShifts::sha256_a_and_c,
669 ColumnAndShifts::sha256_and_op_id, ColumnAndShifts::sha256_u32_tag, ColumnAndShifts::sha256_u32_tag
670 };
671 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
672 ColumnAndShifts::bitwise_ia, ColumnAndShifts::bitwise_ib, ColumnAndShifts::bitwise_ic,
673 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_tag_b
674 };
675};
676
678template <typename FF_>
680
682
684 static constexpr std::string_view NAME = "LOOKUP_SHA256_MAJ_AND_2";
685 static constexpr std::string_view RELATION_NAME = "sha256";
686 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
687 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
688 static constexpr Column DST_SELECTOR = Column::bitwise_sel_sha256;
689 static constexpr Column COUNTS = Column::lookup_sha256_maj_and_2_counts;
690 static constexpr Column INVERSES = Column::lookup_sha256_maj_and_2_inv;
691 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
692 ColumnAndShifts::sha256_b, ColumnAndShifts::sha256_c, ColumnAndShifts::sha256_b_and_c,
693 ColumnAndShifts::sha256_and_op_id, ColumnAndShifts::sha256_u32_tag, ColumnAndShifts::sha256_u32_tag
694 };
695 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
696 ColumnAndShifts::bitwise_ia, ColumnAndShifts::bitwise_ib, ColumnAndShifts::bitwise_ic,
697 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_tag_b
698 };
699};
700
702template <typename FF_>
704
706
708 static constexpr std::string_view NAME = "LOOKUP_SHA256_MAJ_XOR_0";
709 static constexpr std::string_view RELATION_NAME = "sha256";
710 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
711 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
712 static constexpr Column DST_SELECTOR = Column::bitwise_sel_sha256;
713 static constexpr Column COUNTS = Column::lookup_sha256_maj_xor_0_counts;
714 static constexpr Column INVERSES = Column::lookup_sha256_maj_xor_0_inv;
715 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
716 ColumnAndShifts::sha256_a_and_b, ColumnAndShifts::sha256_a_and_c, ColumnAndShifts::sha256_a_and_b_xor_a_and_c,
717 ColumnAndShifts::sha256_xor_op_id, ColumnAndShifts::sha256_u32_tag, ColumnAndShifts::sha256_u32_tag
718 };
719 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
720 ColumnAndShifts::bitwise_ia, ColumnAndShifts::bitwise_ib, ColumnAndShifts::bitwise_ic,
721 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_tag_b
722 };
723};
724
726template <typename FF_>
728
730
732 static constexpr std::string_view NAME = "LOOKUP_SHA256_MAJ_XOR_1";
733 static constexpr std::string_view RELATION_NAME = "sha256";
734 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
735 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
736 static constexpr Column DST_SELECTOR = Column::bitwise_sel_sha256;
737 static constexpr Column COUNTS = Column::lookup_sha256_maj_xor_1_counts;
738 static constexpr Column INVERSES = Column::lookup_sha256_maj_xor_1_inv;
739 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
740 ColumnAndShifts::sha256_a_and_b_xor_a_and_c, ColumnAndShifts::sha256_b_and_c, ColumnAndShifts::sha256_maj,
741 ColumnAndShifts::sha256_xor_op_id, ColumnAndShifts::sha256_u32_tag, ColumnAndShifts::sha256_u32_tag
742 };
743 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
744 ColumnAndShifts::bitwise_ia, ColumnAndShifts::bitwise_ib, ColumnAndShifts::bitwise_ic,
745 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_tag_b
746 };
747};
748
750template <typename FF_>
752
754
756 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_NEXT_A_LHS";
757 static constexpr std::string_view RELATION_NAME = "sha256";
758 static constexpr size_t LOOKUP_TUPLE_SIZE = 1;
759 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
760 static constexpr Column DST_SELECTOR = Column::precomputed_sel_range_8;
761 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_next_a_lhs_counts;
762 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_next_a_lhs_inv;
763 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
764 ColumnAndShifts::sha256_next_a_lhs
765 };
766 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::precomputed_idx };
767};
768
770template <typename FF_>
773
775
777 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_NEXT_A_RHS";
778 static constexpr std::string_view RELATION_NAME = "sha256";
779 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
780 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
781 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
782 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_next_a_rhs_counts;
783 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_next_a_rhs_inv;
784 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
785 ColumnAndShifts::sha256_next_a_rhs, ColumnAndShifts::sha256_rng_chk_32
786 };
787 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
788 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
789 };
790};
791
793template <typename FF_>
796
798
800 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_NEXT_E_LHS";
801 static constexpr std::string_view RELATION_NAME = "sha256";
802 static constexpr size_t LOOKUP_TUPLE_SIZE = 1;
803 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
804 static constexpr Column DST_SELECTOR = Column::precomputed_sel_range_8;
805 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_next_e_lhs_counts;
806 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_next_e_lhs_inv;
807 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
808 ColumnAndShifts::sha256_next_e_lhs
809 };
810 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::precomputed_idx };
811};
812
814template <typename FF_>
817
819
821 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_NEXT_E_RHS";
822 static constexpr std::string_view RELATION_NAME = "sha256";
823 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
824 static constexpr Column SRC_SELECTOR = Column::sha256_perform_round;
825 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
826 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_next_e_rhs_counts;
827 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_next_e_rhs_inv;
828 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
829 ColumnAndShifts::sha256_next_e_rhs, ColumnAndShifts::sha256_rng_chk_32
830 };
831 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
832 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
833 };
834};
835
837template <typename FF_>
840
842
844 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_A_RHS";
845 static constexpr std::string_view RELATION_NAME = "sha256";
846 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
847 static constexpr Column SRC_SELECTOR = Column::sha256_last;
848 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
849 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_a_rhs_counts;
850 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_a_rhs_inv;
851 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
852 ColumnAndShifts::sha256_output_a_rhs, ColumnAndShifts::sha256_rng_chk_32
853 };
854 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
855 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
856 };
857};
858
860template <typename FF_>
862
864
866 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_B_RHS";
867 static constexpr std::string_view RELATION_NAME = "sha256";
868 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
869 static constexpr Column SRC_SELECTOR = Column::sha256_last;
870 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
871 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_b_rhs_counts;
872 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_b_rhs_inv;
873 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
874 ColumnAndShifts::sha256_output_b_rhs, ColumnAndShifts::sha256_rng_chk_32
875 };
876 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
877 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
878 };
879};
880
882template <typename FF_>
884
886
888 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_C_RHS";
889 static constexpr std::string_view RELATION_NAME = "sha256";
890 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
891 static constexpr Column SRC_SELECTOR = Column::sha256_last;
892 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
893 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_c_rhs_counts;
894 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_c_rhs_inv;
895 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
896 ColumnAndShifts::sha256_output_c_rhs, ColumnAndShifts::sha256_rng_chk_32
897 };
898 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
899 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
900 };
901};
902
904template <typename FF_>
906
908
910 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_D_RHS";
911 static constexpr std::string_view RELATION_NAME = "sha256";
912 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
913 static constexpr Column SRC_SELECTOR = Column::sha256_last;
914 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
915 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_d_rhs_counts;
916 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_d_rhs_inv;
917 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
918 ColumnAndShifts::sha256_output_d_rhs, ColumnAndShifts::sha256_rng_chk_32
919 };
920 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
921 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
922 };
923};
924
926template <typename FF_>
928
930
932 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_E_RHS";
933 static constexpr std::string_view RELATION_NAME = "sha256";
934 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
935 static constexpr Column SRC_SELECTOR = Column::sha256_last;
936 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
937 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_e_rhs_counts;
938 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_e_rhs_inv;
939 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
940 ColumnAndShifts::sha256_output_e_rhs, ColumnAndShifts::sha256_rng_chk_32
941 };
942 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
943 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
944 };
945};
946
948template <typename FF_>
950
952
954 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_F_RHS";
955 static constexpr std::string_view RELATION_NAME = "sha256";
956 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
957 static constexpr Column SRC_SELECTOR = Column::sha256_last;
958 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
959 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_f_rhs_counts;
960 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_f_rhs_inv;
961 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
962 ColumnAndShifts::sha256_output_f_rhs, ColumnAndShifts::sha256_rng_chk_32
963 };
964 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
965 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
966 };
967};
968
970template <typename FF_>
972
974
976 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_G_RHS";
977 static constexpr std::string_view RELATION_NAME = "sha256";
978 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
979 static constexpr Column SRC_SELECTOR = Column::sha256_last;
980 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
981 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_g_rhs_counts;
982 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_g_rhs_inv;
983 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
984 ColumnAndShifts::sha256_output_g_rhs, ColumnAndShifts::sha256_rng_chk_32
985 };
986 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
987 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
988 };
989};
990
992template <typename FF_>
994
996
998 static constexpr std::string_view NAME = "LOOKUP_SHA256_RANGE_COMP_H_RHS";
999 static constexpr std::string_view RELATION_NAME = "sha256";
1000 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
1001 static constexpr Column SRC_SELECTOR = Column::sha256_last;
1002 static constexpr Column DST_SELECTOR = Column::range_check_sel_sha256;
1003 static constexpr Column COUNTS = Column::lookup_sha256_range_comp_h_rhs_counts;
1004 static constexpr Column INVERSES = Column::lookup_sha256_range_comp_h_rhs_inv;
1005 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
1006 ColumnAndShifts::sha256_output_h_rhs, ColumnAndShifts::sha256_rng_chk_32
1007 };
1008 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
1009 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
1010 };
1011};
1012
1014template <typename FF_>
1016
1017} // 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::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 > 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