Coder Social home page Coder Social logo

global19 / securevaluerecovery Goto Github PK

View Code? Open in Web Editor NEW

This project forked from signalapp/securevaluerecovery

0.0 1.0 0.0 2.06 MB

License: GNU Affero General Public License v3.0

Makefile 0.91% Python 2.52% Shell 0.11% Dockerfile 0.13% C 38.40% Rust 57.83% C++ 0.09%

securevaluerecovery's Introduction

Secure Value Recovery Service (Beta)

Building the SGX enclave (optional)

Building reproducibly with Docker

Prerequisites:

  • GNU Make
  • Docker (able to run debian image)
$ make -C <repository_root>/enclave

The default docker-install target will create a reproducible build environment image using enclave/docker/Dockerfile, build the enclave inside a container based on the image, and install the resulting enclave into service/kbupd/res/enclave/. The Dockerfile will download a stock dated-snapshot debian Docker image. The Debian project builds their docker images reproducibly, based on the a snapshot of the debian repos on the date of the build from the Debian Snapshot Project. Make will then be run inside the newly built Docker Debian image as in the Building with Debian section below:

NB: the installed enclave will be signed with the SGX debug flag enabled by an automatically generated signing key. Due to Intel SGX licensing requirements, a debug enclave can currently only be run with SGX debugging enabled, allowing inspection of its encrypted memory, and invalidating its security properties. To use an enclave in production, provide the Intel-whitelisted signing key as enclave/libkbupd_enclave.hardened.key before building. Alternatively, the generated enclave/build/libkbupd_enclave.hardened.signdata file can be signed and saved as enclave/build/libkbupd_enclave.sig with corresponding public key at enclave/libkbupd_enclave.pub, and signed using make sign install.

Building with Debian

Prerequisites:

  • GNU Make
  • cmake
  • ninja-build
  • gcc
  • ocaml-native-compilers
  • ocamlbuild
  • automake/autoconf/libtool/pkg-config
  • libssl-dev
  • libcurl4-openssl-dev
  • protobuf-compiler
  • libprotobuf-dev
  • llvm-dev
  • libclang-dev
  • clang
  • git
  • devscripts/debhelper/fakeroot
  • rust 1.37.0 toolchain from rustup
  • Intel SGX SDK v2.7.1 SDK build dependencies
$ make -C <repository_root>/enclave debuild install

debuild is a debian tool used to build debian packages after it sanitizes the environment and installs build dependences. The primary advantage of using debian packaging tools in this case is to leverage the Reproducible Builds project. While building a debian package, debuild will record the names and versions of all detected build dependencies into a *.buildinfo file, for future reproducibility debugging.

The debuild target also builds parts needed from the Intel SGX SDK v2.7.1 after cloning it from github.

The install target copies the enclave to service/kbupd/res/enclave/, which should potentially be checked in to be used with the service.

The sign target may also be used as described in Building reproducibly with Docker to produce a release-mode enclave.

Building without Docker or Debian:

Prerequisites:

  • GNU Make
  • cmake
  • ninja-build
  • gcc
  • ocaml-native-compilers
  • ocamlbuild
  • automake/autoconf/libtool/pkg-config
  • libssl-dev
  • libcurl4-openssl-dev
  • protobuf-compiler
  • libprotobuf-dev
  • llvm-dev
  • libclang-dev
  • clang
  • git
  • rust 1.37.0 toolchain from rustup
  • Intel SGX SDK v2.7.1 SDK build dependencies
$ make -C <repository_root>/enclave all install

The all target will probably fail to reproduce the same binary as above, but doesn't require Docker or Debian Linux.

The sign target may also be used as described in Building reproducibly with Docker to produce a release-mode enclave.

Building the service

Building with Docker

Prerequisites:

  • GNU Make
  • Docker (able to run ubuntu image)
$ make -C <repository_root>/service docker

Building without Docker

Prerequisites:

  • GNU Make
  • a C compiler
  • rust toolchain (i.e. rustc, cargo)
  • libsgx-enclave-common from source or prebuilt
  • libssl-dev (OpenSSL)
  • libseccomp-dev
  • pkg-config
  • protobuf-compiler
  • Intel SGX SDK SDK headers (common/inc/sgx*.h) installed in a system include directory
$ make -C <repository_root>/service all

Running the service

Runtime requirements:

$ service/build/target/release/kbupd help

securevaluerecovery's People

Contributors

geogriff-signal avatar

Watchers

 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.