Skip to content

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

Meta Engineering 13 min read Case study mediumAdept

Post-Quantum Cryptography Migration at Meta: Framework, Lessons, and Takeaways

Meta proposes PQC Migration Levels (PQ-Unaware, Aware, Ready, Hardened, Enabled) as a way to track how quickly each use case could respond to a quantum threat. Its migration framework runs through six steps: prioritization, cryptographic inventory, resolving external dependencies, building PQC components, guardrails, and integration. Applications are ranked by quantum risk. Public-key encryption and key exchange are high priority because of store-now-decrypt-later attacks, signatures are medium (split by how easily they can be patched), and symmetric crypto exposed only to Grover's attack is low. Meta recommends sticking to NIST standards: ML-KEM768 and ML-DSA65 by default, with ML-KEM512 and ML-DSA44 allowed where performance demands it, and HQC as a backup built on different math.

Related posts

  • Quantum Resistance and the Signal Protocol

    Signal easyNovice

    Signal is upgrading its X3DH key agreement to PQXDH, which derives the session shared secret from both X25519 elliptic-curve key agreement and the CRYSTALS-Kyber post-quantum key encapsulation mechanism, so an attacker must break both to recover keys. The hybrid design guards against harvest-now-decrypt-later attacks by future quantum computers while hedging against undiscovered weaknesses in newer post-quantum schemes, one of which was broken classically during NIST standardization. PQXDH is already live for new chats between updated clients, X3DH will be disabled for new chats after an update window, and existing chats will be migrated. Protection against an attacker with a contemporaneous quantum computer remains future work.

  • 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.

  • Safeguarding cryptocurrency by disclosing quantum vulnerabilities responsibly

    Google Research hardMaster

    New resource estimates show Shor's algorithm can break 256-bit elliptic curve cryptography (ECDLP-256) using two compiled circuits. One needs under 1,200 logical qubits and 90 million Toffoli gates, the other under 1,450 logical qubits and 70 million Toffoli gates. That translates to fewer than 500,000 physical superconducting qubits running for a few minutes, roughly a 20-fold reduction from earlier estimates. Because most blockchains rely on ECDLP-256, Google recommends migrating cryptocurrencies to post-quantum cryptography, avoiding exposed or reused wallet addresses, and considering policy for abandoned coins. To disclose responsibly, the circuits are withheld and a zero-knowledge proof lets third parties verify the claims without handing attackers a roadmap.

  • How Meta is improving password security and preserving privacy

    Meta Engineering mediumAdept

    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.

  • SQLite Encryption in Production: Key Management, Migration, and Real-World Use Cases

    Turso mediumAdept

    Production SQLite encryption with Turso fails most often at the key, not the cipher. Generate keys from a CSPRNG (hex for local Turso Database, base64 for Turso Cloud, a common gotcha), keep them in a secret manager, and use one key per tenant. Rotation currently means export, reimport and a brief cutover window because native rekeying isn't available. Migrations from SQLCipher, SEE or plaintext SQLite are dump-and-reimport. AES-256-GCM is recommended over AEGIS for HIPAA and PCI-DSS because auditors expect a NIST-approved cipher, alongside a checklist of the key-management artifacts auditors want to see.

The quest for software engineering knowledge.

Look:
Layout: