Skip to content

Instantly share code, notes, and snippets.

@lrvick
Created August 18, 2022 21:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lrvick/c5213880c87b0cdd98430465a9560ca4 to your computer and use it in GitHub Desktop.
Save lrvick/c5213880c87b0cdd98430465a9560ca4 to your computer and use it in GitHub Desktop.
Secret Management
  1. Hardware decryption with user interaction
  • Tools:
  • Defense:
    • Prevent theft of secrets not currently being used
  • Usage:
    • Encrypt secrets to Yubikey PGP keys of all holders as individual files
    • Place secrets in Git repo
    • Use "pass" command to sync and decrypt secrets on demand as needed
      • some-signing-command --key=<(pass Exodus/somesecret)
    • Each access requires a Yubikey tap to decrypt
  1. Hardware decryption with explicit user consent
  1. Shamirs Secret Sharing to tamper evident system
  • Tools:
    • Remotely attestable TEE or HSM
      • Nitro Enclave
      • Google Confidential Compute
      • osresearch/heads booted server
  • Defense:
    • Prevent theft of secrets not currently being used
    • Prevent operator from being tricked into revealing wrong secret
    • Prevent compromised operator from stealing any secrets
  • Usage:
    • Public keys of trusted quorum provided to enclave
    • Secrets are created in enclave
    • Secrets are split into share requiring M-of-N to reconstruct
    • Enclave renturns shares encrypted to each quorum member public key
    • M-of-N quorum members can submit shares of given secret to servers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment