Paper 2025/1240

pracy: A Practical Compiler for Attribute-Based Encryption in Python

Sven Argo, Ruhr University Bochum
Marloes Venema, University of Wuppertal
Adrian Ackermann, University of Wuppertal
Tim Güneysu, Ruhr University Bochum, German Research Centre for Artificial Intelligence
Abstract

Attribute-based encryption (ABE) is a versatile primitive that has been considered in many applications to enforce access control cryptographically. To actually benefit from ABE in practice, we require implementations of schemes that satisfy all the properties that are needed. Many theoretical advancements have been made to attain such properties, ultimately resulting in powerful abstractions such as pair encodings. To build an ABE scheme, we use a compiler (in the theoretical sense), which transforms a provably secure pair encoding scheme into a provably secure ABE scheme. Although several such compilers have been introduced, they all abstract away many details that are relevant for engineers, which can hinder the implementation of schemes in practice. To address this problem, we propose pracy, which is a tool that automatically implements an ABE scheme from an input pair encoding scheme. To achieve this, we first note that we need to overcome a general issue in any automation efforts – including automated optimization and security analysis – in the field of pairing-based cryptography. In particular, there exist no parsers that properly model the interaction between the predicate and the pair encodings. Therefore, we devise a new formal model and type system, which capture this interaction in a way that is compatible with automated implementation efforts. To illustrate the feasibility of our model and system, we construct pracy, which is a (practical) compiler in Python that can implement ABE schemes in multiple target programming languages such as Python and C/C++. With pracy, we not only make the implementation of ABE schemes from pair encodings more accessible to practitioners, we realize the potential that pair encodings have to simplify implementation efforts.

Metadata
Available format(s)
PDF
Category
Implementation
Publication info
A major revision of an IACR publication in TCHES 2025
Keywords
attribute-based encryptionimplementationcompilerautomation
Contact author(s)
sven argo @ rub de
venema @ uni-wuppertal de
tim gueneysu @ rub de
History
2025-07-11: approved
2025-07-04: received
See all versions
Short URL
https://ia.cr/2025/1240
License
Creative Commons Attribution-NonCommercial
CC BY-NC

BibTeX

@misc{cryptoeprint:2025/1240,
      author = {Sven Argo and Marloes Venema and Adrian Ackermann and Tim Güneysu},
      title = {pracy: A Practical Compiler for Attribute-Based Encryption in Python},
      howpublished = {Cryptology {ePrint} Archive, Paper 2025/1240},
      year = {2025},
      url = {https://eprint.iacr.org/2025/1240}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.