
Password Manager and Private Messenger
KeyPears is a password manager, but its true foundation is something more fundamental: a federated Diffie-Hellman key exchange protocol. Today, we're announcing the completion of a proof-of-concept messaging system built on this foundation—the first step toward secure password sharing between users.
To share a password from alice@keypears.com to bob@example.com, we need to:
That's essentially messaging with an attachment. So we started with plain text messages. Once messaging works, adding password attachments is straightforward.
Every KeyPears vault has a master key (a secp256k1 private key). The naive approach would be to publish each vault's public key and let users compute shared secrets via ECDH. But this is problematic:
Our solution: generate unique "engagement keys" for each relationship. Alice and Bob each get a relationship-specific keypair that reveals nothing about their underlying vault keys.
Here's the problem: Bob might be offline when Alice wants to message him. She needs his public key, but Bob isn't there to generate it.
Our solution uses a mathematical property of elliptic curve cryptography: if you add two private keys together, the result corresponds to adding the two public keys together.
(privateKey_A + privateKey_B) * G = publicKey_A + publicKey_B
This enables server-assisted key generation:
derivationPrivKey and computes derivationPubKeyengagementPubKey = vaultPubKey + derivationPubKeyderivationPrivKey to Bob when he comes onlineengagementPrivKey = vaultPrivKey + derivationPrivKeyThe server never learns Bob's vault private key, yet can generate valid engagement public keys on his behalf. Bob can derive the corresponding private keys whenever he needs them.
Without spam controls, anyone could flood inboxes with garbage. We use the same proof-of-work system as vault registration: every message requires solving a computational puzzle.
The difficulty is configurable at three levels:
When you trust someone, you can lower their difficulty to make replies instant. Spammers face the full difficulty—minutes of computation per message.
In a federated system, there's no central database. Alice's server
(keypears.com) and Bob's server (example.com) are completely separate. So
instead of a shared "channel" record, each participant has their own view:
Alice's server stores:
┌─────────────────────────────────────┐
│ channel_view │
│ owner: alice@keypears.com │
│ counterparty: bob@example.com │
│ secretId: "01JFX..." (for vault) │
└─────────────────────────────────────┘
Bob's server stores:
┌─────────────────────────────────────┐
│ channel_view │
│ owner: bob@example.com │
│ counterparty: alice@keypears.com │
│ secretId: "01JFA..." (for vault) │
└─────────────────────────────────────┘
Each user manages their own copy. The server-generated secretId ensures all of
Alice's devices see the same channel ID when syncing.
When Alice sends a message to Bob:
Bob's server only sees incoming messages. Alice's server doesn't know who Alice is messaging—she saves sent messages locally. This is more private than email, where your outgoing mail server sees everything.
Here's what happens when Alice sends a message to Bob:
1. Alice gets her engagement key (from her server, purpose: "send")
2. Alice requests Bob's engagement key (from Bob's server, purpose: "receive")
→ Bob's server returns the key + required PoW difficulty
3. Alice solves PoW challenge (WebGPU or WASM fallback)
4. Alice encrypts message with ECDH shared secret
5. Alice sends to Bob's server with PoW proof
6. Bob's server validates PoW and stores in inbox
7. Bob's sync service moves message from inbox to vault
8. Bob reads message (decrypted client-side)
The messaging system spans both the API server and the Tauri client:
API Server (TypeScript/orpc):
getCounterpartyEngagementKey - Public endpoint, returns recipient's keysendMessage - PoW-authenticated message deliverygetChannels / getChannelMessages - Session-authenticated queriesgetInboxMessagesForSync / deleteInboxMessages - Vault sync integrationClient (TypeScript/React):
@keypears/libSecurity Constants:
This proof-of-concept handles text messages. The next steps:
keypears.com and
example.comThe foundation is solid. Messaging between addresses works. Now we build the secret sharing features that will make KeyPears a truly collaborative password manager.
The messaging system is available in the latest KeyPears development build. You can:
name@keypears.comThe complete implementation is open source in our GitHub repository.
KeyPears: Your secrets, everywhere, owned by you.