Blockchain I hashing algorithms

Gepubliceerd op 13 augustus 2023 om 09:35

We send all kinds of things over the Internet. Sometimes confidential information. For example passport data, passwords or medical information. Not always the information you send ends up in the hands you wanted. For example, the server of the e-mail executor may be hacked. Hashing algorithms can be used to send data securely. When you secure information with a hashing algorithm, you can assume that the data will reach the intended recipient unaltered.


In short: what is a hashing algorithm?

A hashing algorithm is a technology that converts data to a cryptographic output (input to output). What this output looks like depends entirely on the content. When one letter or character of this input is changed, the output looks completely different. This makes it easy to tell if the content has changed in transit: if the hash looks different upon receipt than it did upon transmission, the data has been altered.

In data hashing, a string of data is converted into a string of letters and numbers that have no meaning. Please notice that it is one-way. You can go from input to output. But not from output to input.

Yet the outcome is not at all as random as we might think. This is because there is an algorithm behind the hashing that takes care of the logic. We call this a hashing algorithm, of which there are an awful lot of different ones. For example, Bitcoin (BTC) uses the SHA-256 algorithm.

Hashing example

You could think of a hashing algorithm as a kind of machine for creating a ciphertext. Using this link, you can play with a hashing algorithm yourself!

You can use the hash within your crypto project's blockchain explorer. When you make a transaction on a crypto exchange, you will see the transaction hash in the exchange. You can copy this and paste it into the block explorer, after which you will see more information about the transaction. This information has been converted to a hash using a hashing algorithm. Storing this data is done through a Merkle Tree. Read hier more about the Merkle Tree!

Output to input possible under certain circumstances

Suppose we secure the passwords in a database by converting them to a hash. When a hacker gains access to the database, he cannot do anything with the passwords contained here. This is because the hacker only sees the hashes.

If you want to log in somewhere, you enter your username and password. Then the password is converted to a hash via the hashing algorithm used. The website then checks to see if the hash matches the hash in the database.

This is all only possible when the algorithm is not cracked. That means no one should know the logic behind the algorithm. This includes the developers of the algorithm. When someone has cracked the logic, it is possible to convert hashes back to their contents (output to input). This would mean that all passwords contained in the database could be seen by people who would not be allowed to see them.

A few known hashing algorithms
MD5
MD5 is broken and therefore no longer used.

Nevertheless, we see that many applications still use MD5. These are old applications and websites that have not had an update for a long time. But since it has been broken, MD5 is no longer considered a secure algorithm.

Because MD5 is broken, it is possible to easily reverse the hash. With a secure algorithm, it is only possible to reverse one way. This means that the content must match the content of the hash. Only then can one gain access.

When you see an MD5 hash, you can access its contents within seconds. There are special Web sites where you can do that, such as at www.md5online.org, where you can also create MD5 hashes.

SHA-1
The SHA-1 algorithm produces a 160-bit hash and was created in 1995, when the NSA designed it. The algorithm is part of the SHA family, where SHA stands for Secure Hashing Algorithm. Despite its name, SHA-1 is no longer as secure as it was then. Microsoft, Google and Mozilla no longer provide SSL certificates signed with the SHA-1 hashing algorithm.

Several Web sites allow you to encrypt and decrypt data with SHA-1, such as www.md5decrypt.nl/en/Sha1. Security experts recommend not using the algorithm anymore.

SHA-256
Many applications and Web sites today use the SHA-256 hashing algorithm for its security. It is a variant of the SHA-2 function and part of the SHA family.

Its security is ensured by the fact that it works in a very complicated way. The algorithm is 30% slower than its predecessor (SHA-2), but this makes it all the more difficult to crack. The algorithm has not been broken until now, and is therefore safe to use.

You can use various websites to encrypt data with SHA-256. It is not possible to decrypt/break SHA-256 hashes. SHA-256 produces a 256-bit hash.

SHA-256 is considered by many experts to be the most secure hashing algorithm. The NIST recommends the use of this algorithm due to its high level of security. Many governments use the SHA-256 algorithm, including those of the United States and Australia.

Many cryptocurrencies also use the SHA-256 hashing algorithm, the best known of which is Bitcoin.

Go to this website to hash yourself! https://emn178.github.io/online-tools/sha256.html 

Whirlpool
Among techies, Whirlpool is a well-known hashing algorithm. Belgian Vincent Rijmen designed Whirlpool in 2000 and it is recommended by many bodies, such as ISO and IEC. This is because it meets established safety standards.

The algorithm is widely used within applications, also because the algorithm has been adopted within programming languages such as C and Java.

Go to this website to hash yourself! http://www.unit-conversion.info/texttools/whirlpool/ 

PBKDF2
The PBKDF2 hashing algorithm is recommended by the NIST. According to this organization, it is a secure algorithm that can be used by applications and Web sites to secure passwords. The algorithm works slower than SHA, making it extra secure. It also uses salt. This is a technique in which hashes are re-hashed multiple times. Before a new hash takes place, an additional hash is added, making the value extra dependent on this additional hash.

Go to this website to hash yourself! https://neurotechnics.com/tools/pbkdf2-test 

Broken hashing algorithms?
Any algorithm that is broken is insecure. These are all the hashing algorithm that are broken and insecure:

MD2;
MD4;
MD5;
Message Authenticator Algorithm;
SHA-1;
GOST;
LAN Manager;
Panama;
Snefru.
Many organizations and experts advise developers and users to stop using these algorithms. When you secure sensitive data with these algorithms, others can see the content quite easily.

Reactie plaatsen

Reacties

Er zijn geen reacties geplaatst.