Side-channel attacks are a major threat to the security of cryptographic implementations, particularly for small devices that are under the physical control of the adversary. While several strategies for protecting against side-channel attacks exist, these often fail in practice due to unintended interactions between values deep within the CPU. To detect and protect from side-channel attacks, several automated tools have recently been proposed; one of their common limitations is that they only support first-order leakage. In this work, we present the first automated tool for detecting and eliminating higher-order leakage from cryptographic implementations. Rosita++ proposes statistical and software-based tools to allow high-performance higher-order leakage detection. It then uses the code rewrite engine of Rosita (Shelton et al. NDSS 2021) to eliminate detected leakage. For the sake of practicality we evaluate Rosita++ against second and third order leakage, but our framework is not restricted to only these orders. We evaluate Rosita++ against second-order leakage with three-share implementations of two ciphers, PRESENT and Xoodoo, and with the second-order Boolean-to-arithmetic masking, a core building block of masked implementations of many cryptographic primitives, including SHA-2, ChaCha and Blake. We show effective second-order leakage elimination at a performance cost of 36% for Xoodoo, 189% for PRESENT, and 29% for the Boolean-to-arithmetic masking. For third-order analysis, we evaluate Rosita++ against the third-order leakage using a four-share synthetic example that corresponds to typical four-share processing. Rosita++ correctly identified this leakage and applied code fixes.
翻译:侧声道攻击是对加密实施安全的一大威胁,特别是对处于对手实际控制的小型装置而言。虽然存在一些防止侧声道攻击的战略,但这些战略实际上往往无法奏效,原因是在CPU深处的价值观之间发生了意外的相互作用。为了探测和保护侧声道攻击,最近提出了若干自动工具;它们的一个共同限制是它们仅支持一级泄漏。在这项工作中,我们展示了第一个用于探测和消除加密实施过程中较高级泄漏的高级装置的自动化工具。Rosita++提议了基于统计和软件的工具,以便能够发现高性能高声道渗漏。随后,这些战略往往由于在CPU深处的价值观之间发生意外的相互作用而在实践中失败。为了实用起见,我们评估了Rosita++仅支持一级渗漏。我们用三声道渗漏的第一种自动工具来探测和消除高音道渗漏。我们用第二波波尔图-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直流-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-直-