5 ms·
The crypto scheme used should depend on the importance of what you want to protect. For instance, I think using md5 for a secure token that will expire in a few
by mtourne 13y ago
The crypto scheme used should depend on the importance of what you want to protect.
For instance, I think using md5 for a secure token that will expire in a few minutes is reasonable.
- dchest 13y agoWhat's reasonable about it? Why not use a non-broken hash algorithm?
- mtourne 13y agothey're small and easy to compute. I'm not talking about signing my microsoft update cert with md5() here. By all means, I do encourage you to get a valid token for the next 20 minutes, find a collision attack and get a secure token that will work for another timestamp "sometime in the future" (without passing the captcha!) on the system I'm building..
- dchest 13y agoNeed small output? Truncate the output of SHA-256. What "easy to compute" means? Performance? Use BLAKE2. Code complexity? sha256() is only 3 letters more than md5() (you're probably not writing your own implementation). Asking other people (especially, not professional cryptographers) to try to break your system which knowingly uses insecure primitives is an awful way to evaluate system security.