End-to-end encrypted messaging on Algorand
Features
X25519 + ChaCha20-Poly1305
Per-message ephemeral keys
Messages stored on blockchain
No central server required
Optional PSK mode (v1.1)
Session-bounded PSK derivation
Wire Format
v1.0 — Standard Mode (0x01)
v1.1 — PSK Mode (0x02)
Cryptographic Primitives
| Function | Algorithm |
|---|---|
| Key Agreement | X25519 ECDH |
| Encryption | ChaCha20-Poly1305 |
| Key Derivation | HKDF-SHA256 |
PSK Ratchet (v1.1)
Optional pre-shared key mode adds quantum resistance through hybrid key derivation.
| Property | Standard (0x01) | PSK (0x02) |
|---|---|---|
| Key derivation | X25519 ECDH | X25519 + ratcheted PSK |
| Quantum resistance | No | Defense-in-depth |
| Max plaintext | 882 bytes | 878 bytes |
| Session size | N/A | 100 messages |
| Out-of-order delivery | Yes | Yes (counter window) |
The ratchet derives a unique key per message from a shared PSK using deterministic session-based HKDF. An attacker must break both X25519 and know the PSK to decrypt.
Documentation
Implementations
| Language | Repository | Status |
|---|---|---|
| Swift | swift-algochat | Production |
| TypeScript | ts-algochat | Active |
| Python | py-algochat | Active |
| Rust | rs-algochat | Active |
| Kotlin | kt-algochat | Active |
| Angular | algochat-web | Active |
Transport
Messages are transmitted as the note field of Algorand payment transactions:
Version History
| Version | Changes |
|---|---|
| 1.0 | Initial specification. Standard mode (0x01) with X25519 + ChaCha20-Poly1305. |
| 1.1 | Add ratcheting PSK mode (0x02). Hybrid X25519 + pre-shared key derivation for quantum defense-in-depth. |