Purpose
The Ping-Pong Wake Protocol is Secure Legion's stateless, serverless delivery handshake. It solves one brutal requirement:
"Do not deliver a message to my device unless I am physically present and have unlocked it."
This guarantees:
Ping-Pong is the high-security mode of Secure Legion. Other users can still use the asynchronous encrypted relay mode for convenience.
Roles
Sender (S)
Creates and encrypts the message.
Receiver (R)
Authenticates and retrieves the message.
No permanent servers or relays are required. Relays can act only as ephemeral transport layers for wake tokens, never as message custodians.
Cryptographic Material
Each Secure Legion identity includes:
Identity Key (Ed25519)
Long-term signing key for authenticity.
Wake Key (X25519/Kyber768)
Used for ping/pong wake encryption.
Session/Chat Keys
Ephemeral keys for message encryption (Double Ratchet-style).
Onion Encryption Key
Protects locally queued messages.
All private keys are stored in hardware security modules (SecureEnclaves / Secure Elements).
Lifecycle Overview
Sender creates message M.
M is encrypted → ciphertext C.
C stored locally (encrypted queue).
Sender sends encrypted Ping Token to Receiver.
Receiver wakes, authenticates, sends Pong.
Sender transmits ciphertext C → Receiver.
Receiver decrypts and displays. C is deleted.
Sender Behavior
Message Preparation
- Encrypt plaintext M → ciphertext C.
- Store C locally (per-contact encrypted queue).
Ping Creation
- Create Wake Token: {nonce, metadata_hash = hash(nonce)}
- Encrypt with Receiver's Wake Key → Ping.
- Sign with Identity Key.
Ping Transport
- Direct (online peer)
- Tor onion route
- Encrypted Push/Notification / UDP channel
Relays only move opaque encrypted tokens, not messages.
Receiver Behavior
Wake & Authentication
- Receiver decrypts Ping(s) via Wake Key.
- User authentication (PIN, biometric) required before generating Pong.
- Prevents message delivery to seized/locked device.
Pong Response
- Receiver constructs Pong.
- Includes original nonce, signature, ephemeral address.
- Sends encrypted Pong back to Sender.
Secure Transfer After Pong
Sender verifies Pong and matches to queued message ID.
Sender transmits ciphertext C over secure channel.
Sender deletes C.
Receiver decrypts in memory.
For view-once messages, keys and plaintext are erased instantly.
Key Advantages
Device-Gated Delivery
Messages can't arrive without verified user presence.
Zero Metadata Exposure
Relays only see opaque, fixed-length tokens.
Configurable Privacy Profiles
Users can choose Ping-Pong (real-time, max security) or asynchronous mode with encrypted time-limited storage.
Storage Model
| Component | Stored Where | Notes |
|---|---|---|
| Ciphertext | Sender Device | Encrypted, TTL-based |
| Wake Tokens | Transport | Opaque, fixed-size |
| Private Keys | Hardware Enclave | Non-exportable |
Failures & Timeouts
Each queued message has:
Duress PIN Integration
When a duress PIN is entered:
Device wipes local private keys.
Broadcasts signed revocation event.
Senders delete queued messages for that identity.
Patentable Novelty
Summary
The Ping-Pong Wake Protocol gives users control over when and how their encrypted messages are delivered.
No central servers, no metadata leaks, and complete receiver autonomy — fulfilling Secure Legion's promise:
No servers. No metadata. No compromises.