SaferComputing.com

Reference · Keys and encryption

Disk encryption check: BitLocker, LUKS and FileVault, and where the recovery key is

Check that the system disk is encrypted and that its recovery key is stored away from the computer: manage-bde -status and Get-BitLockerVolume on Windows 11, lsblk -f, cryptsetup status and luksDump on Linux, fdesetup status on macOS.

Published
Updated
Last checked
Applies to
Windows 11 BitLocker and device encryption, Linux disks encrypted with LUKS, macOS FileVault
Technical specification
Target artifactFull-disk encryption of the system drive (BitLocker or device encryption on Windows, Linux Unified Key Setup (LUKS) on Linux, FileVault on macOS) and the recovery key or spare passphrase that unlocks it when the normal way fails.
Default behaviourWindows 11 24H2 can encrypt the system drive during setup, but protects it only once the recovery key is backed up to a Microsoft account, Microsoft Entra ID or Active Directory; with local accounts only, the data is encrypted but unprotected. A Mac with Apple silicon or a T2 chip encrypts its data, but until FileVault is on, the key is protected only by the hardware. LUKS protects a Linux disk only where it was set up, usually at installation.
Safe stateWindows: VolumeStatus FullyEncrypted, ProtectionStatus On and a RecoveryPassword protector; Linux: / sits on a crypto_LUKS device with a spare passphrase and a header backup; macOS: FileVault on. Every recovery key is stored away from the computer it unlocks.
Check on Windowsmanage-bde -status C:
Check on WindowsGet-BitLockerVolume -MountPoint C: | Format-List VolumeStatus, ProtectionStatus, EncryptionPercentage, KeyProtector
Check on Linuxlsblk -f
Check on macOSfdesetup status
Fix on Windowssign in once with an administrator's Microsoft account, or turn BitLocker on in Manage BitLocker; back up the recovery key there
Fix on Linuxadd a spare passphrase with sudo cryptsetup luksAddKey /dev/DEVICE, and keep a header backup off the machine
Fix on macOSSystem Settings > Privacy & Security > FileVault > Turn on FileVault

Windows 11

Windows PowerShell, as Administrator
manage-bde -status C:
Get-BitLockerVolume -MountPoint C: | Format-List VolumeStatus, ProtectionStatus, EncryptionPercentage, KeyProtector
Get-BitLockerVolume resultMeaning
FullyEncrypted, On, {RecoveryPassword, Tpm}Encrypted and protected, with a 48-digit recovery password
FullyEncrypted with ProtectionStatus OffEncrypted, but no key protector guards the key: the data is not protected
EncryptionInProgressStill encrypting
FullyDecryptedNot encrypted
No RecoveryPassword in KeyProtectorThere is no recovery password for this drive

manage-bde -status reports the same through its conversion status, protection status and key protector lines. For scripts, manage-bde -status C: -protectionaserrorlevel returns 0 when the drive is protected and 1 when it is not.

No recovery password

This creates a random 48-digit recovery password and adds it as a protector:

Windows PowerShell, as Administrator
Add-BitLockerKeyProtector -MountPoint C: -RecoveryPasswordProtector

Then back it up, as in the next section.

Automatic device encryption on Windows 11 24H2

  • Starting with Windows 11 version 24H2, automatic device encryption no longer needs Modern Standby or Hardware Security Test Interface (HSTI) compliance, and still starts when it detects untrusted direct memory access (DMA) buses. Microsoft says more devices now qualify. It still needs a Trusted Platform Module (TPM) and UEFI Secure Boot.
  • After a clean installation, Windows encrypts the system drive and fixed data drives with a clear key, which Microsoft describes as the equivalent of suspended BitLocker.
  • The clear key is removed, a TPM protector is added and the recovery key is backed up when an administrator signs in with a Microsoft account (the key goes to that account), or when the device joins Microsoft Entra ID or Active Directory (the key goes there).
  • Microsoft's BitLocker overview says a device that only uses local accounts "remains unprotected even though the data is encrypted". On Windows 11 Pro, BitLocker can still be turned on by hand in Manage BitLocker.
  • Device encryption covers the system drive and fixed drives, not USB drives.

