Cryptography

Checksums

Easy
15 min

What is a checksum?

The checksum is typically a small amount of data or value derived from a larger amount of data using a specific algorithm. Its purpose is to serve as a quick indicator of whether the data has remained unchanged. Checksums are particularly useful in detecting errors during data transfer or storage.

CRC32

Cyclic Redundancy Check (CRC) is one of the most commonly used checksum algorithms. The CRC32 variant produces a 32-bit checksum that is widely used in data transfer protocols for error detection. Its strength lies in its ability to detect common errors, such as single bit changes or group errors.

Finnish personal identification number checksum

The Finnish personal identity code contains a checksum that allows for quickly verifying the correctness of the identity code. This checksum is the last character in the identity code and is calculated based on certain mathematical formula using the other parts of the identity code. Its purpose is to ensure that the identity code is syntactically correct and to aid in error identification.

Difference between Checksum and Hash Function

In the following section of the course, we will learn about hash functions such as SHA2 and MD5. Don't worry if these don't mean anything to you yet at this stage, it's not necessary.

Checksums (such as CRC32 and the last character of the Finnish personal identity code that were just discussed as an example) are not very relevant in terms of cryptography and cybersecurity, but they are used more for error detection purposes.

But understanding hash values is a great intermediate step on the way to hashing functions!

Although checksums and hash functions may seem similar - both produce a short value from a large amount of data - they have clear differences and purposes. As mentioned, checksums focus on error detection and are designed to be fast and efficient in this task. Hash functions, on the other hand, create unique "digests" of data and are used more widely in the field of cybersecurity, such as in digital signatures and password storage.

When designing hash functions, attention is paid to cryptographic security, such as the difficulty of reverse computation and resistance to attacks.

Exercise

You can use CyberChef to calculate the CRC-32 checksum as well.

What is the CRC-32 checksum for the string "www.hakatemia.fi"?

hakatemia pro

Ready to become an ethical hacker?
Start today.

As a member of Hakatemia you get unlimited access to Hakatemia modules, exercises and tools, and you get access to the Hakatemia Discord channel where you can ask for help from both instructors and other Hakatemia members.