Sunday 6 March 2011

TrustZone and Trusted Execution Environment

This post describes a recent security addition to mobile phones. It has a superficial similarity to the trusted platform module (TPM). Because the TPM seems to cast doubt on anything "trusted" I will compare TrustZone and TPM.
TrustZone is a virtualization technology. The basic idea is that the processor can be switched between normal mode and secure mode. Because of the virtualization the normal mode is unaffected by the secure mode. The secure mode is based on the TrustZone. More technically, some peripherals and keys are only accessible from the secure mode.
The TPM did not use virtualization. There was no unaffected more. It became unclear whether the owner of the computer or the owner of the TPM keys was the real master of the computer.
TrustZone can and will be used to implement a DRM system. However, it won't enforce anything in the normal world. Thus people who do not like to use DRM, can simply ignore it.
Still, there is a feature that will be useful to everyone: The secure mode can be used to protect PIN entry or display of sensitive information from malware. There is hope that such a technology might disrupt the creation of a criminal ecosystem on mobile phones before it gets out of control like it happened on PCs.
The secure mode is typically started from the normal mode, for example because the user wants to enter a PIN. The smart card standardization organization Global Platform intends to standardize this API under the name Trusted Execution Environment. That's the other T-word from the title.


7 comments:

  1. Can u explain elaborately difference between ARM TrustZone TEchnology and TPM/MTM (FOR Mobiles-MTM) in atleast 5 differences.

    ReplyDelete
  2. IF u provide ,it would be very helpful for me.

    ReplyDelete
  3. TPM by defnition is a co-processor to store and access protected info. Let's say, you need to decrypt a buffer, the main processor will send it to TPM module and recevie the result. The main application processor will never know the location or the details of the key.

    Trustzone mimics the same using Virtualization. You get both the secure core and normal core in a single CPU itself. You run both secure OS and normal OS. Communication between SecureOS and NormalOS are defined by TrustZoneAPI. It is more cost effective solution.

    You can look at open source implementations for Trustzone like www.openvirtualization.org. It shows how TrustZone extenions in ARM can be used to run both worlds without additional hardware.

    ReplyDelete
  4. Hey can you help me understanding the differences between intel TXT ( la grande ) technology and ARM TrustZone ?

    ReplyDelete
    Replies
    1. TrustZone is a feature of the processor alone, while TXT is a feature of the processor combined with the TPM. This is possible because the TrustZone is intended to run on a System On Chip only. TXT uses the TPM to controls the data flows outside of the processor.

      Actually, this more a difference between a PC processor and a SoC, but of source the security technology always will take the system architecture into account.

      Running only signed software is not enough from a security point of view. For example, you start a trusted but imperfect software. Some attacker might exploit the security weakness of the software to run an exploit. To counter this issue one might refuse to sign any software that is not guaranteed 100% bug-free. This seems impractical to me. Thus, I think it is necessary that there is a supervising instance that makes sure that critical resources are only accessible to software that has been allowed access to these resources.

      This instance would be TrustZone in the ARM case and TXT combined with VT-d and VT-x, each combined with proper hypervisor, OS and application software. This is an important point, you can compare these technologies only if you take intel's virtualization technologies into account.

      Getting the virtualization security right can be quite hard. In addition to processes and drivers one needs to control DMA access to and from devices. All of that is much easier with an SoC.

      Delete
    2. I am sorry. I dint understand completely. Can you explain in a simpler way the difference between TXT and ARM trustzone? which is better and why?

      Delete
  5. I have a fundamental doubt! I know that normal anti-virus based approach to security fails because the software can be modified easily. Why cannot secure Kernel in TrustZone be modified? Is it because it has a smaller trust base that it is made bug free by ARM ?

    And Regarding TPM ! Why not one can make OS/software steal data from TPM ? That means entire idea of enabling Trusted computing fails right?

    ReplyDelete