Where the Windows recovery key is

  • Microsoft account: sign in at aka.ms/myrecoverykey.
  • Work or school device: the organization's Microsoft Entra ID or Active Directory; ask its IT department.
  • Your own copies: Manage BitLocker offers to save the key to your Microsoft account, save it to a USB flash drive, save it to a file or print it. It refuses to save the file on the drive it unlocks.

Match the stored key to the drive: manage-bde -protectors -get C: lists each protector with its type and ID, and Microsoft's recovery instructions use the first 8 digits of the recovery key ID to pick the right key. From Windows 11 24H2, the recovery screen also shows a hint of the Microsoft account that holds the key.

Stop Without the key, the data is gone

Microsoft Support says it cannot retrieve, provide or recreate a lost BitLocker recovery key. If the key cannot be found, the device has to be reset, which removes all files.

Linux with LUKS

Linux, as a user with sudo
lsblk -f
sudo cryptsetup status NAME
sudo cryptsetup luksDump /dev/DEVICE
  • lsblk -f prints every block device as a tree, with its file system type. An encrypted partition shows crypto_LUKS; once unlocked, its mapping appears below it and holds the file system. If / is not below a crypto_LUKS device, the system disk is not encrypted with LUKS.
  • cryptsetup status NAME, with the mapping name from that tree, reports whether it is active and its type, such as LUKS2, its cipher and the underlying device.
  • cryptsetup luksDump /dev/DEVICE, on the crypto_LUKS partition, prints the header: its LUKS version and the numbered key slots. Each slot holds one passphrase or key.

On Linux, the recovery options are a spare passphrase and a header backup:

Linux, as a user with sudo
sudo cryptsetup luksAddKey /dev/DEVICE
sudo cryptsetup luksHeaderBackup --header-backup-file /media/USB/luks-header.img /dev/DEVICE
  • luksAddKey asks for an existing passphrase, then adds a new one in a free slot. Store the spare passphrase the way you would a recovery key.
  • cryptsetup's manual warns that if the LUKS header is damaged, "all data is permanently lost unless you have a header-backup". Keep the backup off the machine.
  • The header backup plus any passphrase that was valid when it was made can decrypt the disk, even after that passphrase is changed or removed. Store it as carefully as the passphrase, and make a new one after you change passphrases.

macOS with FileVault

macOS Terminal
fdesetup status
sudo fdesetup haspersonalrecoverykey
  • On a Mac with Apple silicon or a T2 chip, Apple's security guide says that without FileVault the volume key is protected only by the hardware; with FileVault it is protected by your password as well.
  • Turn it on in System Settings > Privacy & Security > FileVault, as an administrator. Apple's Mac guide for macOS 26 gives two choices: let your iCloud account unlock the disk, or create a recovery key and not use iCloud. Apple's Passwords guide says that on macOS 26 and later the recovery key can also be seen in the Passwords app.
  • The recovery key is 24 letters and numbers. Apple says to keep a copy somewhere other than the encrypted disk, and not in the same place as the Mac. If you forget both your password and the recovery key, your files are lost.
  • haspersonalrecoverykey prints true when a personal recovery key exists. sudo fdesetup validaterecovery asks for the key you hold and prints true if it is the right one; sudo fdesetup changerecovery -personal makes a new one.

Store recovery keys safely

  • Microsoft and Apple both say to keep the recovery key away from the computer it unlocks, for example printed, or on a USB drive kept elsewhere.
  • Whoever holds a recovery key can unlock the disk and read all of its data, Microsoft notes. Store it like the password to your password manager.
  • Write which key belongs to which device on the emergency recovery sheet from Guide 6.

Sources