Skip to content

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

Engineering@Microsoft 3 min read Announcement easyNovice

Common annotated security keys

Microsoft's Common Annotated Security Standard (CASK) extends GitHub's identifiable-token approach of fixed signatures plus checksums, so leaked secrets can be detected with near-zero false positives. Every CASK key carries a shared `JQQJ` signature, which lets one scanner rule find any conforming key, plus a provider signature such as `AZDO` for Azure DevOps. Keys use only Base62 characters, carry about 310 bits of entropy across 52 random characters, and embed a month/year creation timestamp to support rotation policies. The format also reserves test keys and platform-specific metadata bits, and Microsoft plans to open-source the spec for other providers to adopt.

Assumes: secret scanningAPI keys and tokens

Related posts

  • Behind GitHub’s new authentication token formats

    GitHub Engineering mediumAdept

    GitHub's new token formats add a three-letter identifiable prefix (ghp, gho, ghu, ghs, ghr) with an underscore separator, a CRC32 checksum encoded in Base62 in the last six characters, and a Base62 random portion. The prefix alone is expected to cut secret-scanning false positives to about 0.5%. The checksum lets fake tokens be rejected offline without a database lookup. OAuth token entropy rises from 160 to 178 bits at the same 40-character length, and the underscore is chosen because it is not a Base64 character and double-click selects the whole token.

  • Introducing Automatic Key Verification

    Signal mediumAdept

    Signal's automatic key verification uses key transparency to confirm that the binding between a phone number or username and its public key is globally consistent, giving the same protection against a compromised directory as comparing safety numbers, without meeting in person. The design is an append-only log of key changes. Each entry has a sorted index snapshot, which lets clients binary-search for a contact's key in about 30 lookups over a billion entries. Key owners monitor the same entries to confirm their own key is listed correctly. Third-party auditors (Cloudflare and Trail of Bits) sign each log entry once, which keeps the directory operator from showing different views to different users.

  • Finding leaked passwords with AI: How we built Copilot secret scanning

    GitHub Engineering mediumAdept

    GitHub replaced regex-based detection of generic passwords with an LLM prompt that judges candidate secrets from their file context. The first GPT-3.5-Turbo few-shot prompt broke on unusual file types in customer repos. GitHub responded by expanding offline evals with customer reports and GPT-4-generated cases, adding GPT-4 as a confirming scanner, and adopting Microsoft's MetaReflection hybrid chain-of-thought/few-shot prompt. To scale full-history scans, they excluded low-value files and built a workload-aware rate limiter in which workloads borrow unused LLM capacity from each other. Mirror testing on preview repos showed up to a 94% drop in false positives with little recall loss.

  • How Trail of Bits helps verify the integrity of your Signal chats

    Trail of Bits easyNovice

    Signal's Automatic Key Verification is a key transparency system that keeps a globally consistent, auditable map from phone numbers to public keys, so a compromised server cannot quietly hand out a false key. Trail of Bits runs one of three independent auditors, alongside Signal and Cloudflare. Its auditor is an independent open-source implementation that tracks each new entry in a local Merkle tree and periodically signs tree heads from a single consistent lineage. Clients require signatures from all three auditors within the last seven days, which caps a split-view attack at about one week before warnings appear.

  • Deploying key transparency at WhatsApp

    Meta Engineering mediumAdept

    WhatsApp now automatically verifies end-to-end encryption keys using key transparency: the server maintains an append-only Auditable Key Directory (AKD) mapping accounts to public keys, and every change emits a privacy-preserving audit proof to public storage that anyone can verify. This replaces cumbersome 60-digit/QR security code checks, which scale poorly (4,950 pairwise checks in a 100-person group), with a single-client check against the directory. To handle tens of thousands of key changes per minute, pending changes go through a distributed queue and are batched into atomically committed epochs, exploiting shared Merkle tree paths at the cost of some publication latency. The design builds on CONIKS, SEEMless and Parakeet and is implemented in an open-source Rust crate.

The quest for software engineering knowledge.

Look:
Layout: