Skip to Content
Threat Model

Threat Model

Security assumptions, attacker capabilities, and mitigations in Zentalk.

Trust Assumptions

What Zentalk Trusts

ComponentTrust LevelAssumption
Client deviceFullDevice not compromised
Client codeFullCode integrity verified
Cryptographic primitivesFullX25519, AES-256, etc. are secure
Random number generatorFullOS provides secure randomness

What Zentalk Does NOT Trust

ComponentTrust LevelMitigation
ServersZeroE2EE, zero-knowledge design
NetworkZeroTLS + E2EE + 3-hop relay
Other usersPartialVerification, blocklist
Service operatorsZeroCannot access content

Attacker Model

Passive Network Adversary

Capabilities:

  • Observe all network traffic
  • Record encrypted messages
  • Perform traffic analysis

Mitigations:

AttackMitigation
Content inspectionAES-256-GCM encryption
Metadata analysis3-hop relay, traffic padding
Traffic correlationConstant-rate dummy traffic
Long-term decryptionForward secrecy (Double Ratchet)

Active Network Adversary

Capabilities:

  • Modify network traffic
  • Inject messages
  • Perform MITM attacks

Mitigations:

AttackMitigation
Message injectionEd25519 signatures
Message modificationGCM authentication tags
MITM key exchangeIdentity verification, fingerprints
Replay attacksMessage counters, nonce uniqueness

Compromised Server

Capabilities:

  • Access all stored data
  • Modify server behavior
  • Log all requests

Mitigations:

AttackMitigation
Read messagesE2EE (keys never on server)
Read contactsEncrypted contact list
Identify usersPseudonymous wallet addresses
Correlate sender/recipient3-hop relay
Serve malicious codeClient-side integrity checks

Compromised Relay Node

Capabilities:

  • Observe traffic through node
  • Correlate timing

Mitigations:

AttackMitigation
Traffic observationMulti-hop routing (3 nodes)
Timing correlationTraffic padding
Content inspectionPer-hop encryption layers

Device Theft/Seizure

Capabilities:

  • Physical access to device
  • Extract storage contents

Mitigations:

AttackMitigation
Key extractionDevice key + PIN/biometric
Message historyLocal encryption (AES-256-GCM)
Session hijackingRe-authentication required
Future messagesRevoke device, rotate keys

Quantum Adversary (Future)

Capabilities:

  • Break elliptic curve cryptography
  • Factor RSA keys
  • Run Shor’s algorithm

Mitigations:

AttackMitigation
Break X25519Hybrid Kyber-768 (post-quantum)
Decrypt recorded trafficKyber + forward secrecy
Break signaturesEd25519 → future PQ signatures

Attack Vectors

Key Exchange Attacks

AttackThreat LevelDefense
MITM on X3DHHighIdentity key verification
Prekey exhaustionMediumServer rate limiting
Malicious prekeysMediumSignature verification
Key reuseLowEphemeral keys per session

Message Layer Attacks

AttackThreat LevelDefense
ReplayHighUnique nonces, counters
ReorderingMediumSequence numbers
DeletionMediumDelivery receipts
ModificationHighGCM authentication

Metadata Attacks

AttackThreat LevelDefense
Social graph analysisHighEncrypted contacts, 3-hop relay
Timing analysisHighTraffic padding
Message size analysisMediumPadding to fixed sizes
Online statusMediumConfigurable presence

Application Layer Attacks

AttackThreat LevelDefense
Malicious updatesCriticalCode signing, reproducible builds
XSSHighCSP, input sanitization
CSRFMediumSameSite cookies, tokens
SQL injectionHighParameterized queries

Security Properties

Confidentiality

ScopeGuarantee
Message contentOnly sender and recipient(s) can read
Contact listOnly user can access
Call contentOnly participants can hear/see
MetadataMinimized, protected by 3-hop relay

Integrity

DataProtection
MessagesGCM tag, signatures
KeysAuthenticated key exchange
Profile dataSigned by identity key

Authenticity

AssertionVerification
Message authorEd25519 signature chain
User identityIdentity key fingerprint
DeviceDevice-specific signatures

Forward Secrecy

Time WindowProtection
Per messageDouble Ratchet key rotation
Per sessionEphemeral DH keys
Long-termKey deletion policy

