miracl / MIRACL

MIRACL Cryptographic SDK: Multiprecision Integer and Rational Arithmetic Cryptographic Library is a C software library that is widely regarded by developers as the gold standard open source SDK for elliptic curve cryptography (ECC).
https://miracl.com
652 stars 242 forks source link

build in Intel SGX #131

Closed HuangMinming closed 1 month ago

HuangMinming commented 1 month ago

Hi, I want to build MIRACL with intel sgx sdk[https://github.com/intel/linux-sgx], not libc. But there was a error in mrgf2m.c which needs xmmintrin.h. In fact sgx sdk doesn't provide such header file. Is there any solution to this problem. Is there an Macro which can avoid to use xmmintrin.h. Thanks. I compile the code with "-DMR_NO_FILE_IO -DMR_NO_STANDARD_IO -nostdinc -I/opt/intel/sgxsdk/include -I/opt/intel/sgxsdk/include/tlibc -I/opt/intel/sgxsdk/include/libcxx". Inter SGX SDK was installed in "/opt/intel/sgxsdk/include"

mcarrickscott commented 1 month ago

If the Intel enclave does not support these extensions (and I am not familiar with its capabilities) then you need to edit mrgf2m.c so that it just uses the standard C code.

Mike

On Wed, Sep 25, 2024 at 9:28 AM HuangMinming @.***> wrote:

Hi, I want to build MIRACL with intel sgx sdk[ https://github.com/intel/linux-sgx], not libc. But there was a error in mrgf2m.c which needs xmmintrin.h. In fact sgx sdk doesn't provide such header file. Is there any solution to this problem. Is there an Macro which can avoid to use xmmintrin.h. Thanks. I compile the code with "-DMR_NO_FILE_IO -DMR_NO_STANDARD_IO -nostdinc -I/opt/intel/sgxsdk/include -I/opt/intel/sgxsdk/include/tlibc -I/opt/intel/sgxsdk/include/libcxx". Inter SGX SDK was installed in "/opt/intel/sgxsdk/include"

— Reply to this email directly, view it on GitHub https://github.com/miracl/MIRACL/issues/131, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAU3ZDTA2DYPVUCUBKS67J3ZYJX2BAVCNFSM6AAAAABOZ7GJP6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2DOMZSGU4TKOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

HuangMinming commented 1 month ago

Thanks for you reply. I will try to edit mrgf2m.c