{
  "id": "2023/135",
  "url": "https://opencryptology.org/2023/135",
  "original_url": "https://eprint.iacr.org/2023/135",
  "title": "Uncovering Vulnerabilities in Smartphone Cryptography: A Timing Analysis of the Bouncy Castle RSA Implementation",
  "authors": [
    "Sarani Bhattacharya",
    "Dilip Kumar Shanmugasundaram Veeraraghavan",
    "Shivam Bhasin",
    "Debdeep Mukhopadhyay"
  ],
  "affiliations": null,
  "abstract": "Modern day smart phones are used for performing several sensitive operations, including online payments. Hence, the underlying cryptographic libraries are expected to adhere to proper security measures to ensure that there are no exploitable leakages. In particular, the implementations should be constant time to prevent subsequent timing based side channel analysis which can leak secret keys. Unfortunately, we unearth in this paper a glaring timing variation present in the Bouncy-Castle implementation of RSA like ciphers which is based on the BigInteger Java library to support large number theoretic computations. We follow up the investigation with a step-by-step procedure to exploit the timing variations to retrieve the complete secret of windowed RSA-2048 implementation. The entire analysis is possible with a single set of timing observation, implying that the timing observation can be done at the onset, followed by some post processing which does not need access to the phone. We have validated our analysis on Android Marshmallow 6.0, Nougat 7.0 and Oreo 8.0 versions. Interestingly, we note that for newer phones the timing measurement is more accurate leading to faster key retrievals.",
  "category": "Attacks and cryptanalysis",
  "license": {
    "code": "CC0",
    "url": "https://creativecommons.org/publicdomain/zero/1.0/",
    "label": "CC0 1.0",
    "attribution": "“Uncovering Vulnerabilities in Smartphone Cryptography: A Timing Analysis of the Bouncy Castle RSA Implementation” by Sarani Bhattacharya, Dilip Kumar Shanmugasundaram Veeraraghavan, Shivam Bhasin, Debdeep Mukhopadhyay, Cryptology ePrint Archive, Paper 2023/135, https://eprint.iacr.org/2023/135. Licensed under CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/).",
    "retroactive": false,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2023-02-05T20:49:29Z",
    "updated": "2023-02-05T20:49:29Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2023/135.pdf",
    "sha256": "fc5a07da8afdfe0e56a4dc4687ae5f028beb98d943141a0ced708566e6b78abe",
    "size": 1719820,
    "source": "github-mirror",
    "source_date": "2024-01-14T06:13:41Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2023/135/versions/20240114T061341Z.pdf",
      "captured_at": "2024-01-14T06:13:41Z",
      "label": "copy captured 2024-01-14",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2023/135.pdf",
      "size": 1719820,
      "sha256": "fc5a07da8afdfe0e56a4dc4687ae5f028beb98d943141a0ced708566e6b78abe",
      "is_default_pdf": true
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20260311075720id_/https://eprint.iacr.org/2023/135.pdf",
      "captured_at": "2026-03-11T07:57:20Z",
      "size": 1567367
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2023/135.pdf",
      "captured_at": "2024-01-14T06:13:41Z",
      "size": 1719820
    }
  ],
  "bibtex": "@misc{cryptoeprint:2023/135,\n      author = {Sarani Bhattacharya and Dilip Kumar Shanmugasundaram Veeraraghavan and Shivam Bhasin and Debdeep Mukhopadhyay},\n      title = {Uncovering Vulnerabilities in Smartphone Cryptography: A Timing Analysis of the Bouncy Castle RSA Implementation},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2023/135},\n      year = {2023},\n      url = {https://eprint.iacr.org/2023/135}\n}"
}
