Skip to content

Lantern Security Architecture โ€‹

Last Updated: January 4, 2026
Version: 1.0


Our Security Philosophy โ€‹

Lantern is built on the principle of privacy by design. We strive to implement the strongest security measures possible while maintaining usability. We are transparent about our approach and actively welcome community feedback to identify and address potential vulnerabilities.

Core Commitment: If we don't have your data, we can't leak it, lose it, or be forced to hand it over.


Hybrid Security Architecture โ€‹

Lantern uses different encryption strategies for different types of data:

1. Profile Data (Zero-Knowledge Encryption) โ€‹

What: Birth date, real name (if any), sensitive PII
How: Passphrase-based client-side encryption
Storage: Encrypted ciphertext on Firestore

User passphrase (never leaves device)
    โ†“
Derives AES-256 key (PBKDF2, 600k iterations)
    โ†“
Encrypts data client-side
    โ†“
Server stores: encrypted blob + public salt

Result: Backend CANNOT decrypt without user's passphrase

Implementation: See ZERO_KNOWLEDGE_ENCRYPTION.md


2. Chat Messages (Device-Only Storage) โ€‹

What: Direct messages between users
How: Stored locally on device, server only relays
Storage: Device's encrypted local storage (IndexedDB)

Alice writes message
    โ†“
Encrypted on Alice's device
    โ†“
Relayed through server (no storage)
    โ†“
Delivered to Bob's device
    โ†“
Decrypted on Bob's device
    โ†“
Stored in Bob's local IndexedDB (encrypted)

Result: Server NEVER stores chat history

Why This Approach:

  • โœ… Server cannot access message content
  • โœ… Simpler than full Signal Protocol
  • โœ… Users control their own data
  • โœ… Fast, no server storage costs
  • โš ๏ธ Messages lost if device is lost (unless backed up)

3. Public Social Data (Unencrypted) โ€‹

What: Lantern names, interests, mood, venue check-ins
How: Stored plaintext in Firestore
Why: Required for social discovery and matching

Rationale: These fields are intentionally public/semi-public for the app to function. Privacy is maintained by:

  • Not collecting photos (ever)
  • Not displaying ages
  • Auto-deleting check-ins after 48 hours
  • Anonymous Lantern names instead of real names

4. Location Data (Ephemeral Processing) โ€‹

What: GPS coordinates for proximity features (Waves, check-ins, Lantern Hub)
How: Requested from browser, validated by server, immediately discarded
Storage: NONE - location is NEVER persisted

User grants browser location permission
    โ†“
Browser provides GPS coordinates (one-time)
    โ†“
Client sends to server for proximity check
    โ†“
Server validates (IP cross-check, velocity check)
    โ†“
Server responds: "You are within 50ft of User X" OR "Check-in valid"
    โ†“
Location data DISCARDED (not stored)

Privacy Model:

  • โœ… Location used in real-time for proximity calculations
  • โœ… Location validated server-side to prevent spoofing
  • โŒ Location history NEVER stored
  • โŒ Movement tracking NEVER implemented
  • โŒ Location profiles NEVER built

Security Considerations:

  • Browser permission required (user must explicitly allow)
  • Permissions Policy restricts to same-origin: geolocation=(self)
  • Server-side validation prevents location spoofing (see TODO.md)
  • IP geolocation cross-check catches VPN-based fake locations
  • Velocity checks flag impossible travel (teleportation detection)

Data Retention:

  • GPS coordinates: 0 seconds (processed and discarded)
  • Check-in events: 48 hours (timestamp + venue ID only, no GPS)
  • Wave interactions: 7 days (user IDs only, no location)

Threat Mitigation:

  • Location spoofing โ†’ Server-side validation with IP cross-check
  • Stalking โ†’ Pattern detection, block functionality, shadow banning
  • Merchant fraud โ†’ WiFi verification, fraud scoring, rate limiting

See docs/TODO.md โ†’ "Location Security & Anti-Fraud" for complete threat model and mitigation roadmap.


Security Features by Category โ€‹

Authentication & Access Control โ€‹

FeatureImplementationStatus
User authenticationFirebase Authโœ… Live
Passphrase strength12+ chars, mixed case, numbers, symbolsโœ… Implemented
Passphrase hashingPBKDF2, 600k iterationsโœ… Implemented
Session managementKey cached in memory, cleared on logoutโœ… Implemented
Multi-device supportRe-enter passphrase on new deviceโœ… Designed
Account recoveryBackup codes (planned)โณ TODO

Data Encryption โ€‹

