@@ -19,139 +19,152 @@ parent: Installing and configuring
19
19
20
20
## No OS installed
21
21
22
- If starting with a blank hard drive, Heads will detect it and propose to
23
- boot from USB alongside with other options:
22
+ If starting with a blank hard drive, Heads will detect it and propose to boot
23
+ from USB alongside other options:
24
24
![ IMG_20720216_035536] ( https://user-images.githubusercontent.com/827570/168883552-58dfb283-52b1-4026-9ae3-ae962dfb0672.JPG )
25
25
26
- You can also set a different boot device, or go into Recovery shell and
26
+ You can also set a different boot device, or go into Recovery shell and
27
27
partition with ` fdisk ` .
28
28
29
- Installing an OS by booting from USB is probably the best option. Note here
30
- again that for OSes that provide detached signatures (iso.asc or iso.sig)
31
- alongside of their ISO download option, this is the preferred Heads
32
- installation method, since Heads can validate both integrity and authenticity
33
- against distribution public key, fused (and measured) in the firmware.
29
+ Installing an OS by booting from USB is probably the best option. Note here
30
+ again that for OSes that provide detached signatures (iso.asc or iso.sig)
31
+ alongside their ISO download option, this is the preferred Heads installation
32
+ method, since Heads can validate both integrity and authenticity against
33
+ distribution public key, fused (and measured) in the firmware.
34
34
35
- If there are other OSes providing detached signatures alongside of their ISOs,
35
+ If there are other OSes providing detached signatures alongside their ISOs,
36
36
please open an issue so we can add it.
37
37
38
38
### No public key found in ROM
39
39
![ IMG_20720216_035524] ( https://user-images.githubusercontent.com/827570/168883785-a94c77dc-0743-4622-83cf-62bbf8024462.JPG )
40
40
41
- You can either add a backuped gpg public key matching an already provisioned
42
- USB Security dongle (see below on adding public key) or generate the keys,
43
- alongside as setting all security components in one go with the `OEM Factory
41
+ You can either add a backuped gpg public key matching an already provisioned
42
+ USB Security dongle (see below on adding public key) or generate the keys,
43
+ alongside setting all security components in one go with the `OEM Factory
44
44
Reset/Re-Ownership` option.
45
45
46
46
#### OEM Factory Reset/Re-Ownership
47
- Once you have installed the OS, you will need to take ownership of the
48
- different security components under Heads. The easiest way is through `OEM
47
+ Once you have installed the OS, you will need to take ownership of the
48
+ different security components under Heads. The easiest way is through `OEM
49
49
Factory Reset/Re-Ownership` option.
50
50
51
- ** Note that the passphrases you will type will be echoed back to you. You need
52
- to accomplish this step in a safe environement **
51
+ ** Note that the passphrases you will type will be echoed back to you. You need
52
+ to accomplish this step in a safe environment **
53
53
54
54
** _ EFF Diceware passphrases are recommended_ **
55
- You can generate those on a seperate device from the following recommended
55
+ You can generate those on a separate device from the following recommended
56
56
sites:
57
- - [ https://www.rempe.us/diceware/#eff ] ( https://www.rempe.us/diceware/#eff ) Explains why those are important as opposed to passwords
57
+ - [ https://www.rempe.us/diceware/#eff ] ( https://www.rempe.us/diceware/#eff )
58
+ Explains why those are important as opposed to passwords
58
59
- [ https://diceware.dmuth.org/ ] ( https://diceware.dmuth.org/ ) Explains as well
59
- - [ https://romeljacinto.github.io/diceware/ ] ( https://romeljacinto.github.io/diceware/ ) Minimalist, first letter captitalizer, customizes word seperator.
60
+ - [ https://romeljacinto.github.io/diceware/ ] ( https://romeljacinto.github.io/diceware/ )
61
+ Minimalist, first letter capitalizer, customizes word separator.
60
62
61
- The Secrets involved under Heads are the following (and their recommended lengths):
63
+ The Secrets involved under Heads are the following (and their recommended
64
+ lengths):
62
65
63
66
- Disk Recovery Key passphrase (6 words. _ Do not forget this one_ )
64
67
- This passphrase is required to setup a TPM Disk Unlock Key passphrase.
65
68
- This passphrase is required to access encrypted data from any computer
66
- - This passphrase is required to "unsafe boot", where the installed OS will prompt for it.
69
+ - This passphrase is required to "unsafe boot", where the installed OS will
70
+ prompt for it.
67
71
- TPM Ownership passphrase (2 words.)
68
72
- Used to set ownership on the TPM.
69
- - GPG Admin PIN (2 words. _ Locks Admin out after 3 bad attempts in a row. DO
73
+ - GPG Admin PIN (2 words. _ Locks Admin out after 3 bad attempts in a row. DO
70
74
NOT FORGET_ )
71
- - This passphrase is requested to do management tasks on the USB Security dongle
75
+ - This passphrase is requested to do management tasks on the USB Security
76
+ dongle
72
77
- Under Heads, it is to seal measurements under HOTP
73
78
- It will be needed in case the GPG User PIN was locked
74
- - GPG User PIN (2 words. _ Locks user out after 3 bad attempts in a row. DO NOT
79
+ - GPG User PIN (2 words. _ Locks user out after 3 bad attempts in a row. DO NOT
75
80
FORGET_ )
76
81
- Used to sign/encrypt content
77
- - Used to do anything linked to user interaction with the USB Security dongle.
82
+ - Used to do anything linked to user interaction with the USB Security
83
+ dongle.
78
84
- GPG prompts for this passphrase when signing hashes under Heads
79
85
- TPM Disk Unlock Key passphrase (3 words, asked to boot default boot option)
80
86
- Requires GPG User PIN and Disk Recovery Key passphrase to setup
81
87
82
88
##### Process
83
89
This will go first briefly over a survey, asking you if you want to:
84
90
85
- - Re-encrypt the LUKS encrypted container (Say yes here if you didn't install the OS yourself)
86
- - As explained on screen, anyone having a LUKS header backup could restore it and decrypt with
87
- past corresponding passphrase. Changing passphrase without reencrypting doesn't change the
88
- encryption key.
89
- - Change the Disk Recovery Key passphrase (Say yes here if you didn't install the OS yourself)
91
+ - Re-encrypt the LUKS encrypted container (Say yes here if you didn't install
92
+ the OS yourself)
93
+ - As explained on screen, anyone having a LUKS header backup could restore it
94
+ and decrypt with past corresponding passphrase. Changing passphrase without
95
+ reencrypting doesn't change the encryption key.
96
+ - Change the Disk Recovery Key passphrase (Say yes here if you didn't install
97
+ the OS yourself)
90
98
- You should have also said yes above.
91
- - Define a single shared passphrase across all security components (not recommended)
92
- - This option is used by some OEMs to provision initial secrets. Passphrases should be different
93
- - Define individual passphrases for each security components (recommended: y )
99
+ - Define a single shared passphrase across all security components (not
100
+ recommended)
101
+ - This option is used by some OEMs to provision initial secrets. Passphrases
102
+ should be different
103
+ - Define individual passphrases for each security components (recommended: y)
94
104
- This is the preferred option
95
105
- Set custom under information for the GnuPG key (recommended: y)
96
- - If you desire to use the USB Security dongle to encrypt/sign content linked to a public identity
97
- That identity needs to be provisioned in a way that it will be searchable if you ever decide to
98
- upload the resulting public key to gpg key search engines.
106
+ - If you desire to use the USB Security dongle to encrypt/sign content linked
107
+ to a public identity that identity needs to be provisioned in a way that it
108
+ will be searchable if you ever decide to upload the resulting public key to
109
+ gpg key search engines.
99
110
100
- Note that the Comment section is used to differenciate the resulting public key from other public
101
- keys that would be linked with the same Real Name and E-Mail address, and should be distinguishable
102
- from the Comment. A good Comment example is: "USB Security dongle".
111
+ Note that the Comment section is used to differentiate the resulting public
112
+ key from other public keys that would be linked with the same Real Name and
113
+ E-Mail address, and should be distinguishable from the Comment. A good
114
+ Comment example is: "USB Security dongle".
103
115
104
116
The process then enforces user's selected choices.
105
117
106
- At the end, the wizard outputs on screen the ` Provisioned Security Components Secrets `
107
- This is the last chance you have to note provisioned secrets correctly until you known them by heart.
108
- That piece of paper's content is precious, and should be safeguarded accordingly.
109
-
110
- At the end, the wizard outputs on screen the `Provisioned Security Components
111
- Secrets` This is the last chance you have to note provisioned secrets correctly
112
- until you known them by heart. A Qr code containing the same information is also provided: please scan it.
118
+ At the end, the wizard outputs on screen the `Provisioned Security Components
119
+ Secrets` This is the last chance you have to note provisioned secrets correctly
120
+ until you know them by heart. That piece of paper's content is precious, and
121
+ should be safeguarded accordingly.
113
122
123
+ At the end, the wizard outputs on screen the `Provisioned Security Components
124
+ Secrets` This is the last chance you have to note provisioned secrets correctly
125
+ until you know them by heart. A Qr code containing the same information is also
126
+ provided: please scan it.
114
127
115
128
#### Adding your PGP key
116
129
117
- If you already have a provisioned USB Security dongle and its associated
118
- public key, then follow these steps to inject the public key into Heads.
119
- Otherwise, you should probably follow ` OEM Factory Reset/Re-Ownership ` above.
130
+ If you already have a provisioned USB Security dongle and its associated public
131
+ key, then follow these steps to inject the public key into Heads. Otherwise,
132
+ you should probably follow ` OEM Factory Reset/Re-Ownership ` above.
120
133
121
134
![ IMG_20720216_040452] ( https://user-images.githubusercontent.com/827570/168885326-67a3b8e6-ba17-483e-b5ea-72fdc8123dbc.JPG )
122
135
123
- Heads uses your own GPG key to sign updates and as a result it needs the key
136
+ Heads uses your own GPG key to sign updates and as a result it needs the key
124
137
stored in the ROM image before flashing the full Heads ROM.
125
138
126
- Ensure your USB security dongle and the USB drive with your key are still
127
- inserted. Select "Add a GPG key to the running BIOS" to enter the GPG
128
- Management menu, then "Add a GPG key to the running BIOS + reflash". Follow the
139
+ Ensure your USB security dongle and the USB drive with your key are still
140
+ inserted. Select "Add a GPG key to the running BIOS" to enter the GPG
141
+ Management menu, then "Add a GPG key to the running BIOS + reflash". Follow the
129
142
steps and your GPG key will be added to the Heads rom.
130
143
131
- Once ` flashrom ` is complete, reboot and now you should now be back in the Heads
132
- runtime. It should display a message that is is unable to unseal TOTP.
144
+ Once ` flashrom ` is complete, reboot and now you should now be back in the Heads
145
+ runtime. It should display a message that it is unable to unseal TOTP.
133
146
134
147
## Configuring the TPM
135
148
google authenticator or [ FreeOTP+] ( https://f-droid.org/en/packages/org.liberty.android.freeotpplus/ )
136
- application and use to validate that the firmware (bootblock, ram/rom stages,
149
+ application and use to validate that the firmware (bootblock, ram/rom stages,
137
150
Linux payload and user config injected files are un-altered.
138
151
139
- If you have the HOTP version of the firmware, this is also where Heads will ask
140
- you for your GPG Admin PIN to seal the secret inside of a HOTP compatible USB
152
+ If you have the HOTP version of the firmware, this is also where Heads will ask
153
+ you for your GPG Admin PIN to seal the secret inside of a HOTP compatible USB
141
154
Security dongle.
142
155
143
- On the next boot, the current TOTP will be computed and you can compare this
156
+ On the next boot, the current TOTP will be computed and you can compare this
144
157
one-time-password against the value that your phone generates.
145
158
146
159
TPM Disk Encryption Key (TPM Disk Unlock Key)
147
160
---
148
161
149
- The LUKS Disk Recovery Key stored under LUKS header at OS install is derived
150
- from its user passphrase, which is expanded via the LUKS expansion algorithm to
151
- increase the time needed to brute force it. For extra protection it is possible
152
- to store an additional LUKS key in the TPM so that it will only be released to
153
- unlock the LUKS container if the PCRs match (firmware measurements, kernel
154
- modules loaded, no recovery shell access) from Heads when selecting a boot
162
+ The LUKS Disk Recovery Key stored under LUKS header at OS install is derived
163
+ from its user passphrase, which is expanded via the LUKS expansion algorithm to
164
+ increase the time needed to brute force it. For extra protection it is possible
165
+ to store an additional LUKS key in the TPM so that it will only be released to
166
+ unlock the LUKS container if the PCRs match (firmware measurements, kernel
167
+ modules loaded, no recovery shell access) from Heads when selecting a boot
155
168
option.
156
169
157
170
If you want to use the TPM to seal a secret used to unlock your LUKS volumes:
@@ -164,16 +177,17 @@ Select make default:
164
177
Answer the prompts properly:
165
178
![ IMG_20720216_043921] ( https://user-images.githubusercontent.com/827570/168886507-6e8671f1-c553-464c-90dc-28137a5fbf46.JPG )
166
179
167
- This will prompt you for your Disk Recovery Key passphrase, a new TPM Disk
168
- unlock passphrase and confirm and finally ask you to enter your GPG Unser PIN
169
- to sign the new default boot option before rebooting.
180
+ This will prompt you for your Disk Recovery Key passphrase, a new TPM Disk
181
+ unlock passphrase and confirm and finally ask you to enter your GPG User PIN to
182
+ sign the new default boot option before rebooting.
170
183
171
- Reboot and you will be prompted for your boot password when that device is used
184
+ Reboot and you will be prompted for your boot password when that device is used
172
185
to boot in the future:
173
- ![ IMG_20720216_043940] (https://user-images.githubusercontent.com/827570/168886785-581e8548-945b-4b06-a2d7-36ceb170
174
- ![ IMG_20720216_043940] ( https://user-images.githubusercontent.com/827570/168886785-581e8548-945b-4b06-a2d7-36ceb170 )
175
- The key file can not persist on disk anywhere, since it would allow an adversary
176
- ![ IMG_20720216_043940] ( https://user-images.githubusercontent.com/827570/168886785-581e8548-945b-4b06-a2d7-36ceb170 )
177
- TPM and then bundle the key file into a RAM copy of Qubes' dom0 initrd on each
178
- boot. The initramfs format allows concatenated cpio files, so it is easy for the
179
- Heads firmware to inject files into the Qubes startup script.
186
+ ![ IMG_20720216_043940] ( https://user-images.githubusercontent.com/827570/168886785-581e8548-945b-4b06-a2d7-36ceb1707220.JPG )
187
+ ![ IMG_20720216_061726] ( https://user-images.githubusercontent.com/827570/168889805-4f606591-1a0c-41c2-8c8a-3493a65bba04.JPG )
188
+
189
+ The key file cannot persist on disk anywhere, since it would allow an adversary
190
+ to decrypt the drive. Instead it is necessary to unseal/decrypt the key from
191
+ the TPM and then bundle the key file into a RAM copy of Qubes' dom0 initrd on
192
+ each boot. The initramfs format allows concatenated cpio files, so it is easy
193
+ for the Heads firmware to inject files into the Qubes startup script.
0 commit comments