vcipherlast

Vector Cipher Last

vcipherlast vD, vA, vB

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

vcipherlast vd, va, vb

Encoding

Binary Layout
4
0
vD
6
vA
11
vB
16
1289
21
 
Format VX-form
Opcode 0x10000509
Extension Vector Crypto
Registers Altered MSR

Operands

  • vD
    Target
  • vA
    State
  • vB
    Round Key