Insecure how?
Re:Retiring a Great Interview Problem
by Daniel_Newby on Wednesday August 10, 2011 @12:16PM
(#2868901)
Timing attacks. If one of the strings is supplied by the client and the other string is a secret, a comparison that exits at the first mismatch is faster. The client can try every value of the first character until it finds one that takes longer, and it knows that that one is the first character of the secret. It can repeat this with the second character, and so on until the entire secret is known.
Standard string comparisons exit on the first mismatched character, which is insecure.