Signal Protocol Encryption

Your privacy is not negotiable

Payra uses the gold standard of encryption protocols to ensure that only you and your recipients can read your messages.

How your messages are protected

๐Ÿ”‘

X3DH Key Exchange

Extended Triple Diffie-Hellman (X3DH) establishes a shared secret between two parties โ€” even if one is offline. This forms the foundation for the Double Ratchet algorithm.

Uses Curve25519 elliptic-curve keys. Identity keys are generated on your device and never transmitted to servers.

๐Ÿ”„

Double Ratchet Algorithm

Every single message uses a fresh encryption key. Even if one key is compromised, past and future messages remain secure. This is forward secrecy and break-in recovery.

Combines the Diffie-Hellman ratchet with a symmetric-key KDF ratchet. Implemented using libsignal.

๐Ÿ”

AES-256-GCM for Media

All files, images, and videos are encrypted with AES-256-GCM before upload. The media encryption key is sent via the E2EE message channel only.

Uses authenticated encryption with 96-bit random IVs. Media stored on servers is ciphertext only โ€” we cannot decrypt it.

โ˜๏ธ

Encrypted Cloud Backups

Cloud backups are encrypted end-to-end with a key derived from your password. Your backup provider (Google Drive, iCloud, Dropbox) stores ciphertext only.

Backup key derived using Argon2id with high memory cost. Neither PayraLab nor your backup provider can read your messages.

Infrastructure Security

๐Ÿฆ€

Rust Backend

Memory-safe, no null pointer dereferences or data races by design.

๐Ÿ—„๏ธ

PostgreSQL

ACID-compliant โ€” message ordering and key rotation are transactional.

๐Ÿ”’

Zero Plaintext

Message content is never stored unencrypted. Servers only handle ciphertext.

โšก

Constant-Time Crypto

No GC pauses during key exchange. Timing side-channels are eliminated.

๐Ÿ›ก๏ธ

TLS 1.3

All client-server connections use TLS 1.3 with forward secrecy.

๐Ÿ”‘

2FA / TOTP

Two-factor authentication with any TOTP app (Authy, 1Password, Google Authenticator).

System Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  Client Apps                     โ”‚
โ”‚   Android ยท iOS ยท macOS ยท Windows ยท Linux ยท Web  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
             โ”‚  HTTPS/REST        โ”‚  PayraProto (WS)
             โ–ผ                    โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Rust API Server  โ”‚  โ”‚  Rust Real-time Gateway  โ”‚
โ”‚   (Axum + Tower)   โ”‚  โ”‚  (Custom Binary Proto)   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                         โ”‚
         โ–ผ                         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  PostgreSQL 16  โ”‚     โ”‚  Redis 7 Cluster โ”‚
โ”‚  (Primary DB)   โ”‚     โ”‚  (Pub/Sub+Cache) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  S3 / MinIO     โ”‚     โ”‚  mediasoup SFU   โ”‚
โ”‚  (Media Store)  โ”‚     โ”‚  (Group Calls)   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Privacy Controls

You are in complete control of your privacy settings. Every setting defaults to the most private option.

Last seen & online status โ€” choose who can see
Profile photo visibility control
Who can add you to groups
Who can find you by phone number
Read receipts on/off
IP address protection for calls
Account deletion & data export (GDPR)
Linked devices management

Safety Number Verification

You can verify the identity of any contact by comparing Safety Numbers โ€” a unique fingerprint of your shared encryption keys. If the numbers match in person or via a separate channel, your conversation has never been intercepted.