A javascript VM guarded by enclaves.
- A linux server that supports Intel SGX
- Install ego
git clone https://github.com/smartbch/egvm
cd egvm
go mod download -x
-
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 }
-
build and run
cd keygrantor ego-go build -o keygrantor ./cmd ego sign enclave.json ego run keygrantor
-
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
-
run
./egvminvoker
-
test
./invokertester -w ./tester/script/write_output.txt