Intel® Software Guard Extensions (Intel® SGX)
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.

About __uint128_t / __int128_t in SGX SDK

anatol_m_
Beginner
316 Views

What is the best way to get 128 bit integers to work in currently existing SDK? And what about the Linux SDK?

It's quite important for the crypto developments.

Thank you!

0 Kudos
1 Solution
Surenthar_S_Intel
316 Views

Rad A. wrote:

Quote:

Muthumanickam V. (Intel) wrote:

 

EDL only supports the following basic types:

char, short, long, int, float, double, void, int8_t, int16_t, int32_t, int64_t, size_t, wchar_t, uint8_t, uint16_t, uint32_t, uint64_t, unsigned, struct, enum, union.

The Intel® Software Guard Extensions Evaluation SDK includes a trusted cryptography library named sgx_tcrypto. It includes the cryptographic functions used by other trusted libraries included in the SDK, such as the sgx_tservice library. Thus, the functionality provided by this library might be somewhat limited. If you need additional cryptographic functionality, you would have to develop your own trusted cryptographic library

 

Regarding the LINUX SDK please follow the following link for the Update:

https://software.intel.com/en-us/blogs/2016/04/11/intel-software-guard-extensions-sdk-for-linux-avai...

 

 

 

 

I tried to use sgx_tcrypto in a simple project. In VS, I created a simple Win32 console application and added paths to sgx_tcrypto.h and sgx_tcrypto.lib to the project properties. But while building it turned out that the library depends on libmmdd.lib. I have to questions:

1. Am I allowed to use sgx_tcrypto.lib or other libraries shipped with SGX SDK?
2. If so, what should I do for its dependencies? Does it mean I have to use Intel products (which I assume provides libmmdd.lib)?

Thanks in advance.

Regards,
Rad

 

Hi Red,

sgx_intin.h has a dependency on the MS Windows intrin.h. For enclaves, the Visual Studio standard include directories are not part of the default configuration and will have to be added manually. In the project configuration for the enclave, go to “Configuration Properties -> VC++ Directories” and set the “Include Directories” parameter to $(VC_IncludePath):

Thanks and Regards,
Surenthar Selvaraj

View solution in original post

9 Replies
Muthumanic_V_Intel
316 Views

EDL only supports the following basic types:

char, short, long, int, float, double, void, int8_t, int16_t, int32_t, int64_t, size_t, wchar_t, uint8_t, uint16_t, uint32_t, uint64_t, unsigned, struct, enum, union.

The Intel® Software Guard Extensions Evaluation SDK includes a trusted cryptography library named sgx_tcrypto. It includes the cryptographic functions used by other trusted libraries included in the SDK, such as the sgx_tservice library. Thus, the functionality provided by this library might be somewhat limited. If you need additional cryptographic functionality, you would have to develop your own trusted cryptographic library

 

Regarding the LINUX SDK please follow the following link for the Update:

https://software.intel.com/en-us/blogs/2016/04/11/intel-software-guard-extensions-sdk-for-linux-avai...

 

 

anatol_m_
Beginner
316 Views

Thank you for the answer!

Yes, I know about tcrypto - however I found no possibility to make basic math operations with the Elliptic Curves that I need with your library (please correct me if I'm wrong).

That's why I develop (partially port) another solution. But it's quite uncomfortable to work without 128 bit integers - modern ICC support them as I know, but SGX SDK no.

I will need to port something like side Google implementation https://src.chromium.org/svn/trunk/src/net/base/int128.h in my project.

I checked information about the Linux SDK terms - still the June - is it correct? We hope for it :)

Muthumanickam V. (Intel) wrote:

EDL only supports the following basic types:

char, short, long, int, float, double, void, int8_t, int16_t, int32_t, int64_t, size_t, wchar_t, uint8_t, uint16_t, uint32_t, uint64_t, unsigned, struct, enum, union.

The Intel® Software Guard Extensions Evaluation SDK includes a trusted cryptography library named sgx_tcrypto. It includes the cryptographic functions used by other trusted libraries included in the SDK, such as the sgx_tservice library. Thus, the functionality provided by this library might be somewhat limited. If you need additional cryptographic functionality, you would have to develop your own trusted cryptographic library

 

Regarding the LINUX SDK please follow the following link for the Update:

https://software.intel.com/en-us/blogs/2016/04/11/intel-software-guard-extensions-sdk-for-linux-avai...

 

 

Muthumanic_V_Intel
316 Views

1. You can use compiler intrinsics to set and manipulate 128-bit type’s.

 

2. Regarding the LINUX availability I would suggest you to follow up the LINUX update page. As far as I know, it is still tracking for the end of June. Most possibly it will be available by that time, if not it won’t be too late after June.

Surenthar_S_Intel
316 Views

Update:

Intel SGX SDK for Linux* OS open source project is now live at:  https://01.org/intel-softwareguard-eXtensions

Rad_A_
Beginner
316 Views

Muthumanickam V. (Intel) wrote:

EDL only supports the following basic types:

char, short, long, int, float, double, void, int8_t, int16_t, int32_t, int64_t, size_t, wchar_t, uint8_t, uint16_t, uint32_t, uint64_t, unsigned, struct, enum, union.

The Intel® Software Guard Extensions Evaluation SDK includes a trusted cryptography library named sgx_tcrypto. It includes the cryptographic functions used by other trusted libraries included in the SDK, such as the sgx_tservice library. Thus, the functionality provided by this library might be somewhat limited. If you need additional cryptographic functionality, you would have to develop your own trusted cryptographic library

 

Regarding the LINUX SDK please follow the following link for the Update:

https://software.intel.com/en-us/blogs/2016/04/11/intel-software-guard-extensions-sdk-for-linux-avai...

 

 

I tried to use sgx_tcrypto in a simple project. In VS, I created a simple Win32 console application and added paths to sgx_tcrypto.h and sgx_tcrypto.lib to the project properties. But while building it turned out that the library depends on libmmdd.lib. I have to questions:

1. Am I allowed to use sgx_tcrypto.lib or other libraries shipped with SGX SDK?
2. If so, what should I do for its dependencies? Does it mean I have to use Intel products (which I assume provides libmmdd.lib)?

Thanks in advance.

Regards,
Rad

 

Juan_d_Intel
Employee
316 Views

Anatol, 

The SGX SDK 1.6 that has been recently posted exposes the full IPP crypto API. This should provide the basic Elliptic Curve operations you need.

anatol_m_
Beginner
316 Views

Dear Juan, thank you!
I saw IPP after release but not exactly what I need - actually I already got an side library that helps me.

And as I found functions from the IPP are not constant timing? Please correct me if I wrong.

Surenthar_S_Intel
317 Views

Rad A. wrote:

Quote:

Muthumanickam V. (Intel) wrote:

 

EDL only supports the following basic types:

char, short, long, int, float, double, void, int8_t, int16_t, int32_t, int64_t, size_t, wchar_t, uint8_t, uint16_t, uint32_t, uint64_t, unsigned, struct, enum, union.

The Intel® Software Guard Extensions Evaluation SDK includes a trusted cryptography library named sgx_tcrypto. It includes the cryptographic functions used by other trusted libraries included in the SDK, such as the sgx_tservice library. Thus, the functionality provided by this library might be somewhat limited. If you need additional cryptographic functionality, you would have to develop your own trusted cryptographic library

 

Regarding the LINUX SDK please follow the following link for the Update:

https://software.intel.com/en-us/blogs/2016/04/11/intel-software-guard-extensions-sdk-for-linux-avai...

 

 

 

 

I tried to use sgx_tcrypto in a simple project. In VS, I created a simple Win32 console application and added paths to sgx_tcrypto.h and sgx_tcrypto.lib to the project properties. But while building it turned out that the library depends on libmmdd.lib. I have to questions:

1. Am I allowed to use sgx_tcrypto.lib or other libraries shipped with SGX SDK?
2. If so, what should I do for its dependencies? Does it mean I have to use Intel products (which I assume provides libmmdd.lib)?

Thanks in advance.

Regards,
Rad

 

Hi Red,

sgx_intin.h has a dependency on the MS Windows intrin.h. For enclaves, the Visual Studio standard include directories are not part of the default configuration and will have to be added manually. In the project configuration for the enclave, go to “Configuration Properties -> VC++ Directories” and set the “Include Directories” parameter to $(VC_IncludePath):

Thanks and Regards,
Surenthar Selvaraj

View solution in original post

Juan_d_Intel
Employee
316 Views

The IPP API supports constant timing as long as your machine supports SSE4.1, which is the lowest feature set included in the SGX SDK crypto library.

Reply