Implementation of AES in assembly [closed]
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=)
If you want to get a 128-bit value into an XMM register, look at the MOVDQA and MOVDQU instructions.
精彩评论