Disclaimer: This project was created in an evening to test the capabilities of Claude Sonnet 4 out of curiosity. Please use at your own risk.
- π End-to-End Encryption - Only conversation participants can read messages
- π Decentralized - No central servers, each user controls their own data
- π΅οΈ Metadata Privacy - Even sender identities are encrypted
- β Cryptographic Verification - All messages are signed and verified
- π Self-Sovereign - Your data, your homeserver, your control
- π± Cross-Platform - Built with Tauri for native desktop performance
- Decentralized Storage: Messages stored as encrypted files on user homeservers
- ECDH Encryption: Shared secrets derived from elliptic curve cryptography
- Public Discoverability: Files are publicly accessible but cryptographically private
- Signed Messages: All communications are cryptographically signed for authenticity
βββββββββββββββββββ βββββββββββββββββββ
β Alice's β β Bob's β
β Homeserver β β Homeserver β
βββββββββββββββββββ€ βββββββββββββββββββ€
β Encrypted Files βββββΊβ Encrypted Files β
β Public Storage β β Public Storage β
βββββββββββββββββββ βββββββββββββββββββ
β² β²
β β
π Decrypt π Decrypt
β β
βββββββββββ βββββββββββ
β Alice βββββββββββββββΊβ Bob β
β(Private)β Shared β(Private)β
β Keys β Secret β Keys β
βββββββββββ βββββββββββ
What's Public: File existence, timestamps, encrypted data blobs
What's Private: Message content, sender identity, conversation relationships
git clone [email protected]:coreyphillips/pubky-private-messenger.git
cd pubky-private-messenger
yarn add -D @tauri-apps/cli
yarn installyarn tauri devyarn tauri build- Recovery File: Select your
.pkarrrecovery file (likevanity-core...4-15.pkarr) - Passphrase: Enter your decryption passphrase
- Click Sign In to authenticate with your keypair
- Copy a contact's public key (starts with their pubky address)
- Paste into the "Enter public key" field in the left sidebar
- Click Add to start a conversation
- Select a contact from the sidebar (they'll appear highlighted in blue)
- Type your message in the input field at the bottom
- Press Enter or click Send
- Messages are encrypted and stored on both homeservers
- β Green checkmarks indicate verified messages
- Edit Names: Click the βοΈ icon next to any contact to set a custom name
- Remove Contacts: Click the Γ button to delete a contact
- View History: All messages are cached locally for quick access
// Shared secret generation (ECDH)
shared_secret = ECDH(sender_private_key, recipient_public_key)
// Message encryption
encrypted_content = encrypt(message_content, shared_secret)
encrypted_sender = encrypt(sender_pubkey, shared_secret)
// Digital signature
signature = sign(message_hash, sender_private_key)Messages are stored as JSON files on homeservers:
{
"timestamp": 1704067200,
"encrypted_sender": [147, 23, 198, 45, ...],
"encrypted_content": [78, 123, 56, 89, ...],
"signature_bytes": [12, 34, 56, 78, ...]
}| Data Type | Visibility | Encryption |
|---|---|---|
| Message content | π Private | β AES-256 |
| Sender identity | π Private | β AES-256 |
| Timestamps | ποΈ Public | β Metadata |
| File existence | ποΈ Public | β Metadata |
| Conversation mapping | π Private | β Path hashing |
- Frontend: Vanilla JavaScript + HTML/CSS
- Backend: Rust with Tauri framework
- Networking: Pubky protocol over HTTP
- Cryptography: Ed25519 + X25519 + AES-256
- Storage: Distributed homeserver network
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Client β β Tauri β β Homeserver β
β (Frontend) βββββΊβ (Backend) βββββΊβ (Storage) β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β β β
UI Logic Crypto Logic File Storage
Caching Key Management Network Access
Contacts Message Signing Public Discovery
- Forward Secrecy: Each conversation uses unique shared secrets
- Authentication: Ed25519 signatures prevent impersonation
- Integrity: Message tampering is cryptographically detectable
- Confidentiality: AES-256 encryption protects content
- Metadata Privacy: Sender identities encrypted
Protected Against:
- Mass surveillance and traffic analysis
- Homeserver operator snooping
- Network eavesdropping
- Message tampering
- Identity spoofing
Not Protected Against:
- Endpoint compromise (device theft)
- Coercion to reveal keys
- Traffic timing analysis
- Availability attacks on homeservers
pubky-private-messenger/
βββ src/ # Frontend (HTML/CSS/JS)
β βββ index.html
β βββ main.js
β βββ styles.css
βββ src-tauri/ # Backend (Rust)
β βββ src/
β β βββ main.rs
β β βββ lib.rs
β β βββ commands.rs # Tauri commands
β β βββ messaging.rs # Core crypto logic
β βββ Cargo.toml
βββ package.json
βββ tauri.conf.json
Access debugging utilities in the browser console:
// List all stored accounts
debugContacts.listAccounts()
// View current user's contacts
debugContacts.currentContacts()
// Check message caches
debugContacts.messageCaches()
// Clear specific account data
debugContacts.clearAccount(pubkey)# Install Rust dependencies
cd src-tauri
cargo build
# Install Node dependencies
cd ..
yarn install
# Run in development mode
yarn tauri dev
# Create production build
yarn tauri buildWe welcome contributions! Please read our contributing guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Clone your fork
git clone https://github.com/yourusername/pubky-private-messenger.git
cd pubky-private-messenger
# Install dependencies
yarn install
cd src-tauri && cargo build && cd ..
# Run tests
cargo test
yarn test
# Start development server
yarn tauri devThis project is licensed under the MIT License - see the LICENSE file for details.
- Pubky Protocol: https://pubky.org
- Documentation: [Coming Soon]
- Bug Reports: GitHub Issues
- Discussions: GitHub Discussions
This software is experimental and under active development. This software has not undergone formal security auditing. Use at your own risk for sensitive communications.

