Can someone explain a hash function in cryptography?
Yes, is it the same as Hash function we use in DBMS ?
unfortunately i know neither
Check these out: http://en.wikipedia.org/wiki/Hash_function http://en.wikipedia.org/wiki/Cryptographic_hash_function
A hash function, If I'm not mistaken, is also called a one-way function. It is used for comparison of input passwords and stored ones, on web sites (it is used for security). The idea is that for a given string (password) you calculate a hash(for example md5) and you store it in a database (This is done when you are creating a new account). Now, when someone wants to log in, he inputs his password and the server then generates md5 for that password. After that, the newly generated hash is compared to the one stored in a database(the true one). If the two are identical the user is allowed access, if not it is denied.
It is called one-way function because you can only get to hash from a string, but you cannot get a string from a hash. In theory there can be more strings that get the same hash, but that is HIGHLY unlikely.
Join our real-time social learning platform and learn together with your friends!