Skip to main content

Overview

Vestauth gives agents cryptographic identities built on Ed25519 public/private keypairs. Each agent has a unique identifier (UID) and a keypair that proves their identity without shared secrets.

Agent UID

Every agent has a unique identifier following the format:
Example:
The UID is generated when you initialize an agent and remains constant even when you rotate keys.

Ed25519 Keypairs

Vestauth uses Ed25519 for cryptographic signatures because it provides:
  • Strong modern cryptographic security
  • Fast signing and verification
  • Small key sizes
  • Wide ecosystem support

Key Structure

Keys are stored in JSON Web Key (JWK) format with the following fields: Public Key:
Private Key:
The kid (key ID) is a thumbprint calculated from the public key and is used to identify which key signed a request.

Key Fields

Storage

Agent identities are stored in a .env file in your agent’s directory:
Never share your AGENT_PRIVATE_JWK. This is the secret that proves your agent’s identity. Anyone with access to this key can impersonate your agent.

Creating an Identity

Generate a new agent identity:
This command:
  1. Generates a new Ed25519 keypair
  2. Creates a unique agent UID
  3. Registers the agent with the Vestauth server
  4. Saves credentials to .env

Implementation

Here’s how Vestauth generates keypairs:
src/lib/helpers/keypair.js

Key Rotation

Rotate your agent’s keys while keeping the same UID:
This generates new keypairs and updates the public key registered with the Vestauth server. Old signatures remain valid until their expiration time.
Key rotation is important for security hygiene. Rotate keys regularly or immediately if you suspect compromise.

Identity Verification

Tools verify agent identities by:
  1. Extracting the agent UID from the Signature-Agent header
  2. Fetching the public key from the agent’s .well-known endpoint
  3. Verifying the signature matches the request
Here’s how identity information is extracted:
src/lib/helpers/identity.js

Public Key Discovery

Each agent’s public key is discoverable at:
Example:
This endpoint returns a JWK Set containing the agent’s public keys:
Public key discovery enables tools to verify agents without manual key exchange or configuration.

Why Not API Keys?

API keys are shared secrets that create several problems: Vestauth replaces shared secrets with public/private key cryptography, making authentication more secure and easier to manage.