Logo di Ap2 Cryptographic Signing

Ap2 Cryptographic Signing

Organizzazione
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.

Panoramica

AutoreOrcaQubits
Repositoryagentic-commerce-skills-plugins
Nome della skillap2-cryptographic-signing
Stelle
40
Fork
17
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da OrcaQubits su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Ap2 Cryptographic Signing in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/ap2-agentic-payments/skills/ap2-cryptographic-signing
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Ap2 Cryptographic Signing in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Ap2 Cryptographic Signing non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Ap2 Cryptographic Signing non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello 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.

Domande frequenti

Cosa fa la skill IA 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.

Perché usare Ap2 Cryptographic Signing su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Ap2 Cryptographic Signing è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Ap2 Cryptographic Signing in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/ap2-agentic-payments/skills/ap2-cryptographic-signing. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Ap2 Cryptographic Signing?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Ap2 Cryptographic Signing?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Ap2 Cryptographic Signing: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Ap2 Cryptographic Signing è gratuita?

Sì. È pubblicata su GitHub da OrcaQubits con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