Re:Clang vs. Clang
by davrosthedalek on Sunday August 04, 2024 @05:02PM
(#41156325)
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.
[ Parent
| on HN ]
There are no comments on this comment yet.