Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
intel_sgx [2017/07/02 10:47] – RuslanBukinintel_sgx [2019/02/18 00:37] (current) – update OSVERSIONs. MarkLinimon
Line 1: Line 1:
 Intel's Software Guard Extensions (SGX) is a set of extensions to the Intel architecture that aims to provide integrity and confidentiality guarantees to security-sensitive computation performed on a computer where all the privileged software (kernel, hypervisor, etc) is potentially malicious. Intel's Software Guard Extensions (SGX) is a set of extensions to the Intel architecture that aims to provide integrity and confidentiality guarantees to security-sensitive computation performed on a computer where all the privileged software (kernel, hypervisor, etc) is potentially malicious.
  
-This is Intel SGX support for %%FreeBSD%%-CURRENT.+This is Intel SGX support for %%FreeBSD%%.
  
-1. Apply the kernel-support from https://reviews.freebsd.org/D11113 and rebuild kernel.+The SGX kernel driver was developed and tested on %%FreeBSD%% 12.0-CURRENT. Intel SGX SDK can be built on both 11-STABLE, 12-STABLE, and 13.0-CURRENT. 
 + 
 +0. Ensure your hardware supports SGX. Enable SGX in BIOS if required. 
 + 
 +1. On %%FreeBSD%% 12-STABLE or 13.0-CURRENT load SGX module
  
 <code> <code>
-kldload sgx+% sudo kldload sgx
 </code> </code>
  
Line 12: Line 16:
  
 <code> <code>
-% pkg install protobuf gmake gcc48+% sudo pkg install protobuf gmake gcc48 ocaml autoconf automake libtool
 % git clone https://github.com/bukinr/freebsd-sgx.git % git clone https://github.com/bukinr/freebsd-sgx.git
 % cd freebsd-sgx % cd freebsd-sgx
 % sh download_prebuilt.sh % sh download_prebuilt.sh
 % gmake -j4 % gmake -j4
-% sudo cp build/linux/libsgx_uae_service.so /usr/lib/ +% sudo gmake install
-% sudo cp build/linux/libsgx_urts.so /usr/lib/+
 </code> </code>
  
-4. Run SGX service daemon+3. Run SGX service daemon
  
 <code> <code>
-sudo ./build/linux/aesm_service+% sudo ./build/linux/aesm_service
 </code> </code>
  
-5. Build and run sample application+Note: The only possible flag for aesm_service is --no-daemon 
 + 
 +4. Build and run sample application
  
 <code> <code>
Line 34: Line 39:
 % sudo ./app % sudo ./app
 </code> </code>
 +
 +5. To run sample app without SGX SDK installed to /usr/lib
 +
 +<code>
 +% setenv LD_LIBRARY_PATH ../../build/linux
 +% sudo --preserve-env=LD_LIBRARY_PATH ./app
 +</code>
 +
 +You should see successfull messages, otherwise please report to br@bsdpad.com
  
 Papers Papers
 [[https://eprint.iacr.org/2016/086.pdf|Intel SGX Explained]] [[https://eprint.iacr.org/2016/086.pdf|Intel SGX Explained]]
 +
 +[[https://arxiv.org/pdf/1802.09085.pdf|SGXPECTRE Attacks: Leaking Enclave Secrets via Speculative Execution]]
  
  • intel_sgx.1498992478.txt.gz
  • Last modified: 2017/07/02 10:47
  • by RuslanBukin