Skip to content

Commit 682ff7d

Browse files
authored
Merge pull request #177 from tlaurion/fix_configure_keys_typos_and_images
Installing-and-Configuring/configuring-keys.md: fix typos and images url
2 parents d5770bd + ba68af1 commit 682ff7d

File tree

1 file changed

+90
-76
lines changed

1 file changed

+90
-76
lines changed

Installing-and-Configuring/configuring-keys.md

Lines changed: 90 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -19,139 +19,152 @@ parent: Installing and configuring
1919

2020
## No OS installed
2121

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:
2424
![IMG_20720216_035536](https://user-images.githubusercontent.com/827570/168883552-58dfb283-52b1-4026-9ae3-ae962dfb0672.JPG)
2525

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
2727
partition with `fdisk`.
2828

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.
3434

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,
3636
please open an issue so we can add it.
3737

3838
### No public key found in ROM
3939
![IMG_20720216_035524](https://user-images.githubusercontent.com/827570/168883785-a94c77dc-0743-4622-83cf-62bbf8024462.JPG)
4040

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
4444
Reset/Re-Ownership` option.
4545

4646
#### 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
4949
Factory Reset/Re-Ownership` option.
5050

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**
5353

5454
**_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
5656
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
5859
- [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.
6062

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):
6265

6366
- Disk Recovery Key passphrase (6 words. _Do not forget this one_)
6467
- This passphrase is required to setup a TPM Disk Unlock Key passphrase.
6568
- 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.
6771
- TPM Ownership passphrase (2 words.)
6872
- 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
7074
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
7277
- Under Heads, it is to seal measurements under HOTP
7378
- 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
7580
FORGET_)
7681
- 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.
7884
- GPG prompts for this passphrase when signing hashes under Heads
7985
- TPM Disk Unlock Key passphrase (3 words, asked to boot default boot option)
8086
- Requires GPG User PIN and Disk Recovery Key passphrase to setup
8187

8288
##### Process
8389
This will go first briefly over a survey, asking you if you want to:
8490

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)
9098
- 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)
94104
- This is the preferred option
95105
- 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.
99110

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".
103115

104116
The process then enforces user's selected choices.
105117

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.
113122

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.
114127

115128
#### Adding your PGP key
116129

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.
120133

121134
![IMG_20720216_040452](https://user-images.githubusercontent.com/827570/168885326-67a3b8e6-ba17-483e-b5ea-72fdc8123dbc.JPG)
122135

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
124137
stored in the ROM image before flashing the full Heads ROM.
125138

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
129142
steps and your GPG key will be added to the Heads rom.
130143

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.
133146

134147
## Configuring the TPM
135148
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,
137150
Linux payload and user config injected files are un-altered.
138151

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
141154
Security dongle.
142155

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
144157
one-time-password against the value that your phone generates.
145158

146159
TPM Disk Encryption Key (TPM Disk Unlock Key)
147160
---
148161

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
155168
option.
156169

157170
If you want to use the TPM to seal a secret used to unlock your LUKS volumes:
@@ -164,16 +177,17 @@ Select make default:
164177
Answer the prompts properly:
165178
![IMG_20720216_043921](https://user-images.githubusercontent.com/827570/168886507-6e8671f1-c553-464c-90dc-28137a5fbf46.JPG)
166179

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.
170183

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
172185
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

Comments
 (0)