6.4 Cyclic Redundancy Check

Overview

In the CRC16 and CRC32 verification methods, a Cyclic Redundancy Check (CRC) signature is calculated over the application space. That value is compared to a precalculated CRC value stored at the end of the application hex file. If the calculated signature matches the signature stored in the application header, the application is allowed to launch. This form of verification can detect errors in communication and if the memory has been accidentally erased/overwritten. A CRC verification is not nearly as fast as a checksum, but provides better protection. CRC is also faster at validation than a hashing algorithm, but less secure in terms of memory protection due to the lack of authenticity checks.

Algorithms Used

Table 6-1. CRC16-CCITT
CRC ValueHex
Seed0xFFFF
Polynomial0x1021
XORN/A
Table 6-2. CRC32-JAM
CRC ValueHex
Seed0xFFFFFFFF
Polynomial0xEDB88320
XOR0x00000000

Verification Flow

In CRC16 and CRC32 verification, the bootloader has a very similar program flow to the Checksum verification. The only difference is the type of hash used in the calculation.

Figure 6-5. CRC Verification Flow