Note: This is an experimental implementation of optimal Ate pairing in Java. It has never been used in production. Use it at your risk.
An admissible bilinear pairing is a function , where and are cyclic subgroups of elliptic curve groups, is a cyclic subgroup of the multiplicative group of a finite field, , and have order r, and the following conditions hold:
• Non-degeneracy:
Also, it immediately follows that
A BN curve is an elliptic curve over a finite prime field , with prime order n and embedding degree k = 12.
The equation of the curve is
The curve order and the characteristic of are parameterised as:
Hence the trace (of Frobenius) of the curve
Finding b is actually very simple: take the smallest b ≠ 0 such that b + 1 is a quadratic residue modp and the point , which is clearly on the curve. [3]