PRIVACY_FIRST_ARCHITECTURE.md

Piston Labs Privacy-First Architecture

Source of Truth Document
Last Updated: January 2026
Classification: Public (Consumer + Technical Audience)


Executive Summary

Piston Labs takes a fundamentally different approach to vehicle telematics: we minimize data collection by design. While competitors store everything and promise to protect it, we recognize that the most secure data is data that doesn't exist.

Our core principle: Can't steal what doesn't exist.


Part 1: The Problem with Traditional Telematics

Industry-Wide Security Failures

The vehicle telematics industry has a systemic security problem. Companies collect massive amounts of sensitive location data, store it indefinitely, and routinely fail to protect it.

Real-World Breaches (2023-2025)

CompanyYearRecords ExposedData TypeRoot Cause
Spireon202315.5 million vehiclesReal-time GPS, VINs, user dataExposed admin portal, hardcoded credentials
Gravy Analytics2025Billions of location pointsHistorical location data from 30+ appsData broker aggregation vulnerability
Tracelo20241.4 million usersPhone tracking, location historyDatabase misconfiguration
Hapn GPS20248,600 devicesLive tracker locations, owner infoNo authentication on API
SiriusXM2022UnknownVehicle locations, commandsAPI authorization flaw

OBD-II Device Vulnerabilities

Academic security research on consumer OBD-II dongles reveals systemic issues:

Source: Argus Cyber Security, University of Michigan Transportation Research Institute

The Real Risk: Location Data as a Weapon

Location data isn't just privacy-sensitive—it's dangerous:

When a telematics company is breached, every user's historical movements become public.


Part 2: Our Technical Architecture

Design Principle: Ephemeral by Default

