Hash algorithms are fundamental tools in cryptography, offering irreversible and sensitive transformations of input data for various security purposes. As computing architectures evolve towards heterogeneous systems, efficiently harnessing diverse computing resources for hash encryption algorithms becomes crucial. This paper presents HETOCompiler, a novel cryptography compilation framework designed for heterogeneous systems. Leveraging Multi-Level Intermediate Representation (MLIR), HETOCompiler abstracts syntax and semantics for cryptographic primitives and heterogeneous computing models, facilitating efficient compilation of high-level hash encryption algorithms into executable programs compatible with diverse devices. Experimental results demonstrate significant performance improvements over existing OpenSSL library, with average enhancements of 49.3x, 1.5x, and 23.4x for SHA-1, MD5, and SM3 algorithms respectively.
翻译:哈希算法是密码学中的基础工具,通过提供不可逆且对输入敏感的变换,服务于多种安全目的。随着计算架构向异构系统演进,如何高效利用多样化的计算资源来执行哈希加密算法变得至关重要。本文提出HETOCompiler,一种专为异构系统设计的新型密码编译框架。该框架利用多级中间表示(MLIR),对密码原语和异构计算模型的语法与语义进行抽象,从而能够高效地将高级哈希加密算法编译为可在多种设备上运行的可执行程序。实验结果表明,相较于现有的OpenSSL库,该框架在SHA-1、MD5和SM3算法上分别实现了平均49.3倍、1.5倍和23.4倍的性能提升。