Constant-time programming is a countermeasure to prevent cache based attacks where programs should not perform memory accesses that depend on secrets. In some cases this policy can be safely relaxed if one can prove that the program does not leak more information than the public outputs of the computation. We propose a novel approach for verifying constant-time programming based on a new information flow property, called output-sensitive noninterference. Noninterference states that a public observer cannot learn anything about the private data. Since real systems need to intentionally declassify some information, this property is too strong in practice. In order to take into account public outputs we proceed as follows: instead of using complex explicit declassification policies, we partition variables in three sets: input, output and leakage variables. Then, we propose a typing system to statically check that leakage variables do not leak more information about the secret inputs than the public normal output. The novelty of our approach is that we track the dependence of leakage variables with respect not only to the initial values of input variables (as in classical approaches for noninterference), but taking also into account the final values of output variables. We adapted this approach to LLVM IR and we developed a prototype to verify LLVM implementations.
翻译:常时编程是防止暗藏式袭击的一种反措施,因为程序不应执行取决于秘密的内存访问。 在某些情况下, 如果能够证明程序没有泄露比计算的公共产出更多的信息, 此项政策可以安全放松。 我们提出基于新的信息流属性, 称为对产出敏感的不干涉, 用于核查固定时间编程的新办法。 不干涉规定公共观察员不能了解关于私人数据的任何信息。 由于真实系统需要有意解密某些信息, 实际上这种属性太强。 为了考虑公共产出, 我们接下来要采取以下行动: 而不是使用复杂的明确解密政策, 我们将变量分成三组: 输入、输出和渗漏变量。 然后, 我们提出一个打字系统, 静态检查泄漏变量不会泄露更多关于秘密投入的信息, 而不是公共正常产出。 我们的方法的新颖之处是, 我们追踪渗漏变量对输入变量初始值的依赖性, 不仅限于输入变量的初始值( 如经典的互不干预方法),, 但也要考虑到输出变量的最终值 。 我们把这个方法调整到 LLVMR, 我们开发了一个原型来核查 LLVMM 。