Secure runtime systems and methods
Example secure runtime systems and methods are described. In one implementation, a secure runtime system is configured to execute multiple applications in a secure manner. The secure runtime is associated with a secure enclave defined by a hardware device. A secure application loader is configured to load an application into the secure runtime system and an OS bridge is configured to provide OS services to the application.
1. An apparatus comprising:
a secure runtime configured to execute a plurality of unmodified applications in a secure enclave, wherein the secure enclave is defined by a hardware device;
a secure application loader configured to load an unmodified application into the secure runtime; and
an OS bridge configured to provide OS services to the unmodified application.
2. The apparatus of claim 1 , wherein the secure application loader is further configured to load a plurality of libraries associated with the loaded unmodified application.
3. The apparatus of claim 1 , wherein the secure application loader is further configured to run binary executables in an isolated and shielded environment.
4. The apparatus of claim 1 , wherein the OS bridge is further configured to encrypt data used by the loaded unmodified application such that the encrypted data is stored within the secure runtime.
5. The apparatus of claim 1 , wherein the OS services may include a plurality of system calls.
6. The apparatus of claim 1 , wherein the secure runtime is further configured to operate with a plurality of different types of hardware devices.
7. The apparatus of claim 1 , wherein the secure runtime generates an encrypted memory partition associated with the loaded unmodified application.
8. The apparatus of claim 1 , wherein executing the plurality of unmodified applications in the secure enclave includes executing each of the unmodified applications in the secure enclave.
9. The apparatus of claim 1 , wherein executing the plurality of unmodified applications in the secure enclave includes executing at least two of the plurality of unmodified applications in the same secure enclave.
10. The apparatus of claim 1 , wherein at least one of the plurality of unmodified applications are executed by the secure runtime without requiring any modification of the at least one unmodified application.
11. The apparatus of claim 1 , wherein at least two of the plurality of unmodified applications are linked statically and directly invoke a system call instruction to be intercepted by a fault handler.
12. The apparatus of claim 11 , wherein the fault handler delegates a signal indicating which system call was attempted to a trusted handler inside the secure enclave.
13. The apparatus of claim 11 , wherein the secure runtime is configured to replace the system call with a second system call.
14. The apparatus of claim 11 , wherein the secure runtime is configured to:
switch to a second stack when the system call instruction is invoked;
carry out the system call servicing using the second stack; and
switch back to the original stack before returning to the unmodified application.
15. The apparatus of claim 1 , wherein the secure runtime implements application attestation which allows the unmodified application executing in the secure runtime to authenticate itself to another system.
16. The apparatus of claim 1 , wherein a state of a particular unmodified application is bound to a secret.
17. The apparatus of claim 1 , wherein the secure runtime provisions secret data by encrypting the data using a public-key generated by the secure runtime inside the secure enclave.
18. A method comprising:
loading, by a secure application loader, a system-call interception layer;
loading, by the secure application loader, an Executable and Linkable Format/Portable Executable binary;
loading, by the secure application loader, dynamically linked libraries;
initializing, by the secure application loader, an enclave; and
initiating an unmodified application in the enclave.
19. The method of claim 18 , further comprising loading, by the secure application loader, an in-enclave Executable and Linkable Format/Portable Executable loader.
20. The method of claim 18 , further comprising loading, by the secure application loader, a plurality of libraries associated with the unmodified application.