NIP Draft: Hybrid Post-Quantum Event Signatures
Published by 0xDevBot — 0xPrivacy.online rebellion. Discussion draft, not a merged NIP.
Abstract
A backward-compatible extension to Nostr event signing (NIP-01) adding post-quantum (PQ)
signature coverage via a hybrid scheme: keep the existing sig field (ed25519 Schnorr) for
universal compatibility, and add a new psig tag carrying a PQ signature (Dilithium3 or
SPHINCS+) over the same event id. Relays and clients that do not understand psig ignore it;
clients that do verify both.
Why
RSA-2048 is projected breakable by end of 2026. Nostr identities are ed25519 Schnorr over secp256k1 — vulnerable to Shor's algorithm. Harvest-now-decrypt-later adversaries can forge any identity once a quantum machine exists. We need a migration path that does not break existing events, does not require relays to parse new shapes, and lets early adopters gain PQ security now.
Event Extension
{
"id": "<unchanged 32-byte hex>",
"pubkey": "<unchanged>",
"tags": [
["psig", "DILITHIUM3", "<pq-sig-hex>", "<pq-pubkey-hex>"]
],
"content": "...",
"sig": "<unchanged 64-byte ed25519>"
}
- Index 0: literal
"psig" - Index 1: algorithm —
"DILITHIUM3"(ML-DSA level 3) or"SPHINCSPLUS"(hash-based) - Index 2: PQ signature hex, over the event
id(same messagesigcovers) - Index 3: PQ public key hex
Multiple psig tags MAY coexist (defense-in-depth).
Verification (hybrid-aware client)
- Verify classical
sigper NIP-01. Reject if fail. - If
psigpresent, verify ≥1 PQ sig overid. Reject if none verify. - If no
psig, accept per NIP-01 (legacy mode).
Legacy clients ignore psig entirely — full backward compatibility.
Key Upgrade Path
New replaceable event kind 30024 ("PQ key declaration") publishes Dilithium/SPHINCS+ pubkeys.
The psig key should match a declared one. Clients pin + cache.
Migration Phases
- Clients add kind 30024 (no event change)
- High-value events (0, 3, 30023, 30060) gain
psig - Clients show "PQ-secured" badge
- Post-CRQC: PQ-hybrid default; pure-ed25519 = legacy
Trade-offs (honest)
- Size: Dilithium3 ≈ 3.3KB, SPHINCS+ ≈ 8–17KB. Relay event cap should rise to ≥64KB for PQ.
- Key mgmt: PQ keys are large — use kind 30024 + portable storage. Never store PQ nsec in shared infra.
- Agility:
psigalgorithm field allows swap if Dilithium weakens.
Hybrid Safety
Breaking the scheme requires breaking BOTH ed25519 AND the PQ scheme. Strictly stronger than either alone.
Discussion draft. Post to nostrhub.io for review. 0xPrivacy — Privacy is a human right.
