Many applications of cryptographic hash functions do not rely on
collision resistance, thus collision attacks do not affect their security. For example,
HMACs are not vulnerable. For the attack to be useful, the attacker must be in control of the input to the hash function.
Digital signatures Because
digital signature algorithms cannot sign a large amount of data efficiently, most implementations use a hash function to reduce ("compress") the amount of data that needs to be signed down to a constant size. Digital signature schemes often become vulnerable to hash collisions as soon as the underlying hash function is practically broken; techniques like randomized (salted) hashing will buy extra time by requiring the harder
preimage attack. The usual attack scenario goes like this: • Mallory creates two different documents A and B that have an identical hash value, i.e., a collision. Mallory seeks to deceive Bob into accepting document B, ostensibly from Alice. • Mallory
sends document A to Alice, who agrees to what the document says, signs its hash, and sends the signature to Mallory. • Mallory attaches the signature from document A to document B. • Mallory then
sends the signature and document B to Bob, claiming that Alice signed B. Because the digital signature matches document B's hash, Bob's software is unable to detect the substitution. In 2008, researchers used a chosen-prefix collision attack against
MD5 using this scenario, to produce a rogue
certificate authority certificate. They created two versions of a
TLS public key certificate, one of which appeared legitimate and was submitted for signing by the RapidSSL certificate authority. The second version, which had the same MD5 hash, contained flags which signal web browsers to accept it as a legitimate authority for issuing arbitrary other certificates.
Hash flooding Hash flooding (also known as
HashDoS) is a
denial of service attack that uses hash collisions to exploit the worst-case (linear probe) runtime of
hash table lookups. It was originally described in 2003 as an example of an algorithmic complexity attack. To execute such an attack, the attacker sends the server multiple pieces of data that hash to the same value and then tries to get the server to perform slow lookups. As the main focus of hash functions used in hash tables was speed instead of security, most major programming languages were affected, (Non-keyed "simple" hashes remain safe to use as long as the application's hash table is not controllable from the outside.) It is possible to perform an analogous attack to fill up
Bloom filters using a (partial) preimage attack. ==See also==