Bitcoin Course Online, Cryptocurrency Technologies - 3 : Cryptographic Hash Function

Well, before getting into Cryptocurrency & Bitcoin, I must outline some basic terms and concepts depending on which this technology works. So, here is "Cyptographic hash function". Keep Calm & learn about Cryptographic hash function. 

Image result for hash function example
img src : wikipedia.org
A cryptographic hash function is a hash function which takes an input (or 'message') and returns a fixed-size alphanumeric string. The string is called the 'hash value', 'message digest', 'digital fingerprint', 'digest' or 'checksum'). 

The ideal hash function has three main properties:

- It is extremely easy to calculate a hash for any given data. 
- It is extremely computationally difficult to calculate an alphanumeric text that has a given hash. 
- It is extremely unlikely that two slightly different messages will have the same hash. 

> A cryptographic hash function is a kind of algorithm that can be run on a piece of data, like an individual file or a password, producing a value called a checksum. The main use of a cryptographic hash function is to verify the authenticity of a piece of data. Two files can be assured to be identical only if the checksums generated from each file, using the same cryptographic hash function, are identical.

> Some commonly used cryptographic hash functions include MD5 and SHA-1, though many others also exist. 

Note: Cryptographic hash functions are often just referred to as hash functions for short, but that's not technically correct. A hash function is a more generic term that's usually used to encompass cryptographic hash functions along with other sorts of algorithms like cyclic redundancy checks.

Cryptographic Hash Functions: Example of hash calculation

Let's say you download the latest version of the Kali Linux. For whatever reason, you needed to download it from a site other than Kali's. Not being hosted on a site you've learned to trust, you'd like to make sure that the installation file you just downloaded is the exact same thing Kali Linux site offers. Using a checksum calculator, you compute a checksum using a particular cryptographic hash function and then compare that to the one published on Kali's site. If they're equal, then you can be reasonably sure that the download you have is the one Kali Linux intended you to have.

Usage in Digital Signatures:

Cryptographic hash functions are most commonly known for their use in digital signatures. These types of signatures tend to be more reliable than written signatures, as long as the private keys attached to a signature is secure. These signature schemes work on a system of private and public keys. The public and private keys have a mathematical relationship where it’s difficult to produce a private key from the public key and a message. It’s also easy for the person holding the private key to decrypt any message sent to them with the public key. Before signing a message with a private key, a hash function is used to simplify the message and make it smaller. The person receiving the message will be able to confirm that the signer has access to the private key without knowing the details of that key.

Resources :
- cex

Comments