




EmPowerYou wrote:Well a friend of mine said that its impossible to decrypt the hash, so we had a bet. I tried the popular sites for decrypting and the Cain app, but nothing... So what do you think, is it encrypted with sha1 or what?
sha1($value);
sha1(md5($value));
sha1( hash('whirlpool', $value) );
hash_hmac('sha1', $value, $key);

LoGiCaL__ wrote:Hashes are made to be irreversible.

What do you mean by that?
If that`s the case then in what circumstances would someone encrypt it this way?

shaqywacky wrote:What do you mean by that?
If that`s the case then in what circumstances would someone encrypt it this way?
To be clear, hashing and encryption are not the same. You do not 'encrypt' something with SHA1. You hash it. Encryption is reversible, hashing is not.
I think an example is the best way to explain the differences.
Say you want to encrypt the word 'cat'. A very simple way to do this would be to shift each letter backward by one place(IE a caesar cipher). So the 'c' would become a 'b', the 'a', would become a 'z' and the 't' would be come a 's'. So the encrypted word would be 'bzt'. If you want to get the original text back, you just shift everything forward by one letter. The 'b' becomes a 'c', ect. And you get 'cat' back.
Now say you want to hash 'cat'. A very simple(although not technically accurate, but it gets the point across) hash would be if you added the numerical(not ascii) value of each letter in the word together. So 'c' would be 3, 'a' would be 1, and 't' would be 20. You then add these( 3 + 1 + 20 ) and get 24. Now you want to get the original value back but there's a problem here. Many (infinite with real hashes) words will have the hashed value 24. For example, 'aaaaaaaaaaaaaaaaaaaaaaaa' would also have the value 24. So would 'ub'. So you can see that there is no way to get the original value back.
When someone 'cracks' a hash, they have just computed every permutation of characters until they found a hash that was the same as the hash they had. They can't say that the answer they found is the same, they just know they have the same hashed value.

samethings wrote:Or do you know any other example that might give me to understand where this hash is used for.

Users browsing this forum: No registered users and 0 guests