Paper 2025/1359

Runtime Code Generation for Constant-Time Secret-Indexed Array Accesses: Applications to PERK and NTRU

Décio Luiz Gazzoni Filho, State University of Londrina
Rafael G. Flores e Silva, State University of Londrina
Alessandro Budroni, Technology Innovation Institute
Marco Palumbi, Technology Innovation Institute
Gora Adj, Technology Innovation Institute
Abstract

One of the main guidelines to prevent timing side-channel attacks against cryptographic implementations is to avoid array accesses indexed by secret data. However, alternatives and countermeasures often incur significant performance losses. We propose a novel methodology for secure, constant-time implementation of algorithms that read and write to small arrays with secret-dependent indices, with a constant-factor performance impact compared to timing-unprotected accesses. It is specifically suitable for simple in-order CPUs like those in embedded systems, e.g., the ARM Cortex-M4 core. Although our methodology is general, we illustrate it with secure implementation of permutation operations, such as composition, inversion, and sampling, the latter using the Fisher-Yates shuffle. We apply this methodology to the post-quantum cryptosystems PERK and NTRU, bridging most of the performance gap to unprotected implementations that employ secret-dependent array accesses.

Metadata
Available format(s)
PDF
Category
Implementation
Publication info
Published elsewhere. LATINCRYPT 2025
Keywords
ShufflingConstant-time implementationPERKNTRUPost-quantum Cryptography
Contact author(s)
dgazzoni @ uel br
rafael guilhermefs @ uel br
alessandro budroni @ tii ae
marco palumbi @ tii ae
gora adj @ tii ae
History
2025-07-25: approved
2025-07-25: received
See all versions
Short URL
https://ia.cr/2025/1359
License
Creative Commons Attribution
CC BY

BibTeX

@misc{cryptoeprint:2025/1359,
      author = {Décio Luiz Gazzoni Filho and Rafael G. Flores e Silva and Alessandro Budroni and Marco Palumbi and Gora Adj},
      title = {Runtime Code Generation for Constant-Time Secret-Indexed Array Accesses: Applications to {PERK} and {NTRU}},
      howpublished = {Cryptology {ePrint} Archive, Paper 2025/1359},
      year = {2025},
      url = {https://eprint.iacr.org/2025/1359}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.