How the hash sum of a file is determined and compared. What is a checksum (hash) and how to check it? Where to compare the hash sum of operating system files

Home / Installing programs

Over time, many computer users, with more detailed acquaintance, wonder about hash sums. They are also called checksums. What is this? What is it for? How are these amounts calculated?

Definition

A specific value is called, which is calculated for the data using special algorithms. The purpose of hash sums is to check the integrity of data during transmission. The most common algorithms for calculation are MD5, CRC32 and SHA-1. Checksums can also be used to compare sets of data for nonequivalence, which is useful for detecting viruses on a computer.

The use of this method has gained popularity due to the fact that the check is easily implemented in digital equipment working with binary It can be analyzed without problems and is excellent for finding errors that are caused by the presence of noise in information channels.

Algorithms for verification

The MD5 algorithm is used not only to check the integrity of data, but also makes it possible to obtain a fairly reliable identifier, which is often used in cases where identical files are found on a computer. Thus, it is not the contents that are compared, but their hash sums.

The CRC32 algorithm is used in archiving programs. It stands for “cyclic redundancy code”.

The SHA-1 algorithm has found application in checking the integrity of data that is downloaded using the BitTorrent program.

Example

For example, a user wants to install an operating system or a game on his computer. He downloads the image and wants to make sure that the integrity of the file is in order and that nothing was lost during transfer. The easiest way to do this is to compare the hash sums of the uploaded file and those provided by the author. If they completely match, then the image contains no errors. Well, if the hash sums of the files are different, you need to download again, since some kind of failure occurred.

This elementary procedure serves as a preventive measure against incorrect operation and freezes. By doing this, you can be sure that the installation operating system, program or game will be correct.

HashTab Program: Checking Hash Sum

This utility is a plugin that is integrated into the operating system and used when needed. It can be downloaded from the official website completely free of charge as an installation file. Installation of the program is intuitive.

After installation, in the properties of each file there will be a new additional tab for calculating the checksum. By default, they will be calculated using the same three algorithms described above.

How to check hash sums? To do this, in the “Comparison” field you need to insert the amount indicated by the author. If the downloaded file has successfully verified its authenticity, a green check mark will appear. Otherwise, the user will see a red cross. In this case, it is recommended to download the file again.

The settings on the “File Hash Sums” tab can be changed by clicking on the corresponding item. A settings window will open, where you can set the display of the required checksums for verification and calculation. To make everything clear, it is recommended to tick the checkbox that allows you to display checksums in lowercase characters.

Thus, working with this program is very simple. Even an inexperienced user can figure it out.

MD5 File Checker

This utility is also downloaded from the official website, but it does not require installation. You just need to launch it. It uses the same algorithm for verification. When downloading a file, you need to copy the hash amount of the original to the clipboard, and then paste it into the field for verification. The next step is to select the file that the user wants to test for integrity. After clicking on the “Check” button, you will receive a message with the result of the work, which will tell you whether the checksum files or the file is damaged and there is no match.

An additional feature of the utility is to calculate the amount using the MD5 algorithm for any file on the computer.

Conclusion

So, the concept of a “checksum” was considered. It became clear what it was used for. For the average user, this is an easy option to check the file for integrity and compliance with the original. Were described useful utilities to calculate and compare hash sums. The first is capable of comparing different amounts, and the second only using one algorithm, but does not require installation, which is important if you do not have administrator rights.

If you are going to install an operating system or any other software product, it is recommended that you check the hashes after downloading all installation files. This will save a lot of time and, more importantly, nerves.

So you've been downloading long and hard Windows image, and now you want to make sure that not a byte was lost along the way. Or the distribution package was brought to you by the good fairy, and you want to check if she is connected with pirates. To determine the integrity of the distribution, you need two things - a checksum and a program to check it.

Windows image checksums

Upd. 2017. Microsoft has moved MSDN downloads to a new site, https://my.visualstudio.com/downloads, where a subscription is required to access the images. Therefore, without subscribing using the method below, it is no longer possible to find out the checksum.

Microsoft publishes their product checksums on MSDN, specifying SHA1 as the hash type. Search for the language version and edition of your Windows and click Intelligence to see the checksum below.

That's half the battle.

Checksum verification using the built-in certutil utility

If you do not specify the parameter -sha1, the utility will calculate the MD5 hash.

As you can see, everything is very simple! You can use this method to verify the MD5 or SHA1 checksums of any files.

Checksum verification using HashTab program

If command line scares you, you can check the checksum in a simpler way.

  1. Download and install the HashTab program.
  2. Click right click mouse on the image file and select "Properties".
  3. Go to the "File Hashes" tab.

Have you ever wondered why such information as “Hash Sum” is indicated? Very often found on torrents. On the one hand, some incomprehensible information, but on the other hand, very useful. Why? I will try to tell you in detail how to find out the hash of a file, how to compare it and why it is so useful.

Let's figure out how to find out the hash of a file and in what cases this hash will be extremely useful for us. I won’t go too deep into the topic, I’ll tell you with an example in simple language so that everyone can understand it!

Why do you need to know the hash sum of a file?

