Hot answers tagged

60 votes
Accepted

How can hashes be unique if they are limited in number?

how can for example SHA-256 be unique if there is only a limited number of them?! Where your issue occurs is that they're not unique. It's just very improbable that they'll reoccur. Unique in ...
user avatar
  • 13.9k
57 votes

Are there two known strings which have the same MD5 hash value?

Just to show you how easy it is today to create collisions on MD5: One could create collisions using Marc Steven's HashClash on AWS and estimated the the cost of around $0.65 per collision. ...
user avatar
  • 741
54 votes
Accepted

For a hashing function like MD5, how similar can two plaintext strings be and still generate the same hash?

This answer is based on the work by AleksanderRas, although my conclusion is different. First, to lay out a definition, a hash is a function that takes an arbitrary length input to a fixed length ...
user avatar
  • 992
36 votes
Accepted

How are the functions used in cryptographic hash functions chosen?

The functions considered are binary functions of 3 bits to 1 bit (extended to bit vectors, that is bitwise functions). There are $2^{(2^3)}=256$ such functions. All the functions considered are ...
user avatar
  • 124k
34 votes
Accepted

Is there really no use for MD5 anymore?

I know that MD5 should not be used for password hashing, and that it also should not be used for integrity checking of documents. There are way too many sources citing MD5 preimaging attacks and MD5s ...
user avatar
31 votes

How can hashes be unique if they are limited in number?

You are right, hashes won't be all unique as you already have shown. The important part are practical collisions - how many SHA-512 hashes can the whole earth generate in its lifetime? Definitely much ...
user avatar
  • 3,820
29 votes
Accepted

How is SHA1 different from MD5?

MD5 and SHA-1 have a lot in common; SHA-1 was clearly inspired on either MD5 or MD4, or both (SHA-1 is a patched version of SHA-0, which was published in 1993, while MD5 was described as a RFC in 1992)...
user avatar
26 votes
Accepted

Could we break MD5 entirely in the future?

If you follow the reference for the alleged preimage attack on MD5, you will see that although the time cost is $2^{123.4}$ steps, the memory cost is $2^{45} \times 11$ words of memory, which has a ...
user avatar
22 votes

Are there two known strings which have the same MD5 hash value?

Two different strings in hex format: ...
user avatar
  • 597
21 votes

For a hashing function like MD5, how similar can two plaintext strings be and still generate the same hash?

The answer is 1 bit (Hamming-distance = 1) for any cryptographic hash algorithm. There are definitely collisions, since the digest of the MD5 algorithm is always 128 bits long but there are more than ...
user avatar
  • 6,326
20 votes
Accepted

Does a hash function have a Upper bound on input length?

Does hashing algorithms have an upper bound in the input space? They can, but they don't have to and it depends on their specification. All Merkle-Damgård based hash functions do have an upper limit,...
user avatar
  • 44.6k
19 votes
Accepted

Is a password cyphered by itself as secure as hash?

There is an important misconception on your part: in general cryptographic hashes such as MD5, SHA-1 or SHA-512 should not be used to directly hash a password. A password hash or PBKDF should be used. ...
user avatar
  • 85.1k
18 votes
Accepted

What is the MD5 collision with the smallest input values?

To answer your question, we must first state that for an integer $x$, we define MD5($x$) to be the MD5 hash of the encoding of $x$ as a sequence of bits. Indeed, MD5 expects a sequence of bits as ...
user avatar
16 votes
Accepted

Practical Uses for Timing Attacks on Hash Comparisons (e.g. MD5)?

There is no timing attack possible on MD5 as practically implemented on most platforms. That's because MD5 uses only 32-bit addition, 32-bit bitwise boolean operators, and constant rotations/shifts, ...
user avatar
  • 124k
16 votes
Accepted

Is base64 the best two-way hash function to encrypt and transmit a set of integer numbers via the internet?

MD5 – Can I use MD5 as a two-way function? If I can break the data in 64 bit portions, will I be able to recover the original message without a pre-calculated lookup table? MD5 is a hash function, ...
user avatar
  • 17.4k
16 votes
Accepted

How hard is it to generate a simultaneous MD5 and SHA1 collision?

Surprisingly enough, it would appear that generating a simultaneous collision wouldn't be that much more expensive than generating a single collision for SHA-1. The basic idea is to form a $2^{64}$ ...
user avatar
  • 132k
16 votes

For a hashing function like MD5, how similar can two plaintext strings be and still generate the same hash?

There are two answers to this: one practical, and one theoretical. First, the practical one: MD5 is a broken hash function, and we know of collisions for it, and a quick web search turned up a ...
user avatar
  • 352
15 votes
Accepted

Why are the outputs of the md5sum tool and Crypto++'s MD5 different?

The echo command appends a new line at the end, by default. The -n option omits this character. Compare these two executions: <...
user avatar
  • 4,832
13 votes
Accepted

Advantages/disadvantages of using symmetric encryption function as hash function?

The disadvantage of this approach is that block ciphers are not necessarily designed with this goal in mind. Specifically, AES has related-key problems, and DES completely breaks in Davies-Meyer. In ...
user avatar
12 votes
Accepted

How does the attack on MD5 work that allows a file to show its own (full) hash?

TO understand what is going on, you have to consider how MD5 works and how the collision attack works. MD5 is a Merkle-Damgård hash function: it process the input data by blocks (of 64 bytes each), ...
user avatar
12 votes
Accepted

How many trials does it take to break HMAC-MD5?

You can find a collision in MD5 at much lower cost than $2^{64}$ evaluations of MD5. You could do the same for HMAC-MD5, if you knew the key, which renders it unfit for unusual applications such as ...
user avatar
12 votes

For a hashing function like MD5, how similar can two plaintext strings be and still generate the same hash?

An important aspect of cryptographic hash functions is that even the smallest difference in input usually results in different output. But given the unlimited input space compared to the limited ...
user avatar
11 votes

What is the MD5 collision with the smallest input values?

For the smallest in theory based on a heuristic argument, see this other answer. For two concrete examples with 512-bit messages, much more than minimum but half the size of the example linked to in ...
user avatar
  • 124k
11 votes
Accepted

Is HMAC-MD5 still secure for commitment or other common uses?

No, message commitment by disclosing its HMAC-MD5 with a key later revealed is no longer any secure, because of the ease with which MD5 collisions can now be found. There's however no compelling ...
user avatar
  • 124k
11 votes
Accepted

Is it possible to make two files with the same size and the same MD5 and CRC32?

Is it possible to make two files with the same size and the same MD5 and CRC32? It's straight-forward. First off, we start with Joux's multicollision attack (PDF) to generate $2^{33}$ different same-...
user avatar
  • 132k
10 votes
Accepted

Is it possible to demonstrate that md5(x) != x for any x?

It is not known whether there is a fixed point or not. Since MD5 gives you 128 bits, you would need an input of 128 bits as well. That is you are really considering ...
user avatar
  • 1,114
10 votes

Is the SHA1 hash of MD5 hash of a password secure?

Pros: The only pro is that your method is very slightly better than storing passwords in plaintext. Cons: If an attacker gains access to your database, he will easily be able to recover 99% of ...
user avatar
  • 1,554
10 votes

Why aren't hash values for "nothing" (empty) defined as all zeros?

Why would that be a convenient property? It would be pretty annoying if I would test an empty string input, hash that and then XOR it with a value. I would get the same value back. You want the output ...
user avatar
  • 85.1k

Only top scored, non community-wiki answers of a minimum length are eligible