You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
marblerun Run a signed executable as a Marblerun Marble.
14
+
signerid Print the SignerID of a signed executable.
15
+
uniqueid Print the UniqueID of a signed executable.
16
+
env Run a command in the EGo environment.
17
+
```
18
+
19
+
## sign
20
+
Usage:
21
+
```
22
+
ego sign [executable | config.json]
23
+
```
24
+
Sign an executable built with ego-go. Executables must be signed before they can be run in an enclave.
25
+
26
+
This command can be used in different modes:
27
+
*`ego sign <executable>`\
28
+
Generates a new key `private.pem` and a default configuration `enclave.json` in the current directory and signs the executable.
29
+
30
+
*`ego sign`\
31
+
Searches in the current directory for `enclave.json` and signs the therein provided executable.
32
+
33
+
*`ego sign <config.json>`\
34
+
Signs an executable according to a given configuration.
35
+
36
+
See [this section](#enclave-configuration-file) for more information on the configuration file.
37
+
38
+
## run
39
+
Usage:
40
+
```
41
+
ego run <executable> [args...]
42
+
```
43
+
Run a signed executable in an enclave. You can pass arbitrary arguments to the enclave.
44
+
45
+
Environment variables are only readable from within the enclave if they start with "EDG_".
46
+
47
+
You need an SGX-enabled machine to run an enclave. For development, you can also enable simulation mode by setting OE_SIMULATION=1, e.g.:
48
+
```
49
+
OE_SIMULATION=1 ego run helloworld
50
+
```
51
+
52
+
## marblerun
53
+
Usage:
54
+
```
55
+
ego marblerun <executable>
56
+
```
57
+
Run a signed executable as a Marblerun Marble.
58
+
Requires a running Marblerun Coordinator instance.
59
+
60
+
Environment variables are only readable from within the enclave if they start with "EDG_" and will be extended/overwritten with the ones specified in the manifest.
61
+
62
+
Requires the following configuration environment variables:
63
+
* EDG_MARBLE_COORDINATOR_ADDR\
64
+
The Coordinator address
65
+
* EDG_MARBLE_TYPE\
66
+
The type of this Marble (as specified in the manifest)
67
+
* EDG_MARBLE_DNS_NAMES\
68
+
The alternative DNS names for this Marble's TLS certificate
69
+
* EDG_MARBLE_UUID_FILE\
70
+
The location where this Marble will store its UUID
71
+
72
+
Set OE_SIMULATION=1 to run in simulation mode.
73
+
74
+
## signerid
75
+
Usage:
76
+
```
77
+
ego signerid <executable | key.pem>
78
+
```
79
+
Print the SignerID either from a signed executable or by reading a keyfile.`
80
+
81
+
## uniqueid
82
+
Usage:
83
+
```
84
+
ego uniqueid <executable>
85
+
```
86
+
Print the UniqueID of a signed executable.
87
+
88
+
## env
89
+
Usage:
90
+
```
91
+
ego env ...
92
+
```
93
+
Run a command within the ego build environment. For example, run
94
+
```
95
+
ego env make
96
+
```
97
+
to build a Go project that uses a Makefile.
98
+
99
+
## Enclave configuration file
100
+
An enclave configuration is defined in JSON and applied when signing an executable.
101
+
102
+
Here is an example configuration:
103
+
```json
104
+
{
105
+
"exe": "helloworld",
106
+
"key": "private.pem",
107
+
"debug": true,
108
+
"heapSize": 512,
109
+
"productID": 1,
110
+
"securityVersion": 1
111
+
}
112
+
```
113
+
114
+
`exe` is the (relative or absolute) path to the executable that should be signed.
115
+
116
+
`key` is the path to the private RSA key of the signer. When invoking `ego sign` and the key file does not exist, a key with the required parameters is automatically generated. You can also generate it yourself with:
117
+
```
118
+
openssl genrsa -out private.pem -3 3072
119
+
```
120
+
121
+
If `debug` is true, the enclave will be debuggable.
122
+
123
+
`heapSize` specifies the heap size available to the enclave in MB. It should be at least 512 MB.
124
+
125
+
A `productID` (SGX: ISVPRODID) is assigned by the developer and enables the attester to distinguish between different enclaves signed with the same key.
126
+
127
+
The developer should increment the `securityVersion` (SGX: ISVSVN) whenever a security fix is made to the enclave code.
0 commit comments