Let's say I get a new computer that's never been connected to the internet before. The first time I connect it to the internet, is it susceptible to a mitm attack while downloading its public key certificates from a certificate authority?

I assume that once the computer gets the certificate authority's public key certificate, it can connect securely and download more certificates for other sites. But how does it securely download the first certificate?


The operating system comes with a set of "default trusted root CA". This is how a Web browser can connect to existing HTTPS Web sites and be content with their certificates without requiring the user to do anything special with his trusted CA. Similarly, the "OS update" mechanism will use the same principle: it will accept an update only if it comes from a trusted server, with a notion of trust which is relative to a public key which is already known to the machine. One may note that OS updates may include updates to the store of default trusted root CA.

Of course, this raises the question of how the OS got there in the first place. All these trusted root CA only move the problem around; trust still has to start somewhere. Usually, a physical medium (say, a DVD) is involved; even more usually, this is done in the computer factory, and the user gets a computer with a pre-installed OS.

If the root CA you are talking about is not part of the "default trusted CA" (i.e. that specific CA did not make a deal with Microsoft to be included by default), then the trust system is bootstrapped by a manual procedure: when the root CA is installed, the machine asks for confirmation to the user; a thumbprint of the new certificate is displayed. The thumprint is a hash value computed over the complete encoded root CA certificate. The user is then supposed to check that the displayed hash value matches a value which was communicated to him through some out-of-band mechanism (e.g. with the on-paper documentation).

Trust must start somewhere, but, thanks to cryptographic hash function, that "somewhere" can be a value small enough to be handled in the physical, non-computer world (a human user can verify that a 40-character hash value matches that which was printed on some paper).


Some certificates are included as part of the OS install. Usually you'll find both a base set of public CAs and, depending on the OS, the necessary certificates to validate the software distribution repositories for that OS. And of course once you can validate the software repositories you can download things like certificates...


Your OS must come with an update system, which is at least responsible for downloading security updates of basic OS components (and may be also responsible for keeping additional, user chosen, software components up to date).

The update system must have at least the public key of the OS provider (or of a "repository").

The public key can be used to validate additional components, including a browser like Firefox which has its own CA (Certificate Authority) collection.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.