A bilinear pairing library for petlib.
Project description
The bplib is a library implementing support for computations on groups supporting bilinear pairings, as used in modern cryptography.
It is based on the OpenPairing library by Diego Aranha (https://github.com/dfaranha/OpenPairing), which is itself based on, and compatible with, OpenSSL math functions (bn and ec). The bplib is compatible with petlib types including petlib.bn and the group G1 is a petlib.ec EC group. Along with petlib, they provide easy to use support for maths and ciphers used in modern Privacy Enhancing Technologies.”
A set of bilinear EC groups is defined as:
>>> G = bp.BpGroup()
Such a BpGroup describes 3 groups G1, G2 and GT such that pair(G1,G2)->GT. Generators for the groups G1 and G2 are denoted by:
>>> g1, g2 = G.gen1(), G.gen2()
The special pair operation computes to pairing into GT:
>>> gt = G.pair(g1, g2)
Operations are defined on all elements of G1, G2 or GT in a natural additive infix notation for G1 and G2, and a multiplicative notation for GT:
>>> gt6 = gt**6
As expected the pair operations is additive:
>>> G.pair(g1, 6*g2) == gt6 True >>> G.pair(6*g1, g2) == gt6 True >>> G.pair(2*g1, 3*g2) == gt6 True
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
Built Distribution
File details
Details for the file bplib_fork-0.0.63.tar.gz
.
File metadata
- Download URL: bplib_fork-0.0.63.tar.gz
- Upload date:
- Size: 40.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5f6ac7b1d020cc429133c4b41ee5b46d32ba9e37bdc4e3faec350ff18d5423a |
|
MD5 | 14852b4f9a9aa96d91a3aa6310c8b611 |
|
BLAKE2b-256 | 8fffc869b390393a36d49ee37bbf99a885c7ac44de97a4d2bba6a4a873527e45 |
File details
Details for the file bplib_fork-0.0.63-cp37-cp37m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: bplib_fork-0.0.63-cp37-cp37m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 101.9 kB
- Tags: CPython 3.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f978feccbca0fc20752eea881668df32de93e52cb42b294350257b1c327bb4d |
|
MD5 | 299e9c20dbaccd543e42bef752f38d36 |
|
BLAKE2b-256 | 5bf84d697c06d3b5ebe3ebefff93b29bed280f12d7f1cfecd72af53db863f2d4 |