Hashing is all about
adding integrity to
information.
The Hash takes a
fixed amount of data and maps it to a new piece of data of fixed sized.
It doesn't matter
how big the source data is, the hash will be the same size..
Hashes are NOT
encrypted versions of the original texts.
Properties:
- Hashes are one way. You can't reverse the hash.
- They are deterministic.
- One letter change leads to a completely different result.
Common Uses:
- Verify a download file
- Compare the downloaded file hash with the posted hash value. So if the file is corrupt (because a SINGLE byte of data is missing), we know something is wrong.
- Passwords
- Since two different messages have a completely different output, even if a single character changes, they are great for passwords. Why store the password when you can store the hashes and compare, that way people who might see the hash CANNOT guess your plaintext password.
- Digital Signatures
- Prove that the message sent was not intercepted and changed.
- We know that the digitial signature is not fake by ENCRYPTING the HASH of with the private key. This is the digital signature.
- The sig is then sent WITH the message.
- The recipient then hashes the message for himself, and then DECRYPT the digital signature hash of with the public key and if the hashes match, we know that the message was not tampered with. hashing the private key.
Anyway, here's a table speaking to different types of hashs. One of the key things to know is that primitive hashes are vulnerable against collisions, and with that, become easier to crack. Several inputs can lead to the same output in the case of weak hashing algorithms.
MD5 (Message
Digest v. 5)
|
Grandpa of Hashes
(1992), 128 bit
|
128
|
SHA (Secure Hash
Algorithm)
|
Family of Hashes
developed by National Institute of Standards
|
168 Bit v 1. 512
has never had a collision though.
|
RIPEMD
|
128, 160, 256 and
360 versions
|
Go ahead and play with different hashes here.
Or check the security of your password somewhere like here.
No comments:
Post a Comment