Skip to content

Design an Item Tracker (Apple AirTags / Find My)

Advanced 83 min read Part 17 of 18

Design an AirTag-style tracker: crowdsourced Bluetooth sightings, end-to-end encrypted reports with rotating keys, owner lookup at scale and anti-stalking.

The Problem#

We want to build an item tracker like Apple's AirTag and its Find My network. You attach a small tag to your keys, your bag or your suitcase. When you lose the item, you open an app and see where it is on a map, even if it is in another city.

The surprise is what the tag cannot do. It has no GPS receiver, no cellular modem and no Wi-Fi. It is a coin-cell-powered chip that can only send short Bluetooth Low Energy (BLE) radio messages to anything within a few tens of metres, and it must run for about a year on one battery. So how does the owner learn where it is?

The answer is crowdsourcing. Hundreds of millions of phones are already carried everywhere. Each phone that participates listens for nearby tags. When it hears one, it attaches its own location (the phone knows where it is from GPS) and uploads a short report to the server. The owner later downloads the reports for their tag and sees where it was seen.

That idea is old and simple. What makes this problem hard, and interesting at staff level, is that we want it to be private:

  • The server operator must not learn where anyone's things are. The reports contain precise locations of the people who found the tag. If the operator could read them, it would have a real-time map of hundreds of millions of people.
  • The finder must stay anonymous. The phone that relayed a report should not be identifiable, neither to the owner nor to the operator.
  • The tag must not be trackable by strangers. If the tag broadcast a fixed id, anyone with a Bluetooth scanner in a shopping mall could follow its owner around.
  • Yet the tag must not become a stalking tool. A tag slipped into someone's bag must be detectable by that person, even though we just said its id must not be stable.

Think of it like this. The tag hands out open padlocks that only its owner can unlock, and it changes the padlock design every few minutes so strangers cannot tell two padlocks came from the same tag. Anyone who passes by writes "I saw this here at 10:02" on a card, locks it in a box with the padlock, and drops the box at the post office. The post office files the boxes by a label printed on each padlock, but it cannot open any of them, and the boxes carry no sender's name. Later the owner walks in, lists the labels of all padlocks their tag handed out today, collects the matching boxes and opens them at home.

The hard parts are:

  • End-to-end encryption with rotating keys. The tag has to broadcast a different public key every 15 minutes, without talking to anyone, and the owner has to be able to compute every one of those keys later.
  • Report ingestion at scale. Hundreds of millions of tags heard by over a billion phones produce hundreds of thousands of reports per second, from anonymous senders.
  • Lookup by owner. The server cannot index reports by owner (it does not know the owner), so lookup must work by key id, with the owner's device doing the work of figuring out which ids to ask for.
  • Privacy and anti-stalking. These two goals pull in opposite directions; the design has to balance them carefully.
  • Battery constraints on the tag (a year on a coin cell) and on finder phones (no noticeable drain).
  • Storage and retention. Reports are sensitive and only useful for a few days; they should disappear automatically.

Background: a few terms used in this design#

  • Tag, accessory. The small device being tracked. Apple's AirTag is one; the same network can also find third-party accessories, and offline phones and laptops that behave like tags.
  • Owner device. A phone, tablet or computer signed in to the owner's account. It holds the keys and shows the location.
  • Finder device. Any participating phone that hears a tag and uploads a report. Most finders have no relation to the owner.
  • BLE advertisement. A tiny broadcast packet a Bluetooth Low Energy device sends repeatedly so others can discover it. The classic advertisement payload is at most 31 bytes, which matters a lot here.
  • Public and private key. In public-key cryptography, anyone can encrypt with the public key, but only the holder of the matching private key can decrypt.
  • Elliptic curve (EC) cryptography and P-224. A family of public-key schemes that give strong security with small keys. The NIST P-224 curve gives about 112 bits of security, and a public key's x coordinate is 28 bytes, small enough to fit in one advertisement.
  • ECDH and ECIES. Elliptic Curve Diffie–Hellman lets two parties derive a shared secret from one party's public key and the other party's private key. ECIES (Elliptic Curve Integrated Encryption Scheme) uses an ECDH secret with a fresh one-time key to encrypt a message to a public key.
  • AES-GCM. A fast symmetric cipher mode that encrypts data and also produces an authentication tag, so tampering is detected.
  • KDF. A key derivation function: turns a secret into new keys, deterministically. Same input, same output.
  • Rolling or rotating keys. The tag changes its broadcast public key on a schedule (for example, every 15 minutes) so observers cannot link broadcasts together.
  • Key id. A hash (SHA-256) of a broadcast public key. The server stores reports under this id.
  • Near-owner and separated. A tag is near-owner when one of the owner's devices is close by, and separated when it has been away from all of them for a while (for example, 30 minutes).
  • Lost mode. An owner-set state: "this item is lost; notify me when it is found, and show this message to whoever finds it".
  • Unwanted tracking alert. A notification on a person's phone that an unknown tag seems to be travelling with them.
  • UWB (Ultra-Wideband) and NFC (Near-Field Communication). UWB is a short-range radio that can measure distance and direction precisely (Apple calls the feature Precision Finding). NFC works only at a few centimetres and lets a phone read a tag by tapping it.

Clarifying Questions#

QuestionAssumed answer
What is being tracked?Small BLE tags with no GPS or cellular, plus phones and laptops that act as tags when offline, plus certified third-party accessories.
Who are the finders?Any participating phone of the platform with location services. Design for 1.5 B finder devices worldwide; participation is on by default with an opt-out.
How many tags?Design for 300 M active tags and offline devices that may be reported at any time.
Who can see a tag's location?Only the owner and people the owner explicitly shares the item with. Not the operator.
How fresh must the location be?Best effort: within a few minutes in busy places. In remote places, possibly never; there is no guarantee.
How accurate?Roughly the finder's GPS accuracy plus Bluetooth range: tens of metres. Close-range finding (sound, UWB direction) handles the last few metres.
How much history?The latest location plus a history of the last 7 days. Older reports are deleted.
Lost mode?Yes: the owner can mark an item lost, be notified when it is found, and leave a contact message visible to whoever taps the tag with a phone.
Anti-stalking?Yes, required: people must be alerted when an unknown tag travels with them, on both major phone platforms, and must be able to find, identify and disable it.
Battery?The tag runs on a replaceable coin cell for about a year. Finders must see no noticeable battery or data impact.
Sharing?An owner can share an item with a few people (family), who can also see its location.
Consistency and loss?Availability over consistency. Losing an occasional report is acceptable because others will follow. Leaking a location is never acceptable.

Requirements#

Functional requirements#

  1. Pair: an owner pairs a tag with their account; keys are set up so that only the owner's devices can read its location.
  2. Crowdsourced reports: separated tags broadcast; finder phones that hear them upload encrypted location reports, without identifying themselves.
  3. Locate: the owner sees the latest location and the last 7 days of locations on any of their devices.
  4. Find nearby: when in Bluetooth range, the owner can play a sound on the tag and get distance and direction guidance.
  5. Lost mode: the owner can mark an item lost, get a notification when it is located, and show a message or contact number to someone who taps it.
  6. Share: the owner can share an item with chosen people.
  7. Anti-stalking: phones detect unknown tags that travel with them and alert the user; the user can play a sound, see a partial identity of the owner, and get disablement instructions.

Non-functional requirements#

  • Privacy (the top requirement). Locations are end-to-end encrypted. The operator cannot read reports, cannot tell which owner a report belongs to, and cannot identify finders. Broadcasts cannot be linked over time by third parties while the tag is with its owner.
  • Safety. Unwanted tracking is detectable within hours, across platforms.
  • Scale. Ingest about 250,000 reports per second on average and 500,000 at peak, from anonymous senders; serve owner lookups for hundreds of millions of tags.
  • Availability. 99.9% or better for report upload and owner lookup. The system degrades gracefully: if ingestion is slow, finders keep reports and retry.
  • Latency. Owner lookup returns in under 1 second at p99. A new report is visible to the owner within about a minute of upload.
  • Retention. Reports deleted automatically after 7 days; nothing about a report survives in logs or backups beyond that.
  • Battery. Tag: about a year on a CR2032 coin cell. Finder: scanning and uploading cost a negligible share of the battery.
  • Abuse resistance. Withstand fake reports, report flooding, scraping of key ids and attempts to misuse the safety features.

Capacity Estimation#

We use the method from Back-of-the-Envelope Estimation. For calibration: when AirTag launched in April 2021, Apple described the Find My network as approaching a billion devices, and Google said in 2024 that over a billion Android devices could take part in its network. Our numbers are assumptions for a network of that size, not either company's real figures.

Tags and finders.

  • 300 M tags and offline devices that might be reported.
  • 1.5 B finder phones. Not all are scanning at any moment; phones scan opportunistically when the OS is already awake for other reasons.

Reports.

  • The key question is how often each tag is heard. A tag on keys sitting in a home is heard mostly by its owner's own phone, and the network does not need crowd reports then. A suitcase in an airport is heard by hundreds of phones an hour.
  • Assume each tag gets reports from about 3 distinct finders per hour on average, and each finder reports a given key at most once per rotation period. That is 300 M × 3 = 900 M reports per hour, which is 250,000 reports per second on average. Commuting hours and big events double that: 500,000 per second at peak.
  • Per day: 900 M × 24 = 21.6 B reports.

Report size. In our design a report holds:

FieldBytes
Key id (SHA-256 of the broadcast public key)32
Time the tag was seen (seconds)4
Finder's one-time public key (P-224, compressed)29
Encrypted payload: latitude, longitude, accuracy, status10
AES-GCM authentication tag16
Server receive time and a small headerabout 10
Totalabout 100

With storage overhead (row keys, indexes, compression gains and losses), budget 150 bytes per stored report.

Storage.

  • 21.6 B × 150 B = 3.2 TB per day.
  • Kept for 7 days: about 23 TB. With 3 replicas: about 70 TB. That is a modest cluster for a wide-column or key-value store, because the data expires: it never grows past a week.

Upload traffic.

  • Finders batch reports: a phone collects sightings and uploads them every few minutes, or when it next has the network awake anyway. With about 10 reports per request, peak upload requests are 50,000 per second.
  • Bandwidth: 500,000 × 100 B = 50 MB/s at peak. Trivial. The cost is in requests, crypto-free validation and writes, not bytes.

Owner lookups.

  • Assume 200 M owner devices, each refreshing the locations of their items about 5 times a day (app opens plus background refresh): 1 B refresh requests per day, about 12,000 per second on average and 40,000 at peak.
  • Each refresh asks for several key ids per tag (Deep Dive 6). With incremental refresh (only keys since the last fetch) it is about 4–10 ids per tag and 2–3 tags per owner: roughly 30 key-id lookups per request, or 1.2 M key-id reads per second at peak. Most return nothing; the store must make empty lookups cheap.
  • A full 7-day history for one tag means generating and querying up to 672 key ids (7 days × 96 rotations per day) in the worst case. That is rare and runs in a batch.

Other traffic.

  • Lost-mode watches: a few million tags at any time, each with a list of upcoming key ids registered for notification.
  • Identifier lookups from unwanted-tracking alerts and NFC taps: thousands per second at most.
  • Pairing: a few million new tags per day, under 100 per second.
QuantityAveragePeak / total
Active tags300 M—
Finder phones1.5 B—
Reports ingested250,000 per second500,000 per second
Upload requests (batched)25,000 per second50,000 per second
Reports per day21.6 B—
Stored reports (7 days, 1 copy)about 23 TBabout 70 TB with 3 replicas
Owner refresh requests12,000 per second40,000 per second
Key-id reads360,000 per second1.2 M per second

The key conclusion: this is a write-heavy, short-lived, opaque-blob system. The server does not need to understand the data, only to store it by key id for a week and return it fast. All the intelligence lives on the devices.

Core Entities#

  • Account: id, verified contact (phone or email) used for the owner registry and lost-mode messages.
  • Accessory (tag): serial number, product data (make and model), paired account id, paired time, firmware version, capabilities (sound, UWB, NFC), and a wrapped key blob only the owner's devices can open.
  • Master beacon key (never on the server in clear): the tag's base key pair and a 32-byte secret seed, from which all broadcast keys are derived. Stored on owner devices and synced among them end-to-end encrypted.
  • Broadcast key (advertisement key): the public key of rotation period i, derived from the master key; its SHA-256 is the key id.
  • Location report: key id, seen-at time, finder's one-time public key, ciphertext, authentication tag, received-at time. There is no owner field and no finder field.
  • Lost-mode record: accessory, message, contact to show, notification watch list of upcoming key ids.
  • Share grant: accessory, recipient account, wrapped key material for the recipient, permissions, expiry.
  • Owner registry entry: accessory serial and the verified identity of the account that paired it, kept for a period after unpairing for safety and law-enforcement requests.
  • Unknown-tracker observations (on the device only, never uploaded): identifiers seen, where and when, to detect a tag that travels with the user.

API Design#

Two very different kinds of callers use the API: anonymous finders, who must not be identifiable, and authenticated owners. They use separate endpoints, separate hosts, and even separate logging policies.

# Finder: upload reports. No account credentials, no device id.
POST https://reports.example.net/v1/reports
  Header: Privacy-Token: <one-time anonymous token>      (abuse control, Deep Dive 7)
  Body:   [ { "kid": "b64(sha256(P_i))", "t": 1733300000,
              "epk": "b64(29 bytes)", "ct": "b64(10 bytes)", "tag": "b64(16 bytes)" }, ... ]
  -> 202 Accepted   (no body: nothing to learn from the reply)
 
# Owner: fetch reports for a set of key ids.
POST https://owner.example.net/v1/reports/fetch
  Auth: owner session token
  Body: { "kids": ["...", "..."], "since": 1733290000 }
  -> 200 { "reports": [ { "kid": "...", "t": ..., "epk": "...", "ct": "...", "tag": "..." } ] }
 
# Owner: accessories
POST /v1/accessories                 { "serial": "...", "product_data": "...", "wrapped_keys": "..." }
DELETE /v1/accessories/{serial}      (unpair; registry entry kept for a safety period)
PUT  /v1/accessories/{serial}/lost-mode
     { "enabled": true, "message": "Please call", "show_phone": true, "watch_kids": ["..."] }
POST /v1/accessories/{serial}/shares { "recipient": "acct_9", "wrapped_keys_for_recipient": "..." }
 
# Safety (anyone): identifier lookup from an NFC tap or a Bluetooth read
GET  https://found.example.net/?pid=<product data>&b=<battery>&fv=<firmware>&e=<encrypted id>
  -> page with masked owner contact (e.g. last 4 phone digits), lost-mode message
POST /v1/accessory-info              { "products": [ { "networkId": "01", "productData": "...", ... } ] }
  -> product name, images, disablement instructions (localised)

Design notes:

  • The report endpoint is deliberately dumb. It checks sizes and formats and the anti-abuse token, then stores the blob. It does not, and cannot, decrypt anything.
  • Report uploads carry no identity. No account token, no device id, no cookies; the request goes through a relay that hides the phone's IP address (Deep Dive 7).
  • Owner fetches carry identity, because only the owner should be able to read the list of reports for an id. That creates a subtle privacy question, discussed in Deep Dive 7: the operator sees which ids an owner asks for.
  • Lost-mode watch lists are an explicit privacy trade-off. To push a "your item was found" notification, the server must know which future ids belong to this lost item. The owner opts in to revealing that link for a lost item only.
  • The safety endpoints follow the industry specification for unwanted-tracking detection (the IETF DULT work, Deep Dive 8): a product-information lookup and an identifier-lookup page with standard query parameters.

High-Level Design#

We build the design one requirement at a time, then combine the pieces.

1) Pair a tag with its owner#

  • The owner's phone generates the keys, not the server. It creates a P-224 key pair (private d, public P) and a 32-byte secret seed.
  • The tag receives what it needs to derive broadcast public keys (the public key P and the seed). As Deep Dive 2 shows, the construction lets the tag compute every future public key without ever holding the private key, so a stolen tag cannot decrypt its own reports.
  • The keys are synced to the owner's other devices through an end-to-end encrypted key store (like a password keychain sync): the server stores only ciphertext it cannot open.
  • The server records the pairing: serial number, product data and the account. This is the owner registry, used for safety and lawful requests; it says who owns a serial number, but not where the tag is.

2) A separated tag broadcasts; a finder hears it#

  • Every 15 minutes the tag advances a counter and derives a new public key P_i. It puts that key (28 bytes) into its advertisement and broadcasts it every couple of seconds.
  • A finder phone that hears the advertisement takes its own current location, encrypts it to P_i with a fresh one-time key (ECIES), and queues the report. It does this silently in the background; its user sees nothing.
  • The finder computes the key id (SHA-256 of P_i) and attaches it, so the server can file the report.

3) Report ingestion#

  • Uploads go through a relay so the report service never sees the phone's IP address.
  • The report edge checks the format and an anonymous anti-abuse token, then appends the batch to an ingest log (Kafka or a similar log) and returns 202. No decryption, no lookups.
  • Writers consume the log and write reports into the report store, partitioned by key id, with a time-to-live of 7 days.
  • A lost-mode matcher checks each key id against the small set of ids that owners have registered for lost items, and triggers a push when one matches.

4) The owner looks up the location#

  • The owner device knows the master keys and the rotation schedule. For "the last day", it derives the 96 key ids of that day, or only the new ones since its last refresh, and asks the lookup service for reports under them.
  • The server returns opaque blobs. The owner device decrypts them, discards anything that fails authentication, combines several reports into a best estimate, and draws the map.
  • The location history is never assembled on the server. Each owner device builds it locally.

5) Find nearby and lost mode#

  • In Bluetooth range, the owner connects to the tag directly: play a sound, and with UWB get precise distance and direction.
  • In lost mode, a stranger who finds the item can tap it with any NFC phone. The tag returns a URL with an encrypted identifier; the found-item page decrypts it on the server and shows the owner's message and masked contact details.

6) Anti-stalking#

  • A separated tag keeps the same broadcast address for 24 hours instead of 15 minutes, so that a phone that travels with it can notice "this same tag has been with me in four places over the last two hours".
  • Detection runs on the victim's phone, using its own Bluetooth scans and its own location. No server sees the victim's movements.
  • The tag itself helps: after being separated from its owner for a long, randomised period, it plays a sound when moved.
  • The phone can ask the safety service for the product name, disablement instructions and a masked owner identity.

7) Sharing an item#

  • The owner device wraps the item's key material for a recipient (encrypts it to the recipient's account public key) and uploads the wrapped blob. The recipient's devices unwrap it and can then derive key ids and decrypt reports exactly like the owner.
  • Revoking a share deletes the blob, but a recipient who already had the keys could still derive future ids. True revocation therefore means rotating the master key: the owner pairs the tag with new keys and stops sharing the old ones.

The full high-level design#

Components:

  • Tags: derive and broadcast a new public key every 15 minutes (24 hours when separated), answer owner connections, play sounds, expose safety functions to non-owners.
  • Finder phones: scan opportunistically, encrypt their own location to each heard key, batch reports and upload them anonymously.
  • Owner devices: hold master keys, derive key ids, fetch and decrypt reports, estimate location, manage lost mode and sharing.
  • Unwanted-tracking detector: runs on every phone, using only local scan history.
  • Anonymising relay: a separate operator or network layer that forwards finder uploads without revealing IP addresses to the report service.
  • Anonymous token issuer: hands out one-time tokens that prove "this is a genuine device" without saying which device, to limit abuse.
  • Report edge and ingest log: accept batches fast, check them, and append them to a durable log.
  • Report writers and report store: write reports by key id with a 7-day TTL in a wide-column or key-value store.
  • Lookup service: answers batched key-id fetches for authenticated owners.
  • Lost-mode matcher and push: notify owners when a watched key id gets a report.
  • Accessory and share service, owner registry: pairing records, shares, wrapped key blobs, the serial-to-owner registry.
  • Key sync: end-to-end encrypted synchronisation of master keys among an owner's devices.
  • Product registry and safety pages: product names, images and disablement instructions; identifier lookup for found or unknown tags.
  • Privacy-safe metrics: aggregate counters only, with no key ids or locations.

Key Flows#

Flow 1: pairing a new tag#

The private key d never leaves the owner's devices in clear. The key-sync service stores an encrypted blob and has no way to open it.

Flow 2: a finder hears a tag and uploads a report#

Flow 3: the owner refreshes the map#

Flow 4: an unknown tag travels with someone#

Flow 5: lost mode and a found notification#

The server still never sees the location itself: the notification only says "a report arrived", and the owner device fetches and decrypts it.

Data Model#

The report store is deliberately flat and unlinked: one table, keyed by key id, with no owner and no finder. Everything else (accessories, shares, registry) is small, relational and strongly consistent.

LOCATION_REPORT has no relationship lines on purpose. Nothing in the server's data links a report to an accessory, an account or a finder.

The report table in a wide-column store (Cassandra-style CQL):

CREATE TABLE reports (
  key_id      blob,          -- SHA-256 of the broadcast public key, 32 bytes
  seen_at     int,           -- seconds since epoch, from the finder
  report_id   timeuuid,      -- server-assigned, for dedupe and ordering
  epk         blob,          -- finder one-time public key, 29 bytes
  ct          blob,          -- encrypted location, 10 bytes
  tag         blob,          -- AES-GCM tag, 16 bytes
  PRIMARY KEY ((key_id), seen_at, report_id)   -- a key id lives 15 min to 24 h, so partitions stay small
) WITH CLUSTERING ORDER BY (seen_at DESC, report_id DESC)
  AND default_time_to_live = 604800          -- 7 days
  AND compaction = { 'class': 'TimeWindowCompactionStrategy',
                     'compaction_window_unit': 'DAYS',
                     'compaction_window_size': 1 }
  AND gc_grace_seconds = 3600;
 
-- Owner lookup: one partition per key id, newest first, capped.
SELECT seen_at, epk, ct, tag FROM reports
WHERE key_id = ? AND seen_at >= ? LIMIT 200;

Accessories, shares and the registry in a relational database:

CREATE TABLE accessories (
  serial        TEXT PRIMARY KEY,
  account_id    TEXT NOT NULL,
  product_data  BYTEA NOT NULL,           -- 8-byte make and model id
  capabilities  INT NOT NULL,             -- bit flags: sound, uwb, nfc, motion
  wrapped_keys  BYTEA NOT NULL,           -- only owner devices can unwrap
  paired_at     TIMESTAMPTZ NOT NULL
);
 
CREATE TABLE owner_registry (
  serial        TEXT NOT NULL,
  account_id    TEXT NOT NULL,
  contact       TEXT NOT NULL,            -- verified phone or email
  paired_at     TIMESTAMPTZ NOT NULL,
  unpaired_at   TIMESTAMPTZ,              -- kept for a safety period after this
  PRIMARY KEY (serial, paired_at)
);
DataStoreWhy
Location reportsCassandra, ScyllaDB, DynamoDB or Bigtable with TTLHuge write rate, point reads by key id, automatic expiry, no joins
Ingest bufferKafka or a similar durable logAbsorbs spikes, decouples upload from storage, feeds the lost-mode matcher
Lost-mode watch listsIn-memory hash sets in the matcher, backed by a small tableMillions of ids, checked against every incoming report
Accessories, shares, registryPostgreSQL or another relational database, sharded by accountSmall, strongly consistent, needs uniqueness of serials
Master keysEnd-to-end encrypted key sync serviceThe operator stores ciphertext only
Product registryRelational table plus CDN for imagesRead-heavy, rarely changes, public
Anonymous token stateRedis or a key-value store of spent token hashesFast double-spend checks with expiry
MetricsTime-series database with aggregate counters onlyOperations without per-key or per-location data

For the method behind these choices, see Choosing a Database: A Decision Guide.

Deep Dives#

1. Crowdsourced finding: beacons, finders and coverage#

The whole system rests on one physical event: a finder phone happens to be within Bluetooth range of a tag while it is scanning. Everything else is bookkeeping. So it is worth understanding how often that event happens and what controls it.

The beacon

  • BLE devices advertise on three dedicated radio channels. Each advertising event sends the same short packet on each channel in turn, then the radio sleeps until the next event.
  • The advertising interval is the gap between events. A short interval means finders hear the tag sooner but costs battery. The industry specification for unwanted-tracking detection requires an interval of at most 4 seconds and recommends 2 seconds or less for good detection; a 2-second interval is a common choice for tags.
  • The packet is tiny. A classic advertisement carries at most 31 bytes of payload, and a P-224 public key's x coordinate alone is 28 bytes. Apple's design, as reverse-engineered and published by researchers, packs the first bytes of the key into the 6-byte Bluetooth address field itself (with the two top bits forced to mark it as a random address) and the rest into the payload. The "address" of the tag is therefore part of its current public key, and it changes whenever the key changes.
  • Range depends on the environment: tens of metres outdoors with line of sight, much less through walls, bags and bodies.

The finder

A finder must not drain its own battery. So it does not scan continuously on its own account:

  • Modern phones have Bluetooth controllers that can filter advertisements in hardware and wake the main processor only when a matching packet arrives. The finder registers a filter for the tracker advertisement format.
  • Scanning is duty-cycled and piggybacks on times the phone is already awake: when the screen is on, when other Bluetooth work runs, or in short scheduled windows.
  • On a match, the finder records (key, time, its own location and accuracy). It needs a location fix; if the phone already has a recent fix from other apps or the OS, it reuses it rather than turning on GPS.
  • It deduplicates locally: one report per key per finder per rotation period is enough. A finder sitting next to a tag for an hour does not upload 1,800 reports.
  • It batches uploads and sends them when the radio is already active or on Wi-Fi. A delay of a few minutes is fine; nobody is waiting for a specific report.

Who should report at all

  • If the tag is with its owner, a crowd report is useless (the owner's phone knows where the tag is) and it is a needless privacy exposure. Tags can signal "near owner" in their advertisement (a single bit in the industry format), and Google states that its network discards crowd reports for a tag when the owner's own devices can locate it.
  • Reports should come only from finders that opted in, and a finder should never report while it is at its own user's home if the user has asked for that. Google's design adds this as an "at home" protection.

How often is a tag heard? A coverage model

Treat finders passing a stationary tag as random arrivals, a Poisson process with rate λ per hour. The probability that the tag is reported at least once within t hours is:

P(at least one report) = 1 − e^(−λt)

and the expected wait for the first report is 1/λ.

We can estimate λ from finder density. A finder walking at speed v past a tag with range r sweeps a strip 2r wide; with ρ moving, scanning finders per square metre, the arrival rate is about λ ≈ ρ × v × 2r.

PlaceScanning finders per km²λ per hour (r = 30 m, v = 1.4 m/s)P(report within 1 hour)Expected wait
Busy city centre or airport200about 60about 100%about 1 minute
Suburb5about 1.578%40 minutes
Rural road0.1about 0.033%33 hours

The arithmetic for the suburb: 5 per km² is 5 × 10⁻⁶ per m²; times 1.4 m/s times 60 m gives 4.2 × 10⁻⁴ per second, which is 1.5 per hour.

Three lessons:

  • The network is excellent where people are and weak where they are not. That is exactly where lost items usually are (cafés, trains, airports), which is why the approach works so well in practice.
  • Doubling the advertising interval barely changes λ in busy places (every passing finder still hears several packets) but matters in sparse places, where a finder may pass within range for only a few seconds.
  • Requiring several finders before showing a location (Google's "aggregation by default", Deep Dive 10) improves safety near private places but lowers coverage in sparse areas. Google's post says as much: the network is most valuable in busy public places, and in quieter areas other methods (last known location, its home devices) fill in.

Location accuracy

  • Each report's position is the finder's location, not the tag's. The error combines the finder's GPS accuracy (5–20 m outdoors, 50 m or more indoors) and the distance to the tag (up to tens of metres).
  • Researchers who analysed Apple's system reported that location traces built from real reports tracked a walking person with a mean error of under 30 m in a city, and that the reports could reveal a person's top locations, such as home and work, to within about 10 m in urban areas. Good for finding items, and a reminder of why the reports must stay encrypted.
  • Several reports from different finders can be combined into a better estimate; Deep Dive 6 covers the method.

2. Rotating keys: unlinkable broadcasts the owner can still decrypt#

We need a broadcast key scheme with five properties at once:

  1. Unlinkable: an observer cannot tell that two broadcast keys came from the same tag.
  2. Owner-computable: the owner can compute every key the tag used at any time, without talking to the tag.
  3. Encryptable: each broadcast value is a real public key, so finders can encrypt to it.
  4. Owner-decryptable: the owner can compute the private key for every period.
  5. Small: fits in one Bluetooth advertisement, and cheap enough for a coin-cell chip.

Options

ApproachHow it worksProblem
Fixed idTag broadcasts a serial numberAnyone can track the tag and its owner
Random ids with a shared listTag and owner share a list of pre-generated key pairsLarge storage on the tag; list runs out; tag holds private keys
Hash chain of idsid_i = hash(seed, i)Not a public key, so finders cannot encrypt to it
Independent key per periodTag generates a fresh key pair every periodThe owner cannot know the new keys without contact
Derived key pairsDerive (d_i, P_i) from a master key pair and a secret seedMeets all five requirements

The derived construction

Apple's platform security documentation describes its scheme, and independent researchers confirmed it by reverse engineering. In outline:

  • At pairing, the owner device creates a P-224 key pair: private d and public P = d·G, where G is the curve's generator point. It also creates a 32-byte secret SK₀ and sets a counter i = 0.
  • Each period, the secret is ratcheted forward: SKᵢ = KDF(SKᵢ₋₁, "update"). The KDF is a standard hash-based function (the researchers identified ANSI X9.63 with SHA-256).
  • From SKᵢ, two large numbers are derived: (uᵢ, vᵢ) = KDF(SKᵢ, "diversify").
  • The period's private key is dᵢ = uᵢ·d + vᵢ (mod n, the order of the curve).
  • The period's public key is Pᵢ = uᵢ·P + vᵢ·G.

Why the two formulas agree:

dᵢ·G = (uᵢ·d + vᵢ)·G = uᵢ·(d·G) + vᵢ·G = uᵢ·P + vᵢ·G = Pᵢ

That one line of algebra is what makes the design work:

  • The tag only needs P and SK₀ to compute every future public key Pᵢ. It never holds d, so a stolen or opened tag cannot decrypt any reports.
  • The owner has d, so it can compute dᵢ for any period with cheap modular arithmetic and decrypt.
  • An observer who sees Pᵢ and Pⱼ cannot link them: without the secret seed, uᵢ and vᵢ look like random numbers, so Pᵢ looks like a random point on the curve.
// Owner-side derivation for period i (pseudo-code, P-224 arithmetic assumed)
function deriveKeys(d: bigint, P: Point, sk0: Bytes, i: number) {
  let sk = sk0;
  for (let k = 1; k <= i; k++) sk = kdf(sk, "update", 32);   // one-way ratchet
  const uv = kdf(sk, "diversify", 72);
  const u = toInt(uv.slice(0, 36)) % N;                      // N = curve order
  const v = toInt(uv.slice(36, 72)) % N;
  const di = (u * d + v) % N;                                // private key, owner only
  const Pi = add(mul(u, P), mul(v, G));                      // public key, tag can do this
  const keyId = sha256(xCoord(Pi));                          // what the server indexes
  return { di, Pi, keyId };
}
// In practice the owner caches sk at checkpoints (for example daily),
// so deriving key i does not repeat thousands of KDF steps.

A one-way ratchet gives a form of forward privacy

Because SKᵢ is computed from SKᵢ₋₁ by a one-way function, someone who extracts SKᵢ from a tag can compute future keys (and so recognise the tag from now on), but cannot go backwards to recognise the keys it broadcast last week. A stolen tag does not reveal where it has been.

Rotation schedules and the stalking trade-off

  • Apple's documentation says the key changes approximately every 15 minutes, which is 96 keys a day.
  • The industry specification for unwanted-tracking detection requires the address to rotate every 15 minutes when near the owner, but only every 24 hours when separated, so that a person carrying an unknown tag sees the same identifier long enough to be warned (Deep Dive 8).
  • One way to implement both: keep two schedules derived from the same master material with different labels, a fast one (15 minutes) and a slow one (one per day), and broadcast the slow one when separated. The owner derives both sets of key ids when looking up.

Time and drift

  • The tag does not talk to the network, so its counter runs on its own clock. A cheap crystal drifts by tens of parts per million: at 50 ppm, 4.3 seconds a day, about 26 minutes a year, which is close to two 15-minute periods.
  • The owner device therefore queries a window of indices (for example, the expected index ± 2) and learns the tag's real offset from which index gets reports. Every time an owner device connects to the tag, it resynchronises the tag's clock.
  • After a battery change, the tag may lose its time entirely. It can continue from the last stored counter, and the owner's devices search a wider window until the next direct connection fixes it.

Costs

  • On the tag: one P-224 point computation per rotation, a few tens to hundreds of milliseconds on a small microcontroller, 96 times a day. Negligible next to the radio.
  • On the owner device: computing 672 key ids for a 7-day history means 672 KDF steps and 672 scalar multiplications, well under a second on a phone.
  • The key id is a SHA-256 hash of the public key. The server never needs the key itself, and a party who only knows an id cannot encrypt a fake report to the tag without the public key.

3. Encrypting a report: what the finder sends#

The finder holds one thing from the tag: its current public key Pᵢ, which it heard over Bluetooth. It must produce a message that only the holder of dᵢ can read, and it must do so without any conversation with the owner. That is the textbook use case for ECIES (Elliptic Curve Integrated Encryption Scheme): public-key encryption built from a key agreement plus a symmetric cipher.

Step by step

  1. Rebuild the full public key Pᵢ from the advertised bytes. The advertisement carries the 28-byte x coordinate. A point on the curve has two possible y values for a given x; the scheme fixes one (for example, by a convention on the sign bit) so finder and owner agree.
  2. Generate a fresh ephemeral key pair (e, E = e·G) for this report only.
  3. Compute the shared secret S = x-coordinate of e·Pᵢ (an ECDH key agreement).
  4. Run a KDF over S and E to get 32 bytes. The researchers who analysed Apple's format found ANSI X9.63 with SHA-256, using the first 16 bytes as an AES key and the last 16 as the GCM nonce (IV).
  5. Encrypt the payload (latitude, longitude, accuracy, a status byte) with AES-GCM, which gives both secrecy and a 16-byte authentication tag.
  6. Send (key id, coarse timestamp, E, ciphertext, tag).

The owner reverses it: compute S = x-coordinate of dᵢ·E (the same point, since dᵢ·E = dᵢ·e·G = e·Pᵢ), run the same KDF and decrypt. If the authentication tag fails, the report is discarded: it was corrupted or forged for a different key.

// Finder side: encrypt one sighting to the tag's broadcast key
function sealReport(Pi: Point, loc: Location, seenAt: number): Report {
  const e = randomScalar();                       // ephemeral, used once
  const E = mul(e, G);
  const S = xCoord(mul(e, Pi));                   // ECDH shared secret
  const k = x963kdf(sha256, concat(S, encodePoint(E)), 32);
  const aesKey = k.slice(0, 16), iv = k.slice(16, 32);
  const plain = packLocation(loc);                // lat, lon (fixed point), accuracy, status
  const { ct, tag } = aesGcmEncrypt(aesKey, iv, plain);
  return {
    keyId: sha256(xCoordBytes(Pi)),               // server index; reveals nothing about the tag
    seenAt: Math.floor(seenAt / 60) * 60,         // coarse time, minute resolution
    epk: encodeCompressed(E),                     // 29 bytes compressed, 57 uncompressed
    ct, tag,
  };
}

Byte budget

FieldBytesNotes
Key id32SHA-256 of the public key; the only field the server indexes
Timestamp4When the finder saw the tag; can be coarse
Ephemeral public key29Compressed P-224 point (57 if uncompressed)
Ciphertext10Latitude 4, longitude 4, accuracy 1, status 1
GCM tag16Integrity check
Framingabout 10Version, flags, lengths
Totalabout 100Matches the capacity estimate

The payload is tiny, so the cryptography costs more bytes than the data. That is fine: 100 bytes per report is still only 50 MB/s at peak.

Design choices and why

  • Why a fresh ephemeral key per report? If two reports used the same e, they would be linkable and, with GCM, reusing a key and nonce destroys security. A fresh e costs one scalar multiplication on the finder, well under a millisecond on a phone.
  • Why is the timestamp in clear text? The server needs it to expire reports and to answer "since" queries. The minute-level resolution leaks little. A design could put the time inside the ciphertext and keep only an upload-day bucket outside, at the cost of losing server-side "since" filtering.
  • Why not encrypt the key id? The server must match owner queries to reports. The key id is a one-way hash of a rotating key, so on its own it tells the server only "some tag was seen by some finder". The anonymity work (Deep Dive 7) is about stopping the server from linking ids to people.
  • Why not sign the report? A signature by the finder would identify the finder, which is exactly what we are trying to avoid. Instead, spam is controlled with anonymous tokens (Deep Dive 7).

What encryption does not protect

  • The server still sees traffic patterns: how many reports a key id gets and when. A key id that gets hundreds of reports within minutes is in a busy place.
  • The server sees which key ids an owner asks for unless the fetch path is also protected.
  • A finder that lies can encrypt a false location to any key it has heard. The owner cannot detect that from one report, which is why combining several reports matters (Deep Dive 6).

4. Report ingestion at 500,000 reports per second#

Ingestion is a write-heavy, append-only pipeline with no reads on the hot path and no need for strong ordering. That shape is easy to scale if each stage is stateless and the storage is laid out for appends.

The path

Stages

1. Privacy relay and edge.

  • The finder sends its batch through a relay run by a different party, or at least a separate tier with separate logs, so that the ingest tier never sees the finder's IP address (Deep Dive 7).
  • TLS terminates at the edge. Requests are small, around 1 KB for a batch of 10.

2. Ingest gateway.

  • Stateless. Checks request size and format and verifies an anonymous rate-limit token (one token spent per batch).
  • Validates each report: key id length, timestamp not in the future and not older than 7 days, ciphertext length.
  • Responds 202 Accepted as soon as the batch is durably in Kafka. The finder does not care what happens next.
  • Sizing: 50K requests per second at peak. At about 5K requests per second per instance (tiny bodies, mostly crypto-free), that is 10 instances; run 30 across zones for headroom.

3. The log.

  • Kafka (or an equivalent durable log) absorbs bursts and decouples the gateway from storage.
  • Partition by key id hash. That keeps reports for one key id in one partition, which helps dedupe and lets the lost-mode matcher keep per-key state.
  • 500K messages per second at 100 bytes is 50 MB/s, with replication factor 3 about 150 MB/s of disk writes across the cluster. 512 partitions give about 1,000 messages per second each, which is light. Retention of 24 hours (21.6 billion reports, about 2.2 TB raw and 6.5 TB replicated) lets writers replay after an outage.

4. Store writers.

  • Consume partitions in batches and write to the report store.
  • Dedupe: the same finder may upload a report twice after a retry. The writer uses a content hash (key id + ephemeral key) as the report id, so a retried write overwrites itself instead of creating a duplicate.
  • Per-key caps: a tag in a stadium may be seen by 5,000 finders in an hour. Storing all of them wastes space and slows the owner's fetch. The writer keeps at most N reports per key id per time bucket (for example, 20 per 5 minutes), sampled across time. More reports barely improve the location estimate.

5. Lost-mode matcher.

  • Keeps an in-memory set of watched key ids: the ids that lost-mode tags will broadcast over the next day, uploaded by their owners' devices. With perhaps 1 million tags in lost mode at once, each with 96 fast ids and 1 slow id per day, that is about 100 million ids at 32 bytes, a few GB, sharded by the same key-id hash as Kafka so each matcher holds its slice.
  • On a match, it sends a push to the owner's devices: "Your item was found". The push carries no location; the device fetches and decrypts the report itself.

Why not write straight to the database?

  • Bursts: a stadium or train station can create sudden spikes. Kafka smooths them.
  • Fan-out: the same report feeds the store, the lost-mode matcher and (privacy-safe) metrics.
  • Replay: a bug in a writer can be fixed and the last day replayed.

Back-pressure

  • If the report store slows down, writers fall behind and Kafka lag grows; the gateway keeps accepting.
  • If Kafka itself is unavailable, the gateway returns 503 with Retry-After, and finders keep reports in a local queue (bounded, say 500 reports, oldest dropped first) and retry later. The data is not precious, so loss of a few reports is acceptable; overload is not.

5. Storage and retention: a 7-day rolling window of opaque blobs#

The report store is unusual. The server cannot read the data, never updates it, and deletes all of it within a week. That rules out a lot of database features we would normally want and makes others essential.

What the store must do

  • Absorb 250K writes per second on average and 500K at peak.
  • Answer "all reports for key id K since time T" with low latency, about 1.2 million key-id reads per second at peak.
  • Expire everything after 7 days, cheaply and reliably. Privacy depends on this.
  • Survive the loss of a node or a zone without losing recent data.

Choice: a wide-column store with TTL

OptionFitNotes
Cassandra or ScyllaDBStrongPartition by key id, cluster by time, native TTL, time-window compaction
DynamoDB or BigtableStrongSame model as a managed service; TTL deletes are background and may lag
Redis clusterPartialFast, but 23 TB of RAM (70 TB replicated) is expensive for data most owners never read
Relational databaseWeakWrites at this rate need heavy sharding; deletes of 21 billion rows a day are painful
Object storage in time bucketsPartialCheap, but "reports for one key id" needs an index

We pick a Cassandra-style store (see Apache Cassandra in Practice): partition key = key id, clustering by time descending, TTL of 604,800 seconds.

Why partition by key id works here

  • A key id lives only 15 minutes (fast schedule) or 24 hours (slow schedule). Its partition therefore holds at most one period's worth of reports, capped by the writer at a few hundred rows. Partitions can never grow without bound.
  • Load spreads evenly. Key ids are hashes, so consistent hashing scatters them uniformly across nodes (see Consistent Hashing).
  • The owner's read is a multi-partition lookup of about 30 key ids. Each is a single-partition read, and the client or a coordinator runs them in parallel.

Expiry: why time-window compaction matters

  • With a plain TTL, expired rows become tombstones that must be compacted away; a store writing 21 billion rows a day would drown in them.
  • Time-window compaction (TWCS) groups data written in the same window (for example, one day) into the same files. When every row in a file has expired, the whole file is dropped at once. No tombstone scanning, no rewriting.
  • This only works if all rows have the same TTL and arrive roughly in time order, both true here. Reports for old sightings (a finder that uploads late) would land in a newer window; the gateway rejects reports older than a few days to keep windows clean.
  • A short gc_grace_seconds is safe because rows are never deleted explicitly, only expired, so there are no deletes to resurrect.

Sizing

  • 3.2 TB written per day, 23 TB for 7 days, 70 TB with replication factor 3.
  • With nodes holding about 2 TB each (leaving compaction headroom on 4 TB disks), that is about 35–40 nodes per region before read capacity is counted.
  • Writes: 500K per second at peak with replication 3 is 1.5 million replica writes per second. At 50K writes per second per node for small rows, that is 30 nodes, so the same cluster size handles writes.
  • Reads: 1.2 million key-id reads per second at peak. Most key ids an owner asks for have no reports at all (tags are mostly near their owners), so a Bloom filter per data file lets a node answer "nothing here" without touching disk (see Probabilistic Data Structures for Big Data). Reads that hit are mostly in recent files, which stay in page cache.

Hot keys

  • A tag in a stadium of 50,000 people may be seen by thousands of finders an hour. Writes to that key id all go to the same partition and the same three replicas.
  • 5,000 writes in 15 minutes is under 6 per second, trivial for one partition. The cap per key per bucket bounds the stored rows.
  • The real hotspot risk is a flood: an attacker uploading millions of fake reports to one key id. Rate-limit tokens bound uploads per finder, and the per-key cap bounds what is kept (Deep Dive 11).

Deletion on request

  • An owner who removes a tag asks for its history to be deleted. The server cannot list the key ids (it does not know which tag they belong to). The owner's device derives them and sends delete requests by key id. Even if the owner never does, everything expires in 7 days.

6. Owner lookup: from a key-id list to a dot on a map#

The fetch

The owner's device (phone, tablet or laptop on the same account) wants "where has my tag been recently?". It cannot ask "reports for tag X", because the server has no idea which reports belong to tag X. Instead:

  1. Derive the key ids for the window of interest. For "since my last refresh 2 hours ago" that is about 8 fast ids, plus 2 on each side for clock drift and the slow schedule's id: about 12 per tag. An owner with two or three items sends about 30 ids in one request.
  2. Send a fetch with the list of key ids and a "since" time. The server returns all matching reports: opaque blobs.
  3. Decrypt each with the matching dᵢ, discarding any that fail authentication.
  4. Estimate a location and show it.
  5. Remember the last fetch time, so the next one is incremental.

A first-ever fetch for 7 days of history is the worst case: 672 fast ids plus 7 slow ids plus drift margin, about 700 ids. The device splits it into a few requests of 200 ids each. On the server, that is 700 parallel partition reads, most of them empty, served in tens of milliseconds.

Request rate and caching

  • 200 million owner devices, 5 refreshes per day on average: 12K requests per second, 40K at peak (evenings, or after a major outage when everyone opens the app).
  • At about 30 ids per request: 1.2 million partition reads per second at peak.
  • Do not cache on the server by key id. Each owner's ids are unique, so a cache helps little. The store's own page cache and Bloom filters do the work.
  • Cache on the device. Decrypted reports are kept locally (encrypted at rest), so a refresh only fetches new reports. Devices on the same account can share decrypted results through the user's end-to-end encrypted sync, if the design offers it.

Estimating where the tag is

Each report says "a finder at location L with accuracy a saw the tag at time t". Several reports give several overlapping circles.

  • Most recent first. For "where is it now", the latest report dominates. If the tag is moving, older reports describe where it was.
  • Weighted average for a still tag. If the reports in the last 30 minutes are close together, combine them with weights 1/a² (more accurate fixes count more). With n independent reports of similar error σ, the error of the mean shrinks roughly as σ/√n: 4 reports with 20 m error each give about 10 m.
  • Add the radio range. The tag is within range r of each finder, so the true uncertainty is about √(a² + r²) per report. Ten metres of GPS error and 20 m of range give about 22 m.
  • Reject outliers. A report 5 km from all the others, minutes apart, is either a moving tag or a lie. Use a median-based filter (drop reports further than 3× the median distance from the median point) before averaging.
  • Show uncertainty honestly. Display a circle sized by the combined error, not a pin pretending to be exact.
// Combine recent reports for a stationary tag (pseudo-code)
function estimate(reports: Decrypted[], rangeM = 20): Estimate {
  const recent = reports.filter(r => now() - r.seenAt < 30 * 60);
  if (recent.length === 0) return lastKnown(reports);
  const med = medianPoint(recent);
  const kept = recent.filter(r => dist(r, med) < 3 * medianDist(recent, med) + 50);
  let wSum = 0, lat = 0, lon = 0;
  for (const r of kept) {
    const s2 = r.accuracy ** 2 + rangeM ** 2;    // GPS error plus radio range
    const w = 1 / s2;
    wSum += w; lat += w * r.lat; lon += w * r.lon;
  }
  return { lat: lat / wSum, lon: lon / wSum,
           radiusM: Math.sqrt(1 / wSum), seenAt: maxSeenAt(kept), n: kept.length };
}

When the owner is close

The map gets the owner to the right street or building. The last few metres need different tools:

  • Play a sound over a direct Bluetooth connection, which needs the owner's device to be in range.
  • Signal strength. Bluetooth RSSI gives a rough "warmer, colder" hint, noisy to a few metres.
  • Ultra-wideband (UWB) precision finding. Apple's AirTag has a U1 UWB chip, which on supporting iPhones gives distance and direction to within centimetres to decimetres by measuring radio time of flight. Not every tag or phone has UWB, so the design treats it as an optional extra.

7. Finder and owner anonymity: hiding who reported and who asked#

End-to-end encryption hides the location from the server. It does not hide who talked to the server. Without more care, the operator could still learn a lot from metadata.

What metadata can leak

LeakHowWhy it matters
Finder identityUploads arrive with an account token or a device IPThe server learns where the finder was (the report time plus the finder's coarse IP location)
Finder co-locationOne upload batch contains reports for several key idsTags seen by the same finder at the same time were near each other, and so were their owners
Owner identityFetches are made with the owner's accountThe server learns which key ids belong to which account
Owner to finder linkCombine the two aboveThe server knows "account A's tag was near the phone that uploaded from IP X"

The researchers who studied Apple's system pointed out exactly this kind of issue. Because owner fetches were tied to the owner's account, and one finder's upload could contain reports for several owners, the operator could in principle learn which owners had been near each other, a partial social graph. Their attack required the operator to act maliciously; the encryption itself held. The lesson for a designer is that encryption of content is necessary but not sufficient.

Defences on the upload path

  1. No account on upload. Apple's documentation states that finder uploads carry no authentication information and that Apple does not log the finder's identity. The upload is anonymous by design.
  2. Strip the IP address. Send uploads through a two-hop relay: the relay sees the IP but not the content; the server sees the content but not the IP. Oblivious HTTP (standardised by the IETF in 2024 as RFC 9458) is a standard way to do this, with the relay run by a separate party.
  3. Break batches apart. Instead of one request with 10 reports, send reports in separate requests, or mix reports for different key ids from different times, so that co-location cannot be inferred from a single request. This costs more requests (500K per second instead of 50K) and trades efficiency for privacy; a middle ground is to batch only reports for the same key id.
  4. Coarse time. Round timestamps to the minute, or the 15-minute period, so that timing alone does not re-identify finders.

Rate limits without identity: anonymous tokens

The server still needs to stop a single device from uploading millions of fake reports. Rate limiting normally needs an identity. Anonymous tokens give rate limits without one:

  • The device, authenticated with its account (or with device attestation), asks an issuer for N tokens per day. It blinds each token before asking, so the issuer signs without seeing the final value.
  • The device later spends one token per upload. The server checks the issuer's signature but cannot link the token back to the issuing request.
  • The issuer knows "device D got 200 tokens today"; the server knows "this upload has a valid token". Neither knows "device D uploaded this report".

The idea goes back to David Chaum's blind signatures ("Blind Signatures for Untraceable Payments", 1982). Privacy Pass, standardised by the IETF in 2024, is a modern, widely deployed form. See Rate Limiting and Throttling for rate limiting in general.

Defences on the fetch path

At first the owner side looks harder, as if the owner must prove the right to read. It does not: reports are encrypted, so anyone may fetch any key id without harm. The server does not need to know who asks. That opens options:

  • Fetch anonymously through the same relay, with anonymous tokens for rate limiting. The server sees "someone asked for these 30 ids", not "account A asked".
  • Hide which ids are related. A fetch for 30 ids still tells the server those ids belong together. The device can split fetches across requests and add decoy ids (random hashes, which have no reports).
  • Private information retrieval (PIR) lets a client read an entry from a database without the server learning which entry. The idea was introduced by Chor, Goldreich, Kushilevitz and Sudan ("Private Information Retrieval", 1995). It is costly at this scale (the server does work proportional to the database for each query, or more with replicas), so it is a research direction rather than a default. It is worth naming in a staff-level interview.

Device-side key storage

The owner's private key d and the seed must stay on the owner's devices and in end-to-end encrypted sync. The paper found that an earlier macOS version stored cached, decrypted keys where another app could read them, which would reveal about a week of the tag's history to a malicious app. Apple fixed it (CVE-2020-9986). The design lesson: key material on the client is part of the security boundary, not an implementation detail.

8. Anti-stalking: stopping tags from being used to track people#

A tag the size of a coin, with a battery lasting a year, that reports its location through a billion phones, is also a perfect tool for tracking a person without consent. Rotating keys make this worse: the victim's phone cannot recognise a tag that changes its identity every 15 minutes. Anti-stalking is therefore not a feature; it is a core requirement, and it pulls against privacy in specific, nameable ways.

The core tension

Owner privacy wantsVictim safety wants
Rotate keys often so the tag cannot be followedKeep the identifier stable long enough to notice it is following you
Never reveal who owns a tagLet a victim and the police find the owner
The tag stays silentThe tag makes a noise when it is far from its owner and moving

The industry answer, shared by Apple and Google through a joint specification published at the IETF (Detecting Unwanted Location Trackers, DULT), is to change the tag's behaviour depending on whether it is near its owner or separated.

Tag states

The specification's main rules, in plain terms:

  • Near owner: the address and key rotate every 15 minutes, and the advertisement sets a near-owner bit. Other phones ignore tags with that bit set, so a person walking next to their own partner's tag is not alerted.
  • Separated: after the tag has been away from its owner for about 30 minutes, it switches. It rotates its identifier only once every 24 hours, so a victim's phone can see the same identifier at several places. It also rotates on every state change.
  • Advertising: the tag must advertise at least every 4 seconds (2 seconds or less is recommended) in a standard format with a shared service identifier, so any compliant phone can detect it regardless of brand.
  • Sound: after being separated for a random time between 8 and 24 hours, the tag watches for motion. If it is moved, it plays a sound. To avoid draining the battery or annoying people forever, it backs off for 6 hours after a limit (for example, after 10 sounds).
  • Remote sound: a nearby phone can connect over a standard non-owner Bluetooth service and ask the tag to play a sound, so the victim can find it.
  • Identifier lookup: the victim can read an encrypted identifier from the tag (over Bluetooth after a user action on the tag, or by tapping it with NFC). The phone sends it to the tag maker's server, which decrypts it and returns partial owner information, such as the last four digits of a phone number or a masked email address.
  • Owner registry: makers keep the link between tag and account for at least 25 days after unpairing and provide it to law enforcement on a valid request. Apple's 2022 update said every AirTag has a serial number paired with an Apple ID for this reason.
  • Disabling: the maker must publish instructions to physically disable the tag (for example, removing the battery).

Detection on the victim's phone

The detector runs on the potential victim's phone, entirely on-device:

  1. Collect sightings of tags in the separated state: (identifier, time, own location).
  2. Ignore identifiers seen only at one place, or only at home with no movement.
  3. Raise an alert when the same identifier has been seen at several distinct places while the user moved, over a meaningful time (for example, at least 3 places at least 500 m apart over 30 minutes or more). Exact thresholds are tuned by each platform; the values here are illustrative.
  4. Offer: play a sound, show the identifier lookup, show how to disable the tag.

Apple's 2022 changes moved alerts earlier, made the tag's sound louder, showed an on-screen alert alongside the sound and let iPhones with UWB use Precision Finding to locate an unknown AirTag. In May 2024, Apple and Google said the joint specification shipped in iOS 17.5 and in Android 6.0 and later, with an alert reading "[Item] Found Moving With You", and several tag makers committed to support it.

False positives and false negatives

  • False positive: a family member's tag in a shared car. The near-owner bit handles most cases; the detector also lets the user mark a tag as known and pause alerts.
  • False negative: a tag whose firmware ignores the rules, or a homemade beacon. Platform detection only works for tags that follow the format. This is an arms race (Deep Dive 11).
  • Slow detection: the 24-hour identifier and 8–24 hour sound delay mean a victim may be tracked for hours before an alert. Shorter limits mean more false alarms and more battery use. There is no free setting; the specification picks a middle ground.

9. Battery: a year on a coin cell#

A tag runs on a CR2032 coin cell. Apple says the AirTag's battery lasts more than a year. That budget shapes every choice on the tag.

The energy budget

A CR2032 holds about 220–240 mAh at its rated, low-drain conditions. Use 225 mAh. One year is 8,760 hours, so the whole tag must average about:

225 mAh / 8,760 h ≈ 26 µA

That includes everything: sleeping, advertising, key rotation, sounds, owner connections, UWB ranging, and the battery's own losses.

Where the energy goes (illustrative numbers for a modern BLE chip)

ActivityCost per eventFrequencyAverage current
Sleep with a real-time clock1–2 µA continuousAlwaysabout 2 µA
One advertising event (3 channels)about 15 µCEvery 2 sabout 7.5 µA
Key rotation (one P-224 point multiplication)about 0.5 mC96 per dayabout 0.6 µA
Motion sensor polling when separatedsmallSeparated only1–3 µA
Speaker for one 12-second soundabout 30 mA × 12 s = 360 mCA few per week1–3 µA
Owner connections, firmware updatesvariableOccasional1–5 µA

The base load (sleep plus advertising plus rotation) is about 10 µA. That alone would give 225 / 0.010 = 22,500 hours, about 2.6 years. Sounds, connections, UWB, motion polling, cold weather (which cuts coin-cell capacity) and the voltage sag a coin cell shows under pulsed load bring a real device down to the "a year or more" range.

Design lessons:

  • The advertising interval is the main knob. Halving the interval from 2 s to 1 s adds about 7.5 µA, a 30% cut in battery life, for a modest gain in detection in sparse areas (Deep Dive 1).
  • Transmit power matters less than you might think for range, and a lot for battery. 0 dBm is a typical compromise.
  • Never connect when you can broadcast. A BLE connection costs far more than an advertisement. The tag connects only to its owner (and to a nearby phone asking it to play a sound).
  • Cryptography is cheap, radio is expensive. One elliptic-curve operation every 15 minutes is a rounding error; one extra advertisement per second is not.
  • Tell the owner early. The tag reports its battery level to the owner's device during connections, so the app can warn weeks in advance.

The finder's battery

The finder's cost must be close to zero, or users will turn the feature off.

  • Hardware filters in the Bluetooth controller match the tracker format without waking the main CPU.
  • Scanning piggybacks on existing activity rather than running continuously.
  • Location comes from fixes the phone already has; a finder does not turn on GPS just to report a tag.
  • Uploads are batched and sent when the radio is already awake or on Wi-Fi. One 1 KB upload every few minutes costs almost nothing.

10. Two production designs: Apple Find My and Google's Find Hub#

Both large platforms built a crowdsourced network on the same basic idea, and both publish enough about their designs to compare them. The differences are instructive because each one is a deliberate trade-off.

What they share

  • End-to-end encryption. Apple's documentation describes the rotating P-224 scheme (Deep Dive 2). Google's April 2024 announcement of its network says location data is end-to-end encrypted with keys held only by the owner and the people they share with, so Google cannot see it.
  • Anonymous finders. Both say the finder cannot be identified by the operator.
  • Unknown-tracker alerts following the joint DULT specification, across both platforms since May 2024.
  • Huge networks. Apple described a network approaching a billion devices when it launched AirTag in 2021. Google said its network would include over a billion Android devices.

Where they differ

ChoiceApple Find My (per its platform security guide)Google's network (as announced, Apr 2024)
Show a location from one finder?Yes, a single report is enoughAggregation by default: needs several nearby devices to detect the tag before the location is shown
Finder's own homeNot described in Apple's security documentationAt-home protection: if the user saved a home address, the finder does not report near it
Rate limitsNot described in Apple's security documentationRate limits on how often one finder reports one tag and how often owners can refresh
Owner's own devices nearbyNot described in Apple's security documentationCrowd reports are discarded if the owner's own device finds the tag
Report storageRetention period not described in the documentationData is minimally buffered and frequently overwritten
User choiceNot described in Apple's security documentationContribute aggregated reports (default), opt into non-aggregated reports, or turn participation off

Why Google chose aggregation

  • A single report from a single finder near a quiet house can reveal where a specific person lives. Requiring several finders means the tag must be in a place with many people, which is likely to be public.
  • Cost: weaker coverage in sparse areas (Deep Dive 1). Google's own post accepts that trade-off.
  • Implementation in our design: aggregation can be done without the server seeing locations. The server holds back reports for a key id until it has received reports from at least k distinct anonymous tokens in a time window, then releases them all. The server counts, but cannot read.

Why discard reports when the owner is near

  • If the owner's own phone sees the tag, crowd reports add no information and only add risk (they reveal the owner's location to whoever might break the encryption later).
  • In our design, the owner device, on seeing its tag, uploads a "suppress" message keyed by the key id (anonymously). Writers drop further reports for that id. It is a cheap and effective data-minimisation step.

What to say in an interview

Neither design is "right". The axis is coverage versus privacy:

  • One report per tag, everywhere: best for finding lost items, highest privacy risk.
  • Aggregation, at-home protection, aggressive expiry: safer, misses some items in quiet places.

A strong answer names the axis, picks a default, and explains how to move along it with settings.

11. Attacks and defences#

An open, anonymous, crowdsourced network has an unusual attack surface. Anyone can upload, anyone can fetch, and the server cannot read the data it stores. Here are the main attacks and what each defence costs.

Fake reports

Attack: upload false locations for a tag to mislead its owner, for example to hide where a stolen bike went.

  • To encrypt a report to a tag, the attacker needs its current public key, which means being in Bluetooth range of the tag or knowing the master public key and seed (which only the owner and tag have).
  • So a remote attacker can send garbage for a key id, but it will fail decryption on the owner's device (the GCM tag check) and be discarded.
  • An attacker near the tag can encrypt a false location. Defences: the owner combines several reports and rejects outliers (Deep Dive 6); a single false report among many honest ones is outvoted. Requiring several distinct finders (aggregation) raises the cost further.

Flooding

Attack: upload millions of reports to fill the store, or to one key id to make an owner's fetch slow.

  • Anonymous tokens bound uploads per device per day (Deep Dive 7). An attacker with 1,000 devices still has only 1,000 × N tokens.
  • Per-key caps in the writer keep at most a few hundred reports per key id per period.
  • Size limits at the gateway (batch size, request size).
  • Gateway-level rate limits on the relay's egress addresses, applied in aggregate.

Relaying and replaying beacons

Attack: record a tag's advertisement in one place and replay it elsewhere, so finders report a false location. Or relay it live from a distant place.

  • A replayed advertisement contains a real public key, so reports encrypt correctly and decrypt fine.
  • Partial defences: the key rotates every 15 minutes (or 24 hours when separated), which limits how long a recording is useful; the owner sees reports that jump between distant places within minutes and can flag them as impossible (a speed check).
  • This is a known weakness of any system where the beacon cannot prove it is physically present. Strong distance bounding (proving physical proximity with radio timing, like UWB secure ranging) is possible only with special hardware, so it is not part of the basic design.

Tracking a tag through rotation

Attack: link a tag's identifiers across rotations, defeating unlinkability.

  • With fixed transmission timing, a passive observer could link the "last packet of key i" to the "first packet of key i+1" at the same moment from the same place. Defences: randomise the rotation time slightly and add random jitter to the advertising interval.
  • Other identifying signals: slightly different radio fingerprints between chips, battery-level fields or unusual payload values. Keep all non-key fields constant across rotation.

Evading anti-stalking

Attack: a stalker modifies a tag (removes the speaker, changes firmware) or builds their own beacon that uses the network but ignores the rules.

  • A silenced tag defeats sound alerts but still advertises in the standard format, so phone-based detection still works.
  • Custom firmware that broadcasts a fresh key every few minutes even when separated looks like many different tags, each seen briefly, and can escape the "same identifier at several places" rule. Defences are heuristic: platforms can detect unusual patterns of many short-lived identifiers moving together, or only accept reports for accessories whose keys were registered with certified hardware.
  • The researchers who studied Apple's system showed this is practical: their proof-of-concept let non-Apple devices be tracked through Apple's network.
  • Registering accessories with the network operator (as in Apple's accessory programme and the DULT owner registry) helps tie a tag to an account, but a homemade beacon using the encryption scheme may not need registration to have its reports stored. This is an open arms race; a staff-level answer acknowledges it rather than claiming a complete fix.

Client key theft

Attack: malware on the owner's computer reads the tag keys and gets the tag's location history.

  • Store keys in the platform's protected keychain, encrypted at rest, never in a world-readable cache (the CVE-2020-9986 lesson from Deep Dive 7).
  • Keep the history short (7 days) so a theft reveals little of the past.

Malicious operator

Attack: the operator itself, or someone who compromises it, wants locations.

  • End-to-end encryption means stored reports are useless without owner keys.
  • Metadata (who uploaded, who fetched) is minimised by relays and tokens.
  • Remaining exposure: the operator ships the software. A malicious update could exfiltrate keys. That is a trust problem outside the system design; it is addressed with code signing, audits and transparency logs.
AttackMain defenceResidual risk
Fake reportsGCM check, outlier rejection, aggregationAttacker near the tag can mislead
FloodingAnonymous tokens, per-key capsLarge botnets
Replay or relayKey rotation, speed checkLive relay within a rotation period
Linking across rotationJitter, constant fieldsRadio fingerprinting
Evading anti-stalkingStandard format, registry, heuristicsCustom beacons
Client key theftKeychain storage, short retentionCompromised owner device
Malicious operatorE2E encryption, relaysMalicious software updates

12. Multi-region, reliability and observability without looking at the data#

Regions

The data is opaque and short-lived, which makes multi-region design simpler than usual.

  • Writes land locally. A finder uploads to the nearest region. The report is replicated asynchronously to other regions (with Kafka mirroring or the store's own cross-region replication).
  • Reads may be anywhere. The owner may be in Europe while the tag is lost in the US. Option A: replicate every report everywhere (70 TB per region, three regions is 210 TB), and every fetch is local. Option B: fan out the fetch to all regions and merge. With a handful of regions, option A is simpler and cheaper than it sounds: the storage is modest and the writes are small.
  • Consistency: eventual. A report written in the US may appear in Europe a few seconds later. Nobody can tell the difference.
  • Data residency: since the server cannot read the data, it may not be personal data in the usual sense, but the metadata might be. Some designs keep reports in-region and fan out fetches instead. Discuss with legal; see Multi-Region and Global Data.

Failure modes and their impact

  • A store node fails: replication factor 3 and quorum reads (or local-one reads, since reports are immutable) keep serving. Repair after restart.
  • A region fails: Geo DNS sends finders to another region; reports buffer on devices; owners fetch from the replicas in other regions.
  • Kafka lag: reports appear late. Alert at 2 minutes of lag, page at 10.
  • Lost-mode matcher down: owners do not get "found" pushes, but the next fetch still shows reports. The matcher rebuilds its state from the watched-id list.
  • Key-sync failure on owner devices: a new device on the account cannot decrypt. Show a clear error and retry; never fall back to sending keys to the server in clear.

Observability without seeing locations

The team still needs to know whether the system works, without decrypting anything.

  • Counts, not content: reports per second, per region, per app version; fetch requests per second; percentage of fetched ids with any report; Kafka lag; store latency per percentile.
  • Delivery delay: the gap between the report's timestamp and its arrival time, as a histogram, shows how fast finders upload.
  • Decryption success rate, reported by owner devices as an anonymous counter (for example, through differential-privacy telemetry). A drop means a bug in finder encryption or key derivation, often after a release.
  • Synthetic tags: the operator owns test tags in known places (offices, test labs in several cities). Its own probes fetch and decrypt their reports and check the location and the delay end to end. This is the best single health signal.
  • Never log: finder IPs, owner account ids next to key ids, or full request bodies. Log retention for anything request-level should be short.

See Observability: Logs, Metrics and Traces for the general toolkit.

Releases

  • Crypto changes are format changes. Version every report; owner devices must decrypt both old and new formats for at least 7 days (the retention window) after a change.
  • Tag firmware updates go through owner devices over Bluetooth, staged by percentage, with the ability to stop. A bricked tag cannot be fixed remotely.
  • Stage server releases by region, with the synthetic-tag probe as the gate (see CI/CD and Deployment Strategies).

Bottlenecks and Failure Modes#

Failure / hotspotImpactMitigation
Report flood from a botnetStore fills with junk; owner fetches slow downAnonymous tokens per device per day, per-key caps in writers, gateway size limits
Stadium or airport burstIngest spikes several times above normalKafka absorbs bursts; finders already dedupe per key per period; writers sample per key
Hot key id (tag in a crowd)Thousands of writes to one partitionPer-key cap per time bucket; partitions are short-lived by design
Tombstone build-up from TTLSlow reads, compaction stormsSame TTL for all rows, time-window compaction drops whole files
Owner fetch storm after an outage40K+ requests per second, 1M+ partition readsBloom filters make empty reads cheap; client backoff with jitter; incremental "since" fetches
Clock drift on the tagOwner derives the wrong key ids and sees nothingQuery a window of indices; resync on every owner connection; widen after battery change
Kafka unavailableReports cannot be accepted503 with Retry-After; bounded device-side queue; multi-zone brokers
Region outageFinders and owners in that region failGeo DNS failover; cross-region replicas; devices buffer and retry
Metadata leak through logsOperator can link finders and ownersRelay strips IPs; no account on uploads; short, content-free logs
Key theft from an owner deviceAttacker reads 7 days of historyKeychain storage, encrypted sync, short retention
Anti-stalking evasion with custom beaconsVictims not alertedStandard format required for registered tags; heuristics for many short-lived ids; registry for law enforcement
Crypto or format bug in a releaseOwners cannot decrypt new reportsVersioned formats; synthetic tags gate releases; staged rollout

What Interviewers Expect#

Mid-level. Explain the basic loop: tag advertises over Bluetooth, nearby phones upload a location, owner fetches it. Size the write path (hundreds of thousands of reports per second) and pick a store with TTL partitioned by an identifier. Recognise that a fixed identifier lets anyone track the tag, and suggest rotating identifiers. Draw an HLD with a gateway, a queue and a store, plus a fetch service.

Senior. Explain end-to-end encryption to a rotating public key: the finder encrypts, the server cannot read, the owner derives every key. Explain why derived key pairs (dᵢ = uᵢ·d + vᵢ) let the tag compute public keys without the private key. Lay out the storage: partition by key id, cluster by time, TTL plus time-window compaction, per-key caps, Bloom filters for empty reads. Handle the owner fetch: derive ids for a window, drift margin, incremental fetch, combining reports into an estimate. Raise anti-stalking unprompted: near-owner versus separated behaviour, sounds, phone-side detection, identifier lookup.

Staff and above. Separate content privacy from metadata privacy, and design for both: relays, anonymous tokens, splitting batches, anonymous fetches, and why PIR is not the default. Make the safety and privacy trade-offs explicit: rotation period versus detectability, aggregation versus coverage, one report versus several, retention length. Reason about the attack surface: fake reports, replay and relay, flooding without identity, custom beacons, malicious operator. Talk through cross-industry standards (a shared detection format across platforms), law-enforcement access via an owner registry and the policy side of the product. Plan the operations: synthetic tags as the end-to-end health signal, versioned crypto formats, staged firmware rollouts, multi-region replication of opaque data.

Deep Dive: sizing every tierShow

Starting point (from the capacity section): 1.5 billion finders, 300 million tags, 250K reports per second on average and 500K at peak, batches of 10 (50K upload requests per second at peak), 40K owner fetches per second at peak with about 30 key ids each, and 7 days of retention.

Privacy relay.

  • 50K requests per second at peak, about 1 KB each: 50 MB/s, trivial bandwidth.
  • If uploads are split into one report per request for privacy (Deep Dive 7), that becomes 500K requests per second. At about 20K small requests per second per relay node, that is 25 nodes per region plus headroom. Splitting is the main cost driver of the relay tier.

Token issuer.

  • Each finder uploads on average 21.6 billion / 1.5 billion ≈ 14 reports per day, or 1–2 batches. Give each device, say, 50 tokens a day for headroom.
  • If devices refill once a day, that is 1.5 billion / 86,400 ≈ 17K issuance requests per second, each signing 50 blinded tokens: about 870K signing operations per second.
  • With an elliptic-curve token scheme at about 0.1 ms per operation per core, that is about 90 cores. With RSA blind signatures at about 1 ms, about 900 cores. The token scheme choice matters at this scale.
  • Verifying tokens on upload: 50K per second (or 500K if split), each about 0.1 ms: 5–50 cores. Spent tokens are kept in a short-lived set to stop double spending, keyed by token hash with a TTL of one day: 500K inserts per second at peak, a Redis-class cluster (see Redis in Practice).

Ingest gateways.

  • 50K requests per second at about 5K per instance: 10 instances; run 30 across three zones.

Kafka.

  • 50 MB/s in, 150 MB/s with replication 3; two consumer groups read 100 MB/s.
  • 24 hours of retention: 2.2 TB raw, 6.5 TB replicated. 6–9 brokers with fast disks per region. 512 partitions (see Apache Kafka in Practice).

Store writers.

  • 500K rows per second at peak, about 20K rows per second per writer with batching: 25 instances; run 40.

Report store.

  • 23 TB of unique data for 7 days; 70 TB with replication 3 in one region.
  • At 2 TB per node: 35–40 nodes. With every report replicated to three regions: about 120 nodes in total.
  • Write capacity: 1.5 million replica writes per second at peak across about 40 nodes, under 40K per node, within the range of a well-tuned wide-column node for small rows.

Fetch service.

  • 40K requests per second at peak, about 4K per instance: 10 instances; run 30.
  • 1.2 million partition reads per second at the store, most of them empty and answered by Bloom filters in memory.

Lost-mode matcher.

  • Suppose 1 million tags are in lost mode at once, each with about 100 watched ids per day: 100 million ids, 32 bytes each, about 3.2 GB plus overhead, roughly 10 GB in hash sets. Shard across 16 instances, aligned with Kafka partitions.
  • "Found" events are rare: a few hundred per second at most, sent through the push service.

Owner registry and accessory info.

  • 300 million tags, about 500 bytes per row (serial, account, masked contact, pairing dates): 150 GB. A sharded relational database is plenty.
  • Identifier lookups by people who find unknown tags: a few hundred per second at most.
TierPeak loadSize per region
Relay50K to 500K req/s10 to 30 nodes
Token issuer870K signs/s90 cores (EC)
Ingest gateway50K req/s30 instances
Kafka50 MB/s in6 to 9 brokers
Writers500K rows/s40 instances
Report store1.5M replica writes/s, 1.2M reads/s35 to 40 nodes, 70 TB
Fetch service40K req/s30 instances
Lost-mode matcher100M watched ids16 shards, 10 GB
Owner registrylow150 GB relational
Deep Dive: what the public record tells usShow

Large parts of these networks are documented by their operators or by independent researchers. Treat these as calibration points, not as a description of any company's exact architecture.

Apple's offline finding and AirTag.

  • Researchers from TU Darmstadt (Heinrich, Stute, Kornhuber and Hollick, "Who Can Find My Devices? Security and Privacy of Apple's Crowd-Sourced Bluetooth Location Tracking System", PETS 2021) reverse-engineered the system. They report that Apple introduced offline finding in 2019 with iOS 13, documented the rotating P-224 keys, the ECIES report encryption with AES-GCM, the key id as a SHA-256 hash of the public key, and how the public key is packed into the Bluetooth address and payload.
  • The same paper measured accuracy (a mean error below 30 m for a walking trace in their tests) and found two issues: a way for the operator to correlate the locations of different owners, and a macOS flaw that let a malicious app read cleartext cached keys (CVE-2020-9986), which Apple fixed.
  • Apple's platform security guide states that the key pair rotates about every 15 minutes, that the P-224 public key fits in a single Bluetooth payload, that finder uploads carry no authentication information, and that Apple does not keep finder identity.
  • Apple announced AirTag in April 2021 at $29 (or $99 for four), with a U1 chip for Precision Finding on supported iPhones, an NFC-readable Lost Mode that can show the owner's phone number if they chose to provide it, a user-replaceable CR2032 battery lasting more than a year, IP67 water and dust resistance, and a network Apple described as approaching a billion devices. Apple said no location data or history is stored on the AirTag itself, and that it uses rotating identifiers.
  • In February 2022 Apple described its response to reports of misuse: each AirTag has a unique serial number paired with an Apple ID, Apple can provide account details on a valid law-enforcement request, setup now warns users that tracking people is a crime, alerts arrive earlier, the tag's sound is louder, and iPhones with UWB can use Precision Finding to locate an unknown AirTag.

Google's network.

  • Google's April 2024 security post describes end-to-end encrypted location reports, finders that Google cannot identify, minimal buffering, aggregation by default (several nearby devices must detect the tag), at-home protection, rate limiting, discarding crowd reports when the owner's own device sees the tag, unknown-tracker alerts and user controls for participation. It says the network includes over a billion Android devices.

The joint specification.

  • In May 2024 Apple and Google said their cross-platform specification for detecting unwanted trackers had shipped in iOS 17.5 and Android 6.0 and later, and that several tag makers had committed to support it.
  • The IETF draft on the accessory protocol (authors from Apple and Google) sets the rules in Deep Dive 8: near-owner and separated states, 15-minute and 24-hour rotation, advertising at least every 4 seconds, a non-owner Bluetooth service to play a sound and read an identifier, an owner registry kept at least 25 days after unpairing, and sounds after a random 8–24 hour separation followed by motion.

What we do not know from these sources: exact cluster sizes, storage technology, per-key caps, retention periods for Apple's reports and the exact detector thresholds. The numbers in this page are our own estimates.

Deep Dive: a 45-minute interview plan and follow-up questionsShow

Minutes 0–5: clarify. Ask about scale (finders, tags), whether the operator may see locations (the answer drives everything), history length, lost mode, sharing, anti-stalking and battery life. State the key assumption out loud: "location must be end-to-end encrypted, the server stores blobs it cannot read".

Minutes 5–10: numbers. 300 million tags, 3 sightings per tag per hour, 250K reports per second on average, 500K at peak; 100 bytes per report; 3.2 TB a day; 23 TB for a week. Owner fetches at 40K per second at peak with about 30 key ids each.

Minutes 10–20: HLD. Tag, finder, relay, ingest gateway, Kafka, writers, report store with TTL, fetch service, lost-mode matcher, owner registry. Walk through the two main flows: a finder uploads, an owner fetches.

Minutes 20–35: deep dives. Pick two or three, ideally the ones the interviewer cares about:

  • Rotating keys and why the tag never holds the private key.
  • Storage layout: partition by key id, TTL plus time-window compaction, per-key caps, Bloom filters.
  • Anti-stalking: near-owner versus separated, sounds, detection on the victim's phone.

Minutes 35–45: trade-offs and failures. Metadata privacy (relays, anonymous tokens), aggregation versus coverage, flooding, clock drift, region failure, observability with synthetic tags.

Likely follow-up questions and short answers:

QuestionAnswer in one or two lines
Why not just send the tag's location to the server?Then the operator holds a live location database of hundreds of millions of people; one breach or subpoena exposes it. E2E encryption removes that risk at little cost
How does the owner find reports if the server cannot read them?The owner derives every key id the tag used and asks for those ids. The server matches opaque ids
What if the tag's clock drifts?Query a window of indices around the expected one; resync on every owner connection
How do you stop spam without knowing who uploads?Anonymous rate-limit tokens issued per device, plus per-key caps
Can the server tell two reports came from the same tag?Not from the ids alone; ids are unlinkable. It might from metadata, which is why relays and split batches exist
How does a victim find out a tag is following them?The tag switches to a stable 24-hour identifier when separated, and the victim's phone sees it at several places while moving
How do you find the owner of an unknown tag?Read the encrypted identifier over NFC or Bluetooth; the maker's server returns masked owner details; full details go to police on a valid request
Why 7 days of history?Long enough to find most items, short enough to limit damage from a key leak. It is a product and privacy decision
What if the owner loses all their devices?Recover keys from the end-to-end encrypted account backup; without it, the history is unreadable by design
How would you share a tag with family?Share the master public key, seed and private key over E2E encrypted sync; revoking means re-keying the tag at the next owner connection
How does this work across Apple and Android?Detection follows the joint format; finding networks stay separate, each with its own keys and servers
What is the hardest part?Balancing owner privacy against victim safety; the technology of ingestion is the easy part
Deep Dive: the life of one lost wallet, minute by minuteShow

A worked example that ties the deep dives together. Numbers are illustrative.

Setup. An owner, call them Sam, keeps a tag in their wallet. They leave the wallet on a café table at 12:00 and walk away. The café sees about 200 phones an hour, of which about 120 run a compatible OS with finding on.

12:00–12:30, near-owner to separated.

  • For the first minutes the tag is still "near owner" from its own point of view: it last saw Sam's phone a few minutes ago. It rotates its key every 15 minutes and sets the near-owner bit.
  • Finders that hear it, with the near-owner bit set, either do not report or the network discards those reports (as in Google's design). Sam's phone, now 2 km away, is out of range.
  • At about 12:30, after 30 minutes without contact with the owner, the tag switches to the separated state: it sets the bit off, rotates to a new key on the slow 24-hour schedule, and starts its random 8–24 hour timer for sounds.

12:30–12:45, first reports.

  • Using the coverage model: 120 eligible finders an hour, each within range for a while, gives λ ≈ 120 per hour for the café, so the expected wait for the first report is half a minute. Within 15 minutes there are dozens of sightings from different finders.
  • Each finder deduplicates (one report per key per period), batches with other reports and uploads within a few minutes. With aggregation turned on, the server holds back reports until, say, 3 distinct finders have reported the key id; that threshold is crossed within a minute or two.
  • Each report is about 100 bytes. The writers keep up to 20 per key id per 5-minute bucket and drop the rest.

12:50, Sam notices.

  • Sam opens the app. Their phone derives the key ids for the last 2 hours on both schedules, about 12 ids, adds ids for their other two tags, and sends one fetch of about 30 ids.
  • The server returns 40 reports for the wallet's slow-schedule id (the rest have none). The phone decrypts them, rejects 2 outliers (finders whose GPS fix was 300 m off indoors) and combines the rest. With 38 reports of about 25 m combined error each, the mean has a formal error of about 25 / √38 ≈ 4 m; in practice it is bounded by the systematic bias of indoor GPS, so the app shows a circle of about 30 m around the café. Total time from tap to map: under a second.

12:52, lost mode.

  • Sam turns on lost mode with their phone number. Their phone uploads the ids the tag will broadcast for the next day to the lost-mode matcher, and the NFC response of the tag will now include a link to a page with a message and their masked phone number.

13:10, found.

  • Sam walks back. When their phone is within Bluetooth range, it connects directly to the tag, resynchronises its clock and plays a sound. Their iPhone has UWB, and the tag has a UWB chip, so the app shows an arrow and a distance: "3 m, to your left". Sam finds the wallet under a chair.
  • The tag sees its owner again and switches back to near-owner. It rotates its key immediately (every state change triggers a rotation).

What if the café were a rural bus stop? With 2 finders an hour, the expected wait for the first report is 30 minutes, and with an aggregation threshold of 3 distinct finders, the expected wait for the location to show is about 1.5 hours. That is the coverage cost of aggregation in quiet places, quantified.

What if someone picked up the wallet and took it home? The tag stays separated, keeps its 24-hour identifier, and after a random 8–24 hours starts to play a sound when moved. The person's phone, if it supports the joint specification, notices the same identifier at several places as they move and alerts them. They can read the identifier and see a masked contact for Sam.

Deep Dive: what changes if the server may see locationsShow

A useful exercise in an interview is to design the simpler system first and then show what end-to-end encryption costs and buys.

The simple design.

  • Tags broadcast a fixed or slowly changing id. Finders upload (tag id, location, time) in clear.
  • The server stores location_history(tag_id, time, lat, lon) and can do anything with it: a geospatial index (see Geospatial Indexing and Proximity Search), server-side aggregation and filtering of outliers, "notify me when it moves", "show all my tags on one map", analytics on loss hot spots.
  • The owner fetches by tag id with normal account authentication.

What we gain.

  • Simpler clients: no key derivation, no ECIES, no drift windows.
  • Server-side features: estimation from many reports, push alerts on movement, history beyond 7 days, search.
  • Easier debugging: engineers can look at the data.

What we lose.

  • A live database of where hundreds of millions of people are. Every breach, insider, malicious operator or legal demand exposes it. This is the single biggest risk in the whole product.
  • Finder trust. People join the network because they believe it does not track them. If the server sees finder location plus time, it can reconstruct finder movement.
  • Stalking resistance at the network level. Anyone who learns a fixed tag id can follow it with a cheap scanner, without the network at all.

Middle grounds.

  • Server-visible data with strong access controls and short retention. Better than nothing, but still a honeypot.
  • Encrypt content, but keep the tag id fixed. Still trackable by anyone listening to Bluetooth.
  • Encrypt content and rotate ids, but keep metadata (finder accounts, IPs). Vulnerable to the correlation attacks in Deep Dive 7.
PropertyServer sees locationsEncrypt content, fixed idFull design (E2E, rotating keys, relays, tokens)
Operator learns tag locationsYesNoNo
Passive Bluetooth trackingEasyEasyHard
Operator links owners via findersYesYesHard
Server-side featuresAllFewFew, by design
Client complexityLowMediumHigh
Breach impactSevereModerateLow

The full design costs client complexity and some features. It buys a system whose worst-case breach reveals little. For a product that, by its nature, tracks locations of objects people carry, that trade is the reason the product can exist at all.

Deep Dive: pairing, key sync, sharing and revocationShow

The cryptography only protects reports if the keys stay with the right people. Key management is where many real systems get hurt.

Pairing.

  • The owner's phone connects to the new tag over Bluetooth (a short-range, user-initiated action, often with the tag held near the phone).
  • The phone generates the master key pair (d, P) and the seed SK₀, sends P and SK₀ to the tag over an encrypted pairing channel, and sets the tag's counter and clock.
  • The phone registers the tag's serial number with the owner registry (account, masked contact, pairing date). The registry never receives d or SK₀, so it can say "this serial belongs to this account" but cannot derive key ids.
  • If the tag supports it, the phone also proves the tag is genuine (for example, with a certificate burned in at the factory), so the network can tell certified hardware from homemade beacons.

Sync to the owner's other devices.

  • The owner's laptop and tablet need d and SK₀ too. They travel through the platform's end-to-end encrypted sync (for Apple, the researchers found a keychain-synced store encrypted with AES-GCM). The sync service stores ciphertext; only the owner's devices can open it.
  • Each device can fetch and decrypt independently. They can also share decrypted results to save work.

Sharing with family or friends.

  • Sharing means giving another account the ability to derive key ids and decrypt. The simplest way: send d, P and SK₀ to the other person's devices over an end-to-end encrypted channel.
  • A finer-grained option: share only the keys for a time range. The owner sends SKⱼ for the start of the range and the private keys (or a way to compute them) for those periods. Because the ratchet is one-way, holding SKⱼ reveals nothing about keys before period j.
  • Shared users should appear to the anti-stalking logic as "owners", so a family member carrying a shared tag is not alerted. Google's post states that keys are held by the owner and those they share with, which matches this model.

Revocation.

  • A person who once had the keys can derive every future key id from the same seed. Removing them from a list on the server achieves nothing; the server does not gate access.
  • Real revocation requires re-keying the tag: at the next direct connection, the owner's phone writes a new (P', SK₀') to the tag and syncs the new keys only to the remaining owners. From then on, the revoked person sees nothing new; past reports they could already read stay readable for up to 7 days until they expire.
  • Until the next connection, the revoked person can still read reports. The app should say so honestly ("removal takes effect next time your phone is near the tag").

Unpairing and resale.

  • Unpairing erases keys on the tag and on the owner's devices, and marks the registry entry as unpaired (kept for at least 25 days for law-enforcement requests, per the specification).
  • A tag that was never unpaired is still tied to its account. A common design is to refuse setup on a second account until the first owner removes it, which discourages theft and resale of tracked items. The registry makes that check possible without any key material.

Account recovery.

  • If the owner loses all devices and has no recovery key for their encrypted sync, the tag history cannot be decrypted by anyone. That is the intended outcome. The product should offer re-pairing (by physical access to the tag) rather than server-side recovery.
Deep Dive: the non-owner protocol, lost mode and identifier lookupShow

People who find a tag (or find one following them) need to interact with it without being its owner. That interaction must help them without revealing the owner to just anyone.

Over NFC.

  • Many tags have an NFC chip. A tap with a phone reads a URL, which opens a web page with no app needed.
  • The joint specification describes a URL carrying a product id, battery state, firmware version and an encrypted identifier. The tag maker's server decrypts the identifier to find the tag's serial number and then the registry entry.
  • If the tag is in lost mode, the page shows the owner's message and contact, such as a phone number if the owner chose to provide one, as Apple described for AirTag.
  • If it is not in lost mode, the page shows only masked details (for example, the last four digits of a phone number) and instructions to disable the tag.

Over Bluetooth.

  • The specification defines a standard non-owner Bluetooth service (with a fixed service identifier) that any compliant phone can use.
  • Operations include reading product information, playing a sound (with a minimum loudness and a duration around 12 seconds recommended) and reading the identifier.
  • The identifier can only be read after a physical action on the tag, such as holding a button, which enables reading for a few minutes. This stops a passer-by from silently reading identifiers of tags in other people's bags.

Why the identifier is encrypted.

  • If a tag returned its serial number in clear, anyone with a phone could scan tags and build a list of serial numbers, then link them across rotations by the serial: the unlinkability of rotating keys would be lost.
  • So the tag encrypts the serial (plus a counter, so each read looks different) to the maker's server public key, using a standard public-key encryption scheme. Only the maker's server can decrypt it and map it to the registry.

Server-side flow.

POST /v1/accessory-info
  body: { encrypted_identifier, product_id, nonce }
  -> server decrypts with its private key, checks the counter and signature
  -> looks up serial in owner_registry
  -> returns { product_name, lost_mode_message?, masked_contact, disable_instructions_url }
  rate limits: per client and per serial; responses logged for abuse review, not tied to finder identity

Abuse cases.

  • A stalker might read their own tag's identifier to test whether it reveals them: it only reveals the masked contact they registered.
  • A finder might try many identifier lookups to enumerate owners: rate limits and the physical-action requirement make bulk reads impractical.
  • Law enforcement with a valid legal request can obtain the full registry entry for a serial number. That is the escalation path the specification and Apple's 2022 update describe.
Deep Dive: finding phones, laptops and earbuds that are offlineShow

The same network finds more than tags. Apple's platform security guide says the approach also works for a Mac that is offline and asleep. The design carries over with a few changes.

What is different about a laptop or phone.

  • It has a big battery and a real clock, so it can advertise more often and keep accurate time. Clock drift barely matters.
  • It is often offline: no Wi-Fi, no cellular, or asleep. That is exactly when it needs the crowd. A device that is online simply reports its own location to its owner's account.
  • It may itself be a finder when it is online, so a lost laptop that is awake but offline acts as both a beacon and a non-reporter.

What stays the same.

  • The owner's account holds the master private key; the device holds only what it needs to derive public keys.
  • Finders encrypt to the broadcast key; the server stores opaque reports by key id; owners derive ids and fetch.

Practical differences.

  • Low-power advertising while asleep. Laptops and phones can keep the Bluetooth controller advertising from a stored key schedule while the main processor sleeps. The schedule of future public keys can be computed in advance and handed to the controller, which then needs no crypto at all.
  • Power off. A phone could keep advertising for a while after shutdown, using a small reserve of battery. This depends on hardware support; treat it as a platform feature, not a protocol requirement.
  • Earbuds have small batteries and often live in a case. The case or the earbuds can advertise like a tag. Users want to find each earbud separately, so each gets its own key schedule.
  • Theft versus loss. For a stolen laptop, the thief may disable Bluetooth or wipe the device. The network helps only until then. Activation locks and remote wipe are the stronger tools; the finding network is a bonus.

Server impact. These devices add more beacons but the same kind of reports. If 500 million phones, laptops and earbuds join the 300 million tags, and most of them are near their owners (so reports are suppressed), the extra load is modest: perhaps a 20–50% increase in reports, well within the scaling of each tier.

Key Takeaways#

  • The network is the product. A tag has no GPS and no internet; it is found because a billion phones pass by. Coverage follows people: excellent in cities and transit hubs, weak on empty roads, as the Poisson model 1 − e^(−λt) shows.
  • End-to-end encryption shapes the whole design. Finders encrypt each sighting to the tag's current public key; the server stores opaque 100-byte blobs it cannot read and indexes them only by a hashed key id.
  • Derived key pairs make rotation work. With dᵢ = uᵢ·d + vᵢ and Pᵢ = uᵢ·P + vᵢ·G, the tag computes every public key without ever holding a private key, the owner computes every private key, and an observer cannot link one broadcast to the next.
  • The write path is big but simple. 500K reports per second at peak flow through a relay, a stateless gateway and Kafka into a wide-column store partitioned by key id, with a 7-day TTL and time-window compaction that drops whole files.
  • The read path is "derive, fetch, decrypt, estimate". The owner device derives about a dozen ids per tag per refresh, with a margin for clock drift, fetches incrementally, and combines reports with weights and outlier rejection into an honest circle.
  • Content privacy is not enough. Metadata (finder IPs, batches of co-located reports, owner accounts on fetches) can rebuild a social graph. Relays, anonymous tokens, split batches and anonymous fetches close those gaps.
  • Anti-stalking is a core requirement, not a feature. Tags behave differently near the owner (15-minute rotation, near-owner bit) and separated (24-hour identifier, sounds after motion), so victims' phones can detect them; the joint Apple–Google specification makes this cross-platform.
  • Privacy and safety pull against each other. Rotation speed, aggregation thresholds, at-home protection and retention are dials; good designs name the trade-off and pick defensible defaults.
  • Battery sets the physics. About 26 µA average for a year on a CR2032 means broadcast, never connect; cheap crypto every 15 minutes; and an advertising interval of around 2 seconds.
  • Operate it without looking at the data. Count instead of read, use synthetic tags for end-to-end health, version every crypto format and treat client key storage as part of the security boundary.