What is a hash

Hash function

A hash function, too Hash algorithm called, generally converts a character string or file of any size to an output value with a fixed length. This output value is called a hash or hash value and consists of a sequence of letters and numbers. The length of the hash value always remains the same; only the characters of the hash can change. Such hash functions are used, for example, as checksums for data in order to be able to determine whether a change has been made to the data.

Hash functions are also used in cryptology, for example in blockchain technology for digital signatures and ensuring the correctness of data. However, this is cryptographic Hash functions that are collision-resistant. In this case, collision-resistant means that two different input values ​​can never result in the same hash. Normal hash functions, however, do not fully meet this property.

A well-known cryptographic hash algorithm is SHA-256, which is used, for example, with Bitcoin.

features

  • Fixed length - The length of the hash value is uniform in a hash algorithm.
  • Collision Resistant - A different hash value always comes out for different input values.
  • One-way function - Hashing only works in one direction. Although content can be converted to a hash, the original content cannot be reconstructed from a hash.

example

For our example we use the hash function SHA-256. We take “Decentralbox” as the input value. The converted hash looks like this:

Decentralbox → c28863f9f955dfb05ab6093efc7cb7cafe2f40e92d342ab651e794d0cd862077

If you now make a small change in the first letter ("D" to "d"), the hash value changes. This is because the cryptographic hash function used is collision-resistant.

decentralbox → d284283242d8fde9be2c50ee24a47e8576b75d95d9c81c4b77a6c3a3e5392454

With this online SHA-256 generator you can have your own input values ​​converted to a hash.


Source of information: © Wikipedia - hash function

Back to the glossary

Previous articlePseudo-anonymous
Next articlePaper Wallet
Mariya keeps you up to date on what is happening in the crypto world and helps those interested in crypto to find their way around the world of blockchain and digital currencies.