Having Fun With BN-curves

Prof Bill Buchanan OBE FRSE
Coinmonks
Published in
5 min readJul 28, 2018

--

A demonstration of key sharing BN-curves is here.

Introduction

Elliptic curves are used fairly extensively in public key encryption (such as in Bitcoin and Tor). A BN-curve (Barreto-Naehrig curve) [paper] defines an elliptic curve which can be used for pairings that allow for a high security and efficiency level. This article uses pairings over a 256-bit BN curve and derives a signature for a message, and also outlines a method for where Bob, Alice and Carol can generate a shared key.

Elliptic Curve key pairing is also used with zk-SNARKs and zero-knowledge proofs. It can be used for “encrypted multiplication”.

How do they work?

For an Elliptic Curve Cryptography (ECC) we generate a 256-bit random number for the private key (p), and then take a point (G) [x,y] on the Elliptic Curve and then multiply it by the private key to get another point (p×x,p×y). In this way we get P=p×G, and where G is a known point on the Elliptic Curve, P is our public key and p is our private key.

With pairings we can derive more complex relationships between the points, such as if P=G×p, Q=G×q and R=G×r, we can check to see if r=p×q, but where we only know P, Q and R (the public values). At the current time we cannot compute p from P=p×G, even if we know P and G. The exposure…

--

--

Prof Bill Buchanan OBE FRSE
Coinmonks

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