Data TypeEncryptionStorageCan Server Decrypt?
Birth dateโœ… AES-256-GCMFirestoreโŒ No
Real name (if collected)โœ… AES-256-GCMFirestoreโŒ No
Chat messagesโœ… Device encryptionDevice onlyโŒ Not stored
Lantern nameโŒ PlaintextFirestoreโœ… Yes (public)
InterestsโŒ PlaintextFirestoreโœ… Yes (public)
MoodโŒ PlaintextFirestoreโœ… Yes (public)
Check-insโš ๏ธ PartialFirestore (48hr)โš ๏ธ Geohash only

Data Retention โ€‹

Data TypeRetention PeriodAuto-Deletion
Check-ins48 hoursโœ… Yes
Wave history7 daysโœ… Yes
Chat messagesDevice-dependentโš ๏ธ User's responsibility
Encrypted PIIUntil account deletionโœ… Yes (30 days after request)
Public profileUntil account deletionโœ… Yes

Threat Model โ€‹

What We Protect Against โ€‹

โœ… Database breach - Encrypted PII remains secure
โœ… Rogue employee - Cannot access encrypted data
โœ… Legal data requests - Cannot decrypt what we don't have keys for
โœ… Man-in-the-middle attacks - HTTPS everywhere (Cloudflare)
โœ… Server compromise - Chat messages not stored on server
โœ… Session hijacking - Firebase Auth token security

Known Limitations โ€‹

โš ๏ธ Lost passphrase - Data unrecoverable (by design)
โš ๏ธ Compromised device - Local data accessible if device unlocked
โš ๏ธ Phishing attacks - Users can be tricked into revealing passphrase
โš ๏ธ No forward secrecy (chat) - Same encryption key for all messages from a user
โš ๏ธ Metadata visible - Server knows who's chatting with whom (not content)

Future Improvements Under Consideration โ€‹

๐Ÿ”„ Signal Protocol integration - For perfect forward secrecy in chat
๐Ÿ”„ Backup codes - Account recovery without compromising security
๐Ÿ”„ Encrypted metadata - Hide social graph from server
๐Ÿ”„ Hardware security keys - Optional 2FA with YubiKey, etc.
๐Ÿ”„ Sealed sender (chat) - Hide sender identity from server


Why Not Full Signal Protocol Everywhere? โ€‹

Short answer: Tradeoffs between security and simplicity.

Detailed reasoning:

Signal Protocol Would Provide โ€‹

โœ… Perfect forward secrecy (past messages safe even if key compromised)
โœ… Post-compromise security (future messages safe after key rotation)
โœ… Deniability (cryptographic proof messages are authentic)

But Would Require โ€‹

โŒ Complex key management infrastructure
โŒ Online key directory (public key lookup service)
โŒ Ratcheting state synchronization across devices
โŒ Significant development and maintenance overhead
โŒ Harder to audit for small team

Our Current Approach โ€‹

โœ… Simple, auditable encryption (standard AES-256-GCM)
โœ… Zero-knowledge for sensitive PII
โœ… Device-local storage for ephemeral chats
โœ… Easier to implement correctly
โœ… Lower attack surface (simpler code)

We may upgrade to Signal Protocol in the future as the platform matures and we have security engineering resources to implement and maintain it correctly.


Security Posture vs. Competitors โ€‹

FeatureLanternSignalWhatsAppInstagram DMs
E2E encrypted messagesโš ๏ธ Partial*โœ… Yesโœ… YesโŒ No
Server stores messagesโŒ NoโŒ NoโŒ Noโœ… Yes
Profile encryptionโœ… YesโŒ NoโŒ NoโŒ No
Photos stored/sharedโŒ Neverโœ… Yesโœ… Yesโœ… Yes
Real names requiredโŒ Noโœ… Phone#โœ… Phone#โœ… Yes
Forward secrecyโŒ Noโœ… Yesโœ… YesโŒ No
Open to auditsโœ… Yesโœ… Yesโš ๏ธ PartialโŒ No

*Device-local encryption, not E2E

Lantern's unique position: We prioritize anonymity + zero-knowledge PII storage over feature richness.


Community Security Program โ€‹

We Welcome Security Research โ€‹

Lantern is committed to transparency and continuous improvement of our security posture. We actively encourage:

  • ๐Ÿ” Security audits from the community
  • ๐Ÿ› Vulnerability reports via responsible disclosure
  • ๐Ÿ’ก Suggestions for security improvements
  • ๐Ÿ“Š Public security discussions on our GitHub

How to Report Security Issues โ€‹

