4 ms·
Hmm, not sure, I think it would be possible to mark a function with a pragma as "constant time", and the compiler could make sure that it indeed is that. I thin
by davrosthedalek 2y ago
Hmm, not sure, I think it would be possible to mark a function with a pragma as "constant time", and the compiler could make sure that it indeed is that. I think it wouldn't be impossible to actually teach it to convert branched code into unbranched code automatically for many cases as well.
Essentially, the compiler pass must try to eliminate all branches, and the code generation must make sure to only use data-constant-time ops.
It could warn/fail when it cannot guarantee it.