HomeSSL and Certificates – Part 2 of 3: Public Keys, Private Keys and TrustCybersecuritySSL and Certificates – Part 2 of 3: Public Keys, Private Keys and Trust

SSL and Certificates – Part 2 of 3: Public Keys, Private Keys and Trust

This is the second post in our three-part series on SSL and certificates. If you missed it, Part 1 covers the basics of cryptography: substitution ciphers, one-time pads, the Enigma machine and modern symmetric encryption such as AES.

At the end of Part 1 we had a very strong lock. AES with a 256-bit key is, for all practical purposes, unbreakable by brute force. But we also had a very old problem. AES is symmetric: the same key locks and unlocks the message. That means you and the person you’re talking to both need a copy of the key before you can say anything private, and you have to get it to them without anyone else seeing it.

That was manageable when a courier could hand-carry a one-time pad to an embassy. It is not manageable when your laptop needs to talk securely to your bank, your Microsoft 365 tenant, a parts supplier’s web store and a few hundred other sites you have never visited before. You can’t courier a key to every website on the internet. So how do two computers that have never met agree on a secret key while the whole world is listening?

The Padlock You Can Give Away

The answer, discovered in the 1970s, is asymmetric or public-key encryption. Instead of one key, you have a matched pair: a public key and a private key. Anything locked with the public key can only be unlocked with the private key.

The easiest way to picture it is a box of open padlocks. You keep the only key that opens them (your private key), and you hand out the open padlocks (your public key) to anyone who wants one. Someone who wants to send you a secret puts it in a box, snaps one of your padlocks shut and mails it. Anyone can close the padlock, but only you can open it. It doesn’t matter if a thousand people, or an eavesdropper on the line, have copies of your padlock. Closing it doesn’t help them open it.

In 1976, Whitfield Diffie and Martin Hellman published a method that lets two parties agree on a shared secret over a completely public channel. A year later, Ron Rivest, Adi Shamir and Leonard Adleman described the RSA algorithm, which put the padlock idea into practice. (It later came out that researchers at the British intelligence agency GCHQ had found similar ideas a few years earlier and kept them classified. Bletchley Park’s successors were still keeping secrets.)

Why It Works: Math That Only Runs One Way

Public-key systems depend on mathematical problems that are easy to do in one direction and extraordinarily hard to undo. RSA relies on multiplication. Multiplying two very large prime numbers together is something a computer does in a blink. Taking the result, a number hundreds of digits long, and working out which two primes produced it is a different story. With keys of 2,048 bits or more, there is no known practical way to do it with today’s computers.

Most modern systems also use elliptic-curve cryptography (ECC), which is built on a different one-way problem involving points on a curve. ECC gets the same security from much shorter keys: a 256-bit elliptic-curve key is roughly as strong as a 3,072-bit RSA key. Shorter keys mean less work for the processor, which matters on phones and busy web servers.

You may have noticed that these key lengths are much longer than the 128- or 256-bit AES keys from Part 1. That isn’t because public-key encryption is weaker; it is because the math is different. A 256-bit AES key has to be guessed one possibility at a time, while RSA keys have mathematical structure that clever algorithms can partially exploit, so they need many more bits to stay ahead.

The Best of Both Worlds

If public-key encryption solves the key-sharing problem, why not use it for everything? Because it is slow. Asymmetric operations take far more computing effort than AES, and encrypting a whole video stream or a large file transfer that way would bog everything down.

So real systems use a hybrid approach, and this is exactly what happens every time you visit a secure website:

  1. Your computer and the server use public-key math to agree on a brand-new, random symmetric key that nobody listening can work out.
  2. From then on, everything is encrypted with fast symmetric encryption such as AES, using that freshly agreed key.
  3. When the session ends, that key is thrown away. Your next visit gets a new one.

Public-key encryption, in other words, is the armored courier that delivers the one-time pad. The pad does the heavy lifting.

Running It Backward: Digital Signatures

Here is the part that makes certificates possible. Key pairs also work in reverse. If you process something with your private key, anyone can check it with your public key, but only the holder of the private key could have produced it. That is a digital signature.

In practice, you don’t sign an entire document. You first run it through a hash function such as SHA-256, which boils any amount of data down to a short, fixed-length fingerprint. Change a single comma in the document and the fingerprint changes completely. You sign the fingerprint. The recipient computes the fingerprint themselves, checks your signature against it, and now knows two things: the document came from you, and nobody altered it along the way.

Signatures are everywhere once you start looking. Software updates from Microsoft and Apple are signed, so your computer refuses to install a tampered one. Email security standards such as DKIM sign outgoing mail so receiving servers can spot forgeries. And, as we’ll see in Part 3, every SSL certificate is a signed document.

The Catch: Whose Padlock Is This?

Public-key encryption solves the problem of sharing secrets with strangers, but it creates a new one. When a server hands your browser a public key and says, “Here’s my padlock, I’m your bank,” how do you know it really is your bank?

An attacker sitting between you and the bank, on a rogue coffee-shop Wi-Fi network for example, could hand you their padlock instead. You would happily lock your password inside it. The attacker opens it, reads it, locks it again with the bank’s real padlock and passes it along. Neither you nor the bank would notice. This is called a man-in-the-middle attack, and the math alone can’t stop it. What’s missing is a trustworthy way to prove that a public key belongs to who it claims to belong to.

That proof is exactly what an SSL certificate provides, and it is where we’ll pick up in Part 3: what is inside a certificate, who vouches for it, and the real-world gotchas that still trip up IT teams today.

A Note About the Future

RSA and elliptic curves rest on math problems that today’s computers can’t solve, but a large enough quantum computer could. Nobody has built one yet, and estimates of when anyone might vary widely. The industry isn’t waiting, though: NIST published its first post-quantum cryptography standards in 2024, and major browsers have already started combining traditional and quantum-resistant key exchange. Just as AES offered longer keys for an uncertain future, the next generation of public-key cryptography is being rolled out before it is strictly needed.

Questions about encryption, certificates or securing your business’s systems? See how Moose Logic approaches cybersecurity or talk to our team.

Moose Logic

Technology Built for the Long Haul. Since 1994, Moose Logic has been the outsourced IT department and trusted technology partner for businesses across the Greater Seattle Area and beyond: managed IT, cybersecurity, The Lodge private cloud and The Grove website hosting.

Contact

Concierge, John Regis
(425) 616-1540
johnregis@mooselogic.com

Support
(425) 616-1541

Amanda Perez
(425) 616-1542
amanda@mooselogic.com

Scott Gorcester
scott@mooselogic.com

sales@mooselogic.com
Greater Seattle Area, Washington

© 2026 Moose Logic. All rights reserved.  |  Privacy Policy  |  Cookie Policy