You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
573 B

  1. #include "stdio.h"
  2. #include "fr.h"
  3. int main() {
  4. FrElement a = { 0, Fr_LONGMONTGOMERY, {1,1,1,1}};
  5. FrElement b = { 0, Fr_LONGMONTGOMERY, {2,2,2,2}};
  6. /*
  7. FrElement a={0x43e1f593f0000000ULL,0x2833e84879b97091ULL,0xb85045b68181585dULL,0x30644e72e131a029ULL};
  8. FrElement b = {3,0,0,0};
  9. */
  10. FrElement c;
  11. // Fr_add(&(c[0]), a, a);
  12. // Fr_add(&(c[0]), c, b);
  13. for (int i=0; i<1000000000; i++) {
  14. Fr_mul(&c, &a, &b);
  15. }
  16. Fr_mul(&c,&a, &b);
  17. printf("%llu, %llu, %llu, %llu\n", c.longVal[0], c.longVal[1], c.longVal[2], c.longVal[3]);
  18. }