modernpython icon indicating copy to clipboard operation
modernpython copied to clipboard

random.expovariate() usage inside the check_user function

Open theSyndical opened this issue 3 years ago • 0 comments

Raymond thanks for the amazing course!

i have a question regarding this snippet of code: https://github.com/rhettinger/modernpython/blob/d305a097607acce12fb687a3a24da993fdfb6353/pubsub/pubsub.py#L85-L89

whats the point of a random sleep with exponential distribution ? to my knowledge it wont prevent timing attacks. according to the documentation compare_digest is designed to prevent timing analysis so it already takes care of that for us.

thank you.

theSyndical avatar Jan 28 '22 18:01 theSyndical