Sitemap
Press enter or click to view image in full size

Member-only story

PEM, DER and OpenSSH Formats For Elliptic Curve Keys

6 min readJun 6, 2024

--

Elliptic curve cryptography (ECC) saved cybersecurity a whole lot of processing. Without it, we would be implementing key exchange with large prime numbers of over 2K bits. With it, our key exchanges are small, with a private key of around 256 bits and a public key of 512 bits.

Overall, an elliptic curve can have the relationship of:

=x³+ax+b (mod p)

and for a defined prime number (p). Overall, NIST has defined a number of standard curves, and which relate to the size of their finite field. These are P256, P384 and P512. With P-256 we use: p=2²⁵⁶- 2²²⁴+2¹⁹²+2⁹⁶−1, a=−3, b=41058363725152142129326129780047268409114441015993725554835256314039467401291.

In ECC, we have a private key of sk and which is a scalar value. The public key is then:

pk=sk.G

and where G is the base point on the curve, and pk is a public key point. If sk has 256 bits, then pk will have 512 bits, as it is an (x,y) point.

Press enter or click to view image in full size

Now, the EITF has just published RFC 9500 [here] which defined test keys for RSA, DLP (Discrete Logarithm Problem) and ECDLP (Elliptic Curve DLP)…

--

--

Prof Bill Buchanan OBE FRSE
Prof Bill Buchanan OBE FRSE

Written by Prof Bill Buchanan OBE FRSE

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