[Paper Review] PrettyCat: Adaptive guarantee-controlled software partitioning of security protocols
PrettyCat is an automatic, sound method for partitioning security protocols into isolated software components based on their required security guarantees, using SMT-based constraint analysis and performance-aware optimization. It reduces the trusted computing base (TCB) of OTR by 53% and confidentiality-critical code by 71%, achieving a 29% TCB for confidentiality with overhead comparable to sandboxing.
One single error can result in a total compromise of all security in today's large, monolithic software. Partitioning of software can help simplify code-review and verification, whereas isolated execution of software-components limits the impact of incorrect implementations. However, existing application partitioning techniques are too expensive, too imprecise, or involve unsafe manual steps. An automatic, yet safe, approach to dissect security protocols into component-based systems is not available. We present a method and toolset to automatically segregate security related software into an indefinite number of partitions, based on the security guarantees required by the deployed cryptographic building blocks. As partitioning imposes communication overhead, we offer a range of sound performance optimizations. Furthermore, by applying our approach to the secure messaging protocol OTR, we demonstrate its applicability and achieve a significant reduction of the trusted computing base. Compared to a monolithic implementation, only 29% of the partitioned protocol requires confidentiality guarantees with a process overhead comparable to common sandboxing techniques.
Motivation & Objective
- To address the lack of automatic, sound, and precise software partitioning techniques for security protocols that minimize the trusted computing base (TCB).
- To systematically identify security-critical components and their required guarantees without manual error-prone analysis.
- To enable a configurable trade-off between security (TCB size) and performance (inter-process communication overhead).
- To support formal verification and code review by isolating only the minimal, critical components.
- To reduce the attack surface of security protocols by decoupling non-critical components from security guarantees.
Proposed method
- Model security protocols as a graph of primitives connected by channels, annotated with security predicates (e.g., confidentiality, integrity).
- Apply SMT-based constraint data flow analysis to assign sound security guarantees to each primitive based on cryptographic assumptions.
- Group primitives with compatible guarantees into components to minimize TCB while optimizing for performance.
- Introduce performance optimizations such as batching and reduced interface calls to minimize inter-component communication (IPC) overhead.
- Use a formal model to derive a communication policy between components, ensuring soundness and correctness of the partitioned system.
- Support component-based system synthesis via automated tooling, with future work aiming to extract models directly from source code.
Experimental results
Research questions
- RQ1Can security protocols be automatically partitioned into isolated components with provably sound security guarantees?
- RQ2How can the trusted computing base (TCB) be minimized while preserving the protocol's security guarantees?
- RQ3What performance overhead is introduced by componentization, and can it be reduced to acceptable levels?
- RQ4Can confidentiality and integrity guarantees be treated independently to further reduce the TCB?
- RQ5To what extent can the partitioning process be automated, reducing manual intervention and error?
Key findings
- PrettyCat reduces the TCB of the OTR protocol from 10,957 source lines of code (SLOC) in a monolithic implementation to 5,800 SLOC in the partitioned version, a 53% reduction.
- The portion of code requiring confidentiality guarantees is reduced to just 29% of the original monolithic size, demonstrating significant TCB minimization.
- The performance overhead of the partitioned system is comparable to that of common sandboxing techniques, indicating practical feasibility.
- By treating confidentiality and integrity independently, the method enables smaller, more focused components that are easier to verify.
- The approach enables formal verification of only the minimal critical components, while non-critical parts can be implemented without security guarantees.
- Preliminary results show that model extraction from source code (e.g., via FlowDroid) is feasible, paving the way for full automation in future tooling.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.