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.
To cite Charm, use the following bibtex reference:
@articlecharm13 year=2013, issn=2190-8508, journal=Journal of Cryptographic Engineering, volume=3, number=2, doi=10.1007/s13389-013-0057-3, title=Charm: a framework for rapidly prototyping cryptosystems, url=http://dx.doi.org/10.1007/s13389-013-0057-3, publisher=Springer-Verlag, 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., pages=111-128,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.
CodeThe Charm code repository is split into two branches: the dev branch (for Python 3.x) and the 2.7-devbranch (for Python 2.7).
To check out the dev branch (default):
git clone https://github.com/JHUISI/charm.gitTo switch to the 2.7-dev branch:
git checkout 2.7-devTo switch back to the dev branch:
git checkout dev