3 ms·
I honestly haven't heard the term constant time used in a context other than asymptotic in computer science, even in relation to side-channels. I think this is
by uxcn 11y ago
I honestly haven't heard the term constant time used in a context other than asymptotic in computer science, even in relation to side-channels. I think this is the way the majority of people use the term. I worry that trying to use it another way will probably just confuse people, not to say I don't think it isn't a valid concept.
In relation to side-channel attacks, wouldn't it be sufficient to just pad the difference between upper and lower bounds using no-ops?
- Dylan16807 11y ago>I worry that trying to use it another way will probably just confuse people, not to say I don't think it isn't a valid concept. I'll keep that in mind so I don't give wrong impressions in the future. >In relation to side-channel attacks, wouldn't it be sufficient to just pad the difference between upper and lower bounds using no-ops? It can be extremely difficult to design algorithms so that they spend the same amount of time no matter what the input number is. You can't just use no-op instructions because you don't know how many cycles things will take, no-ops aren't perfect at soaking up extra time, and they don't help at all against something like an attacker on the same EC2 host. Even worse is if you have the OS interrupt mid-computation and wreck the cycle-accurate counters that would tell you how many no-ops to use. You want to design it so that the same instruction sequence happens every time, without branching based on input, without having varied memory accesses based on input. And avoiding other variable length pitfalls like division.