46.5.3.1.4 Plain text processing with DMAC

Follow these steps for processing plain text with DMAC:

  1. Set CTRLB.NEWMSG for the new set of plain text processing.
  2. Load the CIPLEN register.
  3. Load (J0+1) in the INTVECT register.
  4. Load plain text in the INDATA register.
  5. Wait for INTFLAG.ENCCMP to be set.
  6. AES Hardware generates output in the INDATA register.
  7. Intermediate GHASH is stored in the GHASH register and ciphertext available in the INDATA register.
  8. Continue Step 3 to 5 till the input of plain text to get the ciphertext and the HashKeys.
  9. At the last input, set CTRLB.EOM.
  10. Write last in-data to the INDATA register.
  11. Wait for INTFLAG.ENCCMP to be set.
  12. AES Hardware generates output in the INDATA register and the final HashKey in the GHASH register.
  13. Load [LEN(A)]64||[LEN(C)]64 in the INDATA register and set CTRLB.GFMUL and CTRLB.START as ‘1’.
  14. Wait for INTFLAG.GFMCMP to be set.
  15. AES hardware generates the final GHASH value in the GHASH register.