{
  "id": "2025/1359",
  "url": "https://opencryptology.org/2025/1359",
  "original_url": "https://eprint.iacr.org/2025/1359",
  "title": "Runtime Code Generation for Constant-Time Secret-Indexed Array Accesses: Applications to PERK and NTRU",
  "authors": [
    "Décio Luiz Gazzoni Filho",
    "Rafael G. Flores e Silva",
    "Alessandro Budroni",
    "Marco Palumbi",
    "Gora Adj"
  ],
  "affiliations": null,
  "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.",
  "category": "Implementation",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“Runtime Code Generation for Constant-Time Secret-Indexed Array Accesses: Applications to PERK and NTRU” by Décio Luiz Gazzoni Filho, Rafael G. Flores e Silva, Alessandro Budroni, Marco Palumbi, Gora Adj, Cryptology ePrint Archive, Paper 2025/1359, https://eprint.iacr.org/2025/1359. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": false,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2025-07-25T10:27:43Z",
    "updated": "2025-07-25T10:27:43Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2025/1359.pdf",
    "sha256": "c5417d1cbcd077557cc826a0182dd5b4a73347d9076355b693d26bf23b8ddc88",
    "size": 537957,
    "source": "github-mirror",
    "source_date": "2026-04-28T17:20:00Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "eprint_size": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2025/1359/versions/20260428T172000Z.pdf",
      "captured_at": "2026-04-28T17:20:00Z",
      "label": "copy captured 2026-04-28",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2025/1359.pdf",
      "size": 537957,
      "sha256": "c5417d1cbcd077557cc826a0182dd5b4a73347d9076355b693d26bf23b8ddc88",
      "is_default_pdf": true
    }
  ],
  "other_sources": [
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2025/1359.pdf",
      "captured_at": "2026-04-28T17:20:00Z",
      "size": 537957
    },
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20251216152111id_/https://eprint.iacr.org/2025/1359.pdf",
      "captured_at": "2025-12-16T15:21:11Z",
      "size": 532333
    }
  ],
  "bibtex": "@misc{cryptoeprint:2025/1359,\n      author = {Décio Luiz Gazzoni Filho and Rafael G. Flores e Silva and Alessandro Budroni and Marco Palumbi and Gora Adj},\n      title = {Runtime Code Generation for Constant-Time Secret-Indexed Array Accesses: Applications to PERK and NTRU},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2025/1359},\n      year = {2025},\n      url = {https://eprint.iacr.org/2025/1359}\n}"
}
