Calculate / determine checksum
Instructions for Windows and Linux
In this article or guide I explain what checksum means and how you can easily determine the checksum under Windows and Linux (Ubuntu/Lubuntu).
By comparing the checksum, you check the integrity of a downloaded file, i.e. the checksum check ensures that you have received the original file and not a modified file.
Übersicht / Absprünge
- What is checksum? und What is Checksum useful for?
- Determine checksum using Powershell under Windows 10 & 11
- Determine checksum using 7-Zip context menu CRC SHA under Windows 10
- Verify checksum using terminal under Linux Ubuntu/Lubuntu
What is checksum?
The checksum is a digital fingerprint of a file. Just as a person's fingerprint is unique, the digital fingerprint, i.e. the checksum of a file, is also unique. As long as the content of a file has not been changed, the fingerprint (the checksum) of each file remains unchanged. However, if the content (not the file name) of a file is changed even minimally, the digital fingerprint of this file also changes.
For what is checksum useful?
If I create a file and make it available to someone by e-mail, download, etc., it is possible that this file is manipulated/altered on the way to the person. And this is where the checksum helps. I determine the checksum from the file that I want to send to a person and also inform this person of this checksum.
And as soon as this person has received my file, this person can determine the checksum of the file and compare it with the checksum that I have sent to the person separately. If they are identical, the file has not been changed on its way to the person. However, if the checksums are not identical, it is certain that the content of this file has been changed on its way to the person.
Of course, checksum matching is unnecessary for unimportant files such as images or mp3 music. As long as the image corresponds to the expectation and the music plays the desired song, it doesn't matter whether the checksums are identical or not.
However, this is different for important programs such as a crypto wallet. If someone has, for example, 1.5 Bitcoin (current value: 146,456.51 USD), 25 Litecoin (current value: 3,282.13 USD) or 100 Monero (current value: 19,619.90 USD) on their crypto address, they should check more closely that the downloaded wallet program has not been changed or manipulated during the download process. In short, important programs/files should always be checked for integrity.
The case of the Monero cli wallet that became known on November 19, 2019 shows how important it is to check the integrity of a wallet file via the hash value before installing it. Anyone who downloaded the Monero cli wallet between 19.11. and 20.11.2019 and installed it without checking has installed a wallet with malware. This wallet stole the seed, which led to the Monero being stolen.
Determine checksum under Windows 10 or 11
Using Powershell or command prompt (cmd)
First, open Powershell. To do this, you can use the key combination [Windows key] + [R]. A small window will open. Enter "powershell" (without quotation marks) and press Enter.
This guide uses Powershell. It also works with the "cmd" command prompt.
In this example, the checksum of the file "Beam-Wallet-3.1.5765.exe" is determined. This file is located in the download folder.
Here we use the hash algorithm sha256, as the checksum of the file on the Beam website was specified with this hash algorithm. Enter the following in Powershell (without the $ sign) and press Enter.
$ CertUtil -hashfile .\Downloads\Beam-Wallet-3.1.5765.exe sha256
The sha256 checksum of the Beam-Wallet-3.1.5765.exe file (e23146aed...1ee5266c8b) appears. Copy this checksum to the clipboard to be able to perform the synchronization later. Copying in PowerShell/cmd is easy. To do this, select the checksum string and then press Enter.
Now you just have to check whether the checksum of the file on your computer is identical to the checksum on the download page. To do this, go to the download page and press CTRL+F and then CTRL+V. The checksum from your clipboard will now be searched for on the website. If the checksum is found, you can be sure that the checksums match and that you have the original file on your computer.
Checksum under Windows 10 and 11
Determine CRC SHA using 7-zip context menu
If you have the data compression program 7-Zip installed on Windows, you can also quickly read the checksum of a file via the Windows context menu.
To do this, simply right-click on the file. The context menu will open with the sub-item "CRC SHA". Here you only have to select the desired hash algorithm.
As a result, you will receive the checksum of the file. Unfortunately, this character set cannot be copied.
Determine checksum under Linux (Ubuntu/Lubuntu)
Using Linux Terminal
To determine the checksum under Linux (Ubuntu/Lubuntu etc.), simply enter the hash algorithm you are looking for in front of the file name in the terminal.
For example, if you want to determine the hash algorithm sha256 for the file "Beam-Wallet-3.1.5765.exe", enter the following in the terminal under Ubuntu/Lubuntu.
$ sha256sum Beam-Wallet-3.1.5765.exe
And for MD5 enter the following:
$ md5sum Beam-Wallet-3.1.5765.exe
etc.
$ sha1sum Beam-Wallet-3.1.5765.exe
For crc32 the command is entered without appending "sum".
$ crc32 Beam-Wallet-3.1.5765.exe
These are the options for determining the checksum under Windows and Linux.