Skip to main content

Python bindings for the relic toolkit

Project description

Python bindings for relic

python-relic (pyrelic for short) provides Python bindings for relic. Note though, that the bindings are driven by my personal needs and they do not cover the full relic API.

Dependencies

pyrelic requires the following dependencies to successfully build and install:

  • relic >= 0.5.0 with pairing support enabled.
  • Cython >= 0.28 (optional, only for building). If Cython is not available, the C files are not regenerated from their source.
  • pkgconfig (optional, only for building). If pkgconfig is not available, the build system assumes that relic can be linked as -lrelic.

Quick installation guide

If you are running Ubuntu 20.04, the easiest way to install pyrelic is via my PPA:

sudo add-apt-repository -u ppa:s-ramacher/ait
sudo apt install python3-pyrelic

It comes with a prebuilt version of relic configured for the pairing-friendly BLS12-381 curve.

Otherwise, pyrelic can be installed via pip:

pip install python-relic

or by running:

python3 setup.py install

Note though that these two approaches require a pairing-enabled build of relic to be available.

Examples

pyrelic includes some examples that demonstrate the use of the module and also showcases some pairing-based schemes:

License

The code is licensed under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-relic-0.2.tar.gz (11.9 kB view details)

Uploaded Source

File details

Details for the file python-relic-0.2.tar.gz.

File metadata

  • Download URL: python-relic-0.2.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for python-relic-0.2.tar.gz
Algorithm Hash digest
SHA256 262dcb325c466c1e94bbef4b5907b29f4355b96dc4dd180a700a6a0b9c5cafe6
MD5 0682d1e1441edd3c5f22b42a37868d4f
BLAKE2b-256 02230fa584f91e7645911824363c944573e5d7e32f6c6ac571aa1cdbfe22a635

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page