-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Soft AES probably not constant time #4
Comments
Hm, the table-based implementation is not constant-time only when the whole 5kb (or 10kb) tables can't fit in the L1 cache - then an access might make the cache invalidated. The difference between this crate and So is it worth it to prevent a cache-timing attack (only for small microprocessor cpus, x86 and arm both have more than enough L1 cache I think) by slowing down the code drastically? |
Can't guarantee that in portable implementation and the problems doesn't stop there - DjB has a paper that goes deep into MARS beyond the obvious "if S-boxes fits" Also there are problems with LLVM inserting unwanted optimizations e.g. with masking without protection and we've been bitten by it having to put best effort guard over subtle. AES is not easy to do in software and make guarantees especially in Rust lacking effective optimisation barriers more so than plain C. Also wortwhile to mention there is already ocb3 crate (which composes with aes) and AEGIS by Frank (which does rely on C libaegis but it has pure-rust mode as well that relies on softaes instead of aes). There is this issue open incl re: aegis - please feel free to contribute :) |
I guess then I can introduce a |
Should use bitslicing etc. maybe fallback to aes crate instead for portability?
The text was updated successfully, but these errors were encountered: