Skip to content

Charm installation guide

wanzhiguo edited this page Jun 10, 2018 · 4 revisions

Before installing Charm, there are a few prerequisites that need to be installed on your system. These are:

Subversion

  • sudo apt-get install subversion

m4

  • sudo apt-get install m4

Python 3 (this is an optional, though recommended, step)

  • sudo apt-get install python3

Header files/static library

  • sudo apt-get install python-dev (if you did NOT install Python 3)

  • sudo apt-get install python3-setuptools python3-dev (for Python 3.x)

libssl-dev (only necessary if you did not install Python 3)

  • sudo apt-get install libssl-dev

GMP

  • sudo apt-get install libgmp-dev

Next, we will install Charm. Navigate to your Charm directory.

We must first run the configuration script:

  • sudo ./configure.sh

Install PBC from source

  • Download source from PBC website: wget https://crypto.stanford.edu/pbc/files/pbc-0.5.14.tar.gz

  • tar xzvf pbc-0.5.14.tar.gz

  • sudo apt install flex bison

  • ./configure LDFLAGS="-lgmp"

  • make

  • sudo make install

  • sudo ldconfig

Now we can build and install Charm:

  • sudo make

  • sudo make install

  • Or you can install via pip: pip install charm-crypto==0.43, without download source code of charm-crypto.

And finally we must rebuild the search path for libraries

  • sudo ldconfig

Run Pytests

  • sudo make test