// Copyright Supranational LLC // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 #if defined(__GNUC__) || defined(__clang__) # define FR_T(vec_t, ...) fr_t{(vec_t){__VA_ARGS__}} #else # define FR_T(vec_t, ...) fr_t{vec_t{__VA_ARGS__}} #endif const fr_t group_gen = FR_T(vec256, 0x0000000efffffff1u, 0x17e363d300189c0fu, 0xff9c57876f8457b0u, 0x351332208fc5a8c4u ); const fr_t group_gen_inverse = FR_T(vec256, 0xdb6db6dadb6db6dcu, 0xe6b5824adb6cc6dau, 0xf8b356e005810db9u, 0x66d0f1e660ec4796u ); const int S = 32; const fr_t forward_roots_of_unity[S + 1] = { FR_T(vec256, 0x00000001fffffffeu, 0x5884b7fa00034802u, 0x998c4fefecbc4ff5u, 0x1824b159acc5056fu ), FR_T(vec256, 0xfffffffd00000003u, 0xfb38ec08fffb13fcu, 0x99ad88181ce5880fu, 0x5bc8f5f97cd877d8u ), FR_T(vec256, 0xf3b05674aa89cfb1u, 0x072f01406006b9feu, 0xce9a0dbf25667a26u, 0x4d2ce4052d598374u ), FR_T(vec256, 0x6ecf49952c42eff8u, 0x6ec1fa834d5dfa57u, 0x3ff5cf385656b15cu, 0x54b80267229e031bu ), FR_T(vec256, 0x1acf64e488202b65u, 0x5b18b637819f004fu, 0xee649cab3107fdf5u, 0x27a8543dce9012a0u ), FR_T(vec256, 0x30c78850dd04d52fu, 0xe27f8794adaddbcbu, 0x0a59f321ae22c531u, 0x1958b127ba7f8ca3u ), FR_T(vec256, 0xbcf7e31ae8d6f162u, 0x15d1c587662fc7a4u, 0xb7ed5ecd71278a57u, 0x329d0d9340ccecb3u ), FR_T(vec256, 0xdaf6401c4aed2336u, 0xa14c0cba41de4f6au, 0xdfdc7d04fc7f2e5bu, 0x6f61ff4e296cff18u ), FR_T(vec256, 0xb4b87dd6a9d4956cu, 0x6a51d0bcd1482f03u, 0x7e8146f7e0dbcb1eu, 0x21f4b238cccb85aeu ), FR_T(vec256, 0x1ff70724b651888bu, 0xcd8166cbe56a5af4u, 0xe4a992a398e1e256u, 0x5705ea3686fd3b03u ), FR_T(vec256, 0xa4a6e37a36d7822au, 0xfc83a2ce8787e5f1u, 0xe89553dae7ea8f80u, 0x6f6d38bb2a92ff1au ), FR_T(vec256, 0xf4a46fbb8dc619e5u, 0x82fa97dcb8e77487u, 0xaf909c5bf198f018u, 0x00edba7d83a038fau ), FR_T(vec256, 0xf2df262c09458a39u, 0x048cdf5b99dff177u, 0x16857bc5c7cce57bu, 0x043b3dbca4a915aeu ), FR_T(vec256, 0xa33d279ff0ccffc9u, 0x41fac79f59e91972u, 0x065d227fead1139bu, 0x71db41abda03e055u ), FR_T(vec256, 0x9e468a30f2a9a5d6u, 0x1fe34726ca6bcf1bu, 0x54a621ae87eb73acu, 0x100a9d2ebfd61a47u ), FR_T(vec256, 0x6ebe497bf4e11f70u, 0x1533f4823c55cafcu, 0x66a7f2da7eb4d017u, 0x5b6be79ab07f3e81u ), FR_T(vec256, 0x4526e48b11c947f9u, 0xccc36140c614d3aau, 0xf2e56f1a03cd5f24u, 0x57db5a4c159e0248u ), FR_T(vec256, 0x860cb52e2d964320u, 0x4c5059aa9678fcc9u, 0xd92f98d7cfe87e16u, 0x40329fd2d283e2d3u ), FR_T(vec256, 0x56e7145ccb39b4a6u, 0x79825deadcbe3defu, 0x3e516f05f02abbe0u, 0x532595f8bef5bd2du ), FR_T(vec256, 0x3b801e7d90f9b375u, 0xaada3338524be4d6u, 0x5f0b11a6bdbd3f25u, 0x04063ff85adb38c4u ), FR_T(vec256, 0x146391f8784685ceu, 0x6975fe2172dbcd2cu, 0x7bfaf2b2edc848d6u, 0x13c5c6b3afb23c0cu ), FR_T(vec256, 0x245f9cbc1f88b5f3u, 0x5dfbb5c68ef4a333u, 0xa9ac7cdbc68f208fu, 0x44448a9838255605u ), FR_T(vec256, 0x0db3e6ccbf7c975bu, 0x9d463b98af4d41ecu, 0x555e1ff59ab7a3e7u, 0x6154be202a31f630u ), FR_T(vec256, 0xbcd2a6e09538df40u, 0x290e2f0c95e6fafdu, 0x37b754afe7fe2f1du, 0x500b5365d11e6548u ), FR_T(vec256, 0x6a4fac5435b444fau, 0xa4c9d25df8a367dau, 0xa33932bd4c0632ffu, 0x038a3b43cfb507b5u ), FR_T(vec256, 0x25acfadbd37328cau, 0xa2157fa336ffb229u, 0x432bc6f21ac4d49eu, 0x60eb5b8db0894969u ), FR_T(vec256, 0x8a0719bd9fc1ac27u, 0x744144bb29716a74u, 0xffea9e0b541fcb9au, 0x4459ada388bb635fu ), FR_T(vec256, 0xe7b5ec2bfbd35ce8u, 0xa99a0f8a35e37e7bu, 0x312c2051a70cacc4u, 0x415444dfc9407c7du ), FR_T(vec256, 0x2c75ff0b8d27bcb7u, 0x00fc392e4413b9d7u, 0xef31d1fd8752020fu, 0x6d5074c8e7a75dc5u ), FR_T(vec256, 0x250a9d0e4b092216u, 0x525a653781be1b5eu, 0xe4381082889cdfb0u, 0x02536cde1d9f1a1cu ), FR_T(vec256, 0x8ea72d687bb12408u, 0xa9ed127cb02387bcu, 0x9c59d748e7669430u, 0x4e720080e9ced390u ), FR_T(vec256, 0x1f2fda6f3141e583u, 0x8d44592227fe5b46u, 0xe33cee1b81e59a5fu, 0x22c666251ad8ae31u ), FR_T(vec256, 0xb9b58d8c5f0e466au, 0x5b1b4c801819d7ecu, 0x0af53ae352a31e64u, 0x5bf3adda19e9b27bu ), }; const fr_t inverse_roots_of_unity[S + 1] = { FR_T(vec256, 0x00000001fffffffeu, 0x5884b7fa00034802u, 0x998c4fefecbc4ff5u, 0x1824b159acc5056fu ), FR_T(vec256, 0xfffffffd00000003u, 0xfb38ec08fffb13fcu, 0x99ad88181ce5880fu, 0x5bc8f5f97cd877d8u ), FR_T(vec256, 0x0c4fa98a55763050u, 0x4c8ea2c29ff7a200u, 0x649fca48e43b5ddfu, 0x26c0c34dfc43f9d3u ), FR_T(vec256, 0xeee067bcc14d5724u, 0x34467c7e90c5a3beu, 0x80b27f647b6536c9u, 0x1a78ad5b3c033457u ), FR_T(vec256, 0xf222d1b8234112aeu, 0x74262683cc227ea9u, 0x5596249d485acc4au, 0x2bd4ab5c73235a95u ), FR_T(vec256, 0x64db788d718c6944u, 0x60072eb5d9ad2c34u, 0xfe642f9ded4e3d6du, 0x5b5ebc8db4134c95u ), FR_T(vec256, 0xf0e6ca2635357ceeu, 0xe8078a41ec44a018u, 0xa9bcb9a225aa3530u, 0x12fe8733c7f02aebu ), FR_T(vec256, 0x17172e1f8e9f64e7u, 0x36cbbaa0f14b6496u, 0x938df19572393444u, 0x6b00e7ac62d2cf16u ), FR_T(vec256, 0xa41af2729b6b31b6u, 0x34bd6b2ef1b43302u, 0xb7451539af334b5fu, 0x16921f606fa46d9fu ), FR_T(vec256, 0x7e90c8e21f27dee5u, 0x20fe58792ddb1430u, 0x9612ab09bf51b9ecu, 0x65af656fca80979fu ), FR_T(vec256, 0x2b56cea3c3b1c080u, 0x09831c848718275cu, 0x16722b724a7434e8u, 0x4a6b4e6bf07adbbdu ), FR_T(vec256, 0xc22aee4c9ac9ca75u, 0x5af8909b4bdf67d7u, 0xc41f72805d493090u, 0x02fb078f4f460a37u ), FR_T(vec256, 0x5e13f9137e7e766du, 0xb8f1f8b31fe9c19fu, 0x7c49eacd4ce1d4cfu, 0x19d942664e21e419u ), FR_T(vec256, 0x507dbef9a1355e75u, 0xeb71fd259b69cc1au, 0x6042c8dbee0557f8u, 0x2415d7709dbce162u ), FR_T(vec256, 0x92c42815b565301eu, 0x55d93cac4ddd94bfu, 0xa35dff64ef7ea500u, 0x1407943e9312dc0cu ), FR_T(vec256, 0x8d5ac1096b2c5deau, 0x2faa86e31574d90fu, 0xbb34c14ae5c2d788u, 0x6b3bd790cdc0b4e0u ), FR_T(vec256, 0x9da11b8f32233a37u, 0x78cd3e7a649253a6u, 0x47b227da5e782970u, 0x4ffe8088a95125a3u ), FR_T(vec256, 0x820fbdda71d5e317u, 0x56c6bb330485951fu, 0x4879070ca04f827fu, 0x4434ce2152cef69cu ), FR_T(vec256, 0x61c7a11808ea085bu, 0xb40fb5417a9ea4d0u, 0x4c57483a5c0cc736u, 0x2bf6e1fb14aa0589u ), FR_T(vec256, 0x39d1657513a32f88u, 0xcc3112e3d9e1e454u, 0x8074cbd954770c18u, 0x0b25db2fb70a7051u ), FR_T(vec256, 0x68ee7cb8b64957f6u, 0x8eeda81e0a2b8bafu, 0xd749ce3d256c4becu, 0x48230b862ae8d689u ), FR_T(vec256, 0x9aa2ba63e3c30b08u, 0xc3a07402d67b21bcu, 0x64a4e58329af6349u, 0x64bffb89f6ae051cu ), FR_T(vec256, 0x52c40fb8f6421a00u, 0xbf33428e5ec95569u, 0x5ecc78dd0f71a346u, 0x5bb66cdb9336bf44u ), FR_T(vec256, 0x62a17c8a3f3f7413u, 0xf60c53c0bb17edbau, 0x4a9ea2d00c4e2817u, 0x13b632eef7c560f3u ), FR_T(vec256, 0xad970bf0990adacau, 0xfcc75b7735d536acu, 0x8dce37c6776dcbaeu, 0x39f39d660b26861du ), FR_T(vec256, 0xbd56d684ae32dcdeu, 0x2db07b791409bd44u, 0xf6fc95fc76a3e44eu, 0x5adc0a4824ed7b31u ), FR_T(vec256, 0xf6d82dbf27c562bbu, 0x4ddc72902b57637fu, 0xc17c34cd06eab0a9u, 0x068dfbae2b59d621u ), FR_T(vec256, 0x3bbb6d5f61b4a6dfu, 0x029e0c54b34eca42u, 0x1d4e30563ffd89d1u, 0x6b3cb83cd07ec38bu ), FR_T(vec256, 0x25909fe27b483997u, 0xe6c3383b3f40368fu, 0xe7a72791dfbf158fu, 0x2bccc28890ca2226u ), FR_T(vec256, 0x7967591754eb1d75u, 0x1d44be7dd07fc645u, 0x1fddcce947873890u, 0x1c9bd17ed4a502f9u ), FR_T(vec256, 0x0491bceb70de2c18u, 0xfe59299087989fc9u, 0x687fc87ab064bd3cu, 0x184857c8fbd5ad87u ), FR_T(vec256, 0x1e4739c8b510e57eu, 0xcc6032ec184b8322u, 0x67262f63984f6527u, 0x5f5b959a87e5e5d4u ), FR_T(vec256, 0x4256481adcf3219au, 0x45f37b7f96b6cad3u, 0xf9c3f1d75f7a3b27u, 0x2d2fc049658afd43u ), }; const fr_t domain_size_inverse[S + 1] = { FR_T(vec256, 0x00000001fffffffeu, 0x5884b7fa00034802u, 0x998c4fefecbc4ff5u, 0x1824b159acc5056fu ), FR_T(vec256, 0x00000000ffffffffu, 0xac425bfd0001a401u, 0xccc627f7f65e27fau, 0x0c1258acd66282b7u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x4000000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x2000000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x1000000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0800000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0400000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0200000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0100000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0080000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0040000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0020000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0010000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0008000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0004000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0002000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0001000000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000800000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000400000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000200000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000100000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000080000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000040000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000020000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000010000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000008000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000004000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000002000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000001000000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000800000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000400000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000200000000u ), FR_T(vec256, 0x0000000000000000u, 0x0000000000000000u, 0x0000000000000000u, 0x0000000100000000u ), }; #undef FR_T