If I have both the initial key and the hash that was created, is there any way to determine what hashing algorithm was used?
For example:
- Key: higher
- Hash: df072c8afcf2385b8d34aab3362020d0
- Algorithm: ?
If I have both the initial key and the hash that was created, is there any way to determine what hashing algorithm was used?
For example:
Didn't match any of the common hashing algorithms:
Perhaps a salt was added prior to hashing...
Well, given that there are a finite number of popular hash algorithms, maybe what you propose is not so ridiculous.
But suppose I asked you this:
Generally speaking, no, you cannot determine the inner-workings of any function simply from knowing one input and one output, without any additional information.
Not other than trying out a bunch that you know and seeing if any match.
By looking at the length, you can decide which algorithms to try. MD5 and MD2 produce 16-byte digests. SHA-1 produces 20 bytes of output. Etc. Then perform each hash on the input and see if it matches the output. If so, that's your algorithm.
Of course, if more than the "key" was hashed, you'll need to know that too. And depending on the application, hashes are often applied iteratively. That is, the output of the hash is hashed again, and that output is hashed… often thousands of times. So if you know in advance how many iterations were performed, that can help too.
There's nothing besides the length in the output of a cryptographic hash that would help narrow down the algorithm that produced it.
The hash seems to contain only hexadecimal characters (each character represents 4bits)
Total count is 32 characters -> this is a 128-bits length hash.
Standard hashing algorithms that comply with these specs are: haval, md2, md4, md5 and ripemd128.
Highest probability is that MD5 was used.
md5("higher") != df072c8afcf2385b8d34aab3362020d0
Highest probability is that some salt was used.
Highest probability still remains MD5.