ecelgamal
ecelgamal copied to clipboard
Segmentation fault
Hi,
I encounter Segmentation fault: 11
when using the C version of the code in my MacOS (x86). And, I encounter Segmentation fault (core dumped)
when using the C version of the code in my B2s Azure virtual machine.
The code:
gamal_ciphertext_t test_1;
gamal_ciphertext_t test_2;
gamal_ciphertext_t test_sum;
gamal_encrypt(test_1, key, 502);
gamal_encrypt(test_2, key, 482);
gamal_add(test_sum, test_1, test_2);
dig_t test_plain;
gamal_decrypt(&test_plain, key, test_scalar_mul, table);
It return Segmentation fault sometimes during the gamal_add
and sometimes during the decrypt function. (I tried to print out something after each line.)
May I ask if I have done something wrongly? And, the implementation is tested on which kind of machine?
Thank you.