Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I identify a hash algorithm based on the initial key and output hash?

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: ?
like image 702
Chrisc Avatar asked Sep 18 '09 03:09

Chrisc


People also ask

What tool can be used to determine what type of hash a particular hash value is?

About the Hash Analyzer The tool can look at the characters that make up the hash to possibly identify which type of hash it is and what it may be used for. Hash types this tool can positively identify: MD5. SHA1 (SHA128)

What methods of hashing do you know?

Types of Hashing There are many different types of hash algorithms such as RipeMD, Tiger, xxhash and more, but the most common type of hashing used for file integrity checks are MD5, SHA-2 and CRC32. MD5 - An MD5 hash function encodes a string of information and encodes it into a 128-bit fingerprint.

What is my hash algorithm?

Hashing algorithms are functions that generate a fixed-length result (the hash, or hash value) from a given input. The hash value is a summary of the original data. For instance, think of a paper document that you keep crumpling to a point where you aren't even able to read its content anymore.

What is the output produced by a hash algorithm called?

A hash function is a versatile one-way cryptographic algorithm that maps an input of any size to a unique output of a fixed length of bits. The resulting output, which is known as a hash digest, hash value, or hash code, is the resulting unique identifier we mentioned earlier.


1 Answers

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.

like image 93
erickson Avatar answered Nov 12 '22 18:11

erickson