┌─────────────────────────────────────────────────────────────────┐
│                     PISTON LABS DATA FLOW                       │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  [Otto Device] ──TCP──> [Cloudflare Worker] ──> [Durable Object]│
│                              │                        │         │
│                              │                        │         │
│                    ┌─────────┴─────────┐              │         │
│                    │                   │              │         │
│                    ▼                   ▼              ▼         │
│             [GPS: WebSocket]    [Non-GPS: Supabase]  [State]    │
│             (Ephemeral)         (Persisted)          (Temp)     │
│                    │                   │                        │
│                    │                   │                        │
│                    ▼                   ▼                        │
│              [User's App]        [Service Records]              │
│              (Real-time)         [Mileage History]              │
│                                  [Trip Summaries]               │
│                                                                 │
│  ─────────────────────────────────────────────────────────────  │
│  GPS flows through the system but is NOT stored by default.     │
│  Users must explicitly opt-in to location history storage.      │
└─────────────────────────────────────────────────────────────────┘

What We Store vs. What We Don't

Data TypeStored?Justification
Current OdometerYesRequired for service reminders
Trip DistanceYesFuel/efficiency calculations
Engine Diagnostics (DTCs)YesCore product value
Battery/VoltageYesVehicle health monitoring
GPS CoordinatesNoNot needed for core functionality
Location HistoryNoOpt-in only
Movement PatternsNoNever stored

Real-Time GPS via WebSocket (Ephemeral Streaming)

For users who want "Find My Car" functionality, we provide real-time location via WebSocket:

// Cloudflare Durable Object - GPS never touches disk
export class VehicleState extends DurableObject {
  private sessions: Map<WebSocketSession, string> = new Map();

  async processGPS(latitude: number, longitude: number) {
    // Stream to connected clients
    for (const [session] of this.sessions) {
      session.send(JSON.stringify({
        type: 'location',
        lat: latitude,
        lng: longitude,
        timestamp: Date.now()
      }));
    }
    // GPS is NOT written to storage
    // When WebSocket closes, data is gone
  }
}

Security Properties:

Opt-In Location History

Users who explicitly want location history can enable it:

// Only if user has opted in
if (user.locationHistoryEnabled) {
  await supabase.from('location_history').insert({
    vehicle_id: vehicleId,
    latitude: coords.lat,
    longitude: coords.lng,
    recorded_at: new Date()
  });
}

Opt-In Requirements:

  1. Explicit toggle in app settings (default: OFF)
  2. Clear explanation of what's stored
  3. Data retention limit (90 days default)
  4. One-tap full deletion

Binary Data: Stripping GPS at Ingestion

Our devices use Teltonika Codec 8 Extended binary protocol. GPS data sits at fixed byte offsets:

AVL Record Structure (per record):
┌──────────────────────────────────────────────────────────────┐
│ Timestamp │ Priority │ Longitude │ Latitude │ Alt │ ... │ IO │
│  8 bytes  │  1 byte  │  4 bytes  │  4 bytes │ 2B  │     │    │
│           │          │  ◄─────── GPS Block (15 bytes) ──────►│
└──────────────────────────────────────────────────────────────┘

We can zero out GPS fields while preserving all diagnostic data:

function stripGPSFromCodec8(buffer: ArrayBuffer): ArrayBuffer {
  const view = new DataView(buffer);
  let offset = 10; // Skip preamble + length + codec + count

  const recordCount = view.getUint8(9);
  for (let i = 0; i < recordCount; i++) {
    offset += 8; // Skip timestamp
    offset += 1; // Skip priority

    // Zero out GPS block (15 bytes)
    for (let j = 0; j < 15; j++) {
      view.setUint8(offset + j, 0);
    }
    offset += 15;

    // Skip IO elements (variable length)
    offset += parseIOLength(view, offset);
  }

  return buffer;
}

Result: Raw binary archives for debugging contain zero location data.


Part 3: Security Analysis

Attack Surface Comparison

Attack VectorTraditional TelematicsPiston Labs
Database breachAll historical GPS exposedNo GPS to expose
Backup theftLocation history in backupsNo location in backups
Insider threatEmployee access to all dataGPS never reaches backend
SQL injectionQuery returns GPS historyGPS field doesn't exist
API abuseEnumerate user locationsNo location endpoint
Legal subpoenaMust provide all stored dataNo GPS data to provide
Data broker saleMonetize location dataNothing to sell

Quantified Risk Reduction

Using standard risk calculation: Risk = Probability × Impact

Scenario: Database Breach

Traditional Approach:

Piston Labs Approach:

Risk Reduction: 80%

Scenario: Targeted Attack (Stalker/Abuser)

Traditional Approach:

Piston Labs Approach:

What Remains Exposed in a Breach

If Piston Labs is breached, attackers could access:

DataSensitivityMitigation
Email addressesMediumIndustry standard
Vehicle VINLowAlready semi-public
Odometer readingsLowNo privacy impact
Service historyLowNo location correlation
Diagnostic codesLowTechnical data only

Notably absent: Location history, movement patterns, home/work addresses, daily routines.


Part 4: Compliance & Legal Position

Regulatory Alignment

RegulationRequirementOur Compliance
GDPRData minimizationCollect only what's necessary
CCPARight to deletionNo GPS to delete (by default)
CPRALimit sensitive dataGPS is opt-in only
State privacy lawsReasonable securityReduced attack surface

Law Enforcement Requests

When law enforcement requests location data:

Traditional Company Response:

"Here are 18 months of GPS coordinates for this vehicle..."

Piston Labs Response:

"We do not store location data. Real-time GPS is ephemeral and not logged."

We cannot provide what we don't have. This isn't obstruction—it's architecture.

Insurance & Liability

Our architecture provides liability protection:

  1. Reduced breach notification scope: GPS isn't PII if it's not stored
  2. Lower damages in litigation: No location data = no location-based harm claims
  3. Simplified compliance audits: Fewer data categories to document

Part 5: Consumer-Facing Communication

How We Talk About Privacy

Wrong approach (competitor-style):

"We take your privacy seriously. Your data is encrypted and protected by enterprise-grade security."

Our approach:

"We don't store your location. Period. Your car's GPS flows through our system to your phone, but we don't keep it. Can't leak what we don't have."

Key Messages for Marketing

  1. "Your location, your control."
    • Real-time GPS goes to your phone, not our servers
    • Enable history only if you want it
    • Delete everything with one tap
  2. "We built it this way on purpose."
    • Not a privacy policy—a privacy architecture
    • Other companies promise to protect your data; we chose not to collect it
  3. "Car diagnostics without surveillance."
    • Know your battery voltage without us knowing your home address
    • Get service reminders without location tracking

FAQ Responses

Q: How do you provide real-time location without storing it?

A: We use WebSocket streaming through Cloudflare's edge network. When you open the app, your car's GPS coordinates flow directly to your phone. When you close the app, the connection ends and the data is gone. It's like a phone call—the conversation happens, but we're not recording it.

Q: What if I want location history?

A: You can opt in. We'll store up to 90 days of location data, and you can delete it anytime. But we think most people don't actually need a permanent record of everywhere their car has been.

Q: What do you actually store?

A: Odometer readings, engine diagnostic codes, battery voltage, fuel efficiency data. The stuff that helps you maintain your car, not track your movements.

Q: What happens if you get hacked?

A: Attackers would get diagnostic data—the same information your mechanic sees. They wouldn't get location history because we don't have it.


Part 6: Technical Implementation Checklist

Current State ✓

Planned Enhancements

Architecture Invariants

These rules must never be violated:

  1. GPS coordinates SHALL NOT be written to persistent storage without explicit user opt-in
  2. WebSocket GPS streams SHALL NOT be logged or recorded
  3. Raw Codec 8 binaries MAY be stored only with GPS bytes zeroed
  4. Location history opt-in SHALL default to OFF
  5. Any location data stored SHALL have automatic expiration

Part 7: Competitive Differentiation

How We Compare

FeatureBouncieZubieHumPiston Labs
GPS trackingAlways onAlways onAlways onOpt-in only
Location historyStored indefinitely1 yearStoredNot stored (default)
Data monetizationYes (anonymized)YesYesNever
Breach exposureFull historyFull historyFull historyDiagnostics only
Monthly cost$8/mo$10/mo$10/moTBD

Our Moat

Privacy-first isn't a feature—it's an architectural decision that's hard to reverse. Competitors would need to:

  1. Redesign their data pipeline
  2. Delete existing location databases
  3. Rebuild real-time streaming infrastructure
  4. Change their business model (no data monetization)

By the time they catch up, we'll have the privacy-conscious market.


Appendix A: Breach Case Studies

Spireon (2023)

What happened: Security researcher found exposed admin portal with hardcoded credentials. Could access 15.5 million vehicles across multiple fleet management brands (GoldStar, LoJack, FleetLocate).

Data exposed: Real-time GPS, historical locations, VINs, customer data, ability to remotely disable vehicles.

Root cause: Credential management failure, no authentication on admin API.

Piston Labs difference: Even with similar vulnerability, attacker gets diagnostic data only.

Gravy Analytics (2025)

What happened: Location data broker (aggregates from 30+ apps) suffered massive breach. Billions of location data points exposed including sensitive locations (clinics, government buildings, religious sites).

Impact: Location data traced back to individual devices, revealing daily patterns and sensitive visits.

Root cause: Centralized aggregation of location data creates high-value target.

Piston Labs difference: We don't aggregate or sell data. No data broker relationship.

SiriusXM Connected Vehicle (2022)

What happened: API vulnerability allowed attackers to locate vehicles, unlock doors, start engines using only VIN number.

Root cause: Authorization bypass—API didn't verify requestor owned the vehicle.

Piston Labs difference: Our WebSocket requires authenticated session. No remote commands.


Appendix B: Security Architecture Details

Data Flow Security

[Device] ──TLS/TCP──> [Cloudflare Edge] ──Internal──> [Durable Object]
                           │
                           │ (GPS)
                           ▼
                      [WebSocket]
                           │
                           ▼
                    [User's Device]

    GPS never touches: Database, Logs, Backups, Analytics

Encryption

LayerMethodKey Management
Device → EdgeTLS 1.3Cloudflare managed
Edge → DOInternal (Cloudflare backbone)N/A
DO → UserWSS (TLS)Cloudflare managed
DatabaseAES-256 at restSupabase managed

Access Controls

RoleGPS AccessDiagnostic Access
End UserReal-time (own vehicle)Yes
Support StaffNoneRead-only
EngineeringNoneAnonymized
Database AdminNone (doesn't exist)Encrypted

Document Control

VersionDateAuthorChanges
1.0Jan 2026EngineeringInitial document

Review Schedule: Quarterly or after any security incident

Owner: Engineering Team

Approval: Tyler (CEO)