Start Modes

The Start mode field in the Control A Register (CTRLA.STARTMODE) allows the selection of encryption start mode.

  1. 1.Manual Start Mode
In the Manual Start Mode the sequence is as follows:
    1. 1.1.Write the 128/192/256 bit key in the Key Register (KEYWORDx)
    2. 1.2.Write the initialization vector or counter in the Initialization Vector Register (INTVECTx). The initialization vector concerns all modes except ECB
    3. 1.3.Enable interrupts in Interrupt Enable Set Register (INTENSET), depending on whether an interrupt is required or not at the end of processing.
    4. 1.4.Write the data to be encrypted or decrypted in the Data Registers (DATA).
    5. 1.5.Set the START bit in Control B Register (CTRLB.START) to begin the encryption or the decryption process.
    6. 1.6.When the processing completes, the Encryption Complete bit in the Interrupt Flag Register (INTFLAG.ENCCMP) raises. If Encryption Complete interrupt has been enabled, the interrupt line of the AES is activated.
    7. 1.7.When the software reads one of the Output Data Registers (DATA), INTFLAG.ENCCMP bit is automatically cleared.
  2. 2.Auto start Mode

    The Auto Start Mode is similar to the manual one, except in this mode, as soon as the correct number of input data registers is written, processing is automatically started without setting the START bit in the Control B Register. DMA operation uses this mode.

  3. 3.Last Output Data Mode (LOD)

    This mode is used to generate message authentication code (MAC) on data in CCM mode of operation. The CCM mode combines counter mode for encryption and CBC-MAC generation for authentication.

When LOD is disabled in CCM mode then counter mode of encryption is performed on the input data block.

When LOD is enabled in CCM mode then CBC-MAC generation is performed. Zero block is used as the initialization vector by the hardware. Also software read from the Output Data Register (DATA) is not required to clear the ENCCMP flag. The ENCCMP flag is automatically cleared by writing into the Input Data Register (DATA). This allows retrieval of only the last data in several encryption/decryption processes. No output data register reads are necessary between each block of encryption/decryption process.

Note that assembling message depending on the security level identifier in CCM* has to be done in software.