{
  "id": "2022/1270",
  "url": "https://opencryptology.org/2022/1270",
  "original_url": "https://eprint.iacr.org/2022/1270",
  "title": "Typing High-Speed Cryptography against Spectre v1",
  "authors": [
    "Basavesh Ammanaghatta Shivakumar",
    "Gilles Barthe",
    "Benjamin Grégoire",
    "Vincent Laporte",
    "Tiago Oliveira",
    "Swarn Priya",
    "Peter Schwabe",
    "Lucas Tabary-Maujean"
  ],
  "affiliations": null,
  "abstract": "The current gold standard of cryptographic software is to write efficient libraries with systematic protections against timing attacks. In order to meet this goal, cryptographic engineers increasingly use high-assurance cryptography tools. These tools guide programmers and provide rigorous guarantees that can be verified independently by library users. However, high-assurance tools reason about overly simple execution models that elide micro-architectural leakage. Thus, implementations validated by high-assurance cryptography tools remain potentially vulnerable to micro-architectural attacks such as Spectre or Meltdown.  Moreover, proposed countermeasures are not used in practice due to performance overhead.\n\nWe propose, analyze, implement and evaluate an approach for writing efficient cryptographic implementations that are protected against Spectre v1 attacks. Our approach ensures speculative constant-time, an information flow property which guarantees that programs are protected against Spectre v1. Speculative constant-time is enforced by means of a (value-dependent) information flow type system. The type system tracks security levels depending on whether execution is misspeculating. \n \nWe implement our approach in the Jasmin framework for  high assurance cryptography, and use it for protecting all  implementations of an experimental cryptographic library that includes highly optimized implementations of symmetric primitives, of elliptic-curve cryptography, and of Kyber, a lattice-based KEM  recently selected by NIST for standardization.  The performance impact of our protections is very low; for example, less than 1% for Kyber and essentially zero for X25519.",
  "category": "Implementation",
  "license": {
    "code": "CC0",
    "url": "https://creativecommons.org/publicdomain/zero/1.0/",
    "label": "CC0 1.0",
    "attribution": "“Typing High-Speed Cryptography against Spectre v1” by Basavesh Ammanaghatta Shivakumar, Gilles Barthe, Benjamin Grégoire, Vincent Laporte, Tiago Oliveira, Swarn Priya, Peter Schwabe, Lucas Tabary-Maujean, Cryptology ePrint Archive, Paper 2022/1270, https://eprint.iacr.org/2022/1270. Licensed under CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/).",
    "retroactive": false,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2022-09-25T15:13:09Z",
    "updated": "2026-07-26T11:21:26Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2022/1270.pdf",
    "sha256": "527b6e6120d550b5aeeeebd6549cf2d90ad44a02002e1aa6a22825b4bae9a0cc",
    "size": 776387,
    "source": "wayback",
    "source_date": "2026-09-07T01:39:31Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "eprint_size": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2022/1270/versions/20260907T013931Z.pdf",
      "captured_at": "2026-09-07T01:39:31Z",
      "label": "copy captured 2026-09-07",
      "source": "wayback",
      "source_url": "https://web.archive.org/web/20260907013931id_/https://eprint.iacr.org/2022/1270.pdf",
      "size": 776387,
      "sha256": "527b6e6120d550b5aeeeebd6549cf2d90ad44a02002e1aa6a22825b4bae9a0cc",
      "is_default_pdf": true
    },
    {
      "url": "https://opencryptology.org/2022/1270/versions/20240114T061334Z.pdf",
      "captured_at": "2024-01-14T06:13:34Z",
      "label": "copy captured 2024-01-14",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2022/1270.pdf",
      "size": 794161,
      "sha256": "e50dcb6a1ff1f7706357aac61dfbf037ccd104a0c059de62caaf27d96831c82b",
      "is_default_pdf": false
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20260907013931id_/https://eprint.iacr.org/2022/1270.pdf",
      "captured_at": "2026-09-07T01:39:31Z",
      "size": 711316
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2022/1270.pdf",
      "captured_at": "2024-01-14T06:13:34Z",
      "size": 794161
    }
  ],
  "bibtex": "@misc{cryptoeprint:2022/1270,\n      author = {Basavesh Ammanaghatta Shivakumar and Gilles Barthe and Benjamin Grégoire and Vincent Laporte and Tiago Oliveira and Swarn Priya and Peter Schwabe and Lucas Tabary-Maujean},\n      title = {Typing High-Speed Cryptography against Spectre v1},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2022/1270},\n      year = {2022},\n      url = {https://eprint.iacr.org/2022/1270}\n}"
}
