---
title: "How Meta built large-scale cryptographic monitoring"
description: "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."
url: "https://swe.quest/articles/how-meta-built-large-scale-cryptographic-monitoring-007f3fb06e949eb9"
canonical: "https://engineering.fb.com/2024/11/12/security/how-meta-built-large-scale-cryptographic-monitoring/"
source: "Meta Engineering"
published: "2024-11-12"
difficulty: "medium"
kind: "Case study"
reading_minutes: 10
tags: ["cryptography","observability","scalability","c-cpp"]
---

# How Meta built large-scale cryptographic monitoring

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2024-11-12, 10 min read, Case study. Original: [https://engineering.fb.com/2024/11/12/security/how-meta-built-large-scale-cryptographic-monitoring/](https://engineering.fb.com/2024/11/12/security/how-meta-built-large-scale-cryptographic-monitoring/)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Cryptography](https://swe.quest/tags/cryptography.md) (Security)
- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)
- [C & C++](https://swe.quest/tags/c-cpp.md) (Languages)

## Prerequisites

- symmetric key rotation basics
- logging pipelines ([easy posts on Observability](https://swe.quest/tags/observability.md?difficulty=easy))
- concurrent hash maps ([easy posts on Maps & geospatial](https://swe.quest/tags/geospatial.md?difficulty=easy))

## Keywords

FBCrypto, Scribe, Scuba, Hive, folly::ConcurrentHashMap, post-quantum cryptography, AES-GCM-SIV

## Related posts

- [How Meta enables de-identified authentication at scale](https://swe.quest/articles/how-meta-enables-de-identified-authentication-at-scale-aba1c4d5d1b717ac.md): Meta Engineering · 2022-03-30 · Medium · 8 min read · Privacy, Cryptography, Identity & auth, Multi-tenancy, Scaling
  Meta's Anonymous Credential Service (ACS) authenticates clients without user IDs by splitting authentication into token issuance over an authenticated channel and unlinkable token redemption over an anonymous channel, built on VOPRFs and blind signatures with an HMAC over business data keyed by a shared secret.
- [Protecting user data through source code analysis at scale](https://swe.quest/articles/protecting-user-data-through-source-code-analysis-at-scale-357585a0d96f83c8.md): Meta Engineering · 2025-02-18 · Medium · 4 min read · Static analysis, Threat detection, Application security, Python
  Meta's Anti-Scraping team encodes known scraping attack vectors as taint-analysis rules in its in-house static analyzers, Zoncolan for Hack and Pysa for Python, so potential vectors are flagged before code ships.
- [How Meta is improving password security and preserving privacy](https://swe.quest/articles/how-meta-is-improving-password-security-and-preserving-privacy-daa9a84182d0e924.md): Meta Engineering · 2023-08-08 · Medium · 6 min read · Cryptography, Privacy, Identity & auth, Security
  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.
- [Post-Quantum Cryptography Migration at Meta: Framework, Lessons, and Takeaways](https://swe.quest/articles/post-quantum-cryptography-migration-at-meta-framework-lessons-and-takeaways-5ce039d3ec6b2968.md): Meta Engineering · 2026-04-16 · Medium · 13 min read · Cryptography, Security
  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.
- [PrivacyLib: Privacy Controls at the Data Access Boundary](https://swe.quest/articles/privacylib-privacy-controls-at-the-data-access-boundary-f868c0b03bdc9ad2.md): Meta Engineering · 2026-10-27 · Medium · 17 min read · Privacy, System design, Identity & auth, AI agents, Performance engineering
  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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
