Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.

multiple enclaves in a single application

Gokhale__Sushant
Beginner
1,081 Views

How to create multiple enclaves in a single application?

Sample code(or link to it ) would be better. Need it for my academic project.

0 Kudos
1 Solution
Scott_R_Intel
Employee
1,081 Views

Hi Sushant.

The only thing you really need to do to load multiple enclaves is to make sure they are named differently.  The LocalAttestation sample actually loads up 3 different enclaves (simply named Enclave1, Enclave2, and Enclave3).

https://github.com/intel/linux-sgx/tree/master/SampleCode/LocalAttestation

Hope this helps.

Scott

View solution in original post

0 Kudos
3 Replies
Scott_R_Intel
Employee
1,082 Views

Hi Sushant.

The only thing you really need to do to load multiple enclaves is to make sure they are named differently.  The LocalAttestation sample actually loads up 3 different enclaves (simply named Enclave1, Enclave2, and Enclave3).

https://github.com/intel/linux-sgx/tree/master/SampleCode/LocalAttestation

Hope this helps.

Scott

0 Kudos
Gokhale__Sushant
Beginner
1,081 Views

Thanks. And how do you generate "Enclave1_private.pem" file for each enclave?

0 Kudos
Scott_R_Intel
Employee
1,081 Views

You can use OpenSSL to generate the keys you need.  See the "Enclave Signing Tool" section of the latest SGX Dev Ref for Linux for examples of how to do so:

https://download.01.org/intel-sgx/linux-2.4/docs/Intel_SGX_Developer_Reference_Linux_2.4_Open_Source.pdf

But, just as an FYI, unless you want/plan to whitelist each enclave signing key separately, you probably want to use the same signing key for all your enclaves.

Regards.

Scott

0 Kudos
Reply