{
  "id": "2024/2040",
  "url": "https://opencryptology.org/2024/2040",
  "original_url": "https://eprint.iacr.org/2024/2040",
  "title": "Verified Foundations for Differential Privacy",
  "authors": [
    "Markus de Medeiros",
    "Muhammad Naveed",
    "Tancrède Lepoint",
    "Temesghen Kahsai",
    "Tristan Ravitch",
    "Stefan Zetzsche",
    "Anjali Joshi",
    "Joseph Tassarotti",
    "Aws Albarghouthi",
    "Jean-Baptiste Tristan"
  ],
  "affiliations": null,
  "abstract": "Differential privacy (DP) has become the gold standard for privacy-preserving data analysis, but implementing\nit correctly has proven challenging. Prior work has focused on verifying DP at a high level, assuming the\nfoundations are correct and a perfect source of randomness is available. However, the underlying theory of\ndifferential privacy can be very complex and subtle. Flaws in basic mechanisms and random number generation\nhave been a critical source of vulnerabilities in real-world DP systems.\n\nIn this paper, we present SampCert, the first comprehensive, mechanized foundation for differential privacy.\nSampCert is written in Lean with over 12,000 lines of proof. It offers a generic and extensible notion of DP, a\nframework for constructing and composing DP mechanisms, and formally verified implementations of Laplace\nand Gaussian sampling algorithms. SampCert provides (1) a mechanized foundation for developing the next\ngeneration of differentially private algorithms, and (2) mechanically verified primitives that can be deployed in\nproduction systems. Indeed, SampCert’s verified algorithms power the DP offerings of Amazon Web Services\n(AWS), demonstrating its real-world impact.\n\nSampCert’s key innovations include: (1) A generic DP foundation that can be instantiated for various DP\ndefinitions (e.g., pure, concentrated, Rényi DP); (2) formally verified discrete Laplace and Gaussian sampling\nalgorithms that avoid the pitfalls of floating-point implementations; and (3) a simple probability monad and\nnovel proof techniques that streamline the formalization. To enable proving complex correctness properties of\nDP and random number generation, SampCert makes heavy use of Lean’s extensive Mathlib library, leveraging\ntheorems in Fourier analysis, measure and probability theory, number theory, and topology.",
  "category": "Implementation",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“Verified Foundations for Differential Privacy” by Markus de Medeiros, Muhammad Naveed, Tancrède Lepoint, Temesghen Kahsai, Tristan Ravitch, Stefan Zetzsche, Anjali Joshi, Joseph Tassarotti, Aws Albarghouthi, Jean-Baptiste Tristan, Cryptology ePrint Archive, Paper 2024/2040, https://eprint.iacr.org/2024/2040. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": false,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2024-12-18T02:45:39Z",
    "updated": "2024-12-18T02:45:39Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2024/2040.pdf",
    "sha256": "207832a793fc7aa3b8538ad04b94981510d8350492acfd46328134ccae318ca3",
    "size": 720478,
    "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/2024/2040/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/2024/2040.pdf",
      "size": 720478,
      "sha256": "207832a793fc7aa3b8538ad04b94981510d8350492acfd46328134ccae318ca3",
      "is_default_pdf": true
    }
  ],
  "other_sources": [
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2024/2040.pdf",
      "captured_at": "2026-04-28T17:20:00Z",
      "size": 720478
    },
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20260214042744id_/https://eprint.iacr.org/2024/2040.pdf",
      "captured_at": "2026-02-14T04:27:44Z",
      "size": 702077
    }
  ],
  "bibtex": "@misc{cryptoeprint:2024/2040,\n      author = {Markus de Medeiros and Muhammad Naveed and Tancrède Lepoint and Temesghen Kahsai and Tristan Ravitch and Stefan Zetzsche and Anjali Joshi and Joseph Tassarotti and Aws Albarghouthi and Jean-Baptiste Tristan},\n      title = {Verified Foundations for Differential Privacy},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2024/2040},\n      year = {2024},\n      url = {https://eprint.iacr.org/2024/2040}\n}"
}
