r/ComputerSecurity • • Jun 15 '23

Why do we really need intermediate certificates and the chain of trust?

in SSL, I get that we need a chain of trust and root certificate is self-signed. But I still can't grasp why do we REALLY need it? Because aren't intermediate certificates are also issued by the same CA as root? Thus, does it make a difference if root just signs the SSL certs?

12 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/tjthomas101 Jun 16 '23

But what if the root is leaked? Can the intermediaries save the day? If so, how? I can't imagine it. Could they just fill in the role of root by issuing certs?

3

u/Tinidril Jun 16 '23

The point is that you take the root certificate completely offline.

Take an enterprise with hundreds or thousands of servers and websites that all need certificates. Issuing certificates becomes a regular part of doing business and you need at least several support staff with access to the signing keys on an ongoing basis. Odds of a leak are pretty good.

Losing the root means every client must get a new root certificate installed. Losing an intermediary means you revoke it and create a new one. Using an intermediate means that the root certificate can be taken completely offline and stored in a vault that only the CIO or other high level position can access. It only needs to come out when you need a new intermediate, which is rare.

1

u/tjthomas101 Jun 16 '23

This makes total sense! Thank you very much. So, it's management issue that the chain of trust solves.

2

u/opperior Jun 16 '23

If the root is leaked, then it means that anyone could make a cert that looks like you made it. The trust is gone. Imagine if anyone could make a genuine Microsoft cert or Google cert or Facebook cert. No one could be sure that the site they visit, the program they are running, the email they received actually came from the company it claims to be from. As an example, drivers can't be installed on a Windows system unless it's signed by Microsoft or a trusted third party, but if anyone can sign any driver, then rootkits would become trivial to produce.

That means every certificate made by that root, and every certificate made my the intermediate certificates made by that root, are all essentially invalid. They must all be revoked, a new root certificate created, and then all the other certificates re-issued. A nightmare. No, an intermediate certificate can't save you here.

But if it's an intermediate certificate that gets leaked, much less hassle. You can make a new one from the root certificate, revoke the compromised intermediate certificate, then re-sign the previously issued certificates with the new intermediate certificate. You can do this because the root certificate is still trusted.

Thus the root certificate only comes out of hiding when a new intermediate certificate is needed. The rest of the time it is stored in a vault, inaccessible to any internet connected system, and only trusted people are allowed to take it out.