An open API service indexing awesome lists of open source software.

https://github.com/xu-cheng/pbc-bindings

:electric_plug: Bindings for Pairing-Based Cryptography (libpbc)
https://github.com/xu-cheng/pbc-bindings

bindings cplusplus cplusplus-14 cryptography pbc python ruby swig

Last synced: about 2 months ago
JSON representation

:electric_plug: Bindings for Pairing-Based Cryptography (libpbc)

Awesome Lists containing this project

README

          

# Bindings for Pairing-Based Cryptography (libpbc)

This project offers (partial) C++14 and SWIG bindings for [libpbc](https://crypto.stanford.edu/pbc/).
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.

```cpp
#include
using namespace pbc;
```

### SWIG

[SWIG](http://www.swig.org) 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
```bash
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=ON
make
```
Python library files will be built into `swig/python`.

* Ruby
```bash
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:

```bash
make test
#OR
make test-verbose
```

## Author

* [Xu Cheng](https://xuc.me)

## License

MIT License.