3 ms·
These are called "cache-timing attacks". In presence of caches, no memory lookup can be guaranteed to be constant time. Any memory lookups that use secret indic
by dchest 4y ago
These are called "cache-timing attacks". In presence of caches, no memory lookup can be guaranteed to be constant time. Any memory lookups that use secret indices are thus not timing-safe, however non-secret indices are OK.
See https://cr.yp.to/antiforgery/cachetiming-20050414.pdf https://cr.yp.to/antiforgery/cachetiming-20050414.pdf
Here's an implementation that doesn't use tables: https://github.com/openbsd/src/blob/master/sys/crypto/aes.c https://github.com/openbsd/src/blob/master/sys/crypto/aes.c
- mananaysiempre 4y ago(That implementation comes from BearSSL, whose website also has a discussion of the issue and a performance comparison[1].) [1] https://www.bearssl.org/constanttime.html https://www.bearssl.org/constanttime.html