On Sat, Apr 26, 2014 at 6:55 PM, Jens Nockert <j...@nockert.se> wrote:
> On 26 Apr 2014, at 18:39, Geoffroy Couprie <geo.coup...@gmail.com> wrote: > > Constant time code is possible in theory > > > As long as you don’t do memory accesses, branches, division, > floating-point, etc. Some x86 processors even have variable-time > multiplication. > > Writing constant-time code is essentially impossible. > Like most software problems, they're hard in the general case, but doable in specific cases. Yes, that requires taking into account cache lines, counting CPU cycles for every instruction, making sure you do not branch depending on secret information, be wary of concurrent use of the processor, and adapt all of that to the specific processor you target. Yet it has been done for some algorithms and processors. It is insanely hard, few are able to do it correctly, but it is still a worthwhile target.
_______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev