Hello Eskil,
I have been trying to run the scripts with a 992 prime size. The third script ran without any issue. This is the line :
# python3 03_generate_prime_field_using_bbs.py in_03.json in_04.json 992
I used the in_03.json that you can find on the Million Dollar Curve website. The in_04.json file I obtained is in attachment. I guess you already managed to obtain this file.
The next step is to generate the curve. To do so, you should run
# python3 04_generate_curve_using_bbs.py in_04.json out.json —fast
At this point, I get the same memory issue than you (while checking candidate number 3). It seems that the routine causing this failure is sea_weierstrass in the file subroutines.py. I tried to allocate more memory for PARI by changing the line 67 of the file
pari_light_interface.pari_init(100000000, 0)
by
pari_light_interface.pari_init(1000000000, 0)
This allocates 1000000000 bytes = 1 GB of memory (instead of 100 MB). But then, I ran into another issue:
*** error opening seadata file: `/opt/local/share/pari/seadata/sea503'.
*** Error in the PARI system. End of program.
Indeed, this sea503 file is not part of the seadata directory. This file is required to count the number of points on the elliptic curve.
At this point, I am afraid there is not much I can do. Counting points on a curve is done by means of the Schoof–Elkies–Atkin algorithm, as implemented in PARI. It seems that you are pushing the implementation outside its limits ;-)
You could try to contact the maintainers of the PARI library to tell them about your issue. They may be able to help you, e.g., by telling you how to compute the seaXXX files yourself (?).
Please let me know if you managed to make it work. All I can say is that it seems hopeless to try to run the scripts on any architecture until you find a way to get the missing sea files.
I wish you luck
Thomas