Keystone: An Open Framework for
Architecting Trusted Execution Environments
Dayeol Lee, David Kohlbrenner, Shweta Shinde, Krste Asanovic, Dawn Song
- Dept. of Electrical Engineering and Computer Sciences
University of California, Berkeley
! Apps Apps RAM ! Ring 0 - 2 OS / Hypervisor OS / Hypervisor - - PowerPoint PPT Presentation
Keystone : An Open Framework for Architecting Trusted Execution Environments Dayeol Lee , David Kohlbrenner, Shweta Shinde, Krste Asanovic, Dawn Song Dept. of Electrical Engineering and Computer Sciences University of California, Berkeley
Dayeol Lee, David Kohlbrenner, Shweta Shinde, Krste Asanovic, Dawn Song
University of California, Berkeley
Keystone: an Open Framework for Architecting Trusted Execution Environments 2
OS / Hypervisor
RAM
Sensitive App Ring 0 - 2 Ring 3 Trusted Untrusted Protected Memory
Other Apps
Hardware Integrity Confidentiality Remote Attestation Other Apps Other Apps Trustworthy OS / Hypervisor
“Enclave”
Keystone: an Open Framework for Architecting Trusted Execution Environments 3
OS / Hypervisor
RAM
Sensitive App Ring 0 - 2 Ring 3 Trusted Untrusted Protected Memory
Other Apps
Hardware Integrity Confidentiality Remote Attestation Other Apps Other Apps Trustworthy OS / Hypervisor
Keystone: an Open Framework for Architecting Trusted Execution Environments 4
Keystone: an Open Framework for Architecting Trusted Execution Environments 5
Keystone: an Open Framework for Architecting Trusted Execution Environments 6
Keystone: an Open Framework for Architecting Trusted Execution Environments 7
Keystone: an Open Framework for Architecting Trusted Execution Environments 8
C0 C1 C2 C3 Root of Trust ! Optional HW Trusted
Keystone: an Open Framework for Architecting Trusted Execution Environments 9
Trusted
C C 1 C 2 C 3 Root of Trust
!
Optional HW
Keystone: an Open Framework for Architecting Trusted Execution Environments 10
Security Monitor (SM) OS App App App App Runtime Enclave App
Keystone: an Open Framework for Architecting Trusted Execution Environments 11
Keystone: an Open Framework for Architecting Trusted Execution Environments 12
Security Monitor (SM) OS App App App App Runtime Enclave App
Keystone: an Open Framework for Architecting Trusted Execution Environments 13
Keystone: an Open Framework for Architecting Trusted Execution Environments 14
Keystone: an Open Framework for Architecting Trusted Execution Environments 15
Interface Interface
Keystone: an Open Framework for Architecting Trusted Execution Environments 16
Keystone: an Open Framework for Architecting Trusted Execution Environments 17
App Enclave OS " ⚙ Intel SGX App Enclave " Monitor ⚙ ARM TrustZone OS App Eapp RT " ⚙ Security Monitor OS Enclave
Adversary SW
⚫ ⚫ ⚫ ⚫ ⚫
Cache SC
⚫ ⚫ ⚫ ⚫
HW
⚫ ⚫ ⚫
Keystone: an Open Framework for Architecting Trusted Execution Environments
Baseline Cache Partitioning On-Chip Enclave Software Encryption Hardware Encryption
18
Keystone: an Open Framework for Architecting Trusted Execution Environments
Baseline Cache Partitioning On-Chip Enclave Software Encryption Hardware Encryption Adversary SW
⚫ ⚫ ⚫ ⚫ ⚫
Cache SC
⚫ ⚫ ⚫ ⚫
HW
⚫ ⚫ ⚫
19
Baseline
Adversary SW
⚫ ⚫ ⚫ ⚫ ⚫
Cache SC
⚫ ⚫ ⚫ ⚫
HW
⚫ ⚫ ⚫
Keystone: an Open Framework for Architecting Trusted Execution Environments
Baseline Cache Partitioning On-Chip Enclave Software Encryption Hardware Encryption
20
Cache Partitioning
Adversary SW
⚫ ⚫ ⚫ ⚫ ⚫
Cache SC
⚫ ⚫ ⚫ ⚫
HW
⚫ ⚫ ⚫
Keystone: an Open Framework for Architecting Trusted Execution Environments
Baseline Cache Partitioning On-Chip Enclave Software Encryption Hardware Encryption
21
On-Chip Enclave
Adversary SW
⚫ ⚫ ⚫ ⚫ ⚫
Cache SC
⚫ ⚫ ⚫ ⚫
HW
⚫ ⚫ ⚫
Keystone: an Open Framework for Architecting Trusted Execution Environments
Baseline Cache Partitioning On-Chip Enclave Software Encryption Hardware Encryption
22
Software Encryption
Adversary SW
⚫ ⚫ ⚫ ⚫ ⚫
Cache SC
⚫ ⚫ ⚫ ⚫
HW
⚫ ⚫ ⚫
Keystone: an Open Framework for Architecting Trusted Execution Environments
Baseline Cache Partitioning On-Chip Enclave Software Encryption Hardware Encryption
23
Keystone: an Open Framework for Architecting Trusted Execution Environments 24
Ø Keystone enclave defends various adversary models
Ø Keystone supports fine-grained and modular configuration
Ø Various of real-world applications with a few thousands of LoC
Ø Security Monitor Overhead Ø Runtime Overhead Ø Cost of Memory Protection Mechanisms
Keystone: an Open Framework for Architecting Trusted Execution Environments 25
Ø Keystone enclave defends various adversary models
Ø Keystone supports fine-grained and modular configuration
Ø Various of real-world applications with less than thousands of LoC
Ø Security Monitor Overhead Ø Runtime Overhead Ø Cost of Memory Protection Mechanisms
wLderesnet resnext29 LnceptLonv3 resnet50 densenet vgg19 resnet110 squeezenet lenet 200 400 600 Latency (s) base (other) base (user) keyst (other) keyst (eapp) keyst-dyn (other) keyst-dyn (eapp)
Keystone: an Open Framework for Architecting Trusted Execution Environments
ØUnmodified NN inference
ØEnclave measurement (SHA3)
26
Ø Min -3.12% (LeNet) Ø Max 7.35% (DenseNet)
Ø No noticeable overhead
Keystone: an Open Framework for Architecting Trusted Execution Environments
On-chip Execution Self Paging Software Encryption Cache Partitioning
27
Baseline Cache Partitioning On-Chip Enclave Software Encryption
Keystone: an Open Framework for Architecting Trusted Execution Environments
On-chip Execution Self Paging Software Encryption Cache Partitioning
28
Ø https://keystone-enclave.org
Keystone: an Open Framework for Architecting Trusted Execution Environments 29
Keystone: an Open Framework for Architecting Trusted Execution Environments 30