Skip to content

Latest commit

 

History

History
74 lines (65 loc) · 1.37 KB

README.md

File metadata and controls

74 lines (65 loc) · 1.37 KB

Enclave-Guarded Virtual Machine

A javascript VM guarded by enclaves.

Prerequisite

  • A linux server that supports Intel SGX
  • Install ego

Install

git clone https://github.com/smartbch/egvm
cd egvm
go mod download -x

Run

keygrantor

  1. modify keygrantor/encalve.json

    {
      "exe": "keygrantor",
      "key": "private.pem",
      "debug": false,
      "heapSize": 512,
      "executableHeap": false,
      "productID": 1,
      "securityVersion": 3,
      "mounts": [
        {
          "source": "<your_path_to_store_private_key>",
          "target": "/data",
          "type": "hostfs",
          "readOnly": false
        },
        {
          "source": "/etc/ssl",
          "target": "/etc/ssl",
          "type": "hostfs",
          "readOnly": true
        }
      ],
      "env": null,
      "files": null
    }
  2. build and run

    cd keygrantor
    ego-go build -o keygrantor ./cmd
    ego sign enclave.json
    ego run keygrantor

egvm

  1. build

    cd egvm-invoker
    go build -o egvminvoker ./cmd
    go build -o invokertester ./tester
    ego-go build -o egvmscript ../egvm-script/cmd
    ego sign egvmscript
  2. run

    ./egvminvoker
  3. test

    ./invokertester -w ./tester/script/write_output.txt