Simple Examples of Pair-based Cryptography

--

Pair-based cryptography can do no wrong just now, and is often at the core of many of the current advances in privacy, zero-knowledge proof and multi-party computation. You will find it in signature aggregation — and where we can take many signers and create a single signature from their public keys — and in privacy-preserving methods.

So you might read some fairly complicated research papers and even have a look at the Wikipedia page [here], but you probably still can’t make much sense of them. If this is so, then let’s develop a bit of code that illustrates the core concept of pair-based cryptography (bi-linearity and commutative properties).

With the pairing 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:GG2→GT, and where g1 is the generator for G1 and g2 is the generator for G2. If we have the points of U1 and U2 on G1 and V1 and V2 on G2, we get the bi-linear 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}

If G1and G2 are the same group, we get a symmetric grouping (G1=G2=G), and the following commutative property will apply:

--

--

Prof Bill Buchanan OBE FRSE
ASecuritySite: When Bob Met Alice

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.