Skip to main content

Dead man's switch for your digital legacy. Shamir-split encrypted vaults.

Project description

Afterkey

Dead man's switch for your digital legacy. Encrypt your crypto seeds, passwords, and final instructions in a vault, split the key across trusted people using Shamir's Secret Sharing, and let a dead man's switch handle the rest.

No company to trust. No cloud servers. Everything runs locally.

How It Works

  1. You create a vault with your digital assets (crypto seeds, passwords, instructions for loved ones)
  2. The vault is encrypted with a random 256-bit key, then the key is split into 5 shares — any 3 can reconstruct it
  3. You distribute the shares to trusted people (family, friends, attorney)
  4. You check in weekly by running afterkey checkin
  5. If you stop checking in, the system progressively alerts you, then your contacts, then asks them to confirm, then makes the vault recoverable

No single person can access your vault. No single company can shut it down. Your heirs need 3 of 5 shares to unlock it, and the dead man's switch ensures they know when and how.

Install

pip install afterkey

Or from source:

git clone https://github.com/yourusername/afterkey.git
cd afterkey
pip install .

Quick Start

# Set up your vault (interactive wizard)
afterkey init

# Check in weekly to stay active
afterkey checkin

# Check your status anytime
afterkey status

The Dead Man's Switch

When you stop checking in, the system escalates in stages:

Days Silent Stage What Happens
0-6 Active All good
7-29 Alerting You get emailed: "Hey, check in"
30-59 Notifying Your contacts get notified: "Have you heard from them?"
60-89 Voting Contacts are asked to confirm you're gone (2 of 3 must agree)
90+ Released Vault becomes recoverable with 3 shares

A check-in at any stage resets everything back to Active.

Commands

afterkey init                    # Full setup wizard
afterkey checkin                 # Weekly proof-of-life
afterkey status                  # Dashboard

afterkey vault create            # Create/update vault
afterkey vault show              # View vault contents

afterkey shares show             # List share files
afterkey shares verify           # Verify shares can reconstruct the key

afterkey watchdog run            # Run the dead man's switch (put this in cron)
afterkey watchdog run --dry-run  # See what would happen without acting

afterkey vote --contact "Alice"  # Contact confirms owner is gone
afterkey recover s1.json s2.json s3.json  # Heir decrypts vault with 3 shares
afterkey recover s1.json s2.json s3.json -o vault.json  # Save to file

afterkey contacts add "Alice" alice@email.com
afterkey contacts list
afterkey contacts remove "Alice"

Automating the Watchdog

Add a daily cron job to run the dead man's switch automatically:

crontab -e

Add this line:

0 9 * * * /path/to/afterkey watchdog run

This checks your status every morning at 9am and sends notifications if needed.

For Heirs: Recovering the Vault

If you've received a share file and been told it's time to recover the vault:

# You need 3 share files (from 3 different people)
afterkey recover share-1-alice.json share-2-bob.json share-3-carol.json

# Or save to a file
afterkey recover share-1-alice.json share-2-bob.json share-3-carol.json -o recovered.json

Security

  • AES-256-GCM encryption for the vault
  • Shamir's Secret Sharing over GF(2^256-189) — information-theoretically secure, meaning k-1 shares reveal zero information about the key regardless of computational power
  • Scrypt key derivation for passphrase verification (n=2^20, r=8, p=1)
  • No network required — everything is local files. Email notifications are optional.
  • No dependencies beyond click, rich, and cryptography (maintained by the Python Cryptographic Authority)
  • The Shamir implementation is ~80 lines of auditable Python with no external dependencies

Data Storage

Everything lives in ~/.afterkey/:

~/.afterkey/
├── vault.enc          # Encrypted vault blob
├── vault.meta.json    # Salt, nonce, share params (not secret)
├── shares/            # Generated share files (distribute these!)
├── state.json         # Check-in timestamps, contacts, watchdog state
└── checkins.log       # Append-only check-in log

License

BSL 1.1 — source available, free for personal use.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

afterkey-0.1.0.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

afterkey-0.1.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file afterkey-0.1.0.tar.gz.

File metadata

  • Download URL: afterkey-0.1.0.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for afterkey-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ff86bd770f839e4136e2cec05c8ed85c5a758fdfa23de036397482f9f0f57dfa
MD5 7867ba29d220c6c58b81b2ea7fb3a32d
BLAKE2b-256 699fe76df601dafc98af32707c7679d701aa0620c08b29972ff1e9dc3f41ddef

See more details on using hashes here.

File details

Details for the file afterkey-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: afterkey-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for afterkey-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 891ff993fc152237032c1610d8d5809ce0c58fc2949cac8dac938ebf89d3d447
MD5 eaa33fdb4f4e57b75d4212607072f39a
BLAKE2b-256 927f40ef7d21e7801a8fec4b04f023a343efb799ff0a066d5016e11ded1e266b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page