- root_dir: gdpr-sgx root directory
- cd root_dir
- run command
./scripts/install_deps.sh -r -s
to install dependencies - note: in Step 2, -r means install remote attestation dependencies while -s does for SGX SDK
- cd root_dir
- use
./scripts/build_targets.sh [options]
to build targets - in Step 2, there are some options for the command
- -r build remote attestation targets
- -m if you provide -r option the default value for -m is HW which builds targets in Hardware mode otherwise you can use SIM to build in simulation mode
- -s build SGX SDK
- -t build simple remote attestation and SGX SDK(if -r and -s are provided)
- -j build enclave client .so library file. The built targets will be moved to root_dir/target
- -h show usage information
- in EnclaveCPP, build libEnclaveBridge.so
- run $ export LD_LIBRARY_PATH=
pwd
:$LD_LIBRARY_PATH - start webserver after 1&2 are done
- $ cd comsgxtrial
- $ mvn package
- $ ls target/ com.sgxtrial.war
- $ cp com.sgxtrial.war $TOMCAT/webapps/
- $ restart tomcat, then visit http://localhost:8080/com.sgxtrial/webclient.html
- current javascript libraries are in resources/js/
- including protobuf_msg.js for serializing and deserializing Messages.Msg0-4.
- others are for ECDH encryptions.
- main logic for sending/receving Messages.MsgX is in webclient.html.
- Node.js javascript has some minor different Language Grammar than Browser javascript.
- to involve new javascript libraries from nodejs in browser, you need to install browserify to make it work.
- http://browserify.org/
- build protobuf for javascript
- EnclaveThreadManager is a file to init EnclaveBridge
- WebSocketServer.java is a file to handle websocket connections from browser.
- OnMessages is called every time when new byte[] incoming, it should pass byte[] directly to enclave, and gets byte[] from enclave and send back to javascript.