Please DO:

  • Email security concerns to: security@ourlantern.app (when available)
  • Use GitHub Issues for non-sensitive security discussions
  • Wait for acknowledgment before public disclosure (responsible disclosure)
  • Provide detailed reproduction steps

Please DON'T:

  • Publicly disclose critical vulnerabilities before we've patched them
  • Test vulnerabilities on production systems without permission
  • Use automated scanners that could disrupt service

What to Expect:

  • Acknowledgment within 48 hours
  • Status updates every 7 days
  • Credit in our security advisories (if you want)
  • Public fix timeline (we aim for 30 days for critical issues)

See VULNERABILITY_DISCLOSURE.md for full policy.


Security Audits & Reviews โ€‹

DateAuditorScopeStatus
TBDExternal firmFull security reviewโณ Planned
TBDCommunityOpen source reviewโณ Planned

We will publish audit results publicly (with sensitive details redacted).


Security Roadmap โ€‹

Phase 1: Foundation (Current) โ€‹

  • [X] Zero-knowledge profile encryption
  • [X] Device-local chat storage
  • [X] Passphrase-based key derivation
  • [X] Auto-deletion of ephemeral data
  • [X] HTTPS everywhere
  • [ ] Backup codes for recovery

Phase 2: Hardening (Next 6 months) โ€‹

  • [ ] External security audit
  • [ ] Penetration testing
  • [ ] Bug bounty program
  • [ ] Encrypted metadata (geolocation)
  • [ ] Rate limiting and abuse prevention

Phase 3: Advanced (12+ months) โ€‹

  • [ ] Signal Protocol for E2E chat
  • [ ] Hardware security key support
  • [ ] Sealed sender (hide social graph)
  • [ ] Zero-knowledge proofs for age verification
  • [ ] Homomorphic encryption for analytics

Transparency Commitments โ€‹

What We Publish โ€‹

โœ… This security architecture - Our approach, tradeoffs, limitations
โœ… Vulnerability disclosures - After patches are deployed
โœ… Audit results - Full reports (sensitive details redacted)
โœ… Data requests - Transparency reports (when legally allowed)
โœ… Source code - Open to community review (planned)

What We Don't Publish โ€‹

โŒ Unpatched vulnerabilities - Until fixes are deployed
โŒ User data - Ever. We don't have access anyway.
โŒ Internal security details - That would aid attackers


Data Requests โ€‹

When law enforcement or government requests user data:

  1. We verify the request is legally valid
  2. We provide ALL data we have (compliance)
  3. This includes:
    • Encrypted PII (ciphertext only)
    • Public profile data
    • Account metadata (creation date, last login)
  4. We CANNOT provide:
    • Decrypted PII (we don't have passphrase)
    • Chat message content (not stored on server)

Our stance: We comply with valid legal requests, but our architecture ensures we have minimal useful data to provide.

Transparency Reports โ€‹

We will publish annual transparency reports including:

  • Number of data requests received
  • Number of requests complied with
  • Number of accounts affected
  • Types of data provided

(Subject to legal restrictions in some jurisdictions)


Questions & Feedback โ€‹

For Users โ€‹

See User Security Guide for:

  • How to create a strong passphrase
  • What to do if you lose your passphrase
  • How to verify Lantern's security claims
  • Understanding privacy tradeoffs

For Security Researchers โ€‹

See Vulnerability Disclosure Policy for:

  • Responsible disclosure process
  • Scope and rules of engagement
  • Recognition and rewards (when available)

For Developers โ€‹

See Security Development Guidelines (TBD) for:

  • Secure coding practices
  • Encryption API usage
  • Common pitfalls to avoid

Updates to This Document โ€‹

This security architecture will evolve as Lantern grows. Major changes will be:

  1. Documented in GitHub commit history
  2. Announced to users (if user-impacting)
  3. Reviewed by security advisors
  4. Published with clear changelog

Last major update: January 4, 2026 - Initial architecture documented


Summary โ€‹

What makes Lantern secure:

  1. โœ… Zero-knowledge encryption for PII (we can't decrypt)
  2. โœ… Device-local chat storage (we don't store)
  3. โœ… Aggressive data deletion (we don't keep)
  4. โœ… No photos, no real names, no ages (we don't collect)
  5. โœ… Transparent about limitations (we don't hide)
  6. โœ… Open to community review (we don't gatekeep)

What we're working on:

  • External security audits
  • Bug bounty program
  • Signal Protocol integration
  • Continuous improvement based on community feedback

Our commitment: Best-effort security, radical transparency, and openness to improvement.

If you find a vulnerability or have suggestions, please reach out. We're listening. ๐Ÿ”’

Built with VitePress