News for hackers. Stuff that matters.
Re:FaCT: Constant Time Programming Language by amelius on Sunday October 23, 2022 @05:59PM (#33310696)
How do they control for timing in memory accesses, which can vary greatly depending on caching layers etc.
Re:FaCT: Constant Time Programming Language by Mathnerd314 on Sunday October 23, 2022 @07:04PM (#33311166)
There is an example in the paper, where they say the compiler synthesizes masked array reads. Any branching on secrets will be eliminated via transformation to bitmask manipulation, so a memory read that was conditional on a secret will always be performed.

More generally, complex memory access patterns like reading/writing an array at a secret index are forbidden, you have to transform them into looping over the whole array and testing if the current index is equal to the secret index. It seems doing such transformations automatically is possible but FaCT just errors because the resulting code is slow.