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

A new way to use SGX to protect code?


Hello,when I want to use SGX to protect a part of project, if I move the code in enclave,the workload is heavy,and can I compile the part of code into static lib,and my enclave link the static lib,can this way achieves the same goal as move the code in enclave?

0 Kudos
1 Reply

While an Enclave itself must be a DLL, this DLL can include a static library which you construct as long as the static library is constructed with the correct compile/link options.

The SGX Wizard actually allows you to construct a static library for inclusion in an enclave .dll.  See section: "Setting up an Intel(R) Software Guard Extensions Project" in the SGX Developer Reference document (roughly on page 9).  Set up an Enclave Project and select "Enclave Library" as the Project Type in the Enclave Settings Dialog.  This will construct a static library for inclusion in an enclave.

Note: your enclave DLL project which includes your static lib must contain the interface code constructed from the EDL file.