relic-toolkit/relic

/demo/ers-etrs code running error

another-ed opened this issue · 3 comments

Hi!
I'm studying https://eprint.iacr.org/2021/1240, so I downloaded the relic-0.6.0 library and installed the GMP library. After that, I executed make in the demo/ers-etrs directory. It was compiled successfully, but it got following errors when I run it,

another@Laptop-another:~/code/relic-0.6.0/demo/ers-etrs$ ./test-bench
-- RELIC 0.6.0 configuration:

** Allocation mode: AUTO

** Arithmetic backend: X64_ASM_4L

** Benchmarking options:
   Number of times: 10000

** Multiple precision module options:
   Precision: 1024 bits, 16 words
   Arithmetic method:  COMBA;COMBA;MONTY;SLIDE;LEHME;BASIC

** Prime field module options:
   Prime size: 255 bits, 4 words
   Arithmetic method: INTEG;INTEG;INTEG;MONTY;LOWER;LOWER;SLIDE

** Prime elliptic curve module options:
   Arithmetic method: JACOB;LWNAF;COMBS;INTER

** Elliptic Curve Cryptography module options:
   Arithmetic method: EDDIE

** Edwards Curve Cryptography module options:
   Arithmetic method: PROJC;LWNAF;COMBS;INTER

** Hash function module options:
   Chosen method: SH256


** ERS module

{"1": {"time": 0.200440, "size": null}ERROR THROWN in /home/another/code/relic-0.6.0/src/ed/relic_ed_util.c:55
ERROR THROWN in /home/another/code/relic-0.6.0/src/ed/relic_ed_util.c:55
ERROR THROWN in /home/another/code/relic-0.6.0/src/ed/relic_ed_util.c:55
ERROR THROWN in /home/another/code/relic-0.6.0/src/ed/relic_ed_util.c:55
ERROR THROWN in /home/another/code/relic-0.6.0/src/ed/relic_ed_util.c:55
ERROR THROWN in /home/another/code/relic-0.6.0/src/ed/relic_ed_util.c:55
ERROR THROWN in /home/another/code/relic-0.6.0/src/ed/relic_ed_util.c:55
.....
Segmentation fault

It seems that cp_ers_ext function has some errors.
Notes
I initially used git clone https://github.com/relic-toolkit/relic.git, but encountered the same issue as #279 during the compilation.

I pushed a number of fixes to HEAD that should close the issue. Can you please try again?

I pushed a number of fixes to HEAD that should close the issue. Can you please try again?

Thank you for your fixes to this problem,everything is running perfectly now!

Sorry for the breakage, and thanks again for notifying it!