Skip to content
zx0rPublic

About

[GUI/CLI] macOS Secure Enclave SSH auth and Git commit signing

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

proof

Hardware-backed SSH agent and Git commit signer for Apple Secure Enclave and PIV SmartCards, enforcing Touch ID / PIN user verification.

proof binds OpenSSH authentication and Git commit signatures directly to cryptographic hardware. Private keys are generated on-chip inside the Apple Silicon Secure Enclave (SEP) or PIV SmartCards, isolated from host memory, and require physical User Verification (Touch ID biometric assertion or SmartCard PIN) for signing and authentication operations.

Warning

Active Development (Pre-1.0): CLI flags, JSON schemas, and internal IPC interfaces may introduce breaking changes before v1.0.0. Core Tier 1 functionality (Secure Enclave and PIV) is usable for daily workflows, but no independent third-party security audit has been conducted yet.


Installation

Note

Homebrew distribution (brew install --cask zx0r/tap/proof) is currently in development.


Quick Start

1. Configure Git Commit Signing

Configure Git to invoke proof as its SSH signing program:

git config --global gpg.format ssh
git config --global gpg.ssh.program proof

2. Create a Hardware Key

Generate a hardware-isolated key inside the Apple Silicon Secure Enclave:

proof key create "GitHub Signing" --store enclave

(For PIV SmartCards and YubiKeys, existing on-card keys provisioned via ykman or PIV tools are automatically discovered via CryptoTokenKit).

3. Export Public Key for GitHub / GitLab

Export the public identity in OpenSSH format:

proof key export "GitHub Signing"

Copy the output (ecdsa-sha2-nistp256 AAAA...) and add it as a Signing Key in your GitHub/GitLab account settings.

4. Enable Automatic Signing in Git

Pass the exported key to Git using the literal key:: prefix:

git config --global user.signingkey "key::$(proof key export "GitHub Signing")"
git config --global commit.gpgsign true

Every standard git commit will now trigger a native macOS Touch ID or SmartCard PIN prompt.


CLI Reference

USAGE
  proof <command> [options]
  proof -Y <subcommand> [args...]

COMMANDS
  sign        Sign data using OpenSSH signing format (Git commit signing bridge)
  verify      Verify an OpenSSH signature against allowed signers
  key         Manage hardware-backed cryptographic keys
  agent       Manage and inspect background SSH agent
  env         Print environment configuration for shell integration
  version     Display version and hardware capabilities
  help        Show help for any command

GLOBAL OPTIONS
  -j, --json  Output results in structured JSON format
  -h, --help  Show help information

Git & OpenSSH Protocol Bridge (-Y)

When configured as gpg.ssh.program, Git executes proof with OpenSSH flags directly:

  • proof -Y sign [args...]: Intercepts Git signing invocations, injects the isolated SSH_AUTH_SOCK, and executes signing via Darwin.execve targeting /usr/bin/ssh-keygen.
  • All other -Y subcommands (verify, find-principals, check-novalidate): Transparently proxied directly to /usr/bin/ssh-keygen.

Key Management

proof key list                      # List all hardware-backed identities
proof key show <name>               # Display public identity details and fingerprint
proof key export <name>             # Export public key string (SSHSIG compatible)
proof key create <name> [options]   # Generate new hardware-isolated key in Secure Enclave
proof key delete <name> [--force]   # Permanently delete Secure Enclave key (or unlink SmartCard ref)
proof key attest <name>             # Export hardware attestation certificate chain (SEP / PIV)

Caution

For Secure Enclave keys, proof key delete permanently and irreversibly destroys the private key inside the hardware keybag.

Shell Environment

Integrate the proof background agent socket into your shell profile:

# zsh / bash (~/.zshrc or ~/.bashrc)
eval "$(proof env)"

# fish (~/.config/fish/config.fish)
proof env --shell fish | source

Lineage

proof is an independent project originally forked from Secretive, refocused around a CLI-first workflow, native Git commit signing, and PIV SmartCard support.


License

MIT License. See LICENSE for details.

About

[GUI/CLI] macOS Secure Enclave SSH auth and Git commit signing

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages