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
- You create a vault with your digital assets (crypto seeds, passwords, instructions for loved ones)
- The vault is encrypted with a random 256-bit key, then the key is split into 5 shares — any 3 can reconstruct it
- You distribute the shares to trusted people (family, friends, attorney)
- You check in weekly by running
afterkey checkin - 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, andcryptography(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.
Metadata
Release files for afterkey 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| afterkey-0.1.0.tar.gz | 23.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| afterkey-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.1 kB
Release files / afterkey-0.1.0.tar.gz
| Download URL | afterkey-0.1.0.tar.gz |
|---|---|
| Size | 23.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff86bd770f839e4136e2cec05c8ed85c5a758fdfa23de036397482f9f0f57dfa
|
|
BLAKE2b-256 checksum How to use checksums |
699fe76df601dafc98af32707c7679d701aa0620c08b29972ff1e9dc3f41ddef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.8
|
Release files / afterkey-0.1.0-py3-none-any.whl
| Download URL | afterkey-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
891ff993fc152237032c1610d8d5809ce0c58fc2949cac8dac938ebf89d3d447
|
|
BLAKE2b-256 checksum How to use checksums |
927f40ef7d21e7801a8fec4b04f023a343efb799ff0a066d5016e11ded1e266b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.8
|
Security for afterkey 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.