Skip to content

NIP-OA: Owner Attestation for agent key provenance#398

Merged
tlongwell-block merged 2 commits into
mainfrom
nip-oa-owner-attestation
Apr 27, 2026
Merged

NIP-OA: Owner Attestation for agent key provenance#398
tlongwell-block merged 2 commits into
mainfrom
nip-oa-owner-attestation

Conversation

@tlongwell-block

Copy link
Copy Markdown
Collaborator

Adds a draft NIP spec for proving agent-to-owner key relationships on nostr.

What

An optional auth tag that lets an owner key authorize an agent key via a BIP-340 Schnorr signature. The agent carries the 64-byte proof in its events. Anyone can verify the relationship without querying a relay. The two keys are independent — agent compromise does not compromise the owner.

Why

AI agents need verifiable provenance. Agents run LLMs that can be prompt-injected, so key derivation schemes (where agent secret leak → owner secret compromised) are not viable. This NIP uses independent keys with a signed attestation instead.

Reuses NIP-26's proven signing mechanism with different semantics: the event author stays as the agent. The tag is a credential, not an identity override. Relays require no changes.

What's in the spec

  • Signing scheme (BIP-340 Schnorr over sha256("nostr:agent-auth:" || agent_pubkey || ":" || conditions))
  • Condition clauses (kind=, created_at<, created_at>)
  • Relay behavior (no changes)
  • Client behavior (verify, display badge, never rewrite authorship)
  • Security properties (independent keys, contained blast radius)
  • Test vectors (positive + negative, math verified by codex/GPT-5.4)
  • Signed event example

Defines an optional 'auth' tag that lets an owner key authorize an
agent key via a BIP-340 Schnorr signature. The agent carries the
64-byte proof in its events. Anyone can verify the relationship
without querying a relay. The two keys are independent — agent
compromise does not compromise the owner.

Reuses NIP-26's proven signing mechanism with different semantics:
the event author stays as the agent. The tag is a credential, not
an identity override. Relays require no changes.
…ation, timestamp honesty

- Explicit that auth tag is a reusable capability (same tag on multiple events)
- Numeric bounds: kind 0-65535, timestamps 0-4294967295
- MUST NOT reorder/deduplicate/normalize conditions before hashing
- created_at conditions constrain self-declared timestamp, not wall-clock time
- Misbehaving agent can backdate; freshness enforcement is out of scope
@tlongwell-block tlongwell-block merged commit 16214cf into main Apr 27, 2026
13 checks passed
@tlongwell-block tlongwell-block deleted the nip-oa-owner-attestation branch April 27, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant