Add NIP-144: Service Authorization Protocol#2232
Open
btcjt wants to merge 1 commit intonostr-protocol:masterfrom
Open
Add NIP-144: Service Authorization Protocol#2232btcjt wants to merge 1 commit intonostr-protocol:masterfrom
btcjt wants to merge 1 commit intonostr-protocol:masterfrom
Conversation
Introduces a protocol for authorizing third-party services to interact with a user's Nostr data without exposing their private key (nsec). The protocol establishes a shared symmetric encryption key between a principal (user) and a service, enabling the service to encrypt and decrypt shared data while the principal retains full control over authorization, key rotation, and revocation. Key design points: - Shared key grants encryption/decryption only — no signing authority - Scoped authorizations via `a` tags to limit access per entity/dataset - Key rotation and revocation without changing Nostr identity - Reuses NIP-44 encryption primitives with shared key as conversation_key - On-protocol acknowledgment (kind 31441) replaces off-protocol state - Optional NIP-98 HTTP notification for immediate service pickup Event kinds: - 31440: Service Authorization (published by principal) - 31441: Service Authorization Acknowledgment (published by service)
9072888 to
22d33ce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Motivation
Nostr-native applications increasingly need server-side services to handle sensitive data (payment credentials, encrypted configuration, etc.) on behalf of users. Sharing an nsec is unacceptable: it grants full signing authority, cannot be selectively revoked, and a single service compromise exposes every user. NIP-144 solves this with scoped, rotatable, revocable shared keys.
Design
atag scoping to bind authorization to specific entities/datasets.conversation_key— no new cryptographic constructions.dtag (addressable replacement).Test plan