Hacker News new | past | comments | ask | show | jobs | submit login

> Without any third party dependencies (not even openssl or similar).

In your pursuit of "no dependencies", you made a classic blunder: making AES vulnerable to cache-timing attacks.

https://codeberg.org/ezcrypt/ezcrypt/src/commit/3268d71e80d3...

I'm not going to review the rest of your code. This is sufficient for me to recommend everyone run the other way screaming.






Thanks for having a look. The software implementation of AES is actually mostly a copy-paste of https://github.com/kokke/tiny-AES-c (see https://github.com/kokke/tiny-AES-c/blob/master/aes.c#L189 ). I have been meaning to replace and/or improve it. Even moderately modern x86 machines will always take the fast AES-NI path, though.

"mostly a copy-paste" is also known as a dependency

Look to BearSSL for inspiration for how to implement cryptography right


"also known as a dependency" - There are different kinds of dependencies. The ones I'm usually concerned with are the ones that cause you headaches when you try to get the software working on an exotic platform ten years from now. I've developed software for 30+ years, and along the way I have grown a strong disliking to external dependencies (be it Python packages, Boost C++ libraries, 3rd party C libraries or a hefty Mono or Java runtime).

Thanks for the reference to BearSSL - it appears to be very much in line with my own preferred design principles.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: