Repository navigation
luks: FileVault-model password unlock for the aurora-sep token - #21
Merged
Merged
Conversation
The keyslot secret is sealed by the Secure Enclave to a key under a per-user key bag that only the user's password unlocks; the enclave checks the password, entangles it with its UID key and counts failed attempts. The token keeps the wrapped bag, the key record and the sealed secret, none of which opens without the password on this Mac. aurora-sep-fde enrols a password and a FileVault-style recovery key (each its own bag and keyslot), changes the password without touching the keyslot, resets a forgotten password with the recovery key, and removes the installer passphrase once both exist. The token plugin takes the password (or recovery key) as the LUKS2 token PIN, so cryptsetup and systemd-cryptsetup prompt for it; a recovery-key-shaped entry only reaches recovery tokens, so it never costs the user's bag an attempt. tests/test-fde.sh runs every flow on LUKS2 file images against a file-backed enclave double (SEP_FDE_MOCK), one directory per Mac: 32/32 on x86_64 (cryptsetup 2.8.6) and aarch64 Fedora 44 (2.8.8). Kernel side: linux branch sepfde/fde-seal (SEP_BIO_FDE_*) on #921. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g is locked For hardware qualification: with the user's bag locked, ask the enclave to open the sealed secret and require a refusal; unlock with the password and require the same request to succeed. The secret is never printed. test-fde.sh gains the row (31/31 on x86_64 and aarch64). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A fresh variant-5 user bag wraps to 1504 bytes; the kernel raised SEP_KEYBAG_BLOB_MAX to 4096. The ioctl numbers encode the struct size, so match it and assert the layout. Assisted-by: LLM
The existing LUKS passphrase from --unlock-key-file is a key file in the cryptsetup sense: every byte counts, a trailing newline included. It was read like a password file, newline stripped, so a slot made by "cryptsetup luksFormat DEV FILE" from a file ending in a newline did not open (EPERM when adding the keyslot). The test now writes its installer key file with a trailing newline. Assisted-by: LLM
…ag locked After the lock transition the key store keeps the bag in its locking phase, its class keys usable, for a grace period (about 40 s on the Neo, for every lock reason) and then reports it locked. gate-check now unlocks the bag first, locks it, waits up to 120 s for lock_phase 1, reports how long that took, and only then requires the unseal to be refused. Assisted-by: LLM
Contributor
Author
|
Hardware rows on the Neo: real SEP, kernel from linux#1339, LUKS2 container file only. enroll, gate, reboot, recovery, change and reset pass. Two rows fail: replay (an old header with the old password opens after a reboot) and the other-OS lane (it still opens). Full table in linux#1339. Changes from the run:
|
Contributor
Author
|
Cross-Mac row on the J616s: the Neo's container is refused there (the token import fails with |
This was referenced Nov 12, 2026
Closed
This was referenced Nov 20, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds password mode to the
aurora-sepLUKS2 token: the keyslot secret is sealed by the Secure Enclave to a key under a per-user key bag that only the user's password unlocks (linux#1339 on top of #921). The enclave checks the password, entangles it with its UID key and counts failed attempts; the token keeps the wrapped bag, the key record and the sealed secret, none of which opens without the password on this Mac. This is the FileVault model: unlock tied to the user's password.aurora-sep-fde: enrol a password authority and a FileVault-style recovery key (each its own bag + keyslot); change the password without touching the keyslot or re-encrypting; reset a forgotten password with the recovery key; remove the installer passphrase once a password and a recovery key both exist (the FileVault end state).tests/test-fde.shruns every flow on LUKS2 file images against a file-backed enclave double (SEP_FDE_MOCK, one directory per Mac): 31/31 on x86_64 (cryptsetup 2.8.6) and aarch64 Fedora 44 (2.8.8), incl. the enclave refusing to unseal while the bag is locked (gate-check), wrong-password refusal + counting, reboot survival, recovery, password change with anti-rollback, a copied volume refused on another Mac, and a tampered sealed secret refused.Draft until the kernel side merges and the Neo hardware proof passes. dracut module + distro packaging + SELinux follow once proven.