[Paper Review] Rosita: Towards Automatic Elimination of Power-Analysis Leakage in Ciphers
Rosita is an automated code rewrite engine that uses an enhanced leakage emulator (Elmo*) to detect and eliminate power-analysis leakage in masked cryptographic implementations. It successfully removes nearly all leakage in AES and Xoodoo with minimal performance cost, and over 99% of leakage in ChaCha at a 64% performance penalty, demonstrating practical applicability for securing embedded ciphers.
Since their introduction over two decades ago, side-channel attacks have presented a serious security threat. While many ciphers' implementations employ masking techniques to protect against such attacks, they often leak secret information due to unintended interactions in the hardware. We present Rosita, a code rewrite engine that uses a leakage emulator which we amend to correctly emulate the micro-architecture of a target system. We use Rosita to automatically protect masked implementations of AES, ChaCha, and Xoodoo. For AES and Xoodoo, we show the absence of observable leakage at 1,000,000 traces with less than 21% penalty to the performance. For ChaCha, which has significantly more leakage, Rosita eliminates over 99% of the leakage, at a performance cost of 64%.
Motivation & Objective
- To address the critical challenge of unintended micro-architectural interactions that cause power-analysis leakage in masked cryptographic implementations.
- To automate the manual, error-prone process of fixing leakage in masked ciphers, reducing reliance on expert-driven trial-and-error.
- To develop a toolchain that integrates leakage emulation with automatic code rewriting for compliance with standards like ISO/IEC 17825.
- To evaluate the effectiveness of automated leakage mitigation on real hardware using masked implementations of AES, ChaCha, and Xoodoo.
- To demonstrate that automated tools can significantly reduce the effort required to achieve side-channel resistance in embedded cryptographic systems.
Proposed method
- Rosita uses a rule-driven code rewrite engine that applies transformations to eliminate leakage at identified points.
- It integrates with Elmo*, a modified leakage emulator that models micro-architectural storage elements such as registers and latches to detect leakage from operand interactions and value dependencies.
- Elmo* was enhanced to detect non-consecutive instruction leakage and to identify the root cause of leakage, including the specific storage components involved.
- The system performs on-line statistical analysis of emulation traces to detect leakage, using standard side-channel tests such as t-tests.
- The workflow iteratively runs Elmo* to detect leakage, applies Rosita’s rewrite rules, and validates the fixed code on real hardware.
- The approach targets first-order side-channel leakage and is designed for in-order, cacheless microcontrollers like Cortex-M0 and AVR processors.
Experimental results
Research questions
- RQ1Can leakage emulators be used not only for detection but also for automatic mitigation of side-channel leakage in software implementations?
- RQ2To what extent can automated code rewriting eliminate leakage caused by micro-architectural interactions in masked ciphers?
- RQ3How effective is the Rosita toolchain in reducing leakage across different cipher designs with varying complexity?
- RQ4What is the performance overhead introduced by automated leakage mitigation, and how does it vary across ciphers?
- RQ5Can the combination of enhanced emulation and rule-based rewriting achieve compliance with side-channel security standards like ISO/IEC 17825?
Key findings
- Rosita successfully eliminated all observable leakage in masked AES-128 and Xoodoo implementations after 1,000,000 traces, achieving 0 remaining leakage points.
- For ChaCha, Rosita reduced leakage to just 1 out of 238 original leakage points, representing over 99% mitigation, at a 64% performance penalty.
- The performance overhead was highest for ChaCha due to its complex round function and higher masking complexity, but remained acceptable for practical deployment.
- The toolchain achieved full compliance with ISO/IEC 17825 for AES and Xoodoo, with no exploitable leakage detected on real hardware.
- Elmo* was successfully extended to model non-consecutive instruction leakage and identify the root cause, enabling precise targeting of rewrite rules.
- The results demonstrate that automated leakage mitigation is feasible and effective for resource-constrained microcontrollers commonly used in embedded systems.
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.