“Traditional automotive identifiers like engraved chassis plates, plastic keychains, or laminated cards suffer from a fundamental vulnerability: they cannot be dynamically revoked, transferred, or privacy-gated. If a static sticker contains encoded personal data, that data is permanently compromised the moment the car is sold or parked in public. VaahanSafe implements a dual-layer cryptographic state machine that strictly decouples physical inventory from authenticated digital ownership.”
1. The Four Decoupled Domain States
In naive QR implementations, systems use a single boolean `is_active = true`. This is an architectural failure. VaahanSafe enforces four completely decoupled states across all relational schemas:
A. Payment State
Authoritative confirmation of financial transaction (`PENDING`, `PAID`, `FAILED`, `REFUNDED`). Governed exclusively by server-verified Cashfree signed webhook signatures. A paid order does not imply physical delivery or active service.
B. QR Lifecycle State
Tracks the physical sticker hardware (`INVENTORY`, `DISTRIBUTED`, `ASSIGNED`, `ACTIVATED`, `REPLACED`, `RETIRED`). A physical decal exists in warehouse inventory long before any user purchases it.
C. Entitlement State
Authoritative service capabilities (`DIGITAL_QR_ACCESS`, `SAFETY_VIEW_ACTIVE`, `EMERGENCY_ROUTING`). Entitlements require satisfying both the acquisition gate (verified payment OR verified retail activation) and verified vehicle ownership.
D. Subscription State
Optional plan-backed functionality (`TIER_FREE`, `TIER_STANDARD`, `TIER_PREMIUM`). Decoupled so that renewing or lapsing a subscription never corrupts physical decal identity.
2. The Three-Identifier Security Boundary
Under the VaahanSafe security charter, three values must never be collapsed or derived from each other:
| Identifier | Format / Example | Storage Location | Public Exposure Rule |
|---|---|---|---|
| 1. Internal Database ID | `qr_9x2k41b08f` | Cloudflare D1 Primary Key | STRICTLY PRIVATE: Never returned to client DOM or URLs |
| 2. Public Opaque Identifier | `vs_8f4k9a21` (High-entropy nanoid) | D1 Unique Indexed Column | PUBLIC: Encoded into physical QR URL (`qr.vaahansafe.com/vs_...`) |
| 3. Activation Secret Proof | Concealed 6-to-8 digit scratch PIN | Stored as salted SHA-256 hash | PRIVATE: Concealed under scratch foil; never stored in plaintext |
3. Cryptographic Retail Activation Flow
When a customer purchases a retail package from an authorized distributor or dealership, the physical decal is in an inert `DISTRIBUTED` state. Scanning the decal reveals only an unactivated registration portal. Service enablement requires satisfying an atomic, server-verified verification handshake:
Public ID Resolution
RESOLVEThe user scans the QR code; the browser resolves `qr.vaahansafe.com/{publicId}`. The edge worker confirms the decal exists in inventory and is eligible for initial claiming.
Owner Authentication & Mobile Gate
AUTHThe user must authenticate with a verified Indian mobile number (+91) via real MSG91 SMS OTP. Anonymous or guest activations are prohibited.
Concealed Secret Proof Verification
CRYPTOThe user scratches the security foil to reveal the private PIN. The server computes `SHA-256(PIN + Salt)` and verifies it against D1. Rate-limiting protects against brute-force guessing.
Atomic Vehicle Binding & Entitlement Grant
ACTIVEUpon proof match, an atomic D1 transaction transitions the decal to `ACTIVATED`, binds it to the user's verified vehicle plate, creates service entitlements, and enables live emergency routing.
What happens if someone photographs my retail QR before I buy it?
Nothing. Because the physical QR only encodes the public ID (`vs_xxxx`) and NOT the activation secret, photographing the code grants zero ownership rights. The sticker cannot be activated without scratching the physical foil to reveal the one-way hashed PIN.
Can an activated decal be stolen and re-registered to another vehicle?
No. Once bound to a vehicle in Cloudflare D1, the activation secret is marked as consumed. Any attempt to re-activate the decal returns an error. Only the authenticated legal owner can reassign or replace the decal through their verified customer dashboard.
- ISO/IEC 18004 — Information technology automatic identification and QR code techniquesSource: iso.org
Standards for physical symbology generation and alphanumeric URL encoding
- Cloudflare D1 & Workers Relational Data Architecture DocumentationSource: cloudflare.com
Transactional ACID guarantees and edge read-replica replication across India
Canonical reference guidelines and regulatory specifications under VaahanSafe Documents.
Learn how the vehicle safety identity works.
Industrial UV-cured optical decals connecting bystanders directly to your emergency contacts without exposing private phone numbers or home addresses.
Separating Contact Channels from Residential Addresses
Why vehicle safety requires maintaining an ironclad boundary between public roadside beacons and private account records under the DPDP Act 2023.
VaahanSafe Platform Update: Cloudflare Edge Routing & Zero-Exposure Bystander Alerts
A technical release note on deploying multi-region Cloudflare D1 read replicas and Cloudflare Queues across Mumbai, Chennai, and Delhi for sub-45ms emergency resolution.
