International Association for Cryptologic Research

International Association
for Cryptologic Research

Transactions on Cryptographic Hardware and Embedded Systems 2025

Let’s DOIT:

Using Intel’s Extended HW/SW Contract for Secure Compilation of Crypto Code


Santiago Arranz-Olmos
MPI-SP, Bochum, Germany

Gilles Barthe
MPI-SP, Bochum, Germany; IMDEA Software Institute, Madrid, Spain

Benjamin Grégoire
Inria, Sophia-Antipolis, France

Jan Jancar
Masaryk University, Brno, Czechia

Vincent Laporte
Inria, Nancy, France

Tiago Oliveira
SandboxAQ, Palo Alto, USA

Peter Schwabe
MPI-SP, Bochum, Germany; Radboud University, Nijmegen, The Netherlands


Keywords: data-operand-independent timing, Jasmin, high-assurance, constant-time code


Abstract

It is a widely accepted standard practice to implement cryptographic software so that secret inputs do not influence the cycle count. Software following this paradigm is often referred to as “constant-time” software and typically involves following three rules: 1) never branch on a secret-dependent condition, 2) never access memory at a secret-dependent location, and 3) avoid variable-time arithmetic operations on secret data. The third rule requires knowledge about such variable-time arithmetic instructions, or vice versa, which operations are safe to use on secret inputs. For a long time, this knowledge was based on either documentation or microbenchmarks, but critically, there were never any guarantees for future microarchitectures. This changed with the introduction of the data-operand-independent-timing (DOIT) mode on Intel CPUs and, to some extent, the data-independent-timing (DIT) mode on Arm CPUs. Both Intel and Arm document a subset of their respective instruction sets that are intended to leak no information about their inputs through timing, even on future microarchitectures if the CPU is set to run in a dedicated DOIT (or DIT) mode.In this paper, we present a principled solution that leverages DOIT to enable cryptographic software that is future-proof constant-time, in the sense that it ensures that only instructions from the DOIT subset are used to operate on secret data, even during speculative execution after a mispredicted branch or function return location. For this solution, we build on top of existing security type systems in the Jasmin framework for high-assurance cryptography.We then use our solution to evaluate the extent to which existing cryptographic software built to be “constant-time” is already secure in this stricter paradigm implied by DOIT and what the performance impact is to move from constant-time to future-proof constant-time.

Publication

IACR Transactions on Cryptographic Hardware and Embedded Systems, Volume 2025, Issue 3

Paper

Artifact

Artifact number
tches/2025/a28

Artifact published
September 1, 2025

Badge
IACR CHES Artifacts Functional

README

tar.bz2 (23241339 bytes)  

View repository

License

Some files in this archive are licensed under a different license. See the contents of this archive for more information.

Note that license information is supplied by the authors and has not been confirmed by the IACR.


BibTeX How to cite

Santiago Arranz-Olmos, Gilles Barthe, Benjamin Grégoire, Jan Jancar, Vincent Laporte, Tiago Oliveira, Peter Schwabe. (2025). Let’s DOIT: Using Intel’s Extended HW/SW Contract for Secure Compilation of Crypto Code. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2025(3), 644–667. https://doi.org/10.46586/tches.v2025.i3.644-667. Artifact at https://artifacts.iacr.org/tches/2025/a28.