Skip to content

Commit 6cf5d5d

Browse files
authored
Merge pull request #203 from linuxboot/copilot/fix-202
Clarify HOTP/TOTP documentation to address USB Security dongle compatibility confusion
2 parents c363333 + cd965cc commit 6cf5d5d

3 files changed

Lines changed: 44 additions & 22 deletions

File tree

About/FAQ.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -161,25 +161,31 @@ Unlike [Tails](https://tails.boum.org/), which aims to be a stateless OS that
161161
leaves no trace on the computer of its presence, Heads is intended for the
162162
case where you need to store data and state on the computer.
163163

164-
HOTP vs TOTP
164+
USB Security dongles and firmware verification in Heads
165165
----
166166

167-
HOTP (HMAC-based One-time Password algorithm) generates a password
168-
using hash-based message authentication codes (HMAC) that can be used only for
169-
the one authentication attempt. Uniqueness is based on a counter which is
170-
incremented each authentication attempt.
167+
Heads can verify firmware integrity using two methods:
171168

172-
TOTP (Time-based One-time Password algorithm) is an extension of HOTP but
173-
replaces the counter with time. Because of latency, both network and human,
174-
and unsynchronised clocks, the one-time password must validate over a range of
175-
times between the authenticator and the user. Here, time is
176-
downsampled into larger durations (e.g., 30 seconds) to allow for validity
177-
between the parties.
169+
### HOTP verification (with USB Security dongle)
170+
**Heads generates HOTP codes** and sends them to your USB Security dongle. The dongle verifies these codes automatically. If verification succeeds, Heads boots normally. If it fails, the dongle's LED shows red and boot is halted.
178171

179-
Secuirty wise, HOTP is more susceptible to brute force attacks without
180-
throttling or limiting the number of failed attempted while TOTP is susceptible
181-
to phishing attacks and requires a user to enter the code within a given time
182-
period.
172+
**Requirements**: Compatible USB Security dongle (see [Prerequisites compatibility table](/Prerequisites#usb-security-dongles-aka-security-token-aka-smartcard))
173+
174+
**Advantages**: Automatic verification, no manual interaction needed, works without accurate time
175+
176+
### TPMTOTP verification (with smartphone)
177+
**Heads generates TOTP codes** displayed on screen. You compare these with codes from your phone's authenticator app. If they match, your firmware is verified as safe.
178+
179+
**Requirements**:
180+
- Smartphone with authenticator app
181+
- **Accurate time synchronization**: Heads system clock must be set to UTC/GMT through Options menu. Phone time is typically synced automatically.
182+
183+
**Note**: Time synchronization is critical - if clocks don't match, codes will differ and verification fails.
184+
185+
### OpenPGP signing (all configurations)
186+
All Heads configurations use your USB Security dongle's OpenPGP support to store your private key and sign `/boot` contents. This works with any OpenPGP-compatible dongle.
187+
188+
For technical details about HOTP verification, see the [Nitrokey HOTP verification project](https://github.com/Nitrokey/nitrokey-hotp-verification).
183189

184190
coreboot vs Linuxboot
185191
----

About/Keys.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ password based on the current clock time, which the user can compare to the
6868
value displayed on their phone. A new secret must be generated each time the
6969
firmware is updated since this will change the PCRs.
7070

71+
**Note**: Heads generates TPMTOTP codes that appear on your screen. You compare these with codes from your phone's authenticator app to verify firmware integrity. This works independently of your USB Security dongle. **Critical requirement**: You must manually set the correct time in Heads through the Options menu (UTC/GMT timezone) - if the time doesn't match your phone, verification will fail.
72+
7173
If an attacker can control this shared secret (such as by directly sending PCR
7274
values into the TPM), they can install malicious firmware in the SPI flash and
7375
generate valid TOTP codes.

Installing-and-Configuring/Prerequisites.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ If *you have an external programmer* and *are techsavvy enough to bring their su
5555
USB Security Dongles (aka security token aka smartcard)
5656
---
5757

58+
**All USB Security dongles used with Heads must support OpenPGP** for storing your private key and signing `/boot` contents.
59+
60+
**HOTP verification is optional** but provides automatic firmware verification at boot. Without HOTP, you'll use TPMTOTP (manual verification with your phone). Most [board configurations](/Prerequisites#supported-devices) are available in both HOTP and non-HOTP variants, though some vendors only support HOTP-enabled configurations.
61+
62+
### USB Security dongle compatibility:
63+
64+
**Compatible dongles** must support the specialized HOTP verification protocol developed by Nitrokey. For technical details about this protocol, see the [Nitrokey HOTP verification project](https://github.com/Nitrokey/nitrokey-hotp-verification).
65+
5866
*NOTE* - Heads does **NOT** support FIDO2 or U2F authentication. Be careful when
5967
purchasing to buy a compatible key.
6068

@@ -64,13 +72,19 @@ USB Security Dongles (aka security token aka smartcard)
6472
*NOTE* - The NitroKey 3 comes in three sizes: USB A, A-mini and C. Nk3a mini (USB A-mini) is the one most shipped with novacustom and nitropads.
6573
- ThinkPads have USB A ports, not C. After that, it's users preferences for the form factor desired.
6674

67-
|Manufacture|Model line|TOTP|HOTP|
68-
|--|--|:--:|:--:|
69-
|Yubico|[YubiKey 5 Series](https://www.yubico.com/products/yubikey-5-overview/)|X||
70-
|Nitrokey|[Nitrokey Pro 2](https://www.nitrokey.com/products/nitrokeys#comparison)|X|X|
71-
|Nitrokey|[Nitrokey Storage 2](https://www.nitrokey.com/products/nitrokeys#comparison)|X|X|
72-
|Nitrokey|[Nitrokey 3](https://www.nitrokey.com/products/nitrokeys#comparison)|X|X|
73-
|Purism|[Librem Key](https://puri.sm/products/librem-key/)|X|X|
75+
### Supported USB Security dongles:
76+
77+
|Manufacturer|Model|OpenPGP|HOTP verification|Compatible|
78+
|--|--|:--:|:--:|:--:|
79+
|Yubico|[YubiKey 5 Series](https://www.yubico.com/products/yubikey-5-overview/)|||OpenPGP only|
80+
|Nitrokey|[Nitrokey Pro 2](https://www.nitrokey.com/products/nitrokeys#comparison)|||Full support|
81+
|Nitrokey|[Nitrokey Storage 2](https://www.nitrokey.com/products/nitrokeys#comparison)|||Full support|
82+
|Nitrokey|[Nitrokey 3](https://www.nitrokey.com/products/nitrokeys#comparison)|||Full support|
83+
|Purism|[Librem Key](https://puri.sm/products/librem-key/)|||Full support|
84+
85+
**Notes**:
86+
- **OpenPGP only**: Can be used with non-HOTP board configurations (manual TPMTOTP verification)
87+
- **Full support**: Can be used with both HOTP and non-HOTP board configurations
7488

7589
*NOTE* - If you prefer not to use USB security dongles or want simplified security procedures, see the [Purism Boot Modes](/PurismBootModes) documentation for information about Basic and Restricted boot modes that provide different security/usability trade-offs.
7690

0 commit comments

Comments
 (0)