Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Meta Engineering 6 min read Case study mediumAdept

How Meta is improving password security and preserving privacy

Meta's Private Data Lookup (PDL) checks new passwords against breached-password datasets using Private Set Intersection, so the server learns neither the attempted password nor whether it matched. The client sends a per-request blinded hash H(p)^a, the server double-blinds it with a long-term key b and returns blinded hashes of leaked passwords, and the client unblinds and matches locally. To make this practical, leaked passwords are pre-blinded offline, the dataset is sharded by a short hash-prefix index, and returned values are truncated to cut bandwidth. The check flags a password appearing anywhere in a breach, not just a matching username/password pair, and is deployed in Enterprise Center's account creation and reset flows.

Assumes: cryptographic hashingDiffie-Hellman style blindingpassword authentication flows

Related posts

  • PrivacyLib: Privacy Controls at the Data Access Boundary

    Meta Engineering mediumAdept

    PrivacyLib is a common library embedded in the clients of hundreds of Meta data and processing systems that enforces and observes privacy requirements at the point of data access. Each system integrates once by mapping its native APIs to five common operations (read, write, RPC, request entry, inline execution). New requirements then ship as enforcing modules such as Policy Zones or observing modules such as Privacy Probes and Agent Observability, taking days per system instead of months. To sustain billions of checks per second, requirements are compiled at build time, checks are answered from per-request and per-host caches, telemetry is deduplicated with Bloom filters, and signed tokens let ServiceRouter verify raw RPCs that passed client-side checks. A walkthrough shows Logger blocking writes of messaging metadata to tables that lack the right annotation.

  • Data logs: The latest evolution in Meta’s access tools

    Meta Engineering mediumAdept

    Meta serves per-user data logs from its Hive data warehouse, which cannot handle per-user point queries, by batching many Download Your Information requests into one full-table scan. A scheduled job collects recent requests into a batch run on the Core Workflow Service. It writes the requester IDs to a Hive table, then runs per-table and per-partition Dataswarm jobs that INNER JOIN against each table's owner column. PySpark splits the results into per-user files, and a Hack post-processing step applies privacy filters and renders readable HTML. Lessons include checkpointing for resilience against out-of-memory and timeout failures, a user-ID verification step added after a Spark partitioning bug nearly returned data to the wrong user, and an experimentation platform for testing workflow changes.

  • How Meta built large-scale cryptographic monitoring

    Meta Engineering mediumAdept

    Meta logs every operation in FBCrypto, its managed cryptographic library, without sampling by aggregating identical events into per-event counts in an in-process buffer and flushing them periodically to Scribe, with data landing in Scuba and Hive. The buffer is a folly::ConcurrentHashMap shared across threads. Randomized first-flush delays smooth write spikes, and derived-key operations are rolled up under the parent key name to cut volume while still giving a pessimistic count for detecting key overuse. The resulting dataset drives key rotation, inventories of weak and quantum-vulnerable algorithms for migration, migration-safety alarms based on success rates, and fleet-wide library version tracking. Remaining challenges include Scribe and Scuba capacity and flushing safely at shutdown.

  • How Meta discovers data flows via lineage at scale

    Meta Engineering mediumAdept

    Meta builds a data lineage graph across its web, data warehouse and AI systems to find where sensitive data such as Facebook Dating religion fields flows, so privacy controls like Policy Zones can be applied. Signals come from static code analysis, from Privacy Probes runtime instrumentation, and from SQL analysis of Presto and Spark query logs and AI training configs. Privacy Probes captures sampled source and sink payloads within a request and classifies pairs as a high-confidence match-set (exact or contains match) or a noisier full-set that can include transformed flows. An iterative tool in Policy Zone Manager then walks the graph from sources, with developers or heuristics excluding irrelevant nodes so that whole downstream branches are pruned at once.

  • Applying federated learning to protect data on mobile devices

    Meta Engineering easyNovice

    Meta is evaluating federated learning with differential privacy (FL-DP), which trains models on mobile devices and adds noise to updates before they reach a global model so user data stays local and is harder to memorize or reconstruct. Because data isn't visible centrally, FL-DP complicates label balancing, feature normalization and metrics, and it brings slower mobile release cycles, slower training and a need for anonymized logging. Meta's architecture combines mobile devices, trusted execution environments and back-end servers so models can use both server-side data and device-only data. In tests with an in-house FL library, it showed minimal accuracy loss versus server-trained models, though model iteration remains orders of magnitude slower than centralized ML.

The quest for software engineering knowledge.

Look:
Layout: