secure-enclave-unlocker #24

Merged
sneak merged 7 commits from secure-enclave-unlocker into main 2026-03-14 07:36:28 +01:00

7 Commits

Author SHA1 Message Date
02f253fc02 Merge branch 'secure-enclave-unlocker' of git.eeqj.de:sneak/secret into secure-enclave-unlocker 2026-03-13 19:56:02 +07:00
clawbot
cc53469f90 Fix review findings: stub panics, derivation index, tests, README
- Replace panic() calls in seunlocker_stub.go with error returns,
  following the existing keychainunlocker_stub.go pattern
- Fix hardcoded derivation index 0 in getLongTermKeyForSE: now reads
  vault metadata to use the correct DerivationIndex (matching
  getLongTermPrivateKey in keychainunlocker.go)
- Add tests for SE unlocker exports in secret package (both darwin
  and non-darwin stub tests)
- Update README to reflect SE implementation: remove 'planned' labels,
  update Apple Developer Program references, add secure-enclave to
  unlocker type lists and examples
- Run go fmt on files with import ordering issues
2026-03-11 06:36:20 -07:00
9ab960565e Fix nlreturn lint errors in macse CGo bindings 2026-03-11 06:36:20 -07:00
9d238a03af Add Secure Enclave unlocker for hardware-backed secret protection
Adds a new "secure-enclave" unlocker type that stores the vault's
long-term private key encrypted by a non-exportable P-256 key held
in the Secure Enclave hardware. Decryption (ECDH) is performed
inside the SE; the key never leaves the hardware.

Uses CryptoTokenKit identities created via sc_auth, which allows
SE access from unsigned binaries without Apple Developer Program
membership. ECIES (X963SHA256 + AES-GCM) handles encryption and
decryption through Security.framework.

New package internal/macse/ provides the CGo bridge to
Security.framework for SE key creation, ECIES encrypt/decrypt,
and key deletion. The SE unlocker directly encrypts the vault
long-term key (no intermediate age keypair).
2026-03-11 06:36:20 -07:00
b9aaf8ddac Merge branch 'main' into secure-enclave-unlocker 2026-03-11 02:34:45 +01:00
e10b4cec82 Fix nlreturn lint errors in macse CGo bindings 2026-03-11 08:34:24 +07:00
4adeeae1db Add Secure Enclave unlocker for hardware-backed secret protection
Adds a new "secure-enclave" unlocker type that stores the vault's
long-term private key encrypted by a non-exportable P-256 key held
in the Secure Enclave hardware. Decryption (ECDH) is performed
inside the SE; the key never leaves the hardware.

Uses CryptoTokenKit identities created via sc_auth, which allows
SE access from unsigned binaries without Apple Developer Program
membership. ECIES (X963SHA256 + AES-GCM) handles encryption and
decryption through Security.framework.

New package internal/macse/ provides the CGo bridge to
Security.framework for SE key creation, ECIES encrypt/decrypt,
and key deletion. The SE unlocker directly encrypts the vault
long-term key (no intermediate age keypair).
2026-03-11 06:17:34 +07:00