Skip to main content

Checksum calculation component

Checksums are widely used within the system to identify entities, shared between different components, usually backend and a unit. The typical scenario involved checksums is the following:

  • Some entity is modified on the backend
  • Checksum calculated and stored
  • The unit connects to the backend and sends the checksum of his local copy of the entity to the backend
  • Backend compares received checksum and it's the local one
  • If checksum differs, backend notifies unit, that it should update the entity

So the main requirements to checksum function are:

  • Minimize the probability of collisions
  • Out-of-the-box support in popular programming languages

It is suggested to use the SHA3-224 hash function to calculate checksums. The reasons are:

  • A part of the NIST algorithm toolkit
  • Designed to replace SHA2 hash functions
  • Supported by Python and GoLang
  • Hash length allows minimizing collisions
  • Hash generation performance is comparable with other algorithms from NIST toolkit