{
  "id": "2025/1240",
  "url": "https://opencryptology.org/2025/1240",
  "original_url": "https://eprint.iacr.org/2025/1240",
  "title": "pracy: A Practical Compiler for Attribute-Based Encryption in Python",
  "authors": [
    "Sven Argo",
    "Marloes Venema",
    "Adrian Ackermann",
    "Tim Güneysu"
  ],
  "affiliations": null,
  "abstract": "Attribute-based encryption (ABE) is a versatile primitive that has been\nconsidered in many applications to enforce access control cryptographically. To\nactually benefit from ABE in practice, we require implementations of schemes that\nsatisfy all the properties that are needed. Many theoretical advancements have been\nmade to attain such properties, ultimately resulting in powerful abstractions such\nas pair encodings. To build an ABE scheme, we use a compiler (in the theoretical\nsense), which transforms a provably secure pair encoding scheme into a provably\nsecure ABE scheme. Although several such compilers have been introduced, they\nall abstract away many details that are relevant for engineers, which can hinder the\nimplementation of schemes in practice.\nTo address this problem, we propose pracy, which is a tool that automatically\nimplements an ABE scheme from an input pair encoding scheme. To achieve this,\nwe first note that we need to overcome a general issue in any automation efforts –\nincluding automated optimization and security analysis – in the field of pairing-based\ncryptography. In particular, there exist no parsers that properly model the interaction\nbetween the predicate and the pair encodings. Therefore, we devise a new formal\nmodel and type system, which capture this interaction in a way that is compatible\nwith automated implementation efforts. To illustrate the feasibility of our model\nand system, we construct pracy, which is a (practical) compiler in Python that can\nimplement ABE schemes in multiple target programming languages such as Python\nand C/C++. With pracy, we not only make the implementation of ABE schemes\nfrom pair encodings more accessible to practitioners, we realize the potential that\npair encodings have to simplify implementation efforts.",
  "category": "Implementation",
  "license": {
    "code": "CC BY-NC",
    "url": "https://creativecommons.org/licenses/by-nc/4.0/",
    "label": "CC BY-NC 4.0",
    "attribution": "“pracy: A Practical Compiler for Attribute-Based Encryption in Python” by Sven Argo, Marloes Venema, Adrian Ackermann, Tim Güneysu, Cryptology ePrint Archive, Paper 2025/1240, https://eprint.iacr.org/2025/1240. Licensed under CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/).",
    "retroactive": false,
    "redistribute_verbatim_only": false,
    "non_commercial": true
  },
  "dates": {
    "submitted": "2025-07-04T08:11:16Z",
    "updated": "2025-07-04T08:11:16Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2025/1240.pdf",
    "sha256": "c2a426437a308fcb2eb359c7decab6b5c352fc2f3d2bceb3b669902a40b08349",
    "size": 1012091,
    "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/1240/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/1240.pdf",
      "size": 1012091,
      "sha256": "c2a426437a308fcb2eb359c7decab6b5c352fc2f3d2bceb3b669902a40b08349",
      "is_default_pdf": true
    }
  ],
  "other_sources": [
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2025/1240.pdf",
      "captured_at": "2026-04-28T17:20:00Z",
      "size": 1012091
    },
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20260107215548id_/https://eprint.iacr.org/2025/1240.pdf",
      "captured_at": "2026-01-07T21:55:48Z",
      "size": 993781
    }
  ],
  "bibtex": "@misc{cryptoeprint:2025/1240,\n      author = {Sven Argo and Marloes Venema and Adrian Ackermann and Tim Güneysu},\n      title = {pracy: A Practical Compiler for Attribute-Based Encryption in Python},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2025/1240},\n      year = {2025},\n      url = {https://eprint.iacr.org/2025/1240}\n}"
}
