Closed HuangMinming closed 1 month ago
mcl does not support SGX except for BLS12-381. https://github.com/herumi/mcl/issues/209#issuecomment-2213062455 cf. https://github.com/herumi/mcl?tab=readme-ov-file#how-to-make-a-library-for-bls12-381-without-xbyak
I just want to import pub key and verify signature, is there any solution to support SGX? Thanks.
What do you want to do? mcl is mainly a library for pairing operations on BLS12 and BN curves. If you want to use ECDSA (with secp256k1), you are better off using another library. Or if you want to do it with mcl, as I wrote inhttps://github.com/herumi/mcl/issues/ 216#issuecomment-2366735197 first of all, you can try
make lib/libmclecdsa.a bin/ecdsa_c_test.exe MCL_MSM=0 MCL_USE_XBYAK=0
% bin/ecdsa_c_test.exe
to make sure sample/ecdsa_c_test.cpp works on hand, then you should try to run it on SGX. When compiling your code, you must define the same macro in building mcl libraries. Data exchange between the SGX and the host can be done using serialize() and deserialize(), but this is outside the scope of this library.
Thanks for you reply. I can ran this correctly.
make lib/libmclecdsa.a bin/ecdsa_c_test.exe MCL_MSM=0 MCL_USE_XBYAK=0
% bin/ecdsa_c_test.exe
I will use OPENSSL instead.
Hi I want to use libmclecdsa.a in SGX, and generate it through
I added it to my SGX project. However, when I call ecdsaInit(), it returned -1.
What is the exact error? How to solve this problem? Thanks.