4 ms·
Just add some random sleep time, a few milliseconds here and there.
by rorrr 15y ago
Just add some random sleep time, a few milliseconds here and there.
- johnthedebs 15y agoWhile this seems like a reasonable solution at first, it doesn't fix the vulnerability. It should be obvious when you consider that the attacker already deals with natural variation in network speeds and server load. Turns out it's very straightforward to use statistical analysis to get rid of the noise and adding a little more doesn't do anything useful. The most reliable way to throw off the attacker is to make sure you do the same amount of computing in every case. "It's stuff like this that makes building secure systems very hard."
- coffeeaddicted 15y agoHow about starting a timer before doing the calculation and return the result always after XXX milliseconds? Sounds easier to implement than ensuring that calculations always need the same amount of time.
- balloot 15y agoIncorrect. Salt and hash your password strings so they're all the same length.
- Locke1689 15y agoAlso incorrect. Use bcrypt with a sufficient work function to prevent key strengthening attacks.
- mukyu 15y ago"key strengthening attacks" Please do not use Markov chains to construct posts or refrain from commenting on things you do not actually understand.
- Locke1689 15y agoKey strengthening or key stretching is used to add a work function to key generation in order to prevent brute force attacks on the key. The attack itself is probably best referred to as a brute force attack, which I poorly worded. I did not claim that I'm an expert in cryptography, but I will tell you that my graduate course in formal cryptography has taught me enough to explain something as basic as key strengthening. So, mukyu, perhaps you'd like to fill us all in with your detailed explanation of the number theory behind the Blowfish key schedule.
- ars 15y agoA random delay has an average. If you do enough attempts you can figure out what that average is. Then you do many trials and change if the average of those trials was above or below the random average. Do that enough and you get your info.
- pbhjpbhj 15y agoThat's going to vastly increase the number of attempts required though, which may be sufficient to make it practically impossible, no?
- ars 15y agoIncrease number of attempts? Yes. Practically impossible? Not in the slightest.
- pbhjpbhj 15y agoWhat I was thinking was that if the brute-force took 2 weeks (say) and the randomisation added just a single order of increase it could be sufficient to make the crack no longer worthwhile (eg passwords are changed monthly) - ie impossible in a timely manner which achieves the aims of the cracker. It is not that it is impossible technically , it is that it is no longer possible to use the crack to good effect [ie "practically"]. Do you still disagree - I thought it was a truism that increasing attempts meant the crack could become impractical.
- ars 15y agoIt's a timing attack remember, not an ordinary brute force. The randomization adds almost no extra time. You only have to calculate the random average once, and you anyway need to collect lots of timing data.