Cryptography Hash Functions and Digital Signature
Overview of this blog?
This is written to get knowledge about Hash Functions and Digital Signature.
What is a hash function?
- A hash function is an encoding function that maps an arbitrary string of any size to a string of fixed size.
Uses of Hash Function
- Digital signatures
To sign a message, we first take a cryptographic hash of the message and then encrypt it with the receiver’s public key.
- Storing passwords in a database
Hashes of passwords are used instead of storing in plain text so that even if the database is compromised, the hacker cannot get access to the user’s passwords as cryptographic hash functions are pre-image resistant.
- Data integrity
Take a hash of all our files before leaving a system and then recompute the hash to check if the files have been changed or not.
- Blockchain
Types of Hash Functions
Secure Hash Function (SHA)
Family of SHA comprise of four SHA algorithms; SHA-0, SHA-1, SHA-2, and SHA-3. Though from same family, there are structurally different. The original version is SHA-0, a 160-bit hash function, was published by the National Institute of Standards and Technology (NIST) in 1993.
MD5
RIPEMD — 160
HMAC
Comparison of Secure Hash Functions
Properties of cryptographic hash functions
* Collision resistant
* Pre-image resistance
* Second pre-image resistance
* Large output space
* Deterministic
* Avalanche effect
* Puzzle friendliness
* Fixed-length mapping
Digital Signature
- A digital signature is a mathematical technique used to validate the authenticity and integrity of a digital document, message or software.
- It’s the digital equivalent of a handwritten signature or stamped seal, but it offers far more inherent security.
- A digital signature is intended to solve the problem of tampering and impersonation in digital communications.
What are the benefits of digital signatures?
- Security
- Globally accepted and legally compliant
- Timestamping
- Time savings
- Cost savings
- Positive environmental effects
Digital Signature Process
Conclusion
You can get some basic knowledge about Hash Functions and Digital Signature. Mainly these essential points are discussed here.