Implementation of AES in assembly [closed]

感情迁移 提交于 2019-12-12 13:05:08

问题


Hello Everyone I am trying to build a code to do demonstrate doing AES encryption in assembly. the latest Intel manual has

AESENC xmm1,xmm2/m128 —Perform One Round of an AES Encryption Flow round key from the second source operand, operating on 128-bit data (state) from the first source operand, and store the result in the destination operand.

AESENCLAST xmm1, xmm2/m128 —Perform Last Round of an AES Encryption Flow a round key from the second source operand, operating on 128-bit data (state) from the first source operand, and store the result in the destination operand.

AESKEYGENASSIST xmm1, xmm2/m128, imm8 Assist in expanding the AES cipher key, by computing steps towards generating a round key for encryption, using 128-bit data specified in the source operand and an 8-bit round constant specified as an immediate, store the result in the destination operand.

To do this I will be trying inline assembly, I will be building it to compare speeds with normal AES done in C! my first brainstorm took me thinking how to use xmm in inline assembly any help/brainstorming/sharing ideas concerning my probs or the idea in general is welcome Cheers=)


回答1:


If you want to get a 128-bit value into an XMM register, look at the MOVDQA and MOVDQU instructions.



来源:https://stackoverflow.com/questions/4609677/implementation-of-aes-in-assembly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!