System and method for running enclave-aware executables
Ways for enhancing security in computing environments through automating the execution of enclaves are provided. A system includes an enclave-aware processor, memory, an enclave-aware Application Binary Interface (eABI) and an eABI-aware runtime. The system may also include an eABI-aware executable, an eABI-aware library, a published symbol, and an external symbol dependency, where the eABI-aware main executable may interoperate with the eABI-aware library via the eABI-aware runtime. The eABI-aware runtime allows external access to the published symbol to resolve the external symbol dependency. The system may also include an enclave-aware executable, an enclave-aware library, a main enclave, and a library enclave. The main-enclave may be configured to interoperate with the library-enclave via the eABI-aware runtime. The memory may also include an enclave-aware compiler for compiling generic source code into an enclave-aware executable, and an enclave-aware loader, further automating communication between enclaves via the eABI-aware runtime.
1 . A system for enhancing security in a computing environment that supports an enclave, the system comprising:
an enclave-aware Application Binary Interface (eABI);
an enclave-aware processor, and
a memory in communication with the enclave-aware processor, the memory including the enclave, a plurality of eABI-aware executables, an eABI-aware loader, and an eABI-aware runtime,
wherein:
the eABI-aware loader is configured to analyze the plurality of eABI-aware executables and instantiate the enclave;
the plurality of eABI-aware executables including a first portion configured to execute outside the enclave and placed in a common memory by the eABI-aware loader, and a second portion loaded into the enclave by the eABI-aware loader; and
the eABI-aware runtime is configured to facilitate an execution between each of the plurality of eABI-aware executables via the eABI;
wherein the plurality of eABI-aware executables are configured to interoperate via the eABI-aware runtime.
2 . The system of claim 1 , further comprising a first generic source code and a second generic source code, wherein:
a first eABI-aware executable is compiled from a portion of the first generic source code;
a second eABI-aware executable is compiled from a portion of the second generic source code; and
the first eABI-aware executable is configured to interoperate with the second eABI-aware executable via the eABI.
3 . The system of claim 2 , further comprising a plurality of enclave-aware executables, the plurality of enclave-aware executables including an enclave-aware main executable and an enclave-aware library, wherein:
the enclave-aware main executable is compiled from a portion of the first generic source code;
the enclave-aware library is compiled from a portion of the second generic source code; and
the enclave-aware main executable is configured to interoperate with the enclave-aware library via the eABI-aware runtime.
4 . The system of claim 3 , wherein the memory further includes a main-enclave loaded from the enclave-aware main executable and a library-enclave loaded from the enclave-aware library, wherein the main-enclave is configured to interoperate with the library-enclave via the eABI-aware runtime.
5 . The system of claim 4 , further comprising an enclave-aware processor configured to execute a restricted instruction, and a restricted source code, wherein:
the plurality of eABI-aware executables further includes a pseudo library compiled from a portion of the restricted source code; and
the pseudo library is configured to execute the restricted instruction via the eABI.
6 . The system of claim 5 , wherein the memory further includes a common memory, wherein a pseudo enclave is loaded into common memory from the pseudo library, the pseudo enclave configured to execute the restricted instruction via the eABI.
7 . The system of claim 3 , further comprising a generic source code, wherein:
the enclave-aware processor is configured to execute processor instructions and enclave-aware instructions;
the memory further includes an enclave-aware compiler; and
the enclave-aware compiler is configured to translate a portion of the generic source code into an enclave-aware executable, the enclave-aware executable including enclave-aware instructions and processor instructions, the enclave-aware instructions configured to interoperate with the enclave, and the processor instructions are configured to interoperate between the enclave and the eABI-aware runtime via the eABI.
8 . The system of claim 3 , further comprising a generic source code, wherein:
the enclave-aware processor is configured to execute processor instructions and enclave-aware instructions;
the memory further includes an enclave-aware compiler, and an enclave-aware loader;
the enclave-aware compiler is configured to translate a portion of the generic source code into an enclave-aware executable, the enclave-aware executable including enclave-aware instructions and processor instructions, the enclave-aware instructions configured to interoperate with the enclave, and the processor instructions configured to interoperate between the enclave and the eABI-aware runtime via the eABI;
the enclave-aware loader is configured to analyze the enclave-aware executable, create an instance of the enclave in the memory, add a portion of the enclave-aware executable into the enclave, and initialize the enclave; and
the enclave is configured to interoperate with the eABI-aware runtime via the eABI.
9 . The system of claim 1 , wherein each of the plurality of eABI-aware executables includes a published symbol, wherein the eABI-aware runtime is configured to allow external access to the published symbol.
10 . The system of claim 1 , wherein each of the plurality of eABI-aware executables includes an external symbol dependency, wherein the eABI-aware runtime is configured to resolve the external symbol dependency.
11 . The system of claim 1 , further comprising a note, a first eABI-aware executable, and a second eABI-aware executable, wherein:
the first eABI-aware executable is configured to form the note and initiate an external call according to an eABI calling convention by routing the note;
the eABI-aware runtime is configured to dispatch the note to the second eABI-aware executable; and
the first eABI-aware executable is further configured to interoperate with the second eABI-aware executable via the eABI-aware runtime.
12 . The system of claim 11 , wherein the note includes a data security mode, the data security mode includes a member selected from a group consisting of a plaintext mode, an encryption mode, a validation mode, an encryption with a validation mode, and combinations thereof.
13 . The system of claim 1 , further comprising:
a first eABI-aware executable;
a second eABI-aware executable; and
the memory further including a first enclave, and a second enclave;
wherein:
a portion of the first eABI-aware executable is in a common memory;
a portion of the first eABI-aware executable is in the first enclave;
a portion of the second eABI-aware executable is in the common memory;
a portion of the second eABI-aware executable is in the second enclave;
the first eABI-aware executable is configured to form a note within the first enclave, the note being based on the eABI;
the eABI-aware runtime is further configured to dispatch the note to the second enclave; and
the second eABI-aware executable is configured to return the note to the first enclave via the eABI-aware runtime.
14 . A non-transitory computer-readable medium storing enclave-aware instructions that, when executed by an enclave-aware processor, cause the enclave-aware processor to:
dispatch a call between a plurality of enclaves according to a calling convention defined by an enclave-aware Application Binary Interface (eABI);
analyze, by an eABI-aware loader, a plurality of eABI-aware executables;
instantiate, by the eABI-aware loader, an enclave;
load, by the eABI-aware loader, a first portion of the plurality of eABI-aware executables in a common memory;
load, by the eABI-aware loader, a second portion of the plurality of eABI-aware executables into the enclave; and
facilitate, by an eABI-aware runtime, an execution between each of the plurality of eABI-aware executables via the eABI.
15 . A system for enhancing security in a computing environment that supports an enclave, the system comprising:
an enclave-aware Application Binary Interface (eABI) governing symbol resolution, call dispatch, note formation, routing, and return pathways between enclaves;
an enclave-aware processor;
a memory in communication with the enclave-aware processor;
a usermode process instantiated within the memory;
an eABI-aware runtime within the usermode process;
an eABI-aware loader within the usermode process;
a first generic source code including an imported symbol;
a first enclave-aware executable derived from the first generic source code;
a first enclave instantiated within the usermode process and formed from a protected portion of the first enclave-aware executable;
a second generic source code including a published symbol;
a second enclave-aware executable derived from the second generic source code;
a second enclave instantiated within the usermode process and formed from a protected portion of the second enclave-aware executable;
the eABI semantically resolving an external symbol dependency in the first enclave-aware executable to the published symbol in the second enclave-aware executable;
an entry/exit bootstrap module within the usermode process;
a thread of execution configured to enter the first enclave through the entry/exit bootstrap module and the eABI-aware runtime;
the thread of execution further configured to enter the second enclave through the eABI-aware runtime;
a main-note within the entry/exit bootstrap module configured to interoperate with the eABI and initiate an external call to the first enclave;
a subroutine-note within the first enclave configured to interoperate with the eABI and to communicate data between the first enclave and the second enclave;
the subroutine-note being configured to access the published symbol within the second enclave;
a transit buffer in a common memory;
the transit buffer being configured to temporarily store encrypted data during inter-enclave transfer;
a data security mode;
the data security mode including a member selected from a group consisting of:
a plaintext mode,
an encryption mode,
a validation mode,
an encryption with validation mode,
and combinations thereof;
a selected data security mode governing formation, transmission, and processing of the main-note and the subroutine-note;
an enclave-compatible cryptographic key accessible within the first enclave and the second enclave;
the first enclave configured to encrypt the subroutine-note using the enclave-compatible cryptographic key;
the second enclave configured to decrypt the subroutine-note using the enclave-compatible cryptographic key; and
the second enclave configured to validate the subroutine-note prior to accessing the published symbol;
wherein:
the eABI-aware loader is configured to analyze the first enclave-aware executable and the second enclave-aware executable;
the eABI-aware loader is configured to instantiate the first enclave and the second enclave;
the eABI-aware loader is configured to place a non-protected portion of the first enclave-aware executable and a non-protected portion of the second enclave-aware executable in the common memory;
the eABI-aware loader is configured to load the protected portion of the first enclave-aware executable into the first enclave and the protected portion of the second enclave-aware executable into the second enclave;
access to the published symbol is mediated by the eABI-aware runtime, and
the first enclave securely accesses the published symbol in the second enclave via the eABI-aware runtime and in accordance with the data security mode.