Perform member initialization in initialization lists where possible
[bitcoinplatinum.git] / share / certs / PrivateKeyNotes.md
blob8d50144c21f9bd3726b9b12e09e8c3ff44d6e595
1 Code-signing private key notes
2 ==
4 The private keys for these certificates were generated on Gavin's main work machine,
5 following the certificate authority's recommendations for generating certificate
6 signing requests.
8 For OSX, the private key was generated by Keychain.app on Gavin's main work machine.
9 The key and certificate is in a separate, passphrase-protected keychain file that is
10 unlocked to sign the Bitcoin-Qt.app bundle.
12 For Windows, the private key was generated by Firefox running on Gavin's main work machine.
13 The key and certificate were exported into a separate, passphrase-protected PKCS#12 file, and
14 then deleted from Firefox's keystore. The exported file is used to sign the Windows setup.exe.
16 Threat analysis
19 Gavin is a single point of failure. He could be coerced to divulge the secret signing keys,
20 allowing somebody to distribute a Bitcoin-Qt.app or bitcoin-qt-setup.exe with a valid
21 signature but containing a malicious binary.
23 Or the machine Gavin uses to sign the binaries could be compromised, either remotely or
24 by breaking in to his office, allowing the attacker to get the private key files and then
25 install a keylogger to get the passphrase that protects them.
27 Threat Mitigation
30 "Air gapping" the machine used to do the signing will not work, because the signing
31 process needs to access a timestamp server over the network. And it would not
32 prevent the "rubber hose cryptography" threat (coercing Gavin to sign a bad binary
33 or divulge the private keys).
35 Windows binaries are reproducibly 'gitian-built', and the setup.exe file created
36 by the NSIS installer system is a 7zip archive, so you could check to make sure
37 that the bitcoin-qt.exe file inside the installer had not been tampered with.
38 However, an attacker could modify the installer's code, so when the setup.exe
39 was run it compromised users' systems. A volunteer to write an auditing tool
40 that checks the setup.exe for tampering, and checks the files in it against
41 the list of gitian signatures, is needed.
43 The long-term solution is something like the 'gitian downloader' system, which
44 uses signatures from multiple developers to determine whether or not a binary
45 should be trusted. However, that just pushes the problem to "how will
46 non-technical users securely get the gitian downloader code to start?"