Ap2 Cryptographic Signing logo

Ap2 Cryptographic Signing

Organization
OrcaQubits
ap2-cryptographic-signing

Implement AP2 cryptographic signing — hardware-backed user signatures, merchant entity signatures, VDC integrity, key management, and attestation flows. Use when building the signing, verification, and key management components of AP2 mandates.

Overview

PublisherOrcaQubits
Repositoryagentic-commerce-skills-plugins
Skill nameap2-cryptographic-signing
Stars
40
Forks
17
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by OrcaQubits on GitHub. Read the source before you install it.

Installation

Install the Ap2 Cryptographic Signing AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/ap2-agentic-payments/skills/ap2-cryptographic-signing
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/OrcaQubits/agentic-commerce-skills-plugins.git /tmp/agentic-commerce-skills-plugins
mkdir -p .claude/skills
cp -r /tmp/agentic-commerce-skills-plugins/ap2-agentic-payments/skills/ap2-cryptographic-signing .claude/skills/ap2-cryptographic-signing
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ap2 Cryptographic Signing in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ap2 Cryptographic Signing on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ap2 Cryptographic Signing is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

AP2 Cryptographic Signing

Before writing code

Fetch live docs:

  1. Fetch https://ap2-protocol.org/ap2/specification/ for cryptographic signing requirements
  2. Fetch https://ap2-protocol.org/ap2/security_and_privacy_considerations/ for security architecture
  3. Web-search site:github.com google-agentic-commerce AP2 signature mandate for signing implementations
  4. Web-search ap2 protocol VDC signing cryptographic hardware-backed for community guides

Conceptual Architecture

Why Cryptographic Signing Matters

AP2's core innovation is verifiable intent — cryptographic proof that:

  • The user authorized a specific transaction
  • The merchant committed to specific terms
  • Neither party can deny what they agreed to (non-repudiation)
  • No intermediary tampered with the mandate (integrity)

VDC Credential Format

AP2 VDCs use the SD-JWT with Key Binding (+kb) format, enabling selective disclosure and cryptographic holder binding.

Supported Signing Algorithms

AP2 supports ECDSA with the following algorithm/curve combinations:

  • ES256 — ECDSA with P-256 curve
  • ES384 — ECDSA with P-384 curve
  • ES512 — ECDSA with P-521 curve

JSON Canonicalization (JCS)

Before signing, JSON payloads are canonicalized using JCS (RFC 8785) to produce a deterministic byte representation. This ensures that logically equivalent JSON objects produce the same signature regardless of key ordering or whitespace.

Merchant authorization envelope

Version-sensitive. The exact envelope for the merchant's signature has changed across AP2 releases — earlier releases used a detached JWS over canonicalized cart contents; current releases carry a merchant-signed checkout JWT plus a checkout hash inside the mandate. Fetch https://ap2-protocol.org/ap2/checkout_mandate/ and implement what it says. Everything below is the durable shape, not a schema.

The durable pattern, whatever the envelope:

  • The merchant signs a canonical representation of the checkout, so serialization differences cannot change what was signed.
  • A hash identifies the specific checkout and ties the signature to it.
  • The verifier can reconstruct what was signed from data it already holds, rather than trusting a payload the agent supplies.

Header claims must carry, at minimum:

  • the signing algorithm
  • a key identifier — the verifier has to know which key signed, and key rotation depends on this

Payload claims typically carry issuer, audience, issued-at, expiry, a unique identifier, and the checkout hash. Confirm the exact claim names and the permitted algorithms against the live spec before implementing verification.

Two Types of Signatures

User Signatures
  • Hardware-backed device keys — Generated and stored in secure hardware (TPM, Secure Enclave)
  • In-session authentication — User must authenticate (biometric, PIN) at signing time
  • Attestation — Device provides cryptographic proof of the signing context
  • Purpose — Proves the user explicitly authorized the transaction
Merchant Signatures
  • Entity-level — Signed by the merchant organization, not by the AI agent
  • Fulfillment guarantee — Commits the merchant to the stated terms
  • Key management — Organizational-level key infrastructure
  • Purpose — Proves the merchant committed to specific products/prices

What Gets Signed

MandateSigned byWhat's covered
Checkout Mandate (closed)Merchant + UserExact items, prices, totals, payment methods
Checkout Mandate (open)User, then Agent on bindingShopping constraints (allowed merchants, line items), expiry
Payment MandateUserPayment method selection, transaction amount

The open form is where the former "Intent Mandate" lives — the user signs the constraints, the agent later signs the binding to a real transaction, and both signatures are retained as the authorization chain.

Trusted Device Surface

The user signing step (especially for Cart and Payment Mandates) involves:

  1. Shopping Agent triggers redirect to trusted device surface
  2. User's device displays the transaction summary
  3. User authenticates (biometric, PIN, passkey)
  4. Device generates signature using hardware-backed key
  5. Attestation object created proving the signing context
  6. Signature + attestation returned to Shopping Agent

This is a load-bearing security step — the agent cannot bypass it.

Signature Verification

Verifiers check:

  1. Signature validity — Cryptographic verification against the signer's public key
  2. Signer identity — Public key belongs to the claimed entity
  3. Content integrity — Signed content matches the mandate contents
  4. Temporal validity — Signature was created within acceptable timeframe
  5. Attestation validity — Device attestation is genuine (for user signatures)

Non-Repudiation

Signed mandates provide non-repudiation for disputes:

  • User can't deny they authorized a purchase (their device signed it)
  • Merchant can't deny their offer terms (their entity signed it)
  • The cryptographic evidence is deterministic, not inferred

Key Management Considerations

  • User keys: Managed by the user's device secure hardware
  • Merchant keys: Managed at the organization level (HSM or key vault)
  • Key rotation: Support for rotating keys without breaking verification
  • Key revocation: Ability to revoke compromised keys
  • Certificate chain: Trust chain from key to identity

Man-in-the-Middle Prevention

VDC signatures prevent MITM attacks:

  • An attacker cannot modify mandate contents without invalidating signatures
  • End-to-end integrity from creation to verification
  • Digital signatures cover the complete mandate payload

Best Practices

  • Always use hardware-backed keys for user signatures when available
  • Never store private signing keys in agent code or config
  • Implement proper key rotation procedures
  • Verify all signatures before trusting mandate contents
  • Store signed mandates with signatures for dispute resolution
  • Use standard cryptographic libraries — don't implement crypto primitives
  • Test with both valid and invalid signatures
  • Handle signature verification failures gracefully with clear errors
  • Log all signing and verification events for audit

Fetch the specification for exact signature formats, supported algorithms, attestation requirements, and verification procedures before implementing.

Frequently asked questions

What does the Ap2 Cryptographic Signing AI skill do?

Implement AP2 cryptographic signing — hardware-backed user signatures, merchant entity signatures, VDC integrity, key management, and attestation flows. Use when building the signing, verification, and key management components of AP2 mandates.

Why use Ap2 Cryptographic Signing on TypingMind?

Because you install it once and use it with any model. Ap2 Cryptographic Signing is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ap2 Cryptographic Signing in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/ap2-agentic-payments/skills/ap2-cryptographic-signing. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Ap2 Cryptographic Signing?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ap2 Cryptographic Signing?

As many as you like. As long as a model supports skills, you can use Ap2 Cryptographic Signing with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ap2 Cryptographic Signing AI skill free?

Yes. It is published on GitHub by OrcaQubits under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