Logo de Ap2 Cryptographic Signing

Ap2 Cryptographic Signing

Organização
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.

Visão geral

Publicado porOrcaQubits
Repositórioagentic-commerce-skills-plugins
Nome da habilidadeap2-cryptographic-signing
Estrelas
40
Forks
17
Arquivos incluídos
Somente instruções
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Sem arquivos extras

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por OrcaQubits no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Ap2 Cryptographic Signing no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/ap2-agentic-payments/skills/ap2-cryptographic-signing
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

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
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Ap2 Cryptographic Signing em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Ap2 Cryptographic Signing automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Ap2 Cryptographic Signing não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

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.

Perguntas frequentes

O que a habilidade de IA Ap2 Cryptographic Signing faz?

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.

Por que usar Ap2 Cryptographic Signing no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Ap2 Cryptographic Signing é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Ap2 Cryptographic Signing no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/ap2-agentic-payments/skills/ap2-cryptographic-signing. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Ap2 Cryptographic Signing?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Ap2 Cryptographic Signing?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Ap2 Cryptographic Signing com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Ap2 Cryptographic Signing é gratuita?

Sim. A habilidade é publicada no GitHub por OrcaQubits sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