Git Product home page Git Product logo

channel-id-enclave's Introduction

Channel ID Private Key Protection

About

There are two related patches in this project: The BoringSSL patch enables an opaque key for Channel ID, and the Chromium patch enables an opaque key along with providing an implementation of hardware-backed keys using the Intel SGX SDK. Together, these patches demonstrate how Chromium could store its Channel ID private keys in an Intel SGX enclave.

Compile and run

Follow the following steps to compile and run:

  1. Be on a machine with an SGX processor.
  2. Enter the BIOS settings, and make sure SGX is set to enabled.
  3. Install Linux.
  4. Install the SGX Alpha SDK, following the included instructions.
  5. Download the chromium repository following the instructions available. We will call its path <chromium>.
  6. Checkout commit f594a1085b49369c2479e5526dd0ef8b116e9af0 in the chromium repository.
  7. cd third_party/boringssl/src, checkout commit afe57cb14d36f70ad4a109fc5e7765d1adc67035.
  8. Chrome uses an included root to handle packages.
cd build/linux/debian_wheezy_<amd64/i386>-sysroot/
mkdir opt && cd opt && mkdir intel && cd intel
cp -r /opt/intel/sgxsdk .
  1. Set up pkgconfig by creating the file /usr/lib/pkgconfig/sgx.pc with contents:
prefix=/opt/intel/sgxsdk
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${prefix}/lib64

Name: sgx
Description: Intel SGX SDK for Linux
Version: 1.0.0
Cflags: -I${includedir}
Libs: -L${libdir} -lsgx_urts -lsgx_uae_service -lsgx_tservice
  1. add to ~/.bashrc:
export LD_LIBRARY_PATH=/lib64:/usr/lib:/opt/intel/sgxsdk/lib64
export CHROME_DEVEL_SANDBOX="/usr/local/sbin/chrome-devel-sandbox"

(this second one should already be there if chrome compiles properly) 11. Apply chromium/chromium.patch to <chromium>/src. 12. Apply boringssl/bssl.patch to third_party/boringssl/src. 13. If you're using gn, from <chromium>/src:

gn args out/Default
add the line:
enable_nacl = false
  1. Compile the enclave
cd net/ssl
make
cd ../../
  1. Compile chrome (first time: ninja -C out/Default chrome chrome_sandbox)
ninja -C out/Default chrome
  1. Run chrome
out/Default/chrome
  1. Load google.com

If you want to run tests:

ninja -C out/Default net_unittests
out/Default/net_unittests --gtest_filter=*ChannelID*

There are more tests within boringssl, with instructions in third_party/boringssl/src/BUILDING.md

channel-id-enclave's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.