← Demos Index
FHE in Action · Telematics
Demo 08 · UBI Insurance
Factual Demonstration

Risk Computed Without Seeing.

Driver encrypts their driving pattern. Insurer calculates a discount. Without anyone knowing where or when the driver drove.

Scenario

A telematics app collects speed, braking, distance, time of day. Today it sends everything in cleartext to the insurer. Invasive UBI.

Problem

UBI adoption is limited by privacy pushback. Those who accept are already the wrong segment for the insurer.

Guarantee

Under FHE: features encrypted in the app. Insurer computes the score under encryption. Returns a discount factor. No persistent profile.

Step 01 · Setup

Define the parameters.

Before encrypting the driving pattern, we choose CKKS parameters. CKKS is the natural scheme for actuarial scoring over feature vectors.

Capacity · CKKS

8 192Slots/ciphertext
3Mult. depth
APPROX.Scheme type
~128 bitSecurity

What each term means

CKKS ("approximate" scheme) — FHE family for real numbers. Controlled approximation noise (~10⁻¹⁰). The standard for actuarial scoring and risk models — exactly what UBI needs.

8 192 slots — Each ciphertext is a vector of 8 192 values. The 8 telematics features fill 8 slots; the rest stay zero. A single ciphertext carries the full weekly driving pattern.

Multiplicative depth 3 — How many chained multiplications are supported. Linear scoring (Mul + InnerSum + Add bias) consumes few levels.

~128 bits of security — Industry standard. Breaking the key would require ~2128 operations.

RLWE base — Same mathematical problem behind ML-KEM/ML-DSA standardized by NIST as post-quantum cryptography.

Step 02 · Keys

Keys generated on the phone.

The secret key is born inside the telematics app on the driver's phone. It never leaves. The insurer only receives the public key — it can encrypt commands to the driver, but can never decrypt anything from the driver without explicit consent.

Generated keys

~50 msTotal time
~7 KBPublic key

Why this matters for UBI

Driver controls the data — The difference vs traditional UBI is fundamental: today, by installing the app, the driver hands over perpetual control of movement data. Under FHE, they keep the key — they can revoke the service at any moment and the insurer literally cannot read anything that was already sent.

Reduces consent fatigue — Because the data is never in cleartext on the insurer's server, the "I accept sharing X, Y, Z" screen can be drastically simplified. The user accepts "compute my discount" without having to enumerate every field used.

Step 03 · Features

Local extraction before encryption.

The 8 features below are the result of a processing pipeline that ran locally on the phone, in cleartext, over raw GPS + accelerometer data for the week.

Weekly aggregated pattern

avg_speed0.42
braking0.18
distance0.65
time_of_day0.30
acceleration0.22
nighttime0.10
urban0.55
bad_weather0.15
8 msEncryption
1 MBCiphertext

What sits behind each number

Raw data (stays on the phone) — In a typical week, the app captures ~10-50k GPS points + ~500k accelerometer samples (100 Hz). This raw data is highly identifying (it reveals routes, addresses, exact times) and NEVER leaves the phone.

Local feature extraction — A pipeline runs on the device itself: it computes speed from GPS deltas, detects braking events via accelerometer spikes (< -2 m/s²), classifies time of day, tags urban vs highway context via POI density. All in cleartext, locally.

Only the aggregate is encrypted — The 8 aggregated features are enough for actuarial scoring — it is the pattern Progressive Snapshot and Root Insurance have used for a decade. Raw data stays private by construction.

Step 04 · Transit

What the insurer receives.

The insurer receives ~1 MB of pseudo-random bytes. Without the secret key (which stayed on the phone), these bytes are indistinguishable from pure noise. Even under court order, the insurer has nothing to hand over.

Byte sample

01 7b 22 50 6c 61 69 6e
74 65 78 74 4d 65 74 61
44 61 74 61 22 3a 7b 22
53 63 61 6c 65 22 3a 7b
...
1 MBPseudo-random bytes

Why this changes the game

No persistent profile — The insurer today stores months of movement history on its own servers. Under FHE, it stores ciphertext — with no key and no ability to process it outside the authorized query context.

Breach resistant — If the insurer is hacked (and large insurers are constant targets), the attacker walks away with just ciphertext. They cannot infer where any driver has driven.

CLOUD Act compatible — Global insurers can host on US cloud without violating Brazilian LGPD. The data was never in cleartext outside the driver's phone.

Step 05 · Scoring

Actuarial model under encryption.

The insurer applies its linear actuarial model (public weights for each feature) over the encrypted behavior vector. The result is a risk score — still encrypted.

The algorithm

// public actuarial weights
weights := [+0.4, +1.5, +0.3,
       -0.2, +1.2, +0.8,
       +0.1, +0.6]
bias := -0.5

// score = bias + Σ(weight·feature)
ctMul := evaluator.Mul(ctF, weights)
evaluator.Rescale(ctMul)
ctScore := evaluator.InnerSum(ctMul)
evaluator.Add(ctScore, bias)
26 msTotal compute
8Features

What each weight means

Positive weights (raise risk) — hard braking (+1.5), hard acceleration (+1.2), nighttime driving (+0.8), bad weather (+0.6).

Negative weights (lower risk) — business hours (-0.2). Pattern of a driver who only drives during work hours.

Weights are public — The insurer publishes model weights so drivers can understand and audit how the discount is computed. That matters because the EU AI Act requires explainability in automated decisions affecting consumers.

Encrypted compute — The weights are public, but the feature vector is encrypted. Multiplying plaintext × ciphertext stays ciphertext. Result: encrypted score.

Step 06 · Discount

Driver decrypts.

Actuarial discount
12.2%
off the monthly premium
Step 07 · Validation

FHE vs plaintext.

2.3 × 10⁻¹⁰Absolute error
Step 08 · Adversarial

Dishonest insurer.

  • 1 — Infer individual features from score1 number, 8 unknowns. Under-determined.
  • 2 — Repeated queries (weeks)Added DP blocks this. And repeated queries require fresh consent.
  • 3 — Recover skRing-LWE at N=16384. Infeasible.
Step 09 · Summary

Private UBI.

Flow

  1. App encrypted driving pattern locally
  2. Sent ciphertext to the insurer
  3. Insurer computed score under encryption (26 ms)
  4. Returned encrypted discount factor
  5. Driver decrypted: 12.2% discount

Numbers

8 msEncryption
26 msScore
1 MBCiphertext
10⁻¹⁰Error
2 eBooks use this primitiveInsurers (UBI/wellness) and Pharma (wearable in DCT).
PT EN