sslab-gatech / opensgx

OpenSGX
Other
293 stars 80 forks source link

GMP library within enclave: some mpz operations crash #64

Open BoujdadFz opened 5 years ago

BoujdadFz commented 5 years ago

hello,

I'm not able to run some of the GMP library operations inside an enclave, in the code attached I'm getting this error: qemu: uncaught target signal 4 (Illegal instruction) - core dumped

The program crashes at line 34 of the c program "sof.txt" so it is not able to perform mpz_mod operation, I had the same issue before with mpz_invert but could fix with some other strategy but this one, I have no clue that would respect my scenario.

Could anyone please run this program on their machine and tell if it's running properly? Thank you in advance,

thisSecretkey.txt sof.txt

BoujdadFz commented 5 years ago

I rewrote the program using bignum struct of polarssl instead of using GMP library; now I can get my program run at least; but the performance is still hugely different from that of a normal run, I'm wondering why, is it the emulation impact?