Skip to content

xu-cheng/pbc-bindings

Repository files navigation

Bindings for Pairing-Based Cryptography (libpbc)

This project offers (partial) C++14 and SWIG bindings for libpbc. Noted that not all of libpbc C functions have been ported.

How to use?

C++14

C++14 binding is head-only. Just copy the files inside include/ into your project.

#include <pbc/pbc.hpp>
using namespace pbc;

SWIG

SWIG offers bindings in a variety of high-level programming languages. Currently Python and Ruby bindings are supported and tested. However, it should be relatively easy to build binding in any language supported by SWIG. The SWIG interface files are located in swig/ folder.

  • Python
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=ON
make

Python library files will be built into swig/python.

  • Ruby
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_RUBY=ON
make

Ruby library files will be built into swig/ruby.

Development

To run test case:

make test
#OR
make test-verbose

Author

License

MIT License.

About

🔌 Bindings for Pairing-Based Cryptography (libpbc)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors