# Trusted Execution Environment (TEE)
## See also
### - [[SGX]]
## [Trusted Execution Environments: A Technical Overview of Intel SGX, Arm TrustZone, and RISC-V PMP](https://www.youtube.com/watch?v=MREwcSo0uz4)
Presentation by [[Stephano Cetola]] of the [[Linux Foundation]] and [[Confidential Computing Consortium]]
Recommended resources:
- [Intel SGX Explained](https://eprint.iacr.org/2016/086)
- [Keystone: an open framework for architecting trusted execution environments](https://dl.acm.org/doi/pdf/10.1145/3342195.3387532)
- lowRISC
### What is a [[TEE|Trusted Execution Environment]]?
An environment that provides a level of assurance of the following three properties:
- **Data confidentiality**: Unauthorized entities cannot view data while in use within the TEE.
- **Data integrity**: Unauthorized entities cannot add, remove, or alter data w hile it is in use within the TEE
- **Code integrity**: Unauthorized entities cannot add, remove, or alter code executing in the TEE
![[Screen Shot 2022-02-16 at 10.22.03 PM.png]]
![[Screen Shot 2022-02-16 at 10.23.01 PM.png]]
![[Screen Shot 2022-02-16 at 10.27.39 PM.png]]
![[Screen Shot 2022-02-16 at 10.28.04 PM.png]]
![[Screen Shot 2022-02-16 at 10.28.29 PM.png]]
[[LINE]] uses [[ARM TrustZone]]
![[Screen Shot 2022-02-16 at 10.31.04 PM.png]]
![[Screen Shot 2022-02-16 at 10.35.03 PM.png]]
![[Screen Shot 2022-02-16 at 10.35.31 PM.png]]
![[Screen Shot 2022-02-16 at 10.36.01 PM.png]]
## [[SGX|Intel SGX]]
### [[Signal]] already uses [[SGX|Intel SGX]]
![[Screen Shot 2022-02-16 at 10.37.22 PM.png]]
![[Screen Shot 2022-02-16 at 10.38.05 PM.png]]
![[Screen Shot 2022-02-16 at 10.38.41 PM.png]]
![[Screen Shot 2022-02-16 at 10.39.21 PM.png]]
![[Screen Shot 2022-02-16 at 10.39.54 PM.png]]
![[Screen Shot 2022-02-16 at 10.41.20 PM.png]]
![[Screen Shot 2022-02-16 at 10.41.58 PM.png]]
## RISC-V Physical Memory Protection
![[Screen Shot 2022-02-16 at 10.45.30 PM.png]]
![[Screen Shot 2022-02-16 at 10.45.58 PM.png]]
![[Screen Shot 2022-02-16 at 10.46.53 PM.png]]
![[Screen Shot 2022-02-16 at 10.47.08 PM.png]]
Link: [[Keystone]]
![[Screen Shot 2022-02-16 at 10.48.11 PM.png]]
![[Screen Shot 2022-02-16 at 10.49.09 PM.png]]
![[Screen Shot 2022-02-16 at 10.49.31 PM.png]]
![[Screen Shot 2022-02-16 at 10.49.43 PM.png]]
![[Screen Shot 2022-02-16 at 10.51.16 PM.png]]