Native Secure Enclave backed SSH keys on macOS

Passphrases vs hardware‑backed SSH keys

  • Some argue password‑encrypted SSH/GPG keys on macOS are a hassle, leading people to use unencrypted keys.
  • Others say encrypted keys + ssh-agent have been easy on macOS “since the 2000s” and work fine.
  • Debate over value: critics note stolen encrypted keys can be brute‑forced offline without rate limits; defenders say a passphrase still buys time vs. a blank passphrase, which many developers use.
  • Password managers acting as ssh-agents (1Password, Bitwarden) are cited as a convenient way to keep strong passphrases.

Native Secure Enclave SSH keys

  • Many are enthusiastic: built‑in, TouchID‑gated, no third‑party agent like Secretive, and less setup friction.
  • Keys are generated in the Secure Enclave; the so‑called “private key file” is just a reference for OpenSSH tooling.
  • Works similarly to OpenSSH FIDO (sk-*) keys; limited to NIST P‑256 (no Ed25519).

Key export, backup, and threat models

  • Non‑exportable keys mean losing the laptop loses the key. Some see this as a feature (strong exfiltration resistance) and recommend multiple per‑device keys instead of backups.
  • There is an “exportable” variant: the key is stored encrypted by the enclave, then on export is re‑encrypted with a user password. Opinions:
    • Pro: better to export once for disaster recovery than keep long‑lived private files on disk.
    • Con: makes enclave benefits moot; malware could script export and trick users into TouchID.
  • General advice: use multiple keys and/or an SSH CA; don’t rely on backing up a single private key.

Comparison with YubiKeys, TPM, and Secretive

  • YubiKeys remain popular for power users, with guidance to have a master offline key, multiple hardware tokens, and revocation.
  • TPM‑backed SSH on Linux and Windows is mentioned as analogous.
  • Secretive’s UX (per‑use confirmation) is liked, but the native solution wins on trust and not requiring extra software; Secretive’s newer versions are reported buggy.

Crypto choices and security concerns

  • macOS only supports NIST curves/ECDSA here. Some distrust NIST curves due to opaque parameter generation and mention concerns about potential backdoors and legislation (e.g., Chip Security Act).
  • EdDSA is noted as potentially more side‑channel‑resistant generally, but there are fault‑attack papers; this may be why enclaves favor ECDSA.

Limitations and open gaps

  • No native Secure Enclave path for GPG keys or generalized signing; SSH and some SSL use cases are covered by third‑party tools instead.
  • Keys don’t sync via iCloud like passkeys; no straightforward multi‑device sharing.
  • Usability nitpicks: frequent TouchID prompts (especially for Git signing), external keyboards, and lack of a secure‑desktop style trusted UI can make biometric prompts spoofable in theory.