Skip to content

Instantly share code, notes, and snippets.

footer 複数マシン(Node)にまたがるEnclaveアプリ
skinparam nodesep 10
skinparam ranksep 10
' Azure
!define AzurePuml https://raw.githubusercontent.com/RicardoNiepel/Azure-PlantUML/release/2-1/dist
!includeurl AzurePuml/AzureCommon.puml
!includeurl AzurePuml/AzureSimplified.puml
rectangle "SGXマシン1" as s1 {
[Enclaveアプリ] as e1
}
rectangle "SGXマシン2" as s2 {
[Enclaveアプリ] as e2
}
database "Sealing\nData" as sd
class App {
main()
}
class Enclave {
create_sealeddata() <<ECall>>
}
() ECall
App .> ECall
ECall - Enclave
footer プライベートキーを複数アプリで共有する
skinparam nodesep 10
skinparam ranksep 10
' Azure
!define AzurePuml https://raw.githubusercontent.com/RicardoNiepel/Azure-PlantUML/release/2-1/dist
!includeurl AzurePuml/AzureCommon.puml
!includeurl AzurePuml/AzureSimplified.puml
start
:sgx_init_quote;
split
:sgx_target_info_t]
:rsgx_create_report;
:sgx_report_t]
split again
:EPID]
:get_sigrl_from_intel;
class sgx_tse {
rsgx_create_report()
rsgx_verify_report()
}
class sgx_types {
sgx_init_quote()
sgx_calc_quote_size()
sgx_get_quote_size()
}
class App {
main()
}
class Enclave {
OnceCell<[u8; 32]> SECRET_KEY
ecall_get_encryption_key() <<ECall>>
ecall_decrypt() <<ECall>>
}
class ChaChaBox
class PublicKey
participant "main.rs : App" as App
participant "lib.rs:Enclave" as Enclave
participant "secret_key:OnceCell" as OnceCell
App -> Enclave: ecall_get_encryption_key<<ECall>>
Enclave -> Enclave: "generates key pair"
Enclave -> OnceCell: set
return
Enclave --> App: public_key
Rectangle Enclaves {
package "Architectural Enclaves" {
["PvE"]
["QE"]
["LE"]
["PSE"]
["PcE"]
}
["Application Enclave"]
}
class App {
main()
ocall_sgx_init_quote()<<OCall>>
ocall_get_quote()<<OCall>>
}
class Enclave {
verify() <<ECall>>
create_attestation_report()
}
class Client {