8 Public Key Encryption and Digital Signatures: Using ECC

 

This chapter covers

  • Using elliptic curve encryption with JSON Web Encryption
  • Using elliptic curve digital signature with JSON Web Signature
  • Selecting a public key cryptosystem: RSA vs. elliptic curve

In the last chapter, we explored the mechanics of RSA, a foundational cryptographic system that has safeguarded digital communications for decades. But while RSA is the wise elder of public key cryptography, it has its challenges—particularly when it comes to performance. In this chapter, we shift gears to focus on Elliptic Curve Cryptography (ECC), a sleek, modern alternative that offers the same level of security with far smaller keys and better performance.

Before diving in, let’s take a moment to appreciate how far we’ve come. Back in the 1970s, Whitfield Diffie and Martin Hellman introduced the world to public key cryptography, sparking a revolution. Little did they know that decades later, we'd be exploring mathematical curves to protect everything from online shopping to encrypted cat memes. As cryptographers like to joke, ECC is like trading in your vintage station wagon (RSA) for a high-performance sports car—sleek, efficient, and built for the demands of the modern world.

So, grab your gear! We’ll first unravel the mysteries of ECC, explore how it builds on concepts from RSA, and learn why it has become the cryptographic tool of choice in the age of smartphones, cloud computing, and high-stakes digital security.

8.1 Elliptic curve public key cryptosystems

8.1.1 Configuring ECC

8.1.2 Diffie-Helman key agreement

8.1.3 Using ECC with JSON Web Encryption (JWE)

8.1.4 Using ECC with JSON Web Signing (JWS)

8.2 RSA vs. ECC

8.3 Summary