Intel SGX Explained:
https://css.csail.mit.edu/6.858/2017/readings/costan-sgx.pdf
In-Memory Cryptography
**Intel’s Software Guard Extensions **(SGX), shipping with Skylake and newer CPUs. They allow you to load a program into your processor, verify its state is correct - remotely - and then protect its execution. The CPU will automatically encrypt everything leaving the processor (i.e. everything that is offloaded to RAM) and will thereby ensure security for you. The only problem for mass deployment is that SGX requires you to have a signed code that your processor will accept, i.e. Intel must issue you a certificate for this purpose.