Let's say you decide to download an image of a game from a torrent and have fun. So you found an interesting game, read the description and discovered that the description of the file indicated the “Hash Sum” of the image.

The fact is that the person who posted the game first tested it for functionality on his computer, maybe even on several PCs and on different systems.

Once he was sure that everything was installed and working perfectly, he recognized the “Hash Sum” of the image and indicated it in the description of the game. For those who don't know, this begs the question: why did he indicate the hash sum of the image?

To put it roughly: The hash sum is a unique “Key” of a file that can be used to check the file, that is, its integrity.

To put it even simpler: Then, the hash will allow us to compare two files, the file that was uploaded for download, with the file that was downloaded to our computer.

And why should I compare it? Let's say you downloaded the image and naturally began installing the game. But during the installation process some errors began to appear, something was going wrong. All signs that the game will not install as needed, or that it has installed but will not launch.

In general, there are similar problems...

Of course, you can blame all the troubles on the place where you downloaded the file. They say that the file was not of high quality, nothing will run, nothing will work.

But this may not be the case.
Everything is fine with the system and everything is fine with the source from which the file was downloaded.

Everything is actually much simpler than it seems. During the process of downloading the file, some errors could have occurred, or the file was not downloaded to the end, in general, in a word, the file was downloaded to the computer incomplete for some reason.

This is where all the trouble comes from!

We go to the site where we downloaded the file, take the hash amount there, after which we find out the hash of the downloaded file and compare them.

1) If the Hash Sum turns out to be different, then the downloaded file is 100% different from the file that is posted on the site. This means that the downloaded file will not work. You'll have to download it again.

2) If the Hash Sums are the same, then in this case an exact copy of the file was loaded and it will work as expected. You can safely begin installation.

IMPORTANT! If you are downloading Windows images, then after downloading I strongly recommend that you find out the hash sum and compare it; if the sums do not match, then it is better to think 100 times whether it is worth installing Windows from a similar image.

Otherwise, you can get a lot of problems when installing the system.

In general, I think everything is clear, if you have questions, feel free to ask! Okay, we figured out why we need the hash sum of the file we are going to download. Now let's learn how to compare the hash sum to find out whether the file has been completely downloaded or not.

How to find out and compare the Hash Sum of a file.

For this purpose there is special programs and they are generally easy to use. All you have to do is choose required file, to get its hash amount and compare it with the one that was indicated on the site. It's simple!

I would like to present one of these programs in this post. The program, so to speak, “Own production” I was sitting at my laptop yesterday, and I realized that I kind of missed “Coding” and decided that there would be one more program compared to Hash-Sum.

The program interface looks like this. The buttons turned out without labels, but each button has hints about what it is needed for. They appear at the bottom of the program when you hover over the button.

1 – This button will open a dialog box for selecting files.
2 – This button is needed if you need to delete the contents of the fields.
.
4 – This button will close the program.
5 – This button is needed if you need to copy the Hash Sum to the clipboard.
6 – This button is the opposite, insert the Hash Sum for comparison.

To compare hash sums, press the “1” button and select the file that was downloaded. The program will determine its hash sum in md5 encoding, and it will appear in the “Received Hash” field.

Now in the “Compare with:” field, insert the hash amount specified in the description of the downloaded file. Click the “Compare” button and the program will show the result and the following window will appear:

And one more important point about my program. If you use it, then when you receive a hash of a file with a large size, the program will freeze for a short time, the system will prompt you to terminate the program...

In fact, the program works and soon it will show the hash amount of the file. But the program freezes because it needs to be modified a little, namely to add an “additional thread”. In general, do not pay attention to the fact that the program “Does not respond”, these are my errors, it still works smoothly!

How does the Hash Sum of a file change? (For understanding)

I suggest looking at a real example of how the Hash Sum of a file can change. For example, let's take a regular text document.

Let’s create a file “test.txt” and write any string into it, for example, three characters “123”. Now let’s save the file and see its size, it will be only “3 bytes”.

Since one character weighs only 1 byte and it doesn’t matter what it is, a character or a space.

However, this is not particularly important. What matters is that we are in this case we have the opportunity to remove 1 byte from the file, or vice versa, add several bytes to the file. Text document(TXT) works great for this example.

And so, save the file with the line “123” and look at its Hash Sum. For me it turned out to be of such significance.

MD5: 202CB962AC59075B964B07152D234B70

MD5: 202CB962AC59075B964B07152D234B70

Fine! We save the resulting “Hash Sum” somewhere else. Now open the “test.txt” file again and add another character to the line, and the result will be the following string “1234”. We save this file and find out its “Hash Sum” again. This is what happened.

When downloading programs or games from the Internet to your computer, you may have noticed more than once that in the description of the files of some installation images an item such as “Checksums” or “Hash sums” is indicated. What is a hash amount, why is it indicated on websites and how can it be checked?

The hash sum is the result of processing the file data with a hash function. Essentially, a hash is a personal digital identifier that can be used to verify the integrity of a copied or downloaded image by comparing it with the hash value of the original file.

But why do you need to check the integrity of the downloaded image if you can already see in the download manager or torrent client whether the file has been downloaded or not? The point is that, unlike most multimedia files, such as photographs, audio recordings or films, installation files much more sensitive to the slightest damage. Therefore, if even small errors occurred during the image loading process, during which only a few bytes of information were lost, you may well have problems installing a system or application from this image.

To avoid such problems, it is best to immediately check the hash value of the downloaded file, comparing it with the value that was indicated in the description on the site from which the download was made this file. However, you can find out the hash value of a file using standard means operating room Windows systems alas, it won’t work, so you’ll have to resort to help third party program. For example, to check a hash, you can install a specialized utility called HashTab.

HashTab is very simple, convenient and lightweight program Moreover, it is completely free. You can download the HashTab program from the official website of the developer using this link: hashtab.ru/.

After installing the HashTab program, it will automatically be built into the standard Windows Explorer and you can easily find out the hash amounts of absolutely any file on your computer.

In order for you to quickly understand how to work with this program, we will conduct one small experiment. Let's go to the official website of Microsoft, in the section Windows boot Technical Preview, which is located at windows.microsoft.com/ru-ru/windows/preview-download and download from there trial version a freshly baked Windows 10 operating system. Moreover, before downloading, we will definitely copy the hash value of the image file, which is indicated on the site.

After the Windows Technical Preview image is downloaded to hard drive computer, we will produce control check for compliance of the checksums of the file posted on the site and the image file we downloaded.

In order to find out the hash amount of a file, right-click on it and select the item in the context menu Properties. In the file properties window, go to the tab File hashes. Here you can read the value of all three hash sums of the selected file (though you will have to wait while the program calculates the hash value). However, few people will be willing to manually compare the value of hash sums when it is possible to do this automatically. Just copy the hash value of the original (downloaded from the site) file and paste it into the line Hash comparison.

If the values ​​of both hash sums match, it means that no errors occurred during the file download process, and you can safely install this operating system or application from the image. If the hash does not match, then it is better to download this file again, since this is better than then reinstalling the system or application a second time due to problems that may arise both during the installation process and during subsequent work.

You can also use the HashTab program to compare the hash values ​​of two identical files. To do this, you just need both of them to be on the computer or at least on a removable drive connected to it. To compare the hash sums of two supposedly identical files for identity, open the properties of one of the files on the tab File hashes, click on the button Compare file and specify the path to the second file. After this, the program will automatically calculate and compare the hash sums of both files.

Still have questions? - We will answer them for FREE

In our digital age, even one measly byte can cost a lot. If the ISO image file is missing even a byte, then the benefit of such a file will be doubtful. At one point, when you want to install a new operating system for yourself, the process will be interrupted at a certain stage of the installation, due to the fact that the image turned out to be broken. Therefore any ISO file should be scanned for integrity before burning it into a blank. Thus, you save your precious time and warn yourself against ridiculous incidents that arose in the process of using discs on which this or that ISO image was recorded. And one more important point: a broken ISO image can be due to a reason beyond your control - for example, the file itself was uploaded by the author already broken. And also due to the instability of your Internet connection, which ultimately led to the loss of data when downloading a file to your computer.

To scan the checksum of an ISO image, you should follow the following steps sequentially. There is no point in describing it in detail, since the program is quite simple and does not require deep knowledge or a serious description. However, let's take it step by step:

  1. We are searching in the vastness world wide web HashTab program (or a similar program designed to check checksums (or hashes) ISO images), download it to your computer and install it. You can download the program, for example, from here http://www.softportal.com/get-19546-hashtab.html, or from the official website. The installation process is quite simple and does not require description;
  2. Next, right-click on the ISO image file and select from the pop-up context menu the “Properties” item, where the new tab created by the HashTab program will be located;
  3. Go to the “File hash sums” tab, the hash sum of the downloaded file will be indicated there. This sum is a checksum for the file that you downloaded and even if it is not complete, it will still have a checksum;
  4. We copy the hash sum from the description of the ISO file (usually, in the topic from which you download the file, the checksum of the ISO image is indicated, and the checksum must also be present on the reverse side of the disk if the image is copied from the disk and if the disk is licensed), paste it in the “Hash comparison” field and click the “Compare file...” button.

Ready! This way we will know if the checksums match and make sure that the ISO image is ready for burning. If the checksums differ, then you need to download the ISO file again and check its integrity again. If it turns out that the ISO image downloaded again is still broken, then it’s better for you to look on the Internet for another image, preferably from a different author.

The most interesting thing is that the HashTab program is available both for users of the Windows operating system and for MacOs connoisseurs. Therefore, HashTab is a universal tool for checking ISO image checksums. And even if you have several computers with different operating systems installed, you will be much more comfortable using one software rather than searching for individual programs, designed for different operating systems. There are quite a few similar solutions on the Internet, which allows you to choose from an abundance of practically identical programs, differing from each other only in their interface. However, all of these programs are quite simple and not very broad in terms of their functionality, so no matter what you choose, it will all be about the same. Good luck to you and the integrity of the information!

© 2024 ermake.ru -- About PC repair - Information portal