Photo by Johannes Plenio on Unsplash

When Apple released the iPhone 5S in 2013, most people focused on its new camera and features such as Touch ID. However, on top of these features, Apple introduced what was meant to be a very influential idea on the cryptography world. Underpinning Touch ID, the Secure Enclave Processor (SEP) was presented as a separate sub processor that would store sensitive data and run computer programs on top of it. The sensitive data could never be accessed by the regular CPU. The design and inner workings were kept secret by Apple who released only sparse information on the internals. More recently, Intel also started offering such a feature on its desktop CPUs named Intel Software Guard Extensions, or SGX for short. Below we provide a short summary of why this technology is useful, and how it works.

Why it is useful

Before the introduction of enclaves, the technology for segregating your setup into isolated components was the Virtual Machine (VM). Virtual Machines acted like a sandbox in which you could open anything you want, execute it, and it wouldn’t affect the rest of the system. This software was developed as a testing ground, ensuring that everything happening in the VM would stay in the VM, without leaking out. The need for this was apparent at the time with a boom in malware and a fragmented OS market with many compatibility issues dictating the need for a solution that could enable quick and safe testing.

Instead of a sandbox, a blackbox

Enclaves can be easily understood as reverse Virtual Machines. There is again a place where execution can be made without affecting the rest of the system. However, the target now has shifted from avoiding whatever is kept in the separate space to leak out, to not allowing the rest of the system to see what is going on inside the enclave. Instead of a sandbox, a blackbox. The need for such a system arose from the increasing consumer demand for more privacy and more control over their own private data. Hence, the enclaves form a quick and elegant solution to protecting said data.

How it works

There are currently two types of implementations for enclaves. The Apple implementation and the Intel implementation. Apple’s approach is based on a physical separation between the CPU and the secondary secure processor (they are located in different sections on the motherboard). The Intel implementation relies on additional CPU instructions and trusted hardware, which hosts the confidential data and the software to be used on the data. Both of these implementations, however, attempt to accomplish the same goal. That is, to isolate some data and computation from the rest of the system giving access only to agents with privileged rights. In simple words, you have a box in which you can execute whatever program you want using arbitrary data and be assured that the data that has been used in there will not be seen by anyone else except those that have the rights to see it, while also receiving a guarantee that the program running on your data is the intended one.

At decentriq we leverage our knowledge of cryptographic technologies to provide value to our customers. By being on the development forefront of these technologies, we are a trusted partner for everything in applied cryptography.