Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cryptopals Set 4 - Last two tests #1

Open
rgerman opened this issue Dec 31, 2017 · 0 comments
Open

Cryptopals Set 4 - Last two tests #1

rgerman opened this issue Dec 31, 2017 · 0 comments

Comments

@rgerman
Copy link

rgerman commented Dec 31, 2017

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!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant