github doug445/AsahiLocker v1.1.0
v1.1.0 — hardened resume, recovery key, dry-run, loopback CI

latest releases: v3.0.0, v2.2.1, v2.2.0...
3 months ago

Project renamed: asahi-luks-tooling → asahi-LUKS2-encrypter (old URLs redirect).

Safety & correctness fixes

  • Resume after a hard interrupt (power loss / kill) now works: cryptsetup reencrypt --resume-only refuses with "Device requires reencryption recovery" until cryptsetup repair runs — the resume path now does repair-then-retry automatically. Found by the new loopback test.
  • ESP grub stub is never clobbered: GRUB config regenerates only at /boot/grub2/grub.cfg, never onto the ESP chainload stub (the exact failure boot-guards/esp-grub-stub-guard exists to undo); a clobbered stub is detected and flagged.
  • An already-open mapper is cross-checked against the selected ROOT partition (closing on mismatch), and an inner-UUID change after open is a typed-override stop — no more silently configuring the wrong system.
  • Mounted-target guard (live-desktop automounts) before the ENCRYPT confirmation; idempotent shrink (interrupted retries no longer re-shrink 32M each time); snapper create-config actually registers configs; recovery-bundle UUID fallback resolves to a real device path; cryptsetup ≥ 2.4 floor.

New features

  • Recovery key: optional random 64-hex second keyslot, enrolled before the header backup so the backup contains it (LUKS_RECOVERY_KEY=yes|no).
  • --dry-run (or LUKS_DRY_RUN=1): full read-only detection + printed plan, exits before the point of no return.
  • Non-interactive / fleet: LUKS_TARGET_ROOT/BOOT/EFI partition pinning, LUKS_PASSPHRASE_FILE, LUKS_MAPPER_NAME.
  • KDF profiles: three argon2id presets (aggressive / moderate / fast) with unlock times benchmarked on the running machine; env-pinned parameters below a safety floor are refused.
  • 12-point verification gate (was 10): per-kernel initramfs checks for dm-crypt (auto-repaired if missing) and for keyboard/input drivers — without one you cannot type the passphrase at boot.
  • rhgb quiet is stripped so the first passphrase prompt is visible; post-encryption-setup.sh restores it after the first encrypted boot (LUKS_KEEP_SPLASH=1 opts out).

Testing & CI

  • tests/loopback-core-test.sh: the real encrypt / open / recovery-key / hard-kill → repair → resume sequence against a throwaway file-backed loop device (15 checks).
  • GitHub Actions: shellcheck + bash -n on every script, and the loopback test on x86_64 and aarch64 runners — all green.

🤖 Generated with Claude Code

Don't miss a new AsahiLocker release

NewReleases is sending notifications on new releases.