Guarantee: Compromising current keys does not reveal past messages.

Post-Compromise Security

EventRecovery
Session key leakedNext ratchet step heals
Identity key leakedUser must rotate identity
Device compromisedRevoke device, re-establish sessions

Guarantee: Compromising current keys provides only temporary advantage.

Identity Key Compromise Recovery

When an Identity Key is compromised, immediate action is required to restore security and prevent impersonation. This section outlines the detection, response, and recovery process.

Compromise Detection

Warning Signs

IndicatorSeverityDescription
Unknown devicesCriticalDevices you did not authorize appear in linked devices
Unauthorized sessionsCriticalActive sessions from unknown locations
Safety number changesHighContacts report unexpected fingerprint changes
Messages you did not sendCriticalContacts receive messages you never wrote
Account setting changesHighProfile, privacy settings modified without your action
Login notificationsHighAuthentication alerts from unknown locations

Server-Side Anomaly Detection

Zentalk servers monitor for suspicious patterns without accessing message content:

Detection TypeMonitored Behavior
Geographic anomaliesLogins from physically impossible locations
Session velocityMultiple new sessions in short timeframe
Device fingerprintingUnusual device characteristics
Behavioral patternsDeviation from normal usage patterns
Prekey consumptionAbnormal rate of prekey requests

Note: Anomaly detection is privacy-preserving and operates on metadata patterns only.

Immediate Response

When you suspect your Identity Key is compromised, take these steps immediately:

StepActionPriority
1Open Security Settings → Emergency RevocationImmediate
2Revoke all active sessionsImmediate
3Remove all linked devicesImmediate
4Enable account lockdown modeImmediate
5Notify critical contacts through alternative channelsWithin minutes
6Document any suspicious activity observedWithin hour

Session Revocation Process

1. Navigate to Settings → Security → Active Sessions 2. Select "Revoke All Sessions" 3. Confirm with device PIN/biometric 4. All session keys are immediately invalidated 5. Server marks all prekeys as revoked

Contact Notification

Immediately inform your contacts through alternative secure channels:

  • Use a pre-established verification code/phrase
  • Confirm your new Identity Key fingerprint
  • Warn them to ignore messages from old sessions
  • Request they verify safety numbers before communicating

Identity Key Rotation Process

Step-by-Step Rotation Procedure

PhaseActionTechnical Details
1Generate new Identity Key pairEd25519 keypair generated locally
2Generate new Signed PrekeySigned with new Identity Key
3Upload new prekey bundleOld bundle marked as revoked
4Cryptographically link old → newSigned transition statement
5Broadcast key changePush notification to all contacts
6Invalidate old Identity KeyPermanently marked as compromised

How Contacts Learn About New Identity Key

MethodDescription
Push notificationImmediate alert: “Contact has rotated Identity Key”
Safety number changeVisual indicator on conversation
Verification promptApp prompts to re-verify fingerprint
Signed transitionOld key signs statement pointing to new key

Transition Period Handling

During the transition period (typically 24-72 hours):

ConcernHandling
Old key messagesRejected by client, warning displayed
New key messagesRequire safety number verification
Pending messagesRe-encrypted with new session keys
Group messagesRequire session re-establishment

What Happens to Pending Messages

Message StateOutcome
Undelivered (in transit)Discarded, sender notified to resend
Delivered but unreadRemain readable if device not compromised
Queued on serverDeleted, cannot be decrypted
In sender’s outboxSender must re-establish session and resend

Impact on Existing Sessions

All Sessions Must Be Re-established

After Identity Key rotation, all existing Double Ratchet sessions become invalid:

Session TypeRequired Action
1:1 conversationsNew X3DH key exchange required
Group membershipsSender key redistribution
Linked devicesRe-link with new Identity Key
Verified contactsRe-verify safety numbers

Message History Implications

Data TypeAccessibility
Messages before compromiseReadable (forward secrecy protected)
Messages during compromisePotentially exposed to attacker
Messages after rotationSecure with new keys
Local message databaseIntact if device not compromised

Important: Messages encrypted with compromised keys should be considered potentially exposed.

Group Membership Re-verification

StepAction
1Automatic removal from all groups (security measure)
2Group admins notified of member key change
3Re-invitation required for each group
4Other members verify your new Identity Key
5New Sender Key distributed after re-joining

Contact Notification

How Contacts Are Notified of Key Change

Contacts receive multiple indicators of your key change:

Notification TypeVisibility
Safety number changed bannerProminent, in conversation
Push notification”Security alert: Contact changed keys”
Identity key fingerprintNew fingerprint displayed
Verification status resetPreviously verified → unverified
Warning on message sendPrompt to verify before sending

Verification Requirement

After your Identity Key changes, contacts see:

⚠️ Safety Number Changed [Your Name]'s security keys have changed. This could mean: • They reinstalled Zentalk • They switched devices • Someone may be trying to impersonate them Verify the new safety number before sending sensitive messages. [Verify] [Accept Risk]

Risk of Impersonation During Transition

RiskMitigation
Attacker uses old keyOld key marked revoked, messages rejected
Attacker races to new keyCryptographic link from old to new
Social engineeringOut-of-band verification required
Delayed revocationImmediate server-side invalidation

Critical: Always verify new Identity Keys through a separate secure channel.

Recovery Timeline

PhaseDurationActions
Detection0-30 minutesIdentify suspicious activity, confirm compromise
Revocation1-5 minutesRevoke sessions, remove devices, enable lockdown
Key Generation< 1 minuteGenerate new Identity Key and prekey bundle
Upload & Broadcast1-2 minutesPush new keys to server, notify contacts
Contact Notification1-24 hoursAll contacts receive key change alerts
Session Re-establishment24-72 hoursRebuild sessions as contacts come online
Full Recovery1-7 daysAll regular contacts have verified new key

Timeline Considerations

FactorImpact on Timeline
Number of contactsMore contacts = longer full recovery
Contact activity levelInactive contacts may take weeks
Group membershipsEach group requires admin action
Linked devicesMust re-establish each device

Prevention Measures

Hardware Security Keys

FeatureBenefit
FIDO2/WebAuthnIdentity Key stored in secure element
Tamper-resistantPhysical extraction extremely difficult
No key exportPrivate key never leaves device
Transaction confirmationUser presence required for signing

Supported hardware: YubiKey, Titan Security Key, Trezor, Ledger

Multi-Factor for Sensitive Operations

OperationRequired Factors
Identity Key exportDevice PIN + biometric + time delay
New device linkingExisting device approval + verification
Session revocationDevice PIN + biometric
Account recoveryRecovery code + verification

Regular Key Verification Habits

PracticeFrequencyBenefit
Verify critical contactsAfter any key changeDetect MITM attacks
Review linked devicesWeeklyDetect unauthorized access
Check active sessionsWeeklyIdentify suspicious activity
Rotate prekeysAutomatic (monthly)Limit exposure window
Export/backup recovery codesAnnuallyEnsure recovery capability

Additional Prevention Recommendations

RecommendationDescription
Dedicated deviceUse separate device for sensitive communications
Secure enclaveEnable hardware-backed key storage
Minimal linkingOnly link essential devices
Regular auditsReview security settings monthly
Incident response planKnow steps to take before compromise occurs

Out of Scope

Zentalk does not protect against:

ThreatReason
Compromised deviceEndpoint security is OS responsibility
Rubber-hose cryptanalysisPhysical coercion outside protocol
Malicious recipientCannot prevent screenshots/forwarding
Side-channel attacksTiming, power analysis require physical access
Bugs in implementationMitigated by audits, not by design

Security Recommendations

For Users

ActionBenefit
Verify key fingerprintsPrevents MITM attacks
Use strong device PINProtects local data
Enable disappearing messagesReduces exposure window
Review linked devicesDetect unauthorized access
Keep app updatedReceive security patches

For High-Risk Users

ActionBenefit
Use dedicated deviceIsolation from other apps
Enable relay-only callsHide IP address
Disable link previewsPrevent URL tracking
Use through TorAdditional anonymity layer
Rotate identity periodicallyLimit correlation window

Audit Status

ComponentStatus
Protocol designInternal review
Cryptographic implementationPending external audit
Client applicationPending external audit
Server infrastructurePending external audit
Last updated on