1use crate::{
5 field::instance::FpBLS12, fp_from_hex, poseidon2::params::PoseidonParams,
6};
7
8pub struct BLS2Params;
11
12#[rustfmt::skip]
13impl PoseidonParams<FpBLS12> for BLS2Params {
14 const T: usize = 2;
15 const D: u8 = 5;
16 const CAPACITY: usize = 1;
17 const ROUNDS_F: usize = 8;
18 const ROUNDS_P: usize = 56;
19 const MAT_INTERNAL_DIAG_M_1: &'static [FpBLS12] = &[
20 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000001"),
21 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000002"),
22 ];
23 const ROUND_CONSTANTS: &'static [&'static [FpBLS12]] = &[
24 &[
25 fp_from_hex!("6267f5556c88257324c1c8b00d5871b2eba13cc39d72aa10dde6b69bc44c41c7"),
26 fp_from_hex!("30347723511438a085118166c68bf0c4f4ab5c10a2c55adb5cf87cc9e030f60f"),
27 ],
28 &[
29 fp_from_hex!("10db856965e40038eb6427303181e7b7439f1a051aa4630c26cf86d0a0451a4b"),
30 fp_from_hex!("5a3d2dcd541e4faaae7eb143eec847a0f652b6dc1b92e3f39ec23c808b3a5d63"),
31 ],
32 &[
33 fp_from_hex!("3b07f0ff7edcf93b1dd0487bc9fab1c6905f9ceee38dcce83efeb3a320398526"),
34 fp_from_hex!("40c73c524b9fd0fab63128175befe07b5c63ccdde9ca10e1a37205c9607fdf8a"),
35 ],
36 &[
37 fp_from_hex!("3a933861cf23752376d94dbb24b0f3c61630787928875c07672b68abfb9191e0"),
38 fp_from_hex!("71cc165e208570b2d5ef81db84e3c5e714ea4edfb36fc7fb11ef65a64b2d9755"),
39 ],
40 &[
41 fp_from_hex!("6c0dc9eb332b5d968bec8ad68fe24ce34087ea54093f153618434475bce402f8"),
42 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
43 ],
44 &[
45 fp_from_hex!("0af5bafd335dae5c86967b11d5dcefb986a54c9d60d35eb06dc7a3fd779b3906"),
46 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
47 ],
48 &[
49 fp_from_hex!("6e12847918f030f2626c150ab69e4be0f13d202ae1f8bc87ea74323e93372e3b"),
50 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
51 ],
52 &[
53 fp_from_hex!("5565d40e21d059a26db241ca125d9316283eadf144b1318e604e253eeae1fe9a"),
54 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
55 ],
56 &[
57 fp_from_hex!("608e01b42d3dca09fed9b54eadaaba3e4ce6aefe92b0dc954a0fa4683a9678f2"),
58 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
59 ],
60 &[
61 fp_from_hex!("16bbe434b24f94e2c40ed1f4f9bd7d17e5be96c3aec15579b35fd80f0f80de9e"),
62 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
63 ],
64 &[
65 fp_from_hex!("0d1be811a8e73220cab01ce981d475522c3d7dd9e2716c3a2cf4ddd541546890"),
66 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
67 ],
68 &[
69 fp_from_hex!("5997a3affb18f942868b86f8ee10a68966e90bac7bbd8c65ede7e6e5ef1f6320"),
70 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
71 ],
72 &[
73 fp_from_hex!("4d92e86d270041061eec80278079fca771499dea5ccdc99682a953bb3a038b8e"),
74 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
75 ],
76 &[
77 fp_from_hex!("616c8c5ce232b9314f694fc6a968446ea9daf7a4079ce1a75fcc950741d680bb"),
78 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
79 ],
80 &[
81 fp_from_hex!("677e31e7846d9131bdc350eaf11a8ff918dd258ddd800444424afab34dfdfe3d"),
82 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
83 ],
84 &[
85 fp_from_hex!("4e7d7f85aefc110b233525ee3e53851aee7d3241e2a132585e0e25005eee0b0e"),
86 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
87 ],
88 &[
89 fp_from_hex!("06a8b4539488b7dddc48c3a226dbda313f906e106f844196d55013d321244f13"),
90 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
91 ],
92 &[
93 fp_from_hex!("5091517b6a85783108999f8e6bda3c793bef3f2e9589641d260bdfde8bdef00d"),
94 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
95 ],
96 &[
97 fp_from_hex!("0d2703e5b30f54d7f414e901802d54f8c14cd6355415df6e0f063d16bef9c43a"),
98 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
99 ],
100 &[
101 fp_from_hex!("56f69096811148eb38eec143d32565c077b3d1a4a4351f2b458f43b1659d4495"),
102 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
103 ],
104 &[
105 fp_from_hex!("622d94d38d1ded428afd062008c5709b43a678f6ba518ec56383e8ffba473504"),
106 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
107 ],
108 &[
109 fp_from_hex!("2730c607bba7333723a4a44577819b7db82a24574f6d13eee4c856c1ca3de9c7"),
110 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
111 ],
112 &[
113 fp_from_hex!("01ac5f59256c5004dc1043c53b23800a3fbab53eb1a83f551056f227b514b9f6"),
114 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
115 ],
116 &[
117 fp_from_hex!("0790b92523c973f1c95b94937afbb5796d89481e7a56328b44bab5ba81ae42f3"),
118 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
119 ],
120 &[
121 fp_from_hex!("1d63b59d97bc269d13964fb3e8771d0acc749bc83eb2f0372484e266142bb8c0"),
122 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
123 ],
124 &[
125 fp_from_hex!("1a52d04e5f14a3a05f7a01262df9e68c77fdf7e2bfb56c8b252d2140efdf0914"),
126 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
127 ],
128 &[
129 fp_from_hex!("5aa9b3b808812b284857e8622843a8717fa5cb49b217017f31d79e8d0f963fc0"),
130 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
131 ],
132 &[
133 fp_from_hex!("6a3d18fdbeb1d77ec1304539b00e6188786dbbc4435269b4c6281367f42656e3"),
134 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
135 ],
136 &[
137 fp_from_hex!("4743e860df269a85dd76fb99dbe9d840eb669dc859754b3f74805e57ba288b00"),
138 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
139 ],
140 &[
141 fp_from_hex!("6c32cac3946825f80a434c5ab397fc1a1c6a9bdfaab53175d4cf3d29ddb6cbc6"),
142 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
143 ],
144 &[
145 fp_from_hex!("333b0eea5da7ed1e3959d16280a361aa77dd24ecbfb28e1b2583ac4e9894305c"),
146 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
147 ],
148 &[
149 fp_from_hex!("3b503fc333b795ccc0c5bb3ae26b077dc3742cb745ec8821648c5ce7ebd9df18"),
150 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
151 ],
152 &[
153 fp_from_hex!("4fa5853188d9f728a17532d94bee6fb28fee510380a5d50927c6c5b1ce283444"),
154 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
155 ],
156 &[
157 fp_from_hex!("5d2ed8a6603a905bac490ebfb9e6c18f0bc9da1bbc2173291b18de6b6186118f"),
158 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
159 ],
160 &[
161 fp_from_hex!("2d830a53584c5556264852f075c78f7f9eb068016ae88af9cda933d6ae52eca7"),
162 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
163 ],
164 &[
165 fp_from_hex!("0250f4d6780ad29ae60e55f135b9ac80ccc7c81e3add37db276c26f1a2b1b86e"),
166 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
167 ],
168 &[
169 fp_from_hex!("6e3e9595f59220599e23e830728d4a0c4d62515ec1ed10b72446cf4df5b4c308"),
170 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
171 ],
172 &[
173 fp_from_hex!("2cd3314555d6faf23ee90cdb884f1c4697ebe98e3a450a624c4d896233b93cd5"),
174 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
175 ],
176 &[
177 fp_from_hex!("584a408d0f370543b8413fee70a060a394e561f504d8679f7bece4bf222e4108"),
178 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
179 ],
180 &[
181 fp_from_hex!("499cd53437b9fcbf7479c00fcc21295759074ce9bd1bb1fbd3460237aef4759e"),
182 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
183 ],
184 &[
185 fp_from_hex!("56a9b567bd0646effd0608d74d537991136098d9a06af6cb3ff8f010efb57578"),
186 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
187 ],
188 &[
189 fp_from_hex!("6a5fae2b00d968b931441b374e27ba4d03b306bd602d48731677169e75a67e8c"),
190 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
191 ],
192 &[
193 fp_from_hex!("2e1cc28e390e64aa1d60edb99c0aeda7c8c32bdb01ba11abbad5026b46eccb27"),
194 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
195 ],
196 &[
197 fp_from_hex!("2d4820000675df7c276beac408fe2e851e734a7008ae09bbcb3c96c70024f71b"),
198 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
199 ],
200 &[
201 fp_from_hex!("0c2fe101a2b52b538b902c6b2dc992cb266f7636e05b0c068385b5fa19e97142"),
202 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
203 ],
204 &[
205 fp_from_hex!("209b790b78c0e7927c6a178ef2f00b8687fc7bd4f21a9e02578551535002bc95"),
206 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
207 ],
208 &[
209 fp_from_hex!("2dd0926cf56bbaaec6491513d08a9983f94a910852a7b4ea4bd4222b93e14c10"),
210 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
211 ],
212 &[
213 fp_from_hex!("4316b39dd7d65b1bb575198104d409b169236a7ade371f7ab176fcbae75a5f0d"),
214 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
215 ],
216 &[
217 fp_from_hex!("540276d61041b91f6ea3068ec260a9338b6e3da15d934e648c24f35aee04e535"),
218 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
219 ],
220 &[
221 fp_from_hex!("37af612900b839977b146324c84772c58a4ccc0f6494cc054571827e74bfd2d3"),
222 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
223 ],
224 &[
225 fp_from_hex!("2af00c93d59ed14c9911e5cb3781d772371e83228e4267bbce11d065c1955338"),
226 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
227 ],
228 &[
229 fp_from_hex!("62b48779b0cf7ff2c10fd9b91a6ff7b7a99f935e961a5a94aa38f9d4f71c8b4c"),
230 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
231 ],
232 &[
233 fp_from_hex!("540bf5bbe01f28563bcbe11a2ce346d8231a2cdd0fe07641f9fa89e5c21978e3"),
234 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
235 ],
236 &[
237 fp_from_hex!("232b6c847a6d23912cb10ecbe50b53491f67f71e9b87a4a30446f2218017874b"),
238 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
239 ],
240 &[
241 fp_from_hex!("0ab34adbe77b8f1e57a370e4fd626071eea74b3f0b66644a629efaa0e96456c0"),
242 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
243 ],
244 &[
245 fp_from_hex!("1a83e43ef118c90046b1bdbeab8dd5cdcab632807c2cd0dc9147cbc5b7084be8"),
246 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
247 ],
248 &[
249 fp_from_hex!("1ec6fa41b41b672d9005468720918130b642567462a3d557a595d4dc6c56f2f9"),
250 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
251 ],
252 &[
253 fp_from_hex!("01f81a153199a751a111b8f5212cfc5bf82aacf0287d03e1864f8e5713fe4a17"),
254 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
255 ],
256 &[
257 fp_from_hex!("2617307587a675f4ecd73a54a7b206162d751cabf3d9fd007bcca4de2c6f0649"),
258 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
259 ],
260 &[
261 fp_from_hex!("1647be94c515178c7974a245624b642bb1ae6e2d4e1682087e362d7f98bc953f"),
262 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
263 ],
264 &[
265 fp_from_hex!("6e690b956e00b9e339dec49d675586f661f9b081ee3fa7696d73977658aa6fea"),
266 fp_from_hex!("660b85bc22de06d476c47bf084ad436f59874f1d630c0f5c91fbef51d5e738c5"),
267 ],
268 &[
269 fp_from_hex!("32bf3d451b69dde075fc370eaa8c1b77b5c0bc2aab1c7b46da7ef9d1840b0419"),
270 fp_from_hex!("73924b40beaa9c1ce4074c2154d1af4d658c09395a568b99b2fbcc3b5685e810"),
271 ],
272 &[
273 fp_from_hex!("17cbb3ee0adcb9d977e96e9152b36042925244fdd0aa184c7a89a58a2dc40097"),
274 fp_from_hex!("29d76a821e3220775c552f6b5977ab94956e52b8dac36ef88ace050d553766a3"),
275 ],
276 &[
277 fp_from_hex!("62b1a6c06ab26881a1fe57eceac56b5aec0b96da7211557f4e27ec24296d7db6"),
278 fp_from_hex!("0dfc474151e5c605a693a51ae8227cc0a99fdc4524fc2810c6eda9035d04334d"),
279 ],
280 ];
281}
282
283pub struct BLS3Params;
286#[rustfmt::skip]
287impl PoseidonParams<FpBLS12> for BLS3Params {
288 const T: usize = 3;
289 const D: u8 = 5;
290 const CAPACITY: usize = 1;
291 const ROUNDS_F: usize = 8;
292 const ROUNDS_P: usize = 56;
293 const MAT_INTERNAL_DIAG_M_1: &'static [FpBLS12] = &[
294 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000001"),
295 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000001"),
296 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000002"),
297 ];
298 const ROUND_CONSTANTS: &'static [&'static [FpBLS12]] = &[
299 &[
300 fp_from_hex!("6f007a551156b3a449e44936b7c093644a0ed33f33eaccc628e942e836c1a875"),
301 fp_from_hex!("360d7470611e473d353f628f76d110f34e71162f31003b7057538c2596426303"),
302 fp_from_hex!("4b5fec3aa073df44019091f007a44ca996484965f7036dce3e9d0977edcdc0f6"),
303 ],
304 &[
305 fp_from_hex!("67cf1868af6396c0b84cce715e539f849e06cd1c383ac5b06100c76bcc973a11"),
306 fp_from_hex!("555db4d1dced819f5d3de70fde83f1c7d3e8c98968e516a23a771a5c9c8257aa"),
307 fp_from_hex!("2bab94d7ae222d135dc3c6c5febfaa314908ac2f12ebe06fbdb74213bf63188b"),
308 ],
309 &[
310 fp_from_hex!("66f44be5296682c4fa7882799d6dd049b6d7d2c950ccf98cf2e50d6d1ebb77c2"),
311 fp_from_hex!("150c93fef652fb1c2bf03e1a29aa871fef77e7d736766c5d0939d92753cc5dc8"),
312 fp_from_hex!("3270661e68928b3a955d55db56dc57c103cc0a60141e894e14259dce537782b2"),
313 ],
314 &[
315 fp_from_hex!("073f116f04122e25a0b7afe4e2057299b407c370f2b5a1ccce9fb9ffc345afb3"),
316 fp_from_hex!("409fda22558cfe4d3dd8dce24f69e76f8c2aaeb1dd0f09d65e654c71f32aa23f"),
317 fp_from_hex!("2a32ec5c4ee5b1837affd09c1f53f5fd55c9cd2061ae93ca8ebad76fc71554d8"),
318 ],
319 &[
320 fp_from_hex!("5848ebeb5923e92555b7124fffba5d6bd571c6f984195eb9cfd3a3e8eb55b1d4"),
321 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
322 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
323 ],
324 &[
325 fp_from_hex!("270326ee039df19e651e2cfc740628ca634d24fc6e2559f22d8ccbe292efeead"),
326 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
327 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
328 ],
329 &[
330 fp_from_hex!("27c6642ac633bc66dc100fe7fcfa54918af895bce012f182a068fc37c182e274"),
331 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
332 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
333 ],
334 &[
335 fp_from_hex!("1bdfd8b01401c70ad27f57396989129d710e1fb6ab976a459ca18682e26d7ff9"),
336 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
337 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
338 ],
339 &[
340 fp_from_hex!("491b9ba6983bcf9f05fe4794adb44a30879bf8289662e1f57d90f672414e8a4a"),
341 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
342 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
343 ],
344 &[
345 fp_from_hex!("162a14c62f9a89b814b9d6a9c84dd678f4f6fb3f9054d373c832d824261a35ea"),
346 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
347 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
348 ],
349 &[
350 fp_from_hex!("2d193e0f76de586b2af6f79e3127feeaac0a1fc71e2cf0c0f79824667b5b6bec"),
351 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
352 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
353 ],
354 &[
355 fp_from_hex!("46efd8a9a262d6d8fdc9ca5c04b0982f24ddcc6e9863885a6a732a3906a07b95"),
356 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
357 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
358 ],
359 &[
360 fp_from_hex!("509717e0c200e3c92d8dca2973b3db45f0788294351ad07ae75cbb780693a798"),
361 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
362 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
363 ],
364 &[
365 fp_from_hex!("7299b28464a8c94fb9d4df61380f39c0dca9c2c014118789e227252820f01bfc"),
366 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
367 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
368 ],
369 &[
370 fp_from_hex!("044ca3cc4a85d73b81696ef1104e674f4feff82984990ff85d0bf58dc8a4aa94"),
371 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
372 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
373 ],
374 &[
375 fp_from_hex!("1cbaf2b371dac6a81d0453416d3e235cb8d9e2d4f314f46f6198785f0cd6b9af"),
376 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
377 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
378 ],
379 &[
380 fp_from_hex!("1d5b2777692c205b0e6c49d061b6b5f4293c4ab038fdbbdc343e07610f3fede5"),
381 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
382 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
383 ],
384 &[
385 fp_from_hex!("56ae7c7a5293bdc23e85e1698c81c77f8ad88c4b33a5780437ad047c6edb59ba"),
386 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
387 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
388 ],
389 &[
390 fp_from_hex!("2e9bdbba3dd34bffaa30535bdd749a7e06a9adb0c1e6f962f60e971b8d73b04f"),
391 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
392 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
393 ],
394 &[
395 fp_from_hex!("2de11886b18011ca8bd5bae36969299fde40fbe26d047b05035a13661f22418b"),
396 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
397 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
398 ],
399 &[
400 fp_from_hex!("2e07de1780b8a70d0d5b4a3f1841dcd82ab9395c449be947bc998884ba96a721"),
401 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
402 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
403 ],
404 &[
405 fp_from_hex!("0f69f1854d20ca0cbbdb63dbd52dad16250440a99d6b8af3825e4c2bb74925ca"),
406 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
407 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
408 ],
409 &[
410 fp_from_hex!("5dc987318e6e59c1afb87b655dd58cc1d22e513a05838cd4585d04b135b957ca"),
411 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
412 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
413 ],
414 &[
415 fp_from_hex!("48b725758571c9df6c01dc639a85f07297696b1bb678633a29dc91de95ef53f6"),
416 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
417 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
418 ],
419 &[
420 fp_from_hex!("5e565e08c0821099256b56490eaee1d573afd10bb6d17d13ca4e5c611b2a3718"),
421 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
422 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
423 ],
424 &[
425 fp_from_hex!("2eb1b25417fe17670d135dc639fb09a46ce5113507f96de9816c059422dc705e"),
426 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
427 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
428 ],
429 &[
430 fp_from_hex!("115cd0a0643cfb988c24cb44c3fab48aff36c661d26cc42db8b1bdf4953bd82c"),
431 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
432 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
433 ],
434 &[
435 fp_from_hex!("26ca293f7b2c462d066d7378b999868bbb57ddf14e0f958ade801612311d04cd"),
436 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
437 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
438 ],
439 &[
440 fp_from_hex!("4147400d8e1aaccf311a6b5b762011ab3e45326e4d4b9de26992816b99c528ac"),
441 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
442 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
443 ],
444 &[
445 fp_from_hex!("6b0db7dccc4ba1b268f6bdcc4d372848d4a72976c268ea30519a2f73e6db4d55"),
446 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
447 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
448 ],
449 &[
450 fp_from_hex!("17bf1b93c4c7e01a2a830aa162412cd90f160bf9f71e967ff5209d14b24820ca"),
451 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
452 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
453 ],
454 &[
455 fp_from_hex!("4b431cd9efedbc94cf1eca6f9e9c1839d0e66a8bffa8c8464cac81a39d3cf8f1"),
456 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
457 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
458 ],
459 &[
460 fp_from_hex!("35b41a7ac4f3c571a24f8456369c85dfe03c0354bd8cfd3805c86f2e7dc293c5"),
461 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
462 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
463 ],
464 &[
465 fp_from_hex!("3b1480080523c439435927994849bea964e14d3beb2dddde72ac156af435d09e"),
466 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
467 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
468 ],
469 &[
470 fp_from_hex!("2cc6810031dc1b0d4950856dc907d57508e286442a2d3eb2271618d874b14c6d"),
471 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
472 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
473 ],
474 &[
475 fp_from_hex!("6f4141c8401c5a395ba6790efd71c70c04afea06c3c92826bcabdd5cb5477d51"),
476 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
477 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
478 ],
479 &[
480 fp_from_hex!("25bdbbeda1bde8c1059618e2afd2ef999e517aa93b78341d91f318c09f0cb566"),
481 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
482 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
483 ],
484 &[
485 fp_from_hex!("392a4a8758e06ee8b95f33c25dde8ac02a5ed0a27b61926cc6313487073f7f7b"),
486 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
487 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
488 ],
489 &[
490 fp_from_hex!("272a55878a08442b9aa6111f4de009485e6a6fd15db89365e7bbcef02eb5866c"),
491 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
492 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
493 ],
494 &[
495 fp_from_hex!("631ec1d6d28dd9e824ee89a30730aef7ab463acfc9d184b355aa05fd6938eab5"),
496 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
497 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
498 ],
499 &[
500 fp_from_hex!("4eb6fda10fd0fbde02c7449bfbddc35bcd8225e7e5c3833a0818a100409dc6f2"),
501 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
502 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
503 ],
504 &[
505 fp_from_hex!("2d5b308b0cf02cdfefa13c4e60e26239a6ebba011694dd129b925b3c5b21e0e2"),
506 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
507 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
508 ],
509 &[
510 fp_from_hex!("16549fc6af2f3b72dd5d293d72e2e5f244dff42f18b46c56ef38c57c311673ac"),
511 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
512 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
513 ],
514 &[
515 fp_from_hex!("42332677ff359c5e8db836d9f5fb54822e39bd5e22340bb9ba975ba1a92be382"),
516 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
517 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
518 ],
519 &[
520 fp_from_hex!("49d7d2c0b449e5179bc5ccc3b44c6075d9849b5610465f09ea725ddc97723a94"),
521 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
522 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
523 ],
524 &[
525 fp_from_hex!("64c20fb90d7a003831757cc4c6226f6e4985fc9ecb416b9f684ca0351d967904"),
526 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
527 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
528 ],
529 &[
530 fp_from_hex!("59cff40de83b52b41bc443d7979510d771c940b9758ca820fe73b5c8d5580934"),
531 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
532 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
533 ],
534 &[
535 fp_from_hex!("53db2731730c39b04edd875fe3b7c882808285cdbc621d7af4f80dd53ebb71b0"),
536 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
537 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
538 ],
539 &[
540 fp_from_hex!("1b10bb7a82afce39fa69c3a2ad52f76d76398265344203119b7126d9b46860df"),
541 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
542 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
543 ],
544 &[
545 fp_from_hex!("561b6012d666bfe179c4dd7f84cdd1531596d3aac7c5700ceb319f91046a63c9"),
546 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
547 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
548 ],
549 &[
550 fp_from_hex!("0f1e7505ebd91d2fc79c2df7dc98a3bed1b36968ba0405c090d27f6a00b7dfc8"),
551 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
552 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
553 ],
554 &[
555 fp_from_hex!("2f313faf0d3f6187537a7497a3b43f46797fd6e3f18eb1caff457756b819bb20"),
556 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
557 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
558 ],
559 &[
560 fp_from_hex!("3a5cbb6de450b481fa3ca61c0ed15bc55cad11ebf0f7ceb8f0bc3e732ecb26f6"),
561 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
562 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
563 ],
564 &[
565 fp_from_hex!("681d93411bf8ce63f6716aefbd0e24506454c0348ee38fabeb264702714ccf94"),
566 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
567 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
568 ],
569 &[
570 fp_from_hex!("5178e940f50004312646b436727f0e80a7b8f2e9ee1fdc677c4831a7672777fb"),
571 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
572 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
573 ],
574 &[
575 fp_from_hex!("3dab54bc9bef688dd92086e253b439d651baa6e20f892b62865527cbca915982"),
576 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
577 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
578 ],
579 &[
580 fp_from_hex!("4b3ce75311218f9ae905f84eaa5b2b3818448bbf3972e1aad69de321009015d0"),
581 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
582 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
583 ],
584 &[
585 fp_from_hex!("06dbfb42b979884de280d31670123f744c24b33b410fefd4368045acf2b71ae3"),
586 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
587 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
588 ],
589 &[
590 fp_from_hex!("068d6b4608aae810c6f039ea1973a63eb8d2de72e3d2c9eca7fc32d22f18b9d3"),
591 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
592 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
593 ],
594 &[
595 fp_from_hex!("4c5c254589a92a36084a57d3b1d964278acc7e4fe8f69f2955954f27a79cebef"),
596 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
597 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
598 ],
599 &[
600 fp_from_hex!("6cbac5e1700984ebc32da15b4bb9683faabab55f67ccc4f71d9560b3475a77eb"),
601 fp_from_hex!("4603c403bbfa9a17738a5c6278eaab1c37ec30b0737aa2409fc4898069eb983c"),
602 fp_from_hex!("6894e7e22b2c1d5c70a712a6345ae6b192a9c833a9234c31c56aacd16bc2f100"),
603 ],
604 &[
605 fp_from_hex!("5be2cbbc44053ad08afa4d1eabc7f3d231eea799b93f226e905b7d4d65c58ebb"),
606 fp_from_hex!("58e55f287b453a9808624a8c2a353d528da0f7e713a5c6d0d7711e47063fa611"),
607 fp_from_hex!("366ebfafa3ad381c0ee258c9b8fdfccdb868a7d7e1f1f69a2b5dfcc5572555df"),
608 ],
609 &[
610 fp_from_hex!("45766ab728968c642f90d97ccf5504ddc10518a819ebbcc4d09c3f5d784d67ce"),
611 fp_from_hex!("39678f65512f1ee404db3024f41d3f567ef66d89d044d022e6bc229e95bc76b1"),
612 fp_from_hex!("463aed1d2f1f955e3078be5bf7bfc46fc0eb8c51551906a8868f18ffae30cf4f"),
613 ],
614 &[
615 fp_from_hex!("21668f016a8063c0d58b7750a3bc2fe1cf82c25f99dc01a4e534c88fe53d85fe"),
616 fp_from_hex!("39d00994a8a5046a1bc749363e98a768e34dea56439fe1954bef429bc5331608"),
617 fp_from_hex!("4d7f5dcd78ece9a933984de32c0b48fac2bba91f261996b8e9d1021773bd07cc"),
618 ],
619 ];
620}
621
622pub struct BLS4Params;
625#[rustfmt::skip]
626impl PoseidonParams<FpBLS12> for BLS4Params {
627 const T: usize = 4;
628 const D: u8 = 5;
629 const CAPACITY: usize = 1;
630 const ROUNDS_F: usize = 8;
631 const ROUNDS_P: usize = 56;
632 const MAT_INTERNAL_DIAG_M_1: &'static [FpBLS12] = &[
633 fp_from_hex!("07564ad691bf01c8601d68757a561d224f00f313ada673ab83e6255fb4fd5b3d"),
634 fp_from_hex!("6184e3be38549f7c0850cd069b32f6decbfde312dd4b8c18349b1b3776a6eaa4"),
635 fp_from_hex!("419289088178ad742be6f78425c0156b6546a18fd338f0169937dea46cfb64d2"),
636 fp_from_hex!("3244cdec173b71a4659e2529b499362dac10cb2fd17562860c8bb9d0fd45b787"),
637 ];
638 const ROUND_CONSTANTS: &'static [&'static [FpBLS12]] = &[
639 &[
640 fp_from_hex!("1a3bdcbfc11dabfb6ed0dd5f5a9b38191488bce9eecd811c10f9378b32db8c61"),
641 fp_from_hex!("52b733e857912fdd2248dc9638dd79b1ce18b285b27792238b44c2b23c0f5d5f"),
642 fp_from_hex!("47d6df02d73e6c78ced550ec8df1a459ac41f318d8b904a37652b581b2b766b8"),
643 fp_from_hex!("11ec284726dddcf3cbb2b81862c9cd95e9de81ce0317302e1ef432d59b913388"),
644 ],
645 &[
646 fp_from_hex!("19e21d749905904f3e10cd57f7817c2564c06ec1b1e229def2129e79a7a77738"),
647 fp_from_hex!("6eeecf4c83e1ec164217f3c00956d83c3bd845bee2d86b263cf3bf89a345e5e1"),
648 fp_from_hex!("10d5808ab47295f7a950dc72f968398b9c67426a217811b9bd7e97f2a261992f"),
649 fp_from_hex!("25d334fbadcbfd26449c4ce1472f961f7d401a3ddf40a70af5c10ac9176d151b"),
650 ],
651 &[
652 fp_from_hex!("3ef8a46ec07ee551ecba60b1601cbf6e3664418331a254729b7c6a5c3d13a6c6"),
653 fp_from_hex!("30d373e298c09d2a6efe661d708fcfa6163dc61ae1eb103d98cf88c63e482125"),
654 fp_from_hex!("18769839949b2dda9ef3f111acd86e10250ffad4c4c4263ea970e4f4726cfad7"),
655 fp_from_hex!("2c941286d1534ff3be3a66f9dd59833e65b1fa67db23511f7b4b2ae3b3d66bc9"),
656 ],
657 &[
658 fp_from_hex!("08b6d9c90b4139ea70497ac8a22b30fb9b76b8ceabf70449d282b57d98c60ddd"),
659 fp_from_hex!("3a8a2dd917222a71ca678b5c0a803a43c62de2f2c9fe37931b5b2a017fe64638"),
660 fp_from_hex!("2dc17308abd0e731b3cffafd296cc3e6e2403dc563baa1c797a68da9754dd207"),
661 fp_from_hex!("1d04e542f54431c23f9d1812392a0c87203144e343c459d3ee640b04e203be6c"),
662 ],
663 &[
664 fp_from_hex!("500760e2ef6bf463fdecbf7b47f4adaa8214c797e59359439d63169e1cdb9dfb"),
665 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
666 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
667 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
668 ],
669 &[
670 fp_from_hex!("61f36faac1c12d756dcc3b5491f2b22565409a4e952b8f8e726ee126c0e1c0e6"),
671 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
672 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
673 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
674 ],
675 &[
676 fp_from_hex!("49e72db524a48243849fea068e58d0c078b0c738cd482a2e2160602657456ccb"),
677 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
678 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
679 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
680 ],
681 &[
682 fp_from_hex!("4a74677fff94821e97b20b86063c36d35c6a2908c0a19a9f130edde9c8ceb6b5"),
683 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
684 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
685 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
686 ],
687 &[
688 fp_from_hex!("62d27fd5080b44a436e13066ce1c80ddef2af086c2a4806bd99fa02de9726ded"),
689 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
690 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
691 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
692 ],
693 &[
694 fp_from_hex!("15a26c92fc51dd285a61c2c1379f6731377aeb29c62696aa6a9c109c2991f200"),
695 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
696 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
697 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
698 ],
699 &[
700 fp_from_hex!("1db900a5e9b2685be9f8f02498123ac71bd7bfa40b6853ab527a8d2512b9aefb"),
701 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
702 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
703 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
704 ],
705 &[
706 fp_from_hex!("6ff755d237742498e0b78829cd8358bdb831e96fef08eb192b7e334123080afa"),
707 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
708 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
709 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
710 ],
711 &[
712 fp_from_hex!("1595447e5b94a64c8b3681f57068e19ee3696440ef785e35123886311f48cd1e"),
713 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
714 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
715 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
716 ],
717 &[
718 fp_from_hex!("2b0eabc08eef3abae3304cbb2efc67e7b437bd96b6f7d175daed6da5a2144e8b"),
719 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
720 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
721 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
722 ],
723 &[
724 fp_from_hex!("3a345ee8e715f3226e52838652219202efb4e6d4f057f904d69d3fbd781e39f5"),
725 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
726 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
727 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
728 ],
729 &[
730 fp_from_hex!("49eb2a07b5da81b57b7aa4fab19e691f9a684baef4cfb5afb6f46d23cbf1a9cd"),
731 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
732 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
733 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
734 ],
735 &[
736 fp_from_hex!("3051663ef7de7674506f2c873409725363849564815b8bd291f00b9c60b4daf0"),
737 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
738 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
739 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
740 ],
741 &[
742 fp_from_hex!("041a632a7bc167f67ca9c3825021a05b13f81f814ee101d37716e12efec3121f"),
743 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
744 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
745 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
746 ],
747 &[
748 fp_from_hex!("6a5ae006b70bfebc1a485eed2c078654dc0f10514e8c739ca2a7019f42444ce5"),
749 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
750 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
751 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
752 ],
753 &[
754 fp_from_hex!("0f3dba730b64dda2bc2eaa50ede0fcaa86a37c74c3a17be97a9d969fca21fb37"),
755 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
756 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
757 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
758 ],
759 &[
760 fp_from_hex!("6d6c02004f2a4cbb965f9e73799041fafb49f61aee66232f45ae09972af08e86"),
761 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
762 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
763 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
764 ],
765 &[
766 fp_from_hex!("60391f436a32fdb0eeba8578313579c04c48c126f4eb6a0c49e249ff1c1fbf4a"),
767 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
768 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
769 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
770 ],
771 &[
772 fp_from_hex!("570a30710a42539d4440ce9a2cc7d9ac102409a188960d0fbd249fc4352bf3e5"),
773 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
774 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
775 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
776 ],
777 &[
778 fp_from_hex!("35cb6ce55352599332471ad8be46ddc0cf598e0e36b8a8fa5fae6f26277b318e"),
779 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
780 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
781 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
782 ],
783 &[
784 fp_from_hex!("48a8116b254b171052251f353c93ca3816734e4e0baeea10b4269bbab9a2be55"),
785 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
786 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
787 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
788 ],
789 &[
790 fp_from_hex!("126258211a4bb2035121c7ca129eae719d4ddfefa99921a8befb7a160e0f845f"),
791 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
792 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
793 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
794 ],
795 &[
796 fp_from_hex!("5bf6985473bc5500f140844f5b66cea85815772cce03596eda60e6c7dcb4ebbd"),
797 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
798 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
799 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
800 ],
801 &[
802 fp_from_hex!("5af46d3dd02261d893c418582188d328a8a84ff8f6ac6c1997d3aaadf64220d9"),
803 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
804 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
805 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
806 ],
807 &[
808 fp_from_hex!("5e3c84925609016da58df82c1f2b51590e3b91e5502dca2eba13d8354916ddbe"),
809 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
810 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
811 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
812 ],
813 &[
814 fp_from_hex!("410e6fb4390379a8b726cfb22a9eaab7232bc4b60eaddb629a4aacfc7dcdbfcf"),
815 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
816 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
817 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
818 ],
819 &[
820 fp_from_hex!("2ca5debb9de1c4bbfa0204543dd9757241611cd28b5eac2d7f37baa293fa2618"),
821 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
822 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
823 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
824 ],
825 &[
826 fp_from_hex!("4a1554023154a99b4572572ccd5d89fa8745c117a2a85e5786ef6ef39410d611"),
827 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
828 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
829 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
830 ],
831 &[
832 fp_from_hex!("2ca75fb22881b238b6c96da6b908f922da8b54f909237051775c64fec8d5920c"),
833 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
834 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
835 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
836 ],
837 &[
838 fp_from_hex!("546ea8ad3dffe14c4c96e4d6d8c43c644212fb663486165b34cb26ddd717f341"),
839 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
840 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
841 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
842 ],
843 &[
844 fp_from_hex!("6b168ee87f2c532efdb378116dfe462f632a18eccf1e9bcfc740d35e535b2735"),
845 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
846 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
847 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
848 ],
849 &[
850 fp_from_hex!("4cf917a780b850292f44502b80865d3664d75213f89e8ae5861dbcb52aa95e76"),
851 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
852 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
853 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
854 ],
855 &[
856 fp_from_hex!("02e8dfe9046d8b951532466bdf1b62571b85e551b34c8bbfb1ccd3216271b73d"),
857 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
858 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
859 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
860 ],
861 &[
862 fp_from_hex!("4a34d2abd01f09f743cc56a3f87febd60ae5d88e224918d840656da973d9252e"),
863 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
864 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
865 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
866 ],
867 &[
868 fp_from_hex!("0a3fad26c6318d471fa376fbaf02d341e41e687db6f3da88266de21c7157e940"),
869 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
870 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
871 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
872 ],
873 &[
874 fp_from_hex!("131c9df7176eadb9af3a14f0f53a9b87196ef60bbb89b3630142ff8d9d69137b"),
875 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
876 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
877 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
878 ],
879 &[
880 fp_from_hex!("5753682a8120106b42241c86deee879263d81fe8e3423e01f567316d9524647e"),
881 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
882 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
883 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
884 ],
885 &[
886 fp_from_hex!("5ed9725af6a91090027acfc12100733a9dea89771048aa2dfe40daea9546645b"),
887 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
888 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
889 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
890 ],
891 &[
892 fp_from_hex!("2c7b7a87f31ebd2464be9f211d41719b453939d53ff7be07a2cc21741d48b467"),
893 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
894 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
895 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
896 ],
897 &[
898 fp_from_hex!("118159eb07353fef60e9733077cc82f92a6e2bd361c88d8122e9a292217757e0"),
899 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
900 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
901 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
902 ],
903 &[
904 fp_from_hex!("5b4626e787d4a4b00ba4693fd7900ecaa19624be9f2fee6b9c3b538d4f896b8a"),
905 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
906 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
907 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
908 ],
909 &[
910 fp_from_hex!("18cad22ae06bb0e8d043f7928477219e4d38ac544ce81c4c685267089e4c7003"),
911 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
912 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
913 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
914 ],
915 &[
916 fp_from_hex!("0511149594758e789b440ce534b52b6c508ae1881669d1fa4a7e551ef84e4dc4"),
917 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
918 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
919 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
920 ],
921 &[
922 fp_from_hex!("428b8532efa194a7f5cbf4c296786346ddfcfe8f2bab26f25321f5d984dfc307"),
923 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
924 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
925 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
926 ],
927 &[
928 fp_from_hex!("00fd035cc129e91eac66d841e2864989d1ff4853662166143535603bf9460621"),
929 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
930 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
931 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
932 ],
933 &[
934 fp_from_hex!("2c167565114475412c76f0df1961eaca9deb17622c9fb6f5ac8a89a29f42df69"),
935 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
936 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
937 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
938 ],
939 &[
940 fp_from_hex!("10cac3ff02125419ac84ff80295589d1124a1e65a94e8d9b63a411317c7f5728"),
941 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
942 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
943 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
944 ],
945 &[
946 fp_from_hex!("7213c2f17aec536d0a5196e877d1626a63d7db5b4e3bd77327eb3617b932aee7"),
947 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
948 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
949 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
950 ],
951 &[
952 fp_from_hex!("1b86ee2e45fbcd59fa43edee6630dda5cb3b894eb4701eff5fd53967abad2666"),
953 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
954 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
955 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
956 ],
957 &[
958 fp_from_hex!("0b941850091bd16875f408f183fb93d250c538e5ee1e8979e960b5b499b2f070"),
959 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
960 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
961 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
962 ],
963 &[
964 fp_from_hex!("031f75d53bdd5ac603c252925148a74fa5f3bf5d9ffabe64c6e932be904204ec"),
965 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
966 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
967 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
968 ],
969 &[
970 fp_from_hex!("55296a48dd399c65798cdbda11e89f26f998f2d33cf328e87a1c364e05be492b"),
971 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
972 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
973 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
974 ],
975 &[
976 fp_from_hex!("191175ec337e64a48785a083559176168bcea3db2822630c48f1d497d03e1e35"),
977 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
978 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
979 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
980 ],
981 &[
982 fp_from_hex!("33200b518e6b1a1e96ba214cad18929e7f5b4e3336e522c5fa1febf69c0818c6"),
983 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
984 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
985 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
986 ],
987 &[
988 fp_from_hex!("2f989e24f97dc06c075bb53404e3eaaae32a1b6d89d9e09acdeee65712aa4216"),
989 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
990 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
991 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
992 ],
993 &[
994 fp_from_hex!("0de4b77163f1572bbaa325f48bde7a429b6b0f803ade45a0e72cd2bdbd84680c"),
995 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
996 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
997 fp_from_hex!("0000000000000000000000000000000000000000000000000000000000000000"),
998 ],
999 &[
1000 fp_from_hex!("6af270d408f492402b7271432b6c443abbd1f0e220888d73f47498d59044d7cc"),
1001 fp_from_hex!("3d5b5310e7b6be63be8f12594ecd68108f4b3f6266683b13178d0c80d8530c2f"),
1002 fp_from_hex!("5f69d748d06e22916088bd21fb472334ddbe5223ff494b6c0dcdf62db69d43ac"),
1003 fp_from_hex!("6c1fd7dbb3298da86dfe5d0435b26e0a91fe6ad6aa25b9407d5da544e6b9cd27"),
1004 ],
1005 &[
1006 fp_from_hex!("37172dd49bf14ebca52e1c31b60f31de8213644e330bcf2cc59684606e62537d"),
1007 fp_from_hex!("509cf829b68e58861c3d6bce6046ac1b6e9c065378fe9556348c0c1814808e20"),
1008 fp_from_hex!("529d5dd132f5cb4b71994ae6b330b7944f0fd8ba319582d2414b9b10768b7448"),
1009 fp_from_hex!("5d251391abee228833dbd24be99d163ba9f8c92a2cf73a4e1f8a87e9c4ca97ba"),
1010 ],
1011 &[
1012 fp_from_hex!("1abe1d77226f2eff6f1a6bfc6c8d9e00dde1da9d67858e6984e53bc2aceba535"),
1013 fp_from_hex!("4ca74ba72baea6d84fa8f2a05e387a1c41a5a1b2f1a479fb11bbf9d5e09bd01a"),
1014 fp_from_hex!("232bfa6a3120224814967315ebf3d8c88b2eb0ea8c20c79ce854f90aec7a9b91"),
1015 fp_from_hex!("109f5bd722c8cf28ab6a3852970bcb665f398a8dc9d331958dc291d49a1ba9b4"),
1016 ],
1017 &[
1018 fp_from_hex!("4a181a5de6c79a05c02533350ab51deee24b8f5b9154c5cf09ba5e25862ae176"),
1019 fp_from_hex!("6e063b99c16028df94b1eb719164ae8c8336894791516ca2c37c5a1a394bb0d7"),
1020 fp_from_hex!("6bbd2d3a643d301d25a8cf156542165abee3039068fecf501e9d39f313ca2a87"),
1021 fp_from_hex!("04690fe1be7c7b8c10c81e63f5e508fe93853c61f0435f81eabc9997fa3b99f3"),
1022 ],
1023 ];
1024}
1025
1026#[allow(unused_imports)]
1027#[cfg(test)]
1028mod tests {
1029 use crate::{
1030 field::instance::FpBLS12,
1031 fp_from_hex,
1032 poseidon2::{
1033 instance::bls12::{BLS2Params, BLS3Params, BLS4Params},
1034 params::PoseidonParams,
1035 Poseidon2,
1036 },
1037 };
1038
1039 type Scalar = FpBLS12;
1040
1041 #[test]
1042 fn smoke() {
1043 let mut poseidon2 = Poseidon2::<BLS2Params, _>::new();
1044 for i in 1..BLS2Params::T {
1045 poseidon2.absorb(&Scalar::from(i as u64));
1046 }
1047 let perm = poseidon2.squeeze_batch(1);
1048 assert_eq!(
1049 perm[0],
1050 fp_from_hex!(
1051 "1f0e305ee21c9366d5793b80251405032a3fee32b9dd0b5f4578262891b043b4"
1052 )
1053 );
1054
1055 let mut poseidon2 = Poseidon2::<BLS3Params, _>::new();
1056 for i in 1..BLS3Params::T {
1057 poseidon2.absorb(&Scalar::from(i as u64));
1058 }
1059 let perm = poseidon2.squeeze_batch(2);
1060 assert_eq!(
1061 perm[0],
1062 fp_from_hex!(
1063 "4c5793c87d51bdc2c08a32108437dc0000bd0275868f09ebc5f36919af5b3891"
1064 )
1065 );
1066 assert_eq!(
1067 perm[1],
1068 fp_from_hex!(
1069 "1fc8ed171e67902ca49863159fe5ba6325318843d13976143b8125f08b50dc6b"
1070 )
1071 );
1072
1073 let mut poseidon2 = Poseidon2::<BLS4Params, _>::new();
1074 for i in 1..BLS4Params::T {
1075 poseidon2.absorb(&Scalar::from(i as u64));
1076 }
1077 let perm = poseidon2.squeeze_batch(3);
1078 assert_eq!(
1079 perm[0],
1080 fp_from_hex!(
1081 "0e56f2b6fad25075aa93560185b70e2b180ed7e269159c507c288b6747a0db2d"
1082 )
1083 );
1084 assert_eq!(
1085 perm[1],
1086 fp_from_hex!(
1087 "6d8196f28da6006bb89b3df94600acdc03d0ba7c2b0f3f4409a54c1db6bf30d0"
1088 )
1089 );
1090 assert_eq!(
1091 perm[2],
1092 fp_from_hex!(
1093 "07cfb49540ee456cce38b8a7d1a930a57ffc6660737f6589ef184c5e15334e36"
1094 )
1095 );
1096 }
1097}