Developed by Akinyele, Joseph A, Charm Crypto is a simplified Python wrapper of PBC Library. There are many researchers using this library to build prototypes for their cryptographic protocols. In fact, its performance is comparable to the original C version of PBC (I also did some experiments and found that it is actually faster than JPBC, the Java wrapper of PBC).
To use Charm Crypto in Mac OS Catalina, you need to have the following items preinstalled:
It is for running the subsequent commands below.
To install the latest version of homebrew, check the script in the official brew website.
2. GMP Library
brew install gmp
3. PBC Library
brew install pbc
brew install email@example.com
brew install wget
Charm Crypto Installation
After installing the dependencies above, run the following steps:
1. Download the latest source code
git clone https://github.com/JHUISI/charm.git ; cd charm
2. Run the configure in root privileges and with the brew-installed version of openssl
sudo ./configure.sh --extra-cflags="-I/usr/local/opt/openssl/include" --extra-ldflags="-L/usr/local/opt/openssl/lib
(Extra CFLAGS and LDFLAGS are required because brew will not install the openssl into /usr/lib)
3. Run the compilation and installation
sudo make install
4. Run the post-installation testing
sudo make test
After installation, you should be able to import schemes.* and charm.* freely in Python3 freely.
Once you see most of the items are passed, you can start programming with Charm Crypto.
Some example schemes can be found in charm/schemes directory.