Skip to content

soc: apple: sep: add biometric application key operations - #1004

Closed
cameroncooper wants to merge 7 commits into
aurora-silicon:feat/sepfrom
cameroncooper:sep-application-keys
Closed

cameroncooper wants to merge 7 commits into
aurora-silicon:feat/sepfrom
cameroncooper:sep-application-keys

Conversation

@cameroncooper

@cameroncooper cameroncooper commented Nov 5, 2026 •

Copy link
Copy Markdown

The existing SEP interface supports fingerprint verification and attestation with a fixed machine key. This adds application-owned P-256 keys with biometric-authorized signing and ECIES item decryption.

Applications persist an opaque wrapped key blob and public key. Each operation matches a fingerprint into a fresh kernel-owned authentication context, performs the requested operation, and deletes the context before publishing success. The private key stays inside SEP; item decryption returns plaintext to the requesting process.

The change includes:

  • Key creation, asynchronous signing and decryption ioctls, with separate capability flags.
  • Request ownership across cancellation, close and worker cleanup.
  • Single-use plaintext delivery and deadline-based expiry of undelivered results.
  • Focused policy and lifecycle tests, plus reference clients and interface documentation.

The interface is additive to biometric ABI version 4 and remains root-only and exclusive. Support is limited to the validated key-store protocol; other profiles fail closed. Private-key import, P-384, application authorization and vault migration are outside this change.

Validation

  • Every commit builds the ARM64 SEP module.
  • Six focused source tests pass; the KUnit-enabled SEP object compiles. No KUnit runtime pass is claimed.
  • C ABI sizes, pointer offsets and ioctl values compile-check.
  • Reference-client capability checks and software envelope tests pass.

Hardware regression passed on J293/M1 with the final driver artifact loaded after a warm reboot:

  • Capability discovery and restoration of existing enrollments.
  • Creation of a biometric decrypt-enabled application key.
  • Ordinary fingerprint verification.
  • Signing with an existing saved wrapped key, independently verified with OpenSSL.
  • Decryption with an existing saved wrapped key, exact plaintext comparison and single-use delivery.
  • Modified authentication-tag rejection without plaintext.
  • Autonomous expiry of an undelivered matched result, with worker release confirmed before another result poll.
  • Cancellation of an undelivered matched result, with no plaintext and prompt worker release.
  • A fresh request with the finger removed timing out without plaintext.

Keychain application integration was separately validated against the preceding working implementation. The final regression did not modify the keychain application or its data. Hardware results are from J293/M1.

Bind signing policies to a biometric credential set and construct the extended image-init request that authorizes that set. Sort key-store dictionary members by their full encoding so nested access-control policies match the native serializer.

Include synthetic known-answer coverage for policy encoding, member ordering and credential capture fields.
Match into a fresh kernel-owned credential and delete it before publishing a signature. Reserve operation ownership across cancellation, close and synchronous key calls so concurrent ioctls cannot overlap the shared key-store session. Include focused lifecycle checks.
Expose ECIES decryption and an explicit capability flag while retaining the signing ABI. Match each request into a fresh credential, wipe canceled or expired plaintext, and use a condition-variable deadline wait instead of periodic worker polling. Extend lifecycle tests for both operation types and undelivered output.
@cameroncooper
cameroncooper marked this pull request as draft November 5, 2026 20:00

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things are needed before this can be merged:

  1. These commits have no Signed-off-by line: de635fd, fb3d004, 19134cc, 8a85d23, 9ed2e3a, 4780d77, 239f949, 2a4f488, 7d805d1, bf06a25, 8b64787, 879b3b1, b926201, f01b2a8, 1475757, 53d1ab3, 3fc257f, 6180a47, 8ea5bd6. Please add them.
  2. The base feat/sep is far behind. Please rebase onto integration/aurora and retarget the PR there. A test merge conflicts in drivers/soc/apple/{bio.rs,pm.rs,pm_shim.c,profile.rs,sbio.rs,Kconfig,Makefile} and several board DTs (t6000-j314s, t6001-j314c, t6001-j316c, t6021-j414c, t8112-j413).

@cameroncooper

Copy link
Copy Markdown
Author

Closing: this targeted the frozen feat/sep, and most of it is superseded by what has since landed in integration/aurora (#1196, #1544). What is still needed is reworked against integration/aurora, as asked, in #2048, #2049 (on #1824), #2050 and #2051.

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.

2 participants