Lune

CCS2018Top-tier venue

Towards Verified, Constant-time Floating Point Operations

Marc Andrysco, Andres Nötzli, Fraser Brown, Ranjit Jhala, Deian Stefan

Abstract

The runtimes of certain floating-point instructions can vary up to two orders of magnitude with instruction operands, allowing attackers to break security and privacy guarantees of real systems (e.g., browsers). To prevent attacks due to such floating-point timing channels, we introduce CTFP, an efficient, machine-checked, and extensible system that transforms unsafe floating-point operations into safe, constant-time computations. CTFP relies on two observations. First, that it is possible to execute floating-point computations in constant-time by emulating them in software; and second, that most security critical applications do not require full IEEE-754 floating-point precision. We use these observations to: eliminate certain classes of dangerous values from ever reaching floatingpoint hardware; emulate floating-point operations on dangerous values when eliminating them would severely alter application semantics; and, leverage fast floating-point hardware when it is safe to do so. We implement the constant-time transformations with our own domain-specific language that produces LLVM bitcode. Since the transformations themselves equate to bit surgery on already complicated floating-point arithmetic, we use a satisfiability modulo theories (SMT) solver to ensure that their behavior fits our specifications. Finally, we find that CTFP neither breaks real world applications nor incurs overwhelming overhead.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

12 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Formal verification of a constant-time preserving C compiler cites Verifying Constant-Time Implementations
  • Formal verification of a constant-time preserving C compiler cites IODINE: Verifying Constant-Time Execution of Hardware
  • On the effectiveness of mitigations against floating-point timing channels cites Verifying Constant-Time Implementations
  • Constantine: Automatic Side-Channel Resistance Using Efficient Control and Data Flow Linearization cites Strong and Efficient Cache Side-Channel Protection using Hardware Transactional Memory
  • IODINE: Verifying Constant-Time Execution of Hardware cites On the effectiveness of mitigations against floating-point timing channels
  • IODINE: Verifying Constant-Time Execution of Hardware cites Verifying Constant-Time Implementations
  • Rendered Private: Making GLSL Execution Uniform to Prevent WebGL-based Browser Fingerprinting cites On the effectiveness of mitigations against floating-point timing channels
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers12

  1. Telekine: Secure Computing with Cloud GPUsTyler Hunt, Zhipeng Jia, Vance Miller, Ariel Szekely et al.NSDI 2020 · 108 citations
  2. Formal verification of a constant-time preserving C compilerGilles Barthe, Sandrine Blazy, Benjamin Grégoire, Rémi Hutin et al.POPL 2020 · 77 citations
  3. IODINE: Verifying Constant-Time Execution of HardwareKlaus von Gleissenthall, Rami Gökhan Kici, Deian Stefan, Ranjit JhalaUSENIX Security 2019 · 45 citations
  4. Constantine: Automatic Side-Channel Resistance Using Efficient Control and Data Flow LinearizationPietro Borrello, Daniele Cono D'Elia, Leonardo Querzoni, Cristiano GiuffridaCCS 2021 · 43 citations
  5. Rendered Private: Making GLSL Execution Uniform to Prevent WebGL-based Browser FingerprintingShujiang Wu, Song Li, Yinzhi Cao, Ningfei WangUSENIX Security 2019 · 27 citations

Builds on6

  1. T-SGX: Eradicating Controlled-Channel Attacks Against Enclave ProgramsMing-Wei Shih, Sangho Lee, Taesoo Kim, Marcus PeinadoNDSS 2017 · 431 citations
  2. Verifying Constant-Time ImplementationsJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, François Dupressoir et al.USENIX Security 2016 · 274 citations
  3. Strong and Efficient Cache Side-Channel Protection using Hardware Transactional MemoryDaniel Gruss, Julian Lettner, Felix Schuster, Olga Ohrimenko et al.USENIX Security 2017 · 254 citations
  4. Constant-Time Callees with Variable-Time CallersCesar Pereida García, Billy Bob BrumleyUSENIX Security 2017 · 63 citations
  5. On the effectiveness of mitigations against floating-point timing channelsDavid Kohlbrenner, Hovav ShachamUSENIX Security 2017 · 40 citations

Related papers

  1. VeCT: Secure and Efficient Constant-Time Code Rewriting with Vector ExtensionsQisheng Jiang, Danfeng ZhangUSENIX Security 2026
  2. SynthCT: Towards Portable Constant-Time CodeSushant Dinesh, Grant Garrett-Grossman, Christopher W. FletcherNDSS 2022
  3. Towards Efficient Verification of Constant-Time Cryptographic ImplementationsLuwei Cai, Fu Song, Taolue ChenFSE 2024 · 4 citations
  4. Secure, Precise, and Fast Floating-Point Operations on x86 ProcessorsAshay Rane, Calvin Lin, Mohit TiwariUSENIX Security 2016 · 34 citations
  5. Accelerating and verifying constant-time modular inversionDaniel J. Bernstein, Han-Ting Chen, John R. Harrison, Cesare Huang et al.EUROCRYPT 2026 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines