Charm: A tool for rapid cryptographic prototyping

Charm is a framework for rapidly prototyping advanced cryptosystems.  Based on the Python language, it was designed from the ground up to minimize development time and code complexity while promoting the reuse of components.

Charm uses a hybrid design: performance intensive mathematical operations are implemented in native C modules, while cryptosystems themselves are written in a readable, high-level language.  Charm additionally provides a number of new components to facilitate the rapid development of new schemes and protocols.

Features of Charm include:

  • Support for various mathematical settings, including integer rings/fields, bilinear and non-bilinear Elliptic Curve groups.
  • Base crypto library, including symmetric encryption schemes, hash functions, PRNGs.
  • Standard APIs for constructions such as digital signature, encryption, commitments.
  • A “protocol engine” to simplify the process of implementing multi-party protocols.
  • An integrated compiler for interactive and non-interactive ZK proofs.
  • Integrated benchmarking capability.

Charm ships with a library of implemented cryptosystems.  This library includes public key encryption schemes, identity-based encryption schemes, attribute-based encryption schemes, digital signatures, privacy-preserving signatures, commitment schemes, zero-knowledge proofs, and interactive protocols such as anonymous credential and oblivious transfer schemes.

To cite Charm, use the following bibtex reference:

  journal={Journal of Cryptographic Engineering},
  title={Charm: a framework for rapidly prototyping cryptosystems},
  keywords={Applied cryptography; Protocols; Software; Privacy},
  author={Akinyele, Joseph A. and Garman, Christina and Miers, Ian 
          and Pagano, Matthew W. and Rushanan, Michael 
          and Green, Matthew and Rubin, Aviel D.},

This work was made possible by NSF grant CNS 1010928 and Grant Number HHS 90TR0003/01.  Its contents are solely the responsibility of the authors and do not necessarily represent the official views of the HHS.


The Charm code repository is split into two branches: the dev branch (for Python 3.x) and the 2.7-dev branch (for Python 2.7).

To check out the dev branch (default):

git clone

To switch to the 2.7-dev branch:

git checkout 2.7-dev

To switch back to the dev branch:

git checkout dev


Want to contribute to the project? Here are a few ways you can help:

  • Troubleshoot and debug reported issues
  • Fork the dev or 2.7-dev branch, fix a bug, and send a pull request
  • Implement a cryptographic scheme from the literature and contribute as a pull request

If you would like to contribute in other ways, please let us know at:


Test Charm in your browser...Coming soon!