Skip to main content

Module signing

Module signing 

Source
Expand description

Agent card signing and verification (spec §10).

Provides RFC 8785 JSON canonicalization and JWS compact serialization with detached payload for signing AgentCard documents.

This module is only available when the signing feature is enabled.

§Algorithm support

Currently supports ES256 (ECDSA with P-256 and SHA-256) as the signing algorithm, which is the most commonly used algorithm for JWS in the A2A specification.

Structs§

SignatureHeader
The decoded JWS protected header of an AgentCardSignature.

Functions§

canonicalize
Produces an RFC 8785 (JCS) canonical JSON serialization of a value.
canonicalize_card
Canonicalizes an AgentCard to bytes for signing.
sign_agent_card
Signs an AgentCard using ES256 (ECDSA P-256 + SHA-256) with JWS compact serialization and a detached payload.
signature_header
Decodes the JWS protected header of an AgentCardSignature.
verify_agent_card
Verifies an AgentCardSignature against an AgentCard using the given public key.