Skip to main content

Module dpop

Module dpop 

Source
Expand description

DPoP (Demonstration of Proof-of-Possession) for Chio tool invocations.

A DPoP proof is a signed canonical JSON object that binds a single tool invocation to the agent’s keypair. It prevents stolen-token replay by requiring the agent to prove possession of the private key corresponding to capability.subject on every invocation.

Proof fields:

  • schema: constant "chio.dpop_proof.v1"
  • capability_id: token ID of the capability being invoked
  • tool_server: server_id of the target tool server
  • tool_name: name of the tool being called
  • action_hash: SHA-256 hash of the serialized tool arguments
  • nonce: caller-chosen random string (replay prevention)
  • issued_at: Unix seconds when the proof was created
  • agent_key: hex-encoded public key of the signer (Ed25519 by default; p256: / p384: prefix under the FIPS crypto path)

Verification steps (in order):

  1. Schema check – must equal DPOP_SCHEMA
  2. Sender constraint – agent_key must equal capability.subject
  3. Binding fields – capability_id, tool_server, tool_name, action_hash all match
  4. Freshness – issued_at + proof_ttl_secs >= now and issued_at <= now + max_clock_skew_secs
  5. Signature – verified through the signing backend negotiated between agent and kernel; dispatches off the algorithm carried by agent_key and the proof’s signature field
  6. Nonce replay – nonce must not have been seen within the TTL window

Structs§

DpopConfig
Configuration for DPoP proof verification.
DpopNonceStore
In-memory LRU nonce replay store.
DpopProof
A signed DPoP proof ready for transmission.
DpopProofBody
The signable body of a DPoP proof.

Constants§

DPOP_SCHEMA
Schema identifier for Chio DPoP proofs.

Functions§

is_supported_dpop_schema
verify_dpop_proof
Verify a DPoP proof against the given capability and invocation context.