A trusted execution environment (TEE) is a secure area of a main processor. It helps code and data loaded inside it to be isolated from other processes usually at a hardware level in order to provide confidentiality and integrity. Data integrity prevents unauthorized entities from outside the TEE from altering data, while code integrity prevents code in the TEE from being replaced or modified by unauthorized entities, which may also be the computer owner itself.