Security & privacy

Correct Hooks library simplifies asymmetric webhook authentication for developers

A new open-source library introduces asymmetric signature support for webhooks, aiming to replace complex symmetric key management with easier key rotation and verification.

Illustration of asymmetric key pairs connecting to a server
Illustration created for this article

The Handle With Care Collective has released Correct Hooks, an open-source library designed to streamline webhook authentication using asymmetric cryptography. Published on GitHub in October 2026, the project targets developers who struggle with the security and operational complexities of traditional symmetric signing methods.

What happened

Webhook authentication has long relied on symmetric signatures, such as HMAC, where both the sender and receiver share a secret key. While simple to implement initially, this approach creates significant management overhead as a service scales. Each customer endpoint requires a unique shared secret, leading to complex storage requirements and increased risk if any single key is compromised. The Correct Hooks library addresses these pain points by implementing asymmetric signatures, allowing producers to sign requests with a private key while consumers verify them using a public key.

The library encapsulates the cryptographic heavy lifting, providing a user-friendly interface for generating keys, signing payloads, and verifying signatures. It supports TypeScript, Python, and Rust at launch, with plans to add Java, Go, and C# in the future. The project includes a cross-language test suite to help community members build support for other languages, ensuring consistent behavior across different technology stacks.

Key details

  • Asymmetric architecture: Uses a private signing key for producers and a public verifying key set for consumers, eliminating the need to store unique secrets for every user.
  • Zero-downtime rotation: Producers can rotate keys by publishing a new public key set that includes both old and new keys, allowing consumers to update automatically without service interruption.
  • Language support: Currently available for TypeScript, Python, and Rust, with official support for additional languages planned based on community demand.
  • Backward compatibility: The library supports multiple signature versions simultaneously, enabling producers and consumers to upgrade independently without breaking existing integrations.
  • Public key distribution: Producers serve a public verifying key set via a GET endpoint, which can be cached behind a CDN for high-traffic deployments.
  • Migration path: Designed to run in parallel with existing authentication methods, allowing teams to adopt Correct Headers gradually without immediate downtime.

Background

To understand the shift Correct Hooks proposes, it helps to distinguish between symmetric and asymmetric cryptography. In symmetric systems, the same key locks and unlocks the data. For webhooks, this means the service sending the notification and the server receiving it must both know the same secret. If you have ten thousand customers, you must manage ten thousand secrets. Rotating these keys securely is difficult and error-prone.

Asymmetric cryptography uses a pair of keys: a private key for signing and a public key for verification. The producer keeps the private key secure and publishes the public key. Consumers fetch the public key to verify that the message truly came from the producer. This model scales better because the producer only manages one private key, while the public key can be freely distributed. However, implementing this correctly requires careful handling of key formats, signature structures, and verification logic, which is often where developers stumble.

Why it matters

For teams running their own software, webhook security is critical but often treated as an afterthought. Many self-hosted applications or internal tools use simple shared secrets that are rarely rotated. If a secret leaks, an attacker can forge webhooks, potentially triggering unwanted actions in your system. Correct Hooks reduces this risk by making robust asymmetric authentication accessible without requiring deep cryptographic expertise.

Operational resilience is another major benefit. Key rotation is a common source of outages in webhook systems. With symmetric keys, rotating a secret requires coordinating changes on both the sender and receiver sides simultaneously. Correct Hooks automates this process by allowing consumers to fetch updated public keys dynamically. This means security teams can rotate signing keys frequently as a best practice, without fearing that a missed update will break integrations for customers.

Additionally, the library’s design supports independent upgrades. Producers can introduce new signature versions while still supporting old ones, giving consumers time to update their libraries. This decoupling is vital for ecosystems where you do not control the client-side code, such as when offering a SaaS product with webhooks to third-party developers.

What you can do

  • Evaluate current auth: Review your existing webhook implementation to identify if you are using static symmetric secrets that are difficult to rotate.
  • Test the library: Install Correct Hooks in a non-production environment using the provided TypeScript, Python, or Rust packages to assess fit.
  • Plan key rotation: If adopting asymmetric auth, design a public endpoint for serving your verifying key set, considering CDN caching for performance.
  • Check language support: If your stack is not yet supported, review the cross-language test suite to estimate the effort required for a community implementation.
  • Parallel migration: Configure your system to send both existing authentication headers and Correct Hooks headers during the transition phase to ensure continuity.
  • Monitor verification logs: Implement logging for failed signature verifications to detect potential configuration errors or malicious attempts early in the rollout.

More news

All news