Skip to content

Historical: Linux-based prototype

Encrypted data and LUKS2

This page documents the earlier Linux-based prototype as of 24 November 2026. It does not describe the independent Khelforge OS, and its steps are not instructions for it. See the independent Khelforge OS.

Partly implementedRecorded statusLast verified

Khelforge uses LUKS2 in two independent places. The home of the account created at first boot is always encrypted. The root partition can be encrypted too, with a switch in the installer that is off by default. Both come from upstream tools. Khelforge adds no disk cryptography of its own. Both are tested only in disposable virtual machines.

Property Value
Created by systemd-homed, when the first account is created
Container A LUKS2 image per account with btrfs inside
Opened with The password or the recovery key, at sign-in
Locked again When the account signs out. Virtual machine tests check this

The installer can encrypt the root partition with LUKS2. The switch is on its Encryption page and is off unless the person turns it on. When it is off, the root is plain ext4. When it is on, the installed system asks for a passphrase at boot. The installer asks for at least eight characters, typed twice. It never writes the passphrase to a file or a command line, and wipes it afterwards.

The EFI system partition is not encrypted, and the boot files are not protected against someone who can modify the disk. See limitations.

Situation Encrypted home only Encrypted root as well
Powered-off disk, files in the account’s home Protected Protected
Powered-off disk, system files, logs, /var Not protected Protected
Machine running and signed in Not protected Not protected
Machine suspended The screen locks, but the home’s key stays in memory The same
Password and recovery key both lost Data cannot be recovered Data cannot be recovered

Swap, /var and the root file system are outside the home’s encryption.

Locking the home on suspend was investigated and rejected for now. The lock screen could not ask for the password after resume, and the alternative risks data loss. No safe design has been decided yet, so the home stays unlocked while the machine is suspended.

  • The home image is inspected: it is a LUKS2 container with btrfs inside, and the home is opened from it.
  • Wrong passwords and wrong recovery keys are refused. The right ones unlock and sign in.
  • The disk itself is checked after every step of a key change.
  • A power cut with the home active was followed by a normal sign-in.
  • Installer tests install an encrypted root, check that the boot asks for the passphrase, and check that the volume is closed after success and after a failed installation.
  • No real disks. Performance of large game libraries inside an encrypted home image was not measured.
  • Existing unencrypted homes are not converted.
  • A copy of an active home image is not a safe backup. Back up files from inside the signed-in session.