# KeyKeeper

KeyKeeper helps you back up passwords and other important secrets so that they can be recovered even if you forget them or lose access to your usual password manager. It stores encrypted data that can only be decrypted once a "project" is unlocked using a combination of secrets called *key layers*.

## How It Works

Each project contains a master public/private key pair. The public key is used to encrypt secrets and the private key is protected inside *key stores*.

A key store can be unlocked only when all of its required *key layers* are available. Layers are random secrets that you can print and keep in different physical locations. For example, you can print out a layer and store it in a safe deposit box, print out another one and give it to a friend.

## Getting Started

To start using KeyKeeper, follow these simple steps:

1. **Install KeyKeeper**: Download the binary from the releases page.
2. **Create a New Project**
3. **Generate Layers**: Generate the required layers and print them out for physical storage in different locations.
4. **Create Key Stores**: Generate key stores for every relevant combination of layers.
5. **Encrypt Your Secrets**: Encrypt your sensitive information such password manager master passwords, PGP keys, or anything else you may lose or forget.

## Disclaimer

KeyKeeper uses modern cryptography but has not been audited. Use it at your own risk.

## Development
The Rust toolchain is pinned to keep builds reproducible. The pinned version is defined in `rust-toolchain.toml`. Cargo will install the correct version Rust toolchain automatically.

Install the required development tools:
- `capnproto` (`capnp` CLI), used by Cap'n Proto-based components.
- `release-plz`, used for release automation and changelog generation.
- `cargo-edit`, used to manage Cargo dependencies from the command line.
- `cargo-insta`, used for snapshot testing workflows.
- `cargo-bundle`, used for packaging/bundling tasks.
- `cargo-dist`, used for building and publishing release artifacts.

Example installation:

```bash
brew install capnp cargo-bundle cargo-dist cargo-edit
cargo install cargo-insta release-plz
```

```bash
brew install capnp
cargo install cargo-insta release-plz cargo-bundle cargo-dist cargo-edit
```

Currently installed versions on this system (checked on 2026-02-20):
- `capnp`: `Cap'n Proto version 1.3.0`
- `cargo-edit`: `cargo-edit v0.13.8`
- `release-plz`: `release-plz 0.3.156`
- `cargo-insta`: `cargo-insta 1.46.3`
- `cargo-bundle`: `cargo-bundle v0.9.0`
- `cargo-dist`: `cargo-dist v0.30.4`

## Conventional Commits

KeyKeeper uses conventional commit messages to maintain a clear history and facilitate automated changelog generation using `release-plz`.

The following prefixes are used for commit messages:
- `feat`: for new features
- `fix`: for bug fixes
- `docs`: for documentation changes
- `style`: for formatting changes that do not affect code logic
- `refactor`: for code changes that neither fix a bug nor add a feature
- `perf`: for performance improvements
- `test`: for adding or correcting tests
- `chore`: for maintenance tasks like build process changes
- `revert`: to revert a previous commit
