Submit
Path:
~
/
/
usr
/
share
/
doc
/
cryptsetup
/
File Content:
README.gnupg-sc
Using an OpenPGP smartcard for LUKS dm-crypt devices in Debian ============================================================== The Debian cryptsetup package provides the keyscript `decrypt_gnupg-sc` for setups with a keyfile that is encrypted using an OpenPGP smartcard. The following example assumes that you store the encrypted keyfile in `/etc/keys/cryptkey.gpg`. LUKS device is `/dev/<luks_device>`. First, you'll have to create the keyfile and encrypt it with your key 0xDEADBEEF: dd if=/dev/random bs=1 count=256 | gpg --recipient 0xDEADBEEF \ --output /etc/keys/cryptkey.gpg --encrypt Next the LUKS device needs to be formated with the key. For that, the `decrypt_gnupg-sc` keyscript can be used: /lib/cryptsetup/scripts/decrypt_gnupg-sc /etc/keys/cryptkey.gpg | \ cryptsetup --key-file=- luksFormat /dev/<luks_device> In order to unlock the encrypted LUKS device automatically during boot process, add the following to `/etc/crypttab`: cdev1 /dev/<luks_device> /etc/keys/cryptkey.gpg luks,keyscript=decrypt_gnupg-sc In order to avoid data loss if the smartcard is damaged or lost, you may want to decrypt `/etc/keys/cryptkey.gpg` and store the plaintext in a safe place. Or alternatively, use another slot with your backup key: cryptsetup luksAddKey /dev/<luks_device> /path/to/backup.key Decrypting the keyfile at initramfs stage ----------------------------------------- If the device is to be unlocked at initramfs stage (such as for the root FS or the resume device), you need to copy the public part of the encryption key to `/etc/cryptsetup-initramfs/pubring.gpg`: gpg --export 0xDEADBEEF >/etc/cryptsetup-initramfs/pubring.gpg Then the provided initramfs hooks should do all additionally required work for you when the initramfs is created or updated. Be warned though, that for such devices the OpenPGP encrypted key is copied to the initramfs by the initramfs cryptgnupg-sc hook. If you don't want this, you should take a look at the initramfs cryptgnupg-sc hook, which is located at `/usr/share/initramfs-tools/hooks/cryptgnupg-sc`. Moreover, note that unlocking at initramfs stage is currently not compatible with plymouth or other bootsplash, as a curses-based prompt is used for PIN entry. -- Guilhem Moulin <guilhem@guilhem.org> Sun, 23 Sep 2018 03:28:31 +0200
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
examples
---
0755
AUTHORS
137 bytes
0644
FAQ.gz
48990 bytes
0644
Keyring.txt
2724 bytes
0644
LUKS2-locking.txt
2711 bytes
0644
NEWS.Debian.gz
1057 bytes
0644
README.Debian.gz
5680 bytes
0644
README.debug
2731 bytes
0644
README.gnupg
1848 bytes
0644
README.gnupg-sc
2354 bytes
0644
README.keyctl
3583 bytes
0644
README.md.gz
2223 bytes
0644
README.opensc.gz
2219 bytes
0644
changelog.Debian.gz
2251 bytes
0644
copyright
9292 bytes
0644
v1.0.7-ReleaseNotes
2921 bytes
0644
v1.1.0-ReleaseNotes.gz
2275 bytes
0644
v1.1.1-ReleaseNotes
1796 bytes
0644
v1.1.2-ReleaseNotes
1594 bytes
0644
v1.1.3-ReleaseNotes
482 bytes
0644
v1.2.0-ReleaseNotes.gz
2124 bytes
0644
v1.3.0-ReleaseNotes.gz
2134 bytes
0644
v1.3.1-ReleaseNotes
421 bytes
0644
v1.4.0-ReleaseNotes.gz
2253 bytes
0644
v1.4.1-ReleaseNotes
889 bytes
0644
v1.4.2-ReleaseNotes
1630 bytes
0644
v1.4.3-ReleaseNotes
2359 bytes
0644
v1.5.0-ReleaseNotes.gz
3320 bytes
0644
v1.5.1-ReleaseNotes
1295 bytes
0644
v1.6.0-ReleaseNotes.gz
3818 bytes
0644
v1.6.1-ReleaseNotes
1041 bytes
0644
v1.6.2-ReleaseNotes
985 bytes
0644
v1.6.3-ReleaseNotes
1859 bytes
0644
v1.6.4-ReleaseNotes
2036 bytes
0644
v1.6.5-ReleaseNotes
2479 bytes
0644
v1.6.6-ReleaseNotes
1093 bytes
0644
v1.6.7-ReleaseNotes
3333 bytes
0644
v1.6.8-ReleaseNotes
2061 bytes
0644
v1.7.0-ReleaseNotes
3101 bytes
0644
v1.7.1-ReleaseNotes
1371 bytes
0644
v1.7.2-ReleaseNotes
1487 bytes
0644
v1.7.3-ReleaseNotes
811 bytes
0644
v1.7.4-ReleaseNotes
657 bytes
0644
v1.7.5-ReleaseNotes
833 bytes
0644
v2.0.0-ReleaseNotes.gz
9728 bytes
0644
v2.0.1-ReleaseNotes.gz
2226 bytes
0644
v2.0.2-ReleaseNotes.gz
1992 bytes
0644
v2.0.3-ReleaseNotes.gz
2448 bytes
0644
v2.0.4-ReleaseNotes.gz
2325 bytes
0644
v2.0.5-ReleaseNotes.gz
2068 bytes
0644
v2.0.6-ReleaseNotes.gz
1960 bytes
0644
v2.1.0-ReleaseNotes.gz
3484 bytes
0644
v2.2.0-ReleaseNotes.gz
4582 bytes
0644
v2.2.1-ReleaseNotes
1413 bytes
0644
v2.2.2-ReleaseNotes
2151 bytes
0644
v2.3.0-ReleaseNotes.gz
3250 bytes
0644
v2.3.1-ReleaseNotes
1770 bytes
0644
v2.3.2-ReleaseNotes
1499 bytes
0644
v2.3.3-ReleaseNotes
1396 bytes
0644
v2.3.4-ReleaseNotes.gz
2001 bytes
0644
v2.3.5-ReleaseNotes.gz
3129 bytes
0644
v2.3.6-ReleaseNotes
2316 bytes
0644
v2.4.0-ReleaseNotes.gz
4766 bytes
0644
v2.4.1-ReleaseNotes
1942 bytes
0644
v2.4.2-ReleaseNotes
1375 bytes
0644
v2.4.3-ReleaseNotes.gz
1996 bytes
0644
N4ST4R_ID | Naxtarrr