3 ms·
That's all great and makes sense, but ... What does that have to do with being verbose and letting developers know they are using an insecure method when it wo
by mmazing 6y ago
That's all great and makes sense, but ...
What does that have to do with being verbose and letting developers know they are using an insecure method when it would apply to them?
If I'm writing code and using rng for gameplay variety, and then I notice that I have to use a function called "insecureRandom", at the very least I'm going to read up on an interesting aspect of computing and be a little more informed at the end of the day.
- Macha 6y agoBecause suitability for use in secure algorithms is just one property of the random number generator. At what point do we then decide it needs to be uniformInsecureBoundedRandom? Why don't we apply the same logic to string comparisons. Should we replace String.equals with String.shortcuttableEquals()? Since there's plenty of circumstances where that is inappropriate for crypto uses also. What about other functions with important caveats? Should we have mailGmailMightReject()? fsyncCantFixHardware()? file.existsAtCurrentInstant()?
- striking 6y agoI actually don't hate `file.existsAtCurrentInstant`. `file.exists` is so misused. Maybe functions suitable for crypto use should be in their own "crypto primitives" package.
- TheCoelacanth 6y agoI would prefer something like file.existedAtSomePointInTheRecentPast