How to use a file as a LUKS device key - LinuxConfig.org

LUKS is the acronym of Linux Unified Key Setup: it is the most used encryption implementation used on Linux systems and can be configured as an alternative to dm-crypt plain setup. Compared with the latter it provides some additional features like password hashing and salting and the ability to store multiple passwords in the so called LUKS header. In this tutorial I will assume the reader has a certain familiarity with LUKS; if you want to know more about this subject, you can check our basic guide about encrypting linux partitions with luks.


This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-use-a-file-as-a-luks-device-key
1 Like

Hi! Much appreciated article.
I have a question though, what if automatic opening of a LUKS container is to happen after boot. My idea is that certain devices will have the keyfile and only they can access the encrypted external drive. But would be desirable to have them auto-unlock the drive whenever it is connected instead of entering passphrase every time. Where should I look for that?
Thanks again!