0

I'm writing an SGX application on a server in my institute. I need to know whether the Intel SGX SDK and Intel SGX SSL are already installed. The server is running Ubuntu.

Is there a way to check this?

TheDarkTron
  • 304
  • 4
  • 13

2 Answers2

0

I found a solution:

The standard installation directories are:

  • SGX SDK: /opt/intel/sgxsdk
  • SGX SSL: /opt/intel/sgxssl

So check if they exist and you should be ready to go.

TheDarkTron
  • 304
  • 4
  • 13
  • 1
    That is a first step but is bound to give false positive. The usual way to detect things like that is what happens when you run `./configure`: it creates a small C program using the feature you are testing (like importing the library, accessing one of its constant, etc.), compiles it and run it. If it runs, it means everything is installed correctly, if not you know something is wrong. Maybe look at other software using these libraries and how they detect their installation. – Patrick Mevzek Feb 10 '20 at 20:17
0

Try building the sample application in hardware mode. If it succeeds then everything is working fine.

Download the SDK from here: SDK

$ cd SampleCode
$ cd SampleEnclave
$ make clean
$ make

GEN  =>  App/Enclave_u.h
CC   <=  App/Enclave_u.c
CXX  <=  App/App.cpp
CXX  <=  App/Edger8rSyntax/Types.cpp
CXX  <=  App/Edger8rSyntax/Pointers.cpp
CXX  <=  App/Edger8rSyntax/Arrays.cpp
CXX  <=  App/Edger8rSyntax/Functions.cpp
CXX  <=  App/TrustedLibrary/Thread.cpp
CXX  <=  App/TrustedLibrary/Libcxx.cpp
CXX  <=  App/TrustedLibrary/Libc.cpp
LINK =>  app
GEN  =>  Enclave/Enclave_t.h
CC   <=  Enclave/Enclave_t.c
CXX  <=  Enclave/Enclave.cpp
CXX  <=  Enclave/Edger8rSyntax/Types.cpp
CXX  <=  Enclave/Edger8rSyntax/Pointers.cpp
CXX  <=  Enclave/Edger8rSyntax/Arrays.cpp
CXX  <=  Enclave/Edger8rSyntax/Functions.cpp
CXX  <=  Enclave/TrustedLibrary/Thread.cpp
CXX  <=  Enclave/TrustedLibrary/Libcxx.cpp
CXX  <=  Enclave/TrustedLibrary/Libc.cpp
LINK =>  enclave.so
<EnclaveConfiguration>
    <ProdID>0</ProdID>
    <ISVSVN>0</ISVSVN>
    <StackMaxSize>0x40000</StackMaxSize>
    <HeapMaxSize>0x100000</HeapMaxSize>
    <TCSNum>10</TCSNum>
    <TCSPolicy>1</TCSPolicy>
    <!-- Recommend changing 'DisableDebug' to 1 to make the enclave undebuggable for enclave release -->
    <DisableDebug>0</DisableDebug>
    <MiscSelect>0</MiscSelect>
    <MiscMask>0xFFFFFFFF</MiscMask>
</EnclaveConfiguration>
tcs_num 10, tcs_max_num 10, tcs_min_pool 1
The required memory is 4153344B.
Succeed.
SIGN =>  enclave.signed.so
The project has been built in debug hardware mode.

$ ./app
Checksum(0x0x7fff77f02cd0, 100) = 0xfffd4143
Info: executing thread synchronization, please wait...  
Info: SampleEnclave successfully returned.
Enter a character before exit ...



sandeep007734
  • 16
  • 2
  • 3