arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2207.02614cs.CRcs.AI
收藏

针对电源侧通道保护优化代码

Securing Optimized Code Against Power Side Channels

Royal Institute of Technology KTH(瑞典皇家理工学院)

Rodothea Myrsini Tsoupidi, Roberto Castañeda Lozano, Elena Troubitsyna, Panagiotis Papadimitratos

摘要:

侧信道攻击对密码算法构成了严重的威胁,包括广泛使用的AES和RSA算法。这些攻击利用硬件或软件中的算法实现来经由边信道提取秘密信息。软件屏蔽是一种针对功率侧信道攻击的缓解方法,旨在隐藏易受攻击的实现的功率足迹中的秘密泄露依赖关系。然而,这种类型的软件缓解通常依赖于通用编译器,其不保留非功能属性。此外,微体系结构特征,例如存储器总线和寄存器重用,也可能泄漏秘密信息。这些抽象在程序的高级实现中是不可见的。相反,它们在编译时决定。为了解决这些问题,安全工程师通常通过关闭编译器优化和/或执行本地编译后转换来牺牲代码效率。本文提出了安全的构造代码生成(SecCG),一种基于约束的编译器方法,生成优化但安全的电源侧通道代码。SecCG根据处理器成本模型,通过有效地搜索最佳可能的低级别实现来控制减轻程序的质量。在我们的实验中,在Mips 32和ARM Thumb上使用12个掩码加密函数多达100行代码,与非优化的安全代码相比,SecCG将生成的代码速度从75%提高到8倍,与非安全优化代码相比,开销高达7%,但编译成本很高。总之,本文提出了一种形式化的模型来生成电源侧无信道的低级码。

英文摘要:

Side-channel attacks impose a serious threat to cryptographic algorithms, including widely employed ones, such as AES and RSA. These attacks take advantage of the algorithm implementation in hardware or software to extract secret information via side channels. Software masking is a mitigation approach against power side-channel attacks aiming at hiding the secret-revealing dependencies from the power footprint of a vulnerable implementation. However, this type of software mitigation often depends on general-purpose compilers, which do not preserve non-functional properties. Moreover, microarchitectural features, such as the memory bus and register reuse, may also leak secret information. These abstractions are not visible at the high-level implementation of the program. Instead, they are decided at compile time. To remedy these problems, security engineers often sacrifice code efficiency by turning off compiler optimization and/or performing local, post-compilation transformations. This paper proposes Secure by Construction Code Generation (SecCG), a constraint-based compiler approach that generates optimized yet secure against power side channels code. SecCG controls the quality of the mitigated program by efficiently searching the best possible low-level implementation according to a processor cost model. In our experiments with twelve masked cryptographic functions up to 100 lines of code on Mips32 and ARM Thumb, SecCG speeds up the generated code from 75% to 8 times compared to non-optimized secure code with an overhead of up to 7% compared to non-secure optimized code at the expense of a high compilation cost. In summary, this paper proposes a formal model to generate power side channel free low-level code.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