More recently I stumbled across the question on the question on how to manage code signing keys for iOS and android.
Basically as a follow-up I just had to ask myself:
How do large companies (like Apple, Microsoft, Google, Intel, ...) protect their valueable code-signing keys?
In particular this question can be broken down into: How do these companies ensure only valid builds get signed (i.e. access management) and what do they physically do the protect the private keys? In particular the comparison of the security measures root CAs use and that the companies use can be interesting.
This question is also motivated by my older "How do large companies protect their source code?", where I got interesting, unexpected answers such as "they just use private GitHub repositories". In particular one may suspect that the build machine just has a software key that signs all builds it produces and I hope to clarify this (among learning the actual protections).
As for "why" protecting the keys is important:
- If Apple's keys would get lost (silently?) anybody could sign iOS or Mac OS X builds or Apps, which would undermine large portions of Apple's security measures.
- If Microsoft's keys would get leaked, the same app fiasco as for Apple would hold and additionally attackers may be in a position to push malicious Windows updates to targeted machines.
- If Intel's keys were leaked, it would be possible to sign Intel processor code updates and to sign arbitrary SGX software allowing deep implementation of malware in a target system that is impossible to get rid off without changing the hardware.
- If Google's keys were leaked, one could arbitrarily fake Google apps (arguably the weakest attack scenario out of the given)
As usual, I don't want answers saying "it's illegal to steal / abuse such keys", as the law may not be an effective way to stop agencies that can just declare their law violation "top secret" or to stop criminals who don't care about the law anyways.
Further, I want to quickly clarify, why I rule out "revocation" as the solution: a) This is not always possible, especially for hardware manufacturers, if the public key is actually hard-coded (for security reasons) into the hardware. b) The damage to the image of the company would be gigantic if they would have to revoke a key. Thus, while revocation may work in some circumstances (for small app developers for example), it's not a good option for larger companies.