![]() I mean, I don't even know what the different considerations are so I can't design these functions right, so please consider the spirit of the following proposal and not the details. Please make it easy for morons like me to use crypto right. Job safety is nice, but a secure internet is nicer. Cryptographers, please get your act together. We need similar APIs for symmetric and asymmetric encryption, for common use cases, or this madness is simply going to continue. These implement all the best practices, with seeds, the right algorithm parameters, keeping the ability to rehash in the future, etc. Eg PHP doesn't just expose a way to call bcrypt, but also has two functions password_hash and password_hash_verify. Some languages and libraries get it right, here and there. This is shit design and we can blame the cryptographers. The programmer will be none the wiser except if they were lucky enough to post the code somewhere on HN and someone writes a condescending comment. Or else what? Or else the function works perfectly well, produces an encrypted byte array, but with totally broken security. ![]() Most standard crypto modules have calls of the formÄepending on the algorithm chosen totally different parameters need to be passed or else. The reason this code is insecure is that the API is a piece of shit. The AES algorithm being invoked, I expect, was written by proper cryptographers. The code quoted does not implement encryption, it invokes encryption. You suggest we hire a cryptographer every time we need something secured? Implementation is best left to cryptographers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |