Overview
Primitives are low-level commands for cryptographic operations. Use these when you need fine-grained control over keypairs, signatures, and verification without the higher-level abstractions.Most users should use Agent Commands instead. Primitives are for advanced use cases and library development.
primitives keypair
Generate a new Ed25519 public/private keypair.Options
string
Use an existing private JWK instead of generating a new one. Useful for deriving the public key from a known private key.
string
default:"agent"
UID prefix type:
agent, tool, or none.agent- Generates UID likeagent-4b94ccd425e939fac5016b6btool- Generates UID liketool-4b94ccd425e939fac5016b6bnone- No prefix, just the hash
boolean
Pretty-print JSON output.Alias:
--pretty-printExamples
Key Format (JWK)
Vestauth uses JSON Web Key (JWK) format for Ed25519 keys: Public JWK:primitives headers
Generate HTTP Message Signature headers for a request.Arguments
string
required
HTTP method:
GET, POST, PUT, DELETE, etc.string
required
Full URI including scheme and authority (e.g.,
https://api.example.com/path)Options
string
Agent or tool UID. Defaults to
AGENT_UID or AGENT_ID environment variable.If not provided, generates a new random UID.Alias: --idstring
Private JWK for signing. Defaults to
AGENT_PRIVATE_JWK environment variable.If not provided, generates a new keypair.string
default:"web-bot-auth"
Signature tag value per Web-Bot-Auth draft.
string
Custom nonce value. By default, a cryptographically random 64-byte nonce is generated.
boolean
Pretty-print JSON output.Alias:
--pretty-printExamples
Signature Components
Signature Header:- Covered components:
@authority(hostname) created- Unix timestamp when signature was createdkeyid- Public key identifieralg- Signature algorithm (ed25519)expires- Unix timestamp when signature expires (created + 5 minutes)nonce- Random value to prevent replay attackstag- Protocol identifier (web-bot-auth)
primitives verify
Verify HTTP Message Signature headers using a public key.Arguments
string
required
HTTP method of the request being verified.
string
required
Full URI of the request being verified.
Options
string
required
Value of the
Signature header.string
required
Value of the
Signature-Input header.string
Value of the
Signature-Agent header.If provided, fetches the public key from the agent’s .well-known discovery endpoint.If omitted, you must provide --public-jwk.string
Public JWK to verify against. Defaults to
AGENT_PUBLIC_JWK environment variable.Required if --signature-agent is not provided.boolean
Pretty-print JSON output.Alias:
--pretty-printVerification Modes
Mode 1: With Agent Discovery Provide--signature-agent to fetch the public key automatically:
--public-jwk directly:
What Gets Verified
- Signature Validity: Cryptographic signature matches the request
- Expiration: Signature has not expired
- Algorithm: Uses supported algorithm (Ed25519)
- Key ID: Matches the public key
- Components: Signed components match the request
Error Codes
Verification fails with specific errors:- Invalid signature: Signature does not match
- Expired: Current time >
expirestimestamp - Invalid key: Public key format is invalid
- Algorithm mismatch: Signature algorithm not supported
- Missing components: Required signature components missing
Use Cases
Custom Agent Implementation
Build your own agent in any language:Custom Tool Verification
Verify signatures in any language:Testing Signatures
Test signature generation and verification:Standards Compliance
Primitives implement these standards:- RFC 9421 - HTTP Message Signatures
- RFC 8032 - Edwards-Curve Digital Signature Algorithm (EdDSA)
- RFC 7517 - JSON Web Key (JWK)
- Web-Bot-Auth Draft - Agent authentication headers
Related
- Agent Commands - High-level agent operations
- Tool Commands - High-level tool verification
- Library Reference - Programmatic primitives API