Immediate Addressing-Based Efficient Loop Optimization for Encryption Computation
摘要
Encryption algorithms play a core role in data confidentiality, integrity, and authentication, with applications covering most areas of network security. Encryption algorithms involve substantial computations, which affect the algorithm’s response time—an issue particularly prominent in resource-constrained terminal devices. Loop structures are common control constructs in encryption algorithms, and optimizing loop structures can facilitate the application of encryption algorithms in terminal devices. This paper proposes an efficient loop optimization method integrating immediate addressing. This method seeks to replace offset register addressing in loops with immediate addressing, expand the unrolling factor through the immediate addressing mechanism, and eliminate conditional judgment and jump instructions in loops. The method reduces computational overhead and mitigates performance degradation caused by memory access by changing the program’s memory access pattern. Experimental results show that compared with traditional loop optimization methods, the proposed method achieves an average 10% performance improvement in loop programs.