Re:Why you should never use hash functions for message authe...
by marshray on Saturday June 09, 2012 @05:22PM
(#4089331)
> accumulate the XORs of each offset of both strings and then verify that they add up to zero
If you do that in a language with an optimizing compiler or JIT runtime you'd better look at the generated code and/or do your own timing measurements. A sufficiently-smart optimizer could recognize that the first difference encountered allows for early loop termination.
If you do that in a language with an optimizing compiler or JIT runtime you'd better look at the generated code and/or do your own timing measurements. A sufficiently-smart optimizer could recognize that the first difference encountered allows for early loop termination.