A Cryptographic Passport Instead of Anti-Detect: How RFC 9421 Speeds Up AI AgentsArticle · digest for October 19
Conceptual comparison between a heavy browser stack and a lightweight RFC 9421 cryptographic agent passport
Article3 sections≈ 5 min

A Cryptographic Passport Instead of Anti-Detect: How RFC 9421 Speeds Up AI Agents

Anyone who has built autonomous AI agents, market-data scrapers, or search bots knows what that work has turned into over the last few years. It's an exhausting, never-ending arms race against bot-defense systems (WAFs, Cloudflare, Akamai). Just to keep your bot from getting hit by a CAPTCHA on its very first request, you have to maintain a whole menagerie: spin up Firefox- or Chromium-based "anti-detect browsers" (like Camoufox), rent pools of expensive residential proxies, spoof Canvas and WebGL fingerprints, and trace Bezier curves with the mouse cursor to mimic a human being.

Let's be honest: it's an architectural dead end. Every single agent instance burns a gigabyte of RAM, wastes seconds booting a heavyweight browser engine, and drains budget on proxies. Worse, one tweak to a WAF heuristic can break your entire pipeline overnight.

Developer MrKoriy proposed flipping the paradigm: instead of hiding behind a human disguise, an agent should openly present a cryptographic passport built on IETF RFC 9421 (HTTP Message Signatures) and the open wbauth protocol.

I took this mechanism apart down to the bolts, and I have to say: this is what a civilized web actually ought to look like.

How the wbauth Protocol Works

The core idea is simple and clean: instead of guessing from behavioral signals, the server verifies a mathematical digital signature.

RFC 9421 (finalized by the IETF in February 2024) standardizes how to digitally sign any component of an HTTP message—method, path, headers, and request body hash. On top of it, wbauth layers a transparent identity infrastructure:

  1. Ed25519 key pair. The agent generates a lightweight key pair. Its public key is published in an open, decentralized directory (for instance, on Cloudflare Workers + D1 or on the agent owner's own domain).
  2. Signature and Signature-Agent headers. When sending a request, the agent signs the method, host, target URI, and timestamps (created, expires). The Signature-Agent header carries the keyid and the directory URL where the public key lives.
  3. Instant verification at the Edge. The server or WAF fetches the public key (caching it on edge nodes) and verifies the signature in a couple of microseconds. Replay attacks are blocked by the signature's short lifetime and its binding to the request body.

Wiring It Up in Python and Node.js

Using wbauth in real code is simpler than configuring Playwright. Here is a Python client using httpx:

import httpx
from wbauth import Agent, HttpxAuth

# 1. Load the Ed25519 private key and directory settings from environment variables
# WBAUTH_PRIVATE_KEY, WBAUTH_KEY_ID, WBAUTH_DIRECTORY_URL
agent = Agent.from_env()

# 2. Initialize a client that signs every outgoing request automatically
with httpx.Client(auth=HttpxAuth(agent)) as client:
    response = client.get("https://api.targetservice.com/v1/market-data")
    print(f"Статус ответа: {response.status_code}")
    print(response.json())

And here is the matching TypeScript call in Node.js or Bun using a drop-in wrapper around native fetch:

import { createSigner, wrapFetch } from "wb-auth";

// 1. Create a cryptographic signer
const signer = await createSigner({
  privateKey: process.env.WBAUTH_PRIVATE_KEY!,
  keyId: "prod-agent-alpha",
  directoryUrl: "https://keys.mycompany.com/directory",
});

// 2. Wrap fetch — Signature and Signature-Agent headers are added on the fly
const signedFetch = wrapFetch(fetch, signer);

const response = await signedFetch("https://api.targetservice.com/v1/market-data", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ category: "electronics" }),
});

const result = await response.json();
console.log("Данные получены:", result);

Benchmarks: A Cold Shower for Anti-Detect

Now for the fun part—hard numbers from real benchmarks against the Camoufox browser stack:

  • Cold start: 5 milliseconds with wbauth versus 1,744 ms for the browser (a 350x speedup!).
  • Memory footprint: 0.76 MB per process instead of 500–1,500 MB for the browser (a 650x reduction!).
  • Runtime weight: 14 MB of dependencies instead of 1.3 GB of Chromium and Firefox browser images.

While we're watching agent runtimes morph into full operating systems—as we covered in Built-In Browsers in Claude Desktop and Codex: Turning AI into an Operating System—protocols like RFC 9421 give lightweight agents back their biggest advantage: massive energy and compute efficiency.

Where It Applies Today

Naturally, a cryptographic passport only works with services and WAFs that have enabled Signature-Agent verification and opened a green lane for legitimate bots. For closed sites that don't support the standard yet, the anti-detect stack isn't going away overnight—but the shift toward open trust protocols is clearly underway.

Instead of guerrilla warfare with blocklists, we finally get an explicit contract: the agent identifies itself honestly and provably, and the server saves gigabytes of memory on bot checks.

Want a deep diveVotes help us choose what to break down in detail. This material has 0 votes.
Sources · 3