207 {
208#ifdef BN_SUPPORT_SNARK
209 bool supported = cp == CurveSNARK1 || cp == CurveSNARK2;
210#else
212#endif
213 if (!supported) {
214 fprintf(stderr, "not supported parameter\n");
215 exit(1);
216 }
219 const int pCoff[] = { 1, 6, 24, 36, 36 };
220 const int rCoff[] = { 1, 6, 18, 36, 36 };
221 const int tCoff[] = { 1, 0, 6, 0, 0 };
230
231
232
233 Fp2 xi(cp.xi_a, cp.xi_b);
238
239 for (
size_t i = 1; i <
sizeof(
gammar) /
sizeof(*gammar); ++i) {
241 }
242
243 for (
size_t i = 0; i <
sizeof(
gammar2) /
sizeof(*gammar2); ++i) {
245 }
246
247 for (
size_t i = 0; i <
sizeof(
gammar2) /
sizeof(*gammar2); ++i) {
249 }
250
254 assert(temp.b_.isZero());
258
260#ifdef BN_SUPPORT_SNARK
262#endif
263 }
static void setModulo(const mie::Vuint &p, int mode, bool useMulx=true, bool definedBN_SUPPORT_SNARK=false)
static void square(Fp &out, const Fp &x)
bool getGoodRepl(Vec &v, const mie::Vuint &x)
const CurveParam CurveFp254BNb
T power(const T &x, const S &y)
static mie::Vsint largest_c
static void eval(T &y, const U &x, const int *c)