Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Elephant
Beginner
160 Views

Sample Remote Attestation Code (sample_libcrypto.h) Query

Hi,

I would like to clarify the sample_libcrypto.h header in the sample code for Remote Attestation.  Are the API's in that library working exactly the same as the ones in sgx_tcrypto library, e,g. sample_rijndael128GCM_encrypt the same as sgx_rijndael128GCM_encrypt?  The endianness of the API's are expected the same? The point is, can I put the functions that use sample_libcrypto.h inside an enclave and change the references to sample_XXX APIs to sgx_XXX?  Would there be issues in that?

Thanks a lot!

Kind Regards,
Elephant

 

0 Kudos
2 Replies
160 Views

Please do NOT use the sample lib crypto in production code. Please see:

https://github.com/01org/linux-sgx/blob/master/sdk/sample_libcrypto/sample_libcrypto.cpp

And "find" __do_get_rand32 before deciding whether this is a suitable library for production.

Elephant
Beginner
160 Views

Hi Francisco,

Thanks for taking time to answer my question.  I know that sample lib crypto is not meant for production, that's why I was asking if I can do all the work inside an enclave and use the SGX crypto API's instead of using the sample lib crypto.  I wanted to know if sample_xxxx_xxxx API's map directly with sgx_xxxx_xxxx API's.

Thanks a lot!

Kind Regards,
Elephant

Reply