Re: Are the keys of mounted encrypted disks secured during reboot?
Milan Broz <[email protected]>
| Newsgroups | dev.linux.lists.cryptsetup |
|---|---|
| Message-ID | <[email protected]> |
On 12/26/22 20:13, John Smith wrote: > During the course of proper shutdown/reboot/suspend-to-disk, does the > kernel securely erase (or at least free memory of - as it pertains to > init_on_free=1) encryption keys of all dmcrypt/luks systems which > remained mounted? If the device is properly deactivated, then keys are always wiped. (Actually, with LUKS2, dm-crypt no longer keeps own copy of the key, it is stored in kernel keyring only for activation and then, obviously, in kernel crypto where is is directly used for encryption. So if it is not deactivated, it is responsibility of these subsystems to wipe it on reboot.) For suspend to ram, it is more complicated - there is a way how to wipe key and freeze device temporarily (see luksSuspend), but I do no think many systems actually use it. Debian has cryptsetup-suspend that can do this AFAIK. For suspend to disk, the memory should be written to encrypted device. (And RAM contents disappears after some short time with no power anyway.) Milan