{
  "id": "2007/039",
  "url": "https://opencryptology.org/2007/039",
  "original_url": "https://eprint.iacr.org/2007/039",
  "title": "New Branch Prediction Vulnerabilities in OpenSSL and Necessary Software Countermeasures",
  "authors": [
    "Onur Aciicmez",
    "Shay Gueron",
    "Jean-Pierre Seifert"
  ],
  "affiliations": null,
  "abstract": "Software based side-channel attacks allow an unprivileged spy\nprocess to extract secret information from a victim\n(cryptosystem) process by exploiting some indirect leakage of\n``side-channel'' information. It has been realized that some\ncomponents of modern computer microarchitectures leak certain\nside-channel information and can create unforeseen security\nrisks. An example of such MicroArchitectural Side-Channel\nAnalysis is the Cache Attack --- a group of attacks that exploit\ninformation leaks from cache latencies.\nPublic awareness of Cache Attack vulnerabilities lead software\nwriters of OpenSSL (version 0.9.8a and subsequent versions) to\nincorporate countermeasures for preventing these attacks.\n\nIn this paper, we present a new and yet unforeseen side channel\nattack that is enabled by the recently published Simple Branch\nPrediction Analysis (SBPA) which is another type of\nMicroArchitectural Analysis. We\nshow that modular inversion --- a critical primitive in public\nkey cryptography --- is a natural target of SBPA attacks because\nit typically uses the Binary Extended Euclidean algorithm whose\nnature is an input-centric sequence of conditional branches. Our\nresults show that SBPA can be used to extract secret parameters\nduring the execution of the Binary Extended Euclidean algorithm.\nThis poses a new potential risk to crypto-applications such as\nOpenSSL, which already employs Cache Attack countermeasures.\nThus, it is necessary to develop new software mitigation\ntechniques for BPA and incorporate them with cache analysis\ncountermeasures in security applications.\n\nTo mitigate this new risk in full generality, we apply a\nsecurity-aware algorithm design methodology and propose some\nchanges to the CRT-RSA algorithm flow. These changes either avoid\nsome of the steps that require modular inversion, or remove the\ncritical information leak from this procedure.\n\nIn addition, we also show by example that, independently of the\nrequired changes in the  algorithms, careful software analysis is\nalso required in order to assure that the software implementation\ndoes not inadvertently introduce branches that may expose the\napplication to SBPA attacks.\n\nThese offer several simple ways for modifying OpenSSL in order to\nmitigate Branch Prediction Attacks.",
  "category": "Implementation",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“New Branch Prediction Vulnerabilities in OpenSSL and Necessary Software Countermeasures” by Onur Aciicmez, Shay Gueron, Jean-Pierre Seifert, Cryptology ePrint Archive, Paper 2007/039, https://eprint.iacr.org/2007/039. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": true,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2007-02-14T10:36:30Z",
    "updated": "2007-02-14T10:36:30Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2007/039.pdf",
    "sha256": "490b1dd13805da44f469b6bcddf02407b87890507b00ccea648af2cfbb827f39",
    "size": 256579,
    "source": "github-mirror",
    "source_date": "2019-02-25T16:13:43Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2007/039/versions/20190225T161343Z.pdf",
      "captured_at": "2019-02-25T16:13:43Z",
      "label": "copy captured 2019-02-25",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2007/039.pdf",
      "size": 256579,
      "sha256": "490b1dd13805da44f469b6bcddf02407b87890507b00ccea648af2cfbb827f39",
      "is_default_pdf": true
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20260305111031id_/https://eprint.iacr.org/2007/039.pdf",
      "captured_at": "2026-03-05T11:10:31Z",
      "size": 230931
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2007/039.pdf",
      "captured_at": "2019-02-25T16:13:43Z",
      "size": 256579
    }
  ],
  "bibtex": "@misc{cryptoeprint:2007/039,\n      author = {Onur Aciicmez and Shay Gueron and Jean-Pierre Seifert},\n      title = {New Branch Prediction Vulnerabilities in OpenSSL and Necessary Software Countermeasures},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2007/039},\n      year = {2007},\n      url = {https://eprint.iacr.org/2007/039}\n}"
}
