Paper 2023/1713
High-assurance zeroization
Abstract
In this paper, we revisit the problem of erasing sensitive data from memory and registers when returning from a cryptographic routine. While the problem and related attacker model are fairly easy to phrase, it turns out to be surprisingly hard to guarantee security in this model when implementing cryptography in common languages such as C/C++ or Rust. We revisit the issues surrounding zeroization and then present a principled solution in the sense that it guarantees that sensitive data is erased and it clearly defines when this happens. We implement our solution as an extension to the formally verified Jasmin compiler and extend the correctness proof of the compiler to cover zeroization. We show that the approach seamlessly integrates with state-of-the-art protections against microarchitectural attacks by integrating zeroization into Libjade, a cryptographic library written in Jasmin with systematic protections against timing and Spectre-v1 attacks. We present benchmarks showing that, in many cases, the overhead of zeroization is barely measurable and stays below 2% except for highly optimized symmetric crypto routines on short inputs.
Metadata
- Available format(s)
- Category
- Implementation
- Publication info
- Published by the IACR in TCHES 2024
- DOI
- 10.46586/tches.v2024.i1.375-397
- Keywords
- Secret erasureclear stack memorydefense in depthhigh-assurance cryptography
- Contact author(s)
-
santiago arranz-olmos @ mpi-sp org
gilles barthe @ mpi-sp org
mail @ ruben-gonzalez de
benjamin gregoire @ inria fr
Vincent Laporte @ inria fr
jean-christophe lechenet @ inria fr
tiago oliveira @ mpi-sp org - History
- 2024-08-17: last of 3 revisions
- 2023-11-05: received
- See all versions
- Short URL
- https://ia.cr/2023/1713
- License
-
CC0
BibTeX
@misc{cryptoeprint:2023/1713, author = {Santiago Arranz Olmos and Gilles Barthe and Ruben Gonzalez and Benjamin Grégoire and Vincent Laporte and Jean-Christophe Léchenet and Tiago Oliveira and Peter Schwabe}, title = {High-assurance zeroization}, howpublished = {Cryptology {ePrint} Archive, Paper 2023/1713}, year = {2023}, doi = {10.46586/tches.v2024.i1.375-397}, url = {https://eprint.iacr.org/2023/1713} }