为提高处理器对加密算法的处理效率和扩展性能,本文提出一种基于共性子图的指令定制方法.该方法通过挖掘常用加密算法中的共性计算模式,用一条模式指令替换多条被共性模式覆盖的指令,并使用查找表(LUT)对S-盒间址访问进行处理,达到减少算法指令数的目的.我们针对MD5,SHA256,RC5和AES等4种常用加密算法进行了实验,结果表明该方法可以有效的减少4种算法的核心循环体指令,使这些算法得到15.4%~60.6%的指令减少率.%In order to make devices have more efficiency and flexibility on encryption algorithms, this paper proposes a method using common subgraph to customise instructions. By discovering common computation patterns hidden in classical encryption algorithms and replace several instructions in each pattern with one single instruction and using LUT to speedup indirectly access of s-box, the instruction numbers of encryption algorithms are reduced. The experimental results on four encryption algorithms, including MD5, SHA256, RC5 and AES, show that the proposed method can effectively reduce instruction numbers of core loops, and the reduced percentage varies from 15. 4% to 60. 6% in different algorithms.
展开▼