vcipherlast
Vector Cipher Last
Performs the final round of AES encryption (SubBytes, ShiftRows, AddRoundKey). No MixColumns.
Details
Perform the final round of AES encryption on 128-bit blocks. Applies SubBytes, ShiftRows, and AddRoundKey transformations (but not MixColumns, which is done in prior rounds). Operates on one or more 128-bit AES blocks. No status flags are affected.
Pseudocode Operation
vD ← AES_SubBytes(vA)
vD ← AES_ShiftRows(vD)
vD ← AES_AddRoundKey(vD, vB)
Programming Note
The vcipherlast instruction is used to perform the final round of AES encryption on a vector of data. Ensure that the Vector Facility (MSR.VEC) is enabled before using this instruction; otherwise, a Vector_Unavailable exception will be raised. This instruction processes each 32-bit word of the input data with the corresponding round key from the VRA register to produce the encrypted output in the VRT register.
Example
Encoding
Operands
-
vD
Target -
vA
State -
vB
Round Key