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 saltResult: 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 โ
| Feature | Implementation | Status |
|---|---|---|
| User authentication | Firebase Auth | โ Live |
| Passphrase strength | 12+ chars, mixed case, numbers, symbols | โ Implemented |
| Passphrase hashing | PBKDF2, 600k iterations | โ Implemented |
| Session management | Key cached in memory, cleared on logout | โ Implemented |
| Multi-device support | Re-enter passphrase on new device | โ Designed |
| Account recovery | Backup codes (planned) | โณ TODO |
Data Encryption โ
| Data Type | Encryption | Storage | Can Server Decrypt? |
|---|---|---|---|
| Birth date | โ AES-256-GCM | Firestore | โ No |
| Real name (if collected) | โ AES-256-GCM | Firestore | โ No |
| Chat messages | โ Device encryption | Device only | โ Not stored |
| Lantern name | โ Plaintext | Firestore | โ Yes (public) |
| Interests | โ Plaintext | Firestore | โ Yes (public) |
| Mood | โ Plaintext | Firestore | โ Yes (public) |
| Check-ins | โ ๏ธ Partial | Firestore (48hr) | โ ๏ธ Geohash only |
Data Retention โ
| Data Type | Retention Period | Auto-Deletion |
|---|---|---|
| Check-ins | 48 hours | โ Yes |
| Wave history | 7 days | โ Yes |
| Chat messages | Device-dependent | โ ๏ธ User's responsibility |
| Encrypted PII | Until account deletion | โ Yes (30 days after request) |
| Public profile | Until 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 โ
| Feature | Lantern | Signal | Instagram 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 โ
| Date | Auditor | Scope | Status |
|---|---|---|---|
| TBD | External firm | Full security review | โณ Planned |
| TBD | Community | Open 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
Legal & Compliance โ
Data Requests โ
When law enforcement or government requests user data:
- We verify the request is legally valid
- We provide ALL data we have (compliance)
- This includes:
- Encrypted PII (ciphertext only)
- Public profile data
- Account metadata (creation date, last login)
- 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:
- Documented in GitHub commit history
- Announced to users (if user-impacting)
- Reviewed by security advisors
- Published with clear changelog
Last major update: January 4, 2026 - Initial architecture documented
Summary โ
What makes Lantern secure:
- โ Zero-knowledge encryption for PII (we can't decrypt)
- โ Device-local chat storage (we don't store)
- โ Aggressive data deletion (we don't keep)
- โ No photos, no real names, no ages (we don't collect)
- โ Transparent about limitations (we don't hide)
- โ 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. ๐