There is no reasonable solution to that problem that doesn't involve eliminating the side channel. The problem isn't the key management; it's the broken AES deployment.
There is no reasonable solution to that problem that doesn't involve eliminating the side channel. The problem isn't the key management; it's the broken AES deployment.
I understand that... that's the whole point of the paper, after all. But wouldn't rekeying defend against this attack? And therefore how is what I originally said wrong (and hence how is it safe practice to reuse AES keys in general)?
(I'm only trying to understand this.)
Also, how would a one time pad be vulnerable to any side channel attack? That seems like it makes no sense.
What am I missing here?
With a one time pad, the key's length has to be the length of the plaintext. There's no way for the key to be leaked through cache timing, because no memory location is ever read twice.
The entire operation is simply: read a byte of plaintext; read a byte of key; XOR the two, writing the resulting byte"
It makes no sense to use cache timing attacks against one time pads, because the speed of memory access is independent of the key and plaintext!
If you have a side channel attack then a single use of the key would be sufficient to break it-even a OTP would be vulnerable.
Let me try to put it another way: as far as I know, there are no reasonable side channel attacks against one time pad encryption, and certainly no cache timing attacks. So I don't understand why you're saying OTP is vulnerable to side channel attacks. Also, how is it possible for a single use of the key to be vulnerable to a timing-based side channel attack?
If I'm wrong, please point out precisely what I've said that's wrong, so that I can learn from my mistake.
I'll reword my original questions for clarity: does "800 write operations" mean "the attacker initiated 800 separate encryption operations, each using the same encryption key X, then analyzed the cache timing in order to infer X"? If so, doesn't that mean this attack can be defended against by changing the AES key for each encryption operation? And if that's correct, then by definition isn't it less safe (if not unsafe) to reuse your AES key?
The only reason they were able to recover the key in a single run is because GPG uses branching in its inner loop, making it trivial to determine the difference in timing between 1 and 0 bits of the key. AES requires no such branching. Attacking AES requires that the attacker try to predict the key, then calculate how long encryption would take if the attacker's guess was correct, then compare that guess to how long it actually took. This means it's not possible to recover the AES key in a single run unless the attacker happened to guess it correctly the first time (which is effectively impossible).
In other words, the paper you cited apparently doesn't build off of Osvik & Tromer at all, except in the sense that they're both cache timing attacks. The paper uses a completely different technique than Osvik & Tromer.
So how is it safe to reuse your AES key? I'm just trying to understand. Since the attacker needs multiple runs to attack AES, then wouldn't the logical defense be to rekey after every encryption?
It seems like you've been saying "it's impossible to defend against a side channel attack." But that doesn't seem to be true in the case of AES, as long as you don't reuse your key. What am I missing?
I keep telling you this: you can reuse AES keys. Reusing an AES key does not in any intrinsic way reduce the security of AES (at least, not unless you encrypt a truly staggering amount of data with it).
However: you should not be working with encryption at this level of detail anyways. Sillysaurus 2, please go download Nacl and play with it. You'll be using 2012 crypto instead of debating implementation flaws in old crypto.
http://cryptojedi.org/peter/data/tenerife-20130121.pdf
"NaCl systematically avoids all loads from addresses that depend on secret data"
"NaCl systematically avoids all branch conditions that depend on secret data"
So NaCl is an implementation of AES encryption that prevents cache timing attacks. Since there are no other reasonable side channel attacks on AES, the AES key remains secure. Therefore reusing your AES key is ok provided you're using NaCl. (So you should probably be telling people they need to be using NaCl, not merely AES.)
Thank you for the answers. Also, thanks for pointing me at NaCl. That's the most exciting crypto slide deck that's ever been written!