Repository navigation
soc: apple: sep: add blocking biometric application keys - #407
Closed
cameroncooper wants to merge 3 commits into
Closed
cameroncooper wants to merge 3 commits into
cameroncooper wants to merge 3 commits into
Conversation
cameroncooper
marked this pull request as draft
November 7, 2026 21:34
Match native access-control serialization, including Boolean values and complete encoded-member ordering. Add biometric signing and combined signing/decryption policy builders, credential-bound image initialization and context disposal messages. These are wire primitives only; existing callers keep their authorization flow. Source policy and capture-layout tests pass, and the SEP module builds with the matching kernel toolchain. Signed-off-by: Cameron Cooper <c@meron.cc>
Expose application-owned P-256 creation, signing and ECIES decryption through /dev/sep-keys. Each file owns its request and cancellation IDs; the kernel keeps fresh authentication credentials private and disposes them before publishing success. Failed disposal suppresses results and disables the key API until reboot. Use a shared capture lease to arbitrate biometric and key work. Preserve BIO worker generations and suspend handling, retain ownership through hardware cleanup, and serialize enqueue with removal. Claim successful results before user copies, wipe failed delivery, and prevent automatic syscall restarts after submission. The matching module build, source credential-cleanup tests and six request/file/lease/delivery tests pass. Hardware regression is performed on the completed series. Signed-off-by: Cameron Cooper <c@meron.cc>
Provide one importable blocking client with request-scoped cancellation and no automatic EINTR retries. Add disposable signing/decryption commands, the authenticated item envelope helper, C/C++ ABI assertions and client failure/ID tests. Document device permissions, broker duties, delivery/cancellation errors and biometric-only policies. The machine-held identity-bag secret is not fresh password authentication; software passkeys and native SEP keys have different execution boundaries. Signed-off-by: Cameron Cooper <c@meron.cc>
cameroncooper
force-pushed
the
sep/application-keys
branch
from
November 8, 2026 13:58
875788f to
56800a8
Compare
Author
|
Closing: this work now continues against aurora-silicon/linux, where SEP development happens, as a smaller series built on the current driver:
These should reach this tree once its SEP driver is resynced with aurora-silicon. |
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.
Applications need SEP-owned keys with fresh biometric authorization for each
signature or item decryption. Add a root-only
/dev/sep-keysinterface forP-256 key creation, SHA-256 digest signing and authenticated ECIES decryption.
The existing
/dev/sep-bioABI remains available for fingerprint services.Applications store an opaque wrapped key and its public point. Native signing
keeps the private scalar in SEP; decryption returns application plaintext to the
caller. There is no password fallback: the driver's machine-held identity secret
is setup material, not fresh user authentication. Current keys accept any enrolled
finger, so enrollment changes can grant access to existing keys. Current-set
binding and private-key import are not implemented.
Request ownership
Private-key ioctls block interruptibly. Each open file owns its requests and
cancellation IDs; a worker owns copied inputs and the hardware lease until
cleanup finishes, even after cancellation or signal interruption. Idle BIO and
key files can coexist. Conflicting firmware operations return
EBUSYbeforesubmission. Existing BIO worker generations and suspend draining are retained.
Every private operation matches into a fresh kernel-owned credential and disposes
it before publishing success. Cleanup failure suppresses the result and disables
key operations until reboot. A result is consumed before copying to userspace,
outside state locks. Copy faults cannot enable redelivery; cancellation cannot
recall an already-claimed copy. The reference client uses one libc ioctl call
without implicit EINTR replay.
Three signed, signed-off commits separate wire/policy helpers, the driver/UAPI
with implementation-path tests, and the canonical Python client/documentation.
The exported
<linux/apple-sep.h>contains the layouts and ownership contract;tools/aurora-sep/keys/README.mddescribes broker responsibilities and limitations.This replaces this draft's earlier experimental key start/poll interface.
Validation
7.2.11-15-1-ARCHconfiguration,exported symbols and recipe-qualified Rust/LLVM toolchain.
The suites exercise actual credential-cleanup paths, owned requests, lease
lifetime, cancellation, result-copy faults and wiping, client cleanup, and
C/C++ UAPI consistency. No credential-disposal faults were injected on hardware.
first opening BIO. Disposable key creation, independently verified signing and
exact disposable decryption passed.
worker drain and a fresh no-finger timeout returned no plaintext. Data-copy and
response-descriptor faults consumed their results and rejected the same ID.
operation after wake with fprintd and automatic BIO activation suppressed.
Scope
The test used an existing identity with provisioning disabled and its previously
selected
xart_guard=0policy. This changes no device tree, provisioning or xARTpolicy, and does not solve guarded M1 first setup or macOS coexistence. Cold
power-cycle and other hardware are not claimed.
The combined policy enables signing and decryption. A complete forbidden-operation
matrix for the signing-only policy remains unvalidated. A trusted broker must
enforce caller identity, item ownership, operation restrictions and WebAuthn
origin/RP rules. A fingerprint does not authenticate a transaction's display or
isolate Linux users sharing one SEP identity.
One tag-test request expired before a capture, and one ordinary matching request
ended without a frame; the tester may have missed those scan windows. Separately
requested scans passed. An initial fprintd no-match and a subsequent daemon claim
refusal were also observed; the daemon was restarted before the successful
matching check. These are recorded, not claimed as fixed by this series.
This continues the application-key work proposed in
aurora-silicon/linux#1004 on Omacom's current integration
tree, with the blocking ownership model now replacing the draft's polling model.