Git Product home page Git Product logo

myfirstenclave's Introduction

My First Simple enclave

This is my first enclave for testing and educational purpoce. It is supposed to generate a library that does a simple adding into an intel SGX environment.

This repo contains 2 branches:

  • The enclave_only branch that shows only how an enclave is built and signed.
  • The master branch that contains the how build sign and link your enclave with an application.

Compile

How to Compile

You will need to run the following command:

make

Key generation for enclave signing:

The makefile generates the keys for enclave signing in ~/.sgx directory. By default it will generate the ~/.sgx/MyFirstEnclave.pem key. You can modify the path where the key will be stored by modifying the KEY_STORAGE_PATH and KEY_PRIVATE_FILE and KEY_PUBLIC_FILE accorditly. The following table explains the valies of the variables.

Variable Use
KEY_STORAGE_PATH The directory where the keys will be stored.
KEY_PRIVATE_FILE The private key that will be generated and will be used to sign the enclave.
KEY_PUBLIC_FILE The public key that will be used from others to verify the signed enclave.

The Makefile in Simple terms

As far I discovered the application you can compile an enclave by doing the following compile chain:

In what order to compile the files

Requirements

  • A GNU\Linux Distribution with the sgx driver and the sdk & psw libraries
  • As mentioned on the links above to export the correct source.
  • The gcc , g++, make and openssl tools.
  • Git lfs for documentation (optionally)

myfirstenclave's People

Contributors

pc-magas avatar

Stargazers

 avatar

Watchers

 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.