Skip to content

Instantly share code, notes, and snippets.

View AartiNdi's full-sized avatar

Aarti Dwivedi AartiNdi

View GitHub Profile
@AartiNdi
AartiNdi / HashFunctions.md
Created June 16, 2012 13:08
Starter's blog on cryptography

BLOG ON CRYPTOGRAPHY Today, people in general relate to cryptography mostly in regard to the security of their passwords. The passwords are worthless if others have resources to know it.

Today most of the websites dont simply use cryptographic hash functions like SHA256, MD5 etc. directly on the password. Instead random bits ( salt ) are added while encrypting them so that even when two users enter the same password the hashes that are generated are different from each other.

Hashes like SHA1 , SHA256, MD5 etc. are general purpose hashes. They have been designed to hash a large amount of data as quickly as possible.

An encryption algorithm for securely storing your password should have the following characteristics:

Preimage resistance: Given h, it should be hard to find any value x with h = H(x).

@AartiNdi
AartiNdi / Hash Functions.
Created June 16, 2012 05:24
Brief summary of what I know about hash functions
BLOG ON CRYPTOGRAPHY
Today, people in general relate to cryptography mostly in regard to the security of their passwords. The passwords are worthless if others have resources to know it.
Today most of the websites dont simply use cryptographic hash functions like SHA256, MD5 etc. directly on the password. Instead random bits ( salt ) is added while encrypting them so that even when two users enter the same password the hashes that are generated are different from each other.
Hashes like SHA1 , SHA256, MD5 etc. are general purpose hashes. They have been designed to hash a large amount of data as quickly as possible.
An encryption algorithm for securely storing your password should have the following characteristics:
1. preimage resistance: Given h, it should be hard to find any value x with h = H(x).
2. second preimage resistance: Given x1, it should be hard to find x2 != x1 with H(x1) = H (x2).
3. collision resistance: It should be hard to find two values x1 != x2 with H(x1) = H(x2).