Trusted Compiler Server for Secure Runtime Code Generation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Traditional run-time compilers are resource-intensive, leading to performance degradation, security risks, and instability in computing systems due to high memory usage, lack of code sharing, and repeated compilation of the same source code during startup, which results in slow and insecure systems.
Innovation Solution
A trusted compiler server is introduced to securely generate executable codes during run-time, allowing authorized applications to access cached compiled codes, reducing memory usage and enabling secure sharing of compiled codes while preventing direct code generation by applications, thereby improving performance and security.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If traditional run-time compilers are used to generate executable codes, then code execution performance is improved, but system resource usage (memory and processor time) increases significantly
Solution Approach 1:
A trusted compiler server is introduced as an intermediary between applications and the compilation process. The server compiles source code into executable codes and returns them to applications, which then execute the pre-compiled codes. This separates the resource-intensive compilation process from application execution, allowing applications to benefit from optimized code without bearing the compilation overhead.
2Adaptability or versatility
If applications directly generate executable codes using compilers, then code customization is improved, but security risks increase due to potential security holes in compiler code
Solution Approach 1:
The trusted compiler server acts as a secure intermediary that applications cannot directly access or modify. The server enforces security policies and controls the compilation process, preventing malicious applications from exploiting security holes in compiler code. Applications request compilation services through controlled interfaces, maintaining security while allowing code generation.
Solution Approach 2:
The compiler code is extracted from the application environment and placed in a separate, secure compiler server environment. This isolation removes the security vulnerabilities of compiler code from the application execution context, as the compiler runs in a controlled, monitored environment with enforced security policies.
3Ease of operation
If each application compiles the same source code independently, then application autonomy is improved, but startup time increases due to repeated compilation
Solution Approach 1:
Multiple applications share a common compilation service through the trusted compiler server. When one application compiles source code, the resulting executable code is stored and can be reused by other applications. This merging of compilation resources eliminates redundant compilation efforts and reduces overall startup time for multiple applications.
Solution Approach 2:
The compiler server performs compilation in advance and caches the generated executable codes. When applications need the same functionality, they can retrieve pre-compiled codes from the cache rather than compiling from scratch, significantly reducing startup time while maintaining application autonomy through on-demand retrieval.
4Quantity of substance
If compilers run in shared libraries, then memory sharing is improved, but code sharing between applications is prevented due to process space isolation
Solution Approach 1:
The compiler server serves as an intermediary that enables code sharing across process boundaries. It compiles source code once and distributes the resulting executable codes to multiple applications, bypassing the limitations of process space isolation. This allows code to be shared system-wide while maintaining the security and isolation benefits of separate process spaces.
Data Source
AI summary
A method and an apparatus that provide secure executable codes generated during run time via a trusted compiler server are described. An application can send a service request to the compiler server to request executable codes. The compiler server can determine whether the service request is permitted to be served based on a security policy imposed and the security settings associated with the service request. Availability of certain compilers can be allowed if the application is authorized according to the service request.


