ecelgamal icon indicating copy to clipboard operation
ecelgamal copied to clipboard

Segmentation fault

Open marvellous987 opened this issue 1 year ago • 0 comments

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.

marvellous987 avatar Nov 25 '23 12:11 marvellous987