mostly-harmless icon indicating copy to clipboard operation
mostly-harmless copied to clipboard

Cryptopals Set 4 - Last two tests

Open rgerman opened this issue 8 years ago • 0 comments

Hi @FiloSottile ! Thanks for the cryptopals videos, they're awesome!

I know this is a silly thing, but I just wanted to point it out, because maybe someone wants to run the tests for the last two challenges in the fourth set and they're always failing trying to recover the last bytes of the signature. Since the sleep in the code is before the comparison of the bytes, for the last one, there's no noticeable timing difference between the two possible outcomes, because if the two bytes are different, it just returns false, but if they're the same, the loop ends and it returns true.

I guess you can always compare the fist signatureLen - 1 bytes, and just bruteforce the last one. Or just move the time.Sleep(pause) after the comparison (that's what I did to make the test pass).

Anyway, thanks again!

rgerman avatar Dec 31 '17 15:12 rgerman