For a hash function for which "L" is the number of bits in the message digest, finding a message that corresponds to a given message digest can always be done using a brute force search in 2"L" evaluations. This is called a preimage attack and may or may not be practical depending on "L" and the particular computing environment. The second criterion, finding two different messages that produce the same message digest, known as a collision, requires on average only 2"L"/2 evaluations using a birthday attack.