Skip to content

Feature: Unlock LUKS-encrypted volumes with a passphrase prompt - #204

Merged
MemerGamer merged 2 commits into
mainfrom
feat/luks-passphrase
Nov 2, 2026
Merged

MemerGamer merged 2 commits into
mainfrom
feat/luks-passphrase

Conversation

@MemerGamer

Copy link
Copy Markdown
Owner

Resolved / Related Issues

  • Closes # (no existing issue; resolves the LINUX-TODO(udisks2-luks) in UDisks2Model.cs)

Steps used to test these changes

  1. Built Files.Platform.Tests (-warnaserror) and ran the full suite: 1461 passed, 0 failed (new UDisks2LuksTests: listing locked/unlocked, unlock then mount, wrong passphrase re-prompt with retry flag, cancel (no error), already-unlocked cleartext reuse, no prompt registered, other unlock errors, error mapping, buffer cleared).
  2. Built src/Files.App net10.0-desktop Release: 0 errors.

Design

  • IVolumePassphrasePrompt (Abstractions) implemented by the App with the existing credential dialog (title/description are localized, passed via new optional view model properties).
  • Locked LUKS containers are listed (VolumeInfo.IsLocked); MountAsync unlocks via Encrypted.Unlock then mounts the cleartext device. Wrong passphrase re-prompts; cancel throws OperationCanceledException (swallowed, no toast); already-unlocked containers use CleartextDevice/CryptoBackingDevice.
  • Passphrase travels as UTF-8 bytes (no string), written straight to the D-Bus message and zeroed afterwards; never logged. The D-Bus library's pooled message buffer is not zeroed (best effort).

Not verified

  • No real encrypted device and no dialog on a real display (per repo rules); exact UDisks2 wrong-passphrase error wording is matched heuristically (Failed + "Operation not permitted"/passphrase).
  • Unmounted internal (HintSystem) encrypted partitions stay hidden, as other unmounted system volumes.

🤖 Generated with Claude Code

MemerGamer and others added 2 commits November 2, 2026 16:05
Locked LUKS containers are listed and, when mounted, unlocked through
UDisks2 Encrypted.Unlock using a passphrase prompt provided by the UI layer.
Already-unlocked containers mount their existing cleartext device.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MemerGamer
MemerGamer merged commit 00946ad into main Nov 2, 2026
2 checks passed
@MemerGamer
MemerGamer deleted the feat/luks-passphrase branch November 2, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant