You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -84,20 +85,20 @@ Keep in mind that the above doesn't protect you from physical tampering like *ev
84
85
85
86
The easiest way is to install package from [official Arch Linux repository](https://www.archlinux.org/packages/community/any/yubikey-full-disk-encryption/).
@@ -112,7 +113,7 @@ When installing by using `make` you also need to install [yubikey-personalizatio
112
113
113
114
First of all you need to [setup a configuration slot](https://wiki.archlinux.org/index.php/Yubikey#Setup_the_slot) for *YubiKey HMAC-SHA1 Challenge-Response* mode using a command similar to:
@@ -136,7 +137,7 @@ You may instead enable *HMAC-SHA1 Challenge-Response* mode using graphical inter
136
137
137
138
Open the [/etc/ykfde.conf](https://github.com/agherzan/yubikey-full-disk-encryption/blob/master/src/ykfde.conf) file and adjust it for your needs. Alternatively to setting `YKFDE_DISK_UUID` and `YKFDE_LUKS_NAME`, you can use `cryptdevice` kernel parameter. The [syntax](https://wiki.archlinux.org/index.php/Dm-crypt/Device_encryption#Configuring_the_kernel_parameters) is compatible with Arch's `encrypt` hook. After making your changes [regenerate initramfs](https://wiki.archlinux.org/index.php/Mkinitcpio#Image_creation_and_activation):
138
139
139
-
```
140
+
```bash
140
141
sudo mkinitcpio -P
141
142
```
142
143
@@ -148,15 +149,15 @@ You can list existing LUKS key slots with `cryptsetup luksDump /dev/<device>`.
148
149
149
150
To format new *LUKS* encrypted volume, you can use [ykfde-format](https://github.com/agherzan/yubikey-full-disk-encryption/blob/master/src/ykfde-format) script which is wrapper over `cryptsetup luksFormat` command:
## Enroll ykfde passphrase to existing LUKS encrypted volume
156
157
157
158
To enroll new ykfde passphrase to existing *LUKS* encrypted volume you can use [ykfde-enroll](https://github.com/agherzan/yubikey-full-disk-encryption/blob/master/src/ykfde-enroll) script, see `ykfde-enroll -h` for help:
To enroll new ykfde passphrase to existing *LUKS* encrypted volume protected by old ykfde passphrase you can use [ykfde-enroll](https://github.com/agherzan/yubikey-full-disk-encryption/blob/master/src/ykfde-enroll) script, see `ykfde-enroll -h` for help:
@@ -176,39 +177,39 @@ To unlock *LUKS* encrypted volume on a running system, you can use [ykfde-open](
176
177
177
178
As unprivileged user using udisksctl (recommended):
178
179
179
-
```
180
+
```bash
180
181
ykfde-open -d /dev/<device>
181
182
```
182
183
183
184
As root using cryptsetup (when [udisks2](https://www.archlinux.org/packages/extra/x86_64/udisks2/) or [expect](https://www.archlinux.org/packages/extra/x86_64/expect/) aren't available):
184
185
185
-
```
186
+
```bash
186
187
ykfde-open -d /dev/<device> -n <volume_name>
187
188
```
188
189
189
190
To print only the ykfde passphrase to the console without unlocking any volumes:
190
191
191
-
```
192
+
```bash
192
193
ykfde-open -p
193
194
```
194
195
195
196
To test only a passphrase for a specific key slot:
## Kill ykfde passphrase for existing LUKS encrypted volume
208
209
209
210
To kill a ykfde passphrase for existing *LUKS* encrypted volume you can use [ykfde-enroll](https://github.com/agherzan/yubikey-full-disk-encryption/blob/master/src/ykfde-enroll) script, see `ykfde-enroll -h` for help:
Edit `/etc/mkinitcpio.conf` and add the `ykfde` hook before or instead of `encrypt` hook as provided in [example](https://wiki.archlinux.org/index.php/Dm-crypt/System_configuration#Examples). Adding `ykfde` hook before `encrypt` hook will allow for a safe fallback in case of ykfde misconfiguration. You can remove `encrypt` hook later when you confim that everything is working correctly. After making your changes [regenerate initramfs](https://wiki.archlinux.org/index.php/Mkinitcpio#Image_creation_and_activation):
220
221
221
-
```
222
+
```bash
222
223
sudo mkinitcpio -P
223
224
```
224
225
@@ -230,7 +231,7 @@ Reboot and test your configuration.
230
231
231
232
NFC support is provided through [libnfc](https://www.archlinux.org/packages/community/x86_64/libnfc/) and [ykchalresp-nfc](https://aur.archlinux.org/packages/ykchalresp-nfc/) tools. Make sure you have both packages installed. Edit `/etc/ykfde.conf` and uncomment `YKFDE_NFC="1"`setting. After making your changes [regenerate initramfs](https://wiki.archlinux.org/index.php/Mkinitcpio#Image_creation_and_activation):
232
233
233
-
```
234
+
```bash
234
235
sudo mkinitcpio -P
235
236
```
236
237
@@ -244,18 +245,32 @@ You can enable the `ykfde-suspend` service which allows for automatically lockin
244
245
245
246
Edit `/etc/mkinitcpio.conf` and add `shutdown` hook as the last in `HOOKS` array. After making your changes [regenerate initramfs](https://wiki.archlinux.org/index.php/Mkinitcpio#Image_creation_and_activation):
246
247
247
-
```
248
+
```bash
248
249
sudo mkinitcpio -P
249
250
```
250
251
251
252
Enable related systemd service:
252
253
253
-
```
254
+
```bash
254
255
systemctl enable ykfde-suspend.service
255
256
```
256
257
257
258
Reboot and test your configuration.
258
259
260
+
## Use ykfde with encryptssh
261
+
262
+
You can configure ykfde to skip its password-fallback prompt. This allows the boot process to proceed to the next hook in the sequence (e.g., `encryptssh`) after the YubiKey polling loop finishes without a key being presented.
263
+
264
+
Here's how you do it with encryptssh:
265
+
266
+
* Follow the installation guide for [encryptssh](https://wiki.archlinux.org/title/Dm-crypt/Specialties#Busybox_based_initramfs_\(built_with_mkinitcpio\))
267
+
* Edit `/etc/mkinitcpio.conf` and add `ykfde`**before**`encryptssh` in the `HOOKS` array.
268
+
* Edit `/etc/ykfde.conf` and uncomment `YKFDE_SKIP_PASSWORD_PROMPT="1"`.
Copy file name to clipboardExpand all lines: src/ykfde.conf
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,12 @@
48
48
# Defaults to empty, meaning NO wait.
49
49
#YKFDE_SLEEP_AFTER_SUCCESSFUL_CRYPTSETUP=""
50
50
51
+
# WARNING: DO NOT ENABLE THIS OPTION WHEN YOU DO NOT USE encryptssh OR YOU DON'T KNOW WHAT YOU ARE DOING!
52
+
# After timeout (by not presenting a YubiKey) the password prompt by ykfde will be skipped. Instead the next module will be run.
53
+
# Works well with encryptssh and any other hook which will decrypt your filesystem.
54
+
# In /etc/mkinitcpio.conf make sure that in your hooks you have the following order: HOOKS=(... block netconf tinyssh ykfde encryptssh filesystems fsck)
55
+
#YKFDE_SKIP_PASSWORD_PROMPT="1"
56
+
51
57
# Verbose output. It will print all secrets to terminal.
0 commit comments