Friday, June 5, 2009

Principle of a hash explicated;

To understand the principle of a hash, consider taking a Bible or a Quaran and, from start to finish, collecting only the 3rd letter of every word three letters long or longer.

It should be expected that every time you perform this operation you will get the same characteristic grouping of letters. The same operation on another copy of the same book will give the same value, but you could choose Forbes magazine for your source instead.

Reversing a hash is comparable to taking just the hash file and a dictionary and attempting to recreate the original volume without hints or clues. It is more legitimately illustrated by limiting the input to one page, and including all Forbes magazines of all months ever issued as potential sources.

Good hashes have been devised that yield specific lengths exactly - MD5 yields exactly 128 bits or 16 ASCII characters.

An example of a use for a hash is in ATM pin numbers. When you enter your pin at the Point of Sale device, instead of sending the PIN value, a good banker hashes it before transmitting. If the hash matches the hash in the database, your pin is good.

The reason this is an improvement on encryption is that if the bank's table is compromised, a hash table does not yield a list of valid pins with account numbers.

No comments:

Post a Comment