Skip to content

Instantly share code, notes, and snippets.

@glassonion1
Created August 25, 2021 14:18
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/d74be5bd30f9595edf00da9672689a48 to your computer and use it in GitHub Desktop.
Save glassonion1/d74be5bd30f9595edf00da9672689a48 to your computer and use it in GitHub Desktop.
class App {
main()
}
class Enclave {
OnceCell<[u8; 32]> SECRET_KEY
ecall_get_encryption_key() <<ECall>>
ecall_decrypt() <<ECall>>
}
class ChaChaBox
class PublicKey
class SecretKey
SecretKey <-- ChaChaBox
PublicKey <-- ChaChaBox
App .> ChaChaBox
App ..> SecretKey
App ..> PublicKey
Enclave .> ChaChaBox
Enclave ..> SecretKey
Enclave ..> PublicKey
() ECall
App .> ECall
ECall - Enclave
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment