How Hashing Works and Its Importance for Blockchain

Hashing for Blockchain
Илья Дергунов

Илья Дергунов

Автор статьи. ИТ-специалист с 20 летним стажем, автор большого количества публикаций на профильную тематику (разработка ПО, администрирование, новостные заметки). Подробнее.

This is another topic that most people just skip if possible, and I can’t blame them. Cryptography has complexity that not exactly everyone dreams to learn about. There are many different kinds of cryptography that exist; however, I will try to do my best to keep it simple for you to understand.

There is classic cryptography that has been used since the ancient times by the Greeks and Romans, even in Egypt; however, our focus is modern cryptography, especially the one that is related to computers. Before I drag you into it any deeper, let me elaborate some basic terms that are vital to understand before diving into Cryptography. Hashing is referred to a fixed sized string of numbers, for example, 128, 256, 512, 1024, 2048 numbers. Hashing can be performed on various files, such as text, images, audio files, video files, or even software.

It produces a unique hash based on that the particular file. An individual file goes through a hash on one end; then comes out scrambled on the other end. It doesn’t matter what kind of file you try it out on; the result is always different. For example, you might try to put an md5 hash in the word “Blockchain.” The hash would be completely different than the word “Blockchain1.”

Note: MD stands for Message Digest, and the number 5 is its version number. Basically, MD5 has taken over MD4 hashing. Let me explain how much of a difference there is between two very similar words. As I mentioned the word “Blockchain,” I will perform and generate an md5 hash on it. Ok, so the md5 hash value for “Blockchain” is:

5510a843bc1b7acb9507a5f71de51b98

However, now I will perform the same md5 hashing on the word, “Blockchain1.” Let’s see the result:

1150228f14788047028d774b7c83c5a6

As you see, this is a completely different outcome; this is because the word is different, although very similar, it is still a different md5 hashing value. Let’s try to do this now with a number, and for simplicity, I will use very few figures so you will see how powerful hashing can be. This time I will perform md5 hashing on a number string of 123, and then 124, and see if there is any difference. Let’s begin, shall we? Ok, so I have performed md5 hashing on the number string: 123, and the hashing value is this:

202cb962ac59075b964b07152d234b70

Now I will do the same md5 hashing on the number string 124, and the hashing value is this:

c8ffe9a587b126f152ed3d89a146b445

As you see, again, it’s an entirely different outcome; therefore, hashing itself can provide excellent security. However, I will move on to more in-depth. In case you think I am some genius, or just making up the md5 values, I would suggest you visit the link for md5hashgenerator and practice for yourself. Perhaps you can start with the same words and number strings I made examples of. The website to visit is: http://www.md5hashgenerator.com/

MD5 is also case sensitive; therefore, using the very same letters, changing only one character to uppercase, the result of MD5 value would also be completely different. The closest example I can give you is fingerprints or DNS.

Those are also unique, and there are no two people who have the same DNS or the same fingerprint. Hashing has been widely implemented, mainly used by software developers. One of the main reasons is making sure that the software is not modified or corrupted while downloading it. Personally, I had an issue before when I upgraded a Juniper Switch with a new code, which has gone into Rommon mode because I was too lazy to check the md5 hash value of the software. Luckily, I was doing it within a test environment, and not in production network; however, it caused great pain and lost hours to recover the switch to its previous configuration.

In my case I downloaded the code from the right source; but, it seemed to be that our Proxy server must have corrupted halfway. Still, if I would have checked the md5 hashing value of the new code, I would have been more successful at the task. MD5 hashing is excellent; however, it is not called cryptography nor encoding. MD5 was implemented first in 1992, and if you think it’s a little old, then you are right. MD5 has been compromised several times due to its vulnerabilities, alone it is not sufficient to provide the best security. That being said, let’s move on to what Cryptography is.

 

Вас заинтересует / Intresting for you:

How Blockchain is connected to...
How Blockchain is connected to... 559 views Илья Дергунов Sat, 12 Feb 2022, 14:21:14
Bitcoin fundamentals: overview...
Bitcoin fundamentals: overview... 680 views Илья Дергунов Sat, 12 Feb 2022, 13:49:34
Blockchain: how is the securit...
Blockchain: how is the securit... 499 views Илья Дергунов Mon, 14 Feb 2022, 15:51:50
Blockchain technology and Comp...
Blockchain technology and Comp... 536 views Илья Дергунов Wed, 16 Feb 2022, 13:18:04
Comments (0)
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Suggested Locations