Skip to content

Instantly share code, notes, and snippets.

@glassonion1
Last active August 13, 2021 00:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glassonion1/5d50de14c7bbe2971f456acaa3e6f8b1 to your computer and use it in GitHub Desktop.
Save glassonion1/5d50de14c7bbe2971f456acaa3e6f8b1 to your computer and use it in GitHub Desktop.
autoactivate on
participant "main.rs : App" as App
participant "lib.rs:Enclave" as Enclave
participant "client.rs:Client" as Client
participant "SGX SDK" as SDK
participant IPS <<Intel Service>>
participant IAS <<Intel Service>>
App -> Enclave: verify<<ECall>>
Enclave -> Enclave: create_attestation_report
Enclave -> App: ocall_sgx_init_quote<<OCall>>
App -> SDK: sgx_init_quote
SDK -> IPS
return
return
return SGX_SUCCESS
Enclave -> Client: get_sigrl_from_intel
Client -> IAS: GET /sigrl/{gid}
return 200
return
Enclave -> SDK: rsgx_create_report
return
Enclave -> App: ocall_get_quote<<OCall>>
App -> SDK: sgx_calc_quote_size
SDK -> IPS
return
return
App -> SDK: sgx_get_quote
SDK -> IPS
return
return
return SGX_SUCCESS
Enclave -> SDK: rsgx_verify_report
return
Enclave -> Client: post_report_to_intel
Client -> IAS: POST /report
return 200
return
deactivate Enclave
Enclave -> Enclave: verify_intel_sign
deactivate Enclave
Enclave -> Enclave: get_quote_from_attn_report
Enclave --> App: SGX_SUCCESS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment