Home » Learn » How ECU Checksums Work: Sums, CRCs and Signatures

How ECU Checksums Work: Sums, CRCs and Signatures

How ECU checksums work and checksum correction: additive sum, CRC-32 and digital signature, with a Bosch ECU and a hex editor

An ECU checksum is a control value calculated from a block of the engine software and stored next to it. The ECU repeats the calculation at start up, and on many units while it runs, and only trusts the data if both values agree. Older ECUs use simple sums, later ones CRCs, and current ECUs add digital signatures that cannot be recalculated without the manufacturer’s key. Checksum correction is the step in which a tuning tool writes new control values after the maps have been changed.

Checksum correction at a glance
What is checkedDefined blocks of the flash memory: program code, calibration data or both
Common methodsAdditive sums, CRC-16, CRC-32, multiple linked checksums, digital signatures
Who checksThe ECU at start up and while running, the bootloader during flashing, and diagnostic testers through the CVN
When correction is neededAfter any change to a protected block, which means after every remap
Who correctsThe flashing tool while writing, a checksum module in the map editor, or a file service
Where it stopsSigned software: the ECU needs a valid signature, so tools need an unlock or exploit

What a checksum does inside the ECU

An engine ECU keeps its software in flash memory. Part of it is the program, part of it is the calibration: the maps for boost, fuel, timing and torque. Flash memory can be corrupted by a voltage drop, a failing chip or an interrupted update, and an engine that runs on corrupt fuel or ignition data can be damaged. The checksum is the first line of defence against that.

The principle is simple. During development, engineers run a fixed formula over a block of memory and write the result into the file at a known address. Each time the ECU starts, it runs the same formula over the same block and compares its result with the stored one. If they match, the ECU uses the software. However, if they do not, the ECU stores a fault such as P0601 (internal control module memory checksum error), limits power or refuses to start.

The ECU cannot tell why the data changed. A corrupted bit and a deliberate remap look the same. As a result, every tuning file needs checksum correction before the tool writes it.

Try it: break and fix a checksum

Below is a small boost pressure map in mbar, stored in the ECU as 24 bytes. Change any value, swap two cells or simulate a memory fault, then see what the ECU would do and whether a tuning tool can correct it.

Protection used by the ECU
rpm / load40%60%80%100%

Values in mbar absolute. Highlighted cells differ from the original file.

Stored in the file
Calculated by the ECU
What the ECU does

Start by raising one boost value, for example 2,200 to 2,400 mbar.

The main types of ECU checksum

Manufacturers have used several methods, often more than one in the same ECU. The calibration standards used by suppliers list the common ones: additive checksums that add up bytes, words or double words, CRC-16 and CRC-32, and user defined algorithms.

Additive sums

The oldest and simplest method adds up every byte or every 16 bit word in a block and keeps the total, ignoring overflow. It is fast and easy to compute on an old 8 or 16 bit processor. The widget above shows its weakness: if two values swap places, the total does not change, and two errors can cancel each other out.

Cyclic redundancy checks (CRC)

A CRC treats the data as a long binary number and divides it by a fixed polynomial. The remainder is the checksum. Because every bit affects the result according to its position, for example, a CRC catches swapped bytes, shifted blocks and most burst errors that a sum would miss. CRC-16 and CRC-32 are widespread in ECUs and in the bootloaders that write them.

Multiple and linked checksums

From the late 1990s, ECUs started to protect many separate blocks with their own checksums, so a single file can contain dozens of them. Some blocks also depend on each other. EVC describes a compatibility test checksum on Bosch EDC16 and EDC17 that links the operating system, the program and the map data, so the blocks have to stay consistent with each other. Diagnostic standards include a matching step: ISO 14229 (UDS) defines a routine called checkProgrammingDependencies that runs after flashing.

Digital signatures

A signature is not a checksum in the strict sense. The manufacturer calculates a cryptographic hash of the software and encrypts it with a private key that never leaves the factory. The ECU checks it with a public key stored in protected memory. In other words, anyone can recalculate a sum or a CRC, but nobody can create a valid signature without the private key. Workshop sources describe RSA 2048 signed bootloaders on Bosch MED17.5 and EDC17C81, and tuning protection (TPROT) on later EDC17 and MED17 software that checks the signature before the engine starts.

MethodWhat it detectsWeak pointCan a tool simply recalculate it?
Additive sumMost single changesMisses swapped values and errors that cancel outYes
CRC-16 or CRC-32Single and multiple bit errors, swaps, shifted dataNot designed against deliberate changesYes, if the algorithm and area are known
Multiple linked checksumsChanges in any protected block, mismatched blocksComplexity: every block must be found and corrected in orderYes, with support for the exact software
Digital signatureAny change not approved by the manufacturerOnly as strong as the key storage and the bootloaderNo. Needs an unlock, patch or exploit

Where the checks happen

  • At start up. The ECU checks its program and calibration blocks before the engine is allowed to run.
  • While running. Many ECUs repeat part of the check in the background, so a fault can appear after hours or days rather than at the first start.
  • During flashing. The bootloader checks every block it receives, usually with a CRC, and on modern ECUs verifies the signature before it accepts the new software.
  • At the workshop or the test station. Through OBD mode $09, a scan tool reads the calibration ID (CALID) and the calibration verification number (CVN), a checksum of the calibration. Changing fuel or spark maps changes the CVN, so a tester can spot a modified calibration. Our guide to OBD scanners for tuning and data logging explains which tools read mode $09.

How checksum correction works, step by step

  1. Identify the ECU and software version. Checksum areas and algorithms change between software versions, not only between ECU families.
  2. Locate every protected block. The tool or checksum module knows the start and end address of each block and where the file stores its result.
  3. Recalculate each value with the right algorithm, after all map changes are finished.
  4. Write the new values into the file, in the right order where blocks depend on each other. Some methods instead add a small compensation value at the end of the map area so the original result is kept.
  5. Verify. Good tools check the result again before writing, and the ECU confirms it after the write.

In practice, most tuners never do checksum correction by hand. Current flashing tools correct the checksums of supported ECUs while they write, and map editors such as WinOLS use checksum modules for each ECU family. Our guides to WinOLS and Autotuner, KESS3 and Flex cover what each tool supports, and the chiptuning tools guide explains how editors and flashing tools fit together.

Why checksum correction is getting harder

Three changes have pushed checksums from a technical detail to the main obstacle in tuning:

  • Signatures replaced simple checks. From the EDC17 and MED17 generation onwards, manufacturers sign more and more software. Consequently, checksum correction alone no longer gets a file accepted.
  • Hardware security modules. Current Bosch MG1 and MD1 ECUs use secure boot and a cyber security module, and units built from around 2020 have locked bootloaders that close the classic bench route. Tools now rely on unlocks or exploits such as the boot glitch method used by Korhex.
  • Regulation. UN Regulation 156 requires manufacturers to protect the integrity and authenticity of every software update. It has applied to new vehicle types since July 2022 and to all new vehicles sold in the EU, the UK, Japan and South Korea since July 2024.

For an overview of how each ECU family handles this, see our Bosch EDC17 guide.

Common checksum correction mistakes

  • Correcting the original file. A genuine original read should pass every check. If it does not, the read is probably incomplete. Fix the read first.
  • Correcting before the last change. Any edit after the correction breaks it again. Correct once, at the end.
  • Using the wrong checksum module. Support for the ECU family is not enough if the software version uses a different algorithm.
  • Editing outside the protected areas without care. Some tools only correct defined areas and warn when changes fall outside them. Take those warnings seriously.
  • Unstable power while writing. An interrupted write leaves incomplete data that fails every check and may lock the ECU.

For real cases and how tuners solved them, read checksum errors after a remap, based on 82 threads from the original Checksumm forum.

Test what you have learned with the ECU tuning quiz, which includes checksum questions at every level.

Frequently asked questions

What is checksum correction in ECU tuning?

It is the step in which a tool recalculates the control values in the ECU file after the maps have been changed and writes the new values into the file, so the ECU accepts the modified software.

What is the difference between a checksum and a CRC?

A simple checksum adds up the data and misses some errors, such as two values that swap places. A CRC is a polynomial calculation in which every bit counts according to its position, so it detects far more errors. In both cases, a tool that knows the algorithm can recalculate the value.

Can every ECU checksum be corrected?

Checksums and CRCs can, as long as the tool knows the algorithm and the protected areas. However, nobody can recalculate a digital signature without the manufacturer's private key, so signed ECUs need an unlock, a patched bootloader or an exploit.

What is the CVN?

The calibration verification number is a checksum of the calibration that the ECU reports through OBD mode $09, together with the calibration ID. A changed calibration usually produces a different CVN.

Do I need to correct checksums myself?

Usually not. Most current flashing tools and map editors correct them automatically for the ECUs they support. You only need manual checksum correction for unusual ECUs that no tool covers.

Sources

Share this article