Crypto Pairing By Example
I am fascinated by cryptography pairing (pairing-friendly curve cryptography) within elliptic curves, and the potential it gives for signing, anonymisation and zero-knowledge proofs. So let’s show the potential, and demonstrate these with examples. I will be using the MIRACL Go libary, and which is a super fast implementation of crypto pairing [here].
With pair-based cryptography we have two cyclic groups (G1 and G2), and which are of an order of a prime number (n). A pairing on (G1,G2,GT) defines the function e:G1×G2→GT, and where g1 is a generator for G1 and g2 is a generator for G2. If we have the points of U1 and U2 on G1 and V1 and V2 on G2, we get the bilinear mapping of:
e(U1+U2,V1)=e(U1,V1)×e(U2,V1)
e(U1,V1+V2)=e(U1,V1)×e(U1,V2)
If U is a point on G1, and V is a point on G2, we get:
e(aU,bV)=e(U,V)^{ab}
In this example, we will prove these mappings for a pairing for e(aU,bV)=e(U,V)^{ab}. The outline coding using the library from the MIRACL library [here] is [here]:
package mainimport (
"os"
"fmt"
"github.com/miracl/core/go/core/BN254"
"strconv"
)func main() { argCount := len(os.Args[1:])
a1:=5
b1:=10 if (argCount>0)…