Barebones Curve 25519

Beauty comes in many forms

--

Don’t you think there’s those wizards who perform black magic on the Intenret, and their secret magic is … elliptic curve cryptography (ECC). There’s Curve 25519, and NIST 512, with Montgomory this, and Weierstrass that, and base points, and private keys scalars and public key points. It’s a pace for wizards, but it’s not actually that difficult to understand. In this article, I outline a bit of code that takes Curve 25519 down to the bare metal, and expose its beauty.

The core of security on the Internet …

The core of the security on the Web comes down to … elliptic curve cryptography (ECC). With the ECDH (Elliptic Curve Diffie Hellman) handshake method, we have an almost perfect way to generate a shared key between Bob and Alice, without Eve ever finding it out. And so we turn to Curve 25519, and which is one of the best elliptic curves around. It uses the Montgomery curve form of:

And where we take a base point (G), and then create a private key (n), and then determine our public key (nG). With this nG is the point G added n times (G+G+…G). Curve 25519 was created by Daniel J Bernstein, and who has contributed so much to cybersecurity. The form he chose was:

--

--

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.