Compare commits

...
3 Commits
6 changed files with 72 additions and 19 deletions
+10 -1
View File
@@ -1,5 +1,14 @@
---
slug: nostr-quantum-preparation
title: Nostr Quantum Preparation README.md
summary: This project is an interim solution to the problem for those who are concerned about keeping their identities secure through the transition, and also to give developers breathing room.
image: https://blossom.laantungir.net/5b96cc0c5ba4a8081e5ee8e5a2e718f28c0cbc77f218c55d956b9be57c120ef1.jpg
tags: [nostr, quantum, readme.md]
---
# Nostr Quantum Preparation
/tmp/sb_test_save.jpg
## TLDR
@@ -23,7 +32,7 @@ I have currently used the following post quantum algorithms:
This app will generate public-private keypairs for each of these, publish on nostr your public key for each, and sign it with your current Nostr identity via your favorite signer (the nsec never leaves the signer).
You are making a statement to the world: "Here are post quantum pubkeys. If quantum computers hit, you know that the person signing using these can only be me."
You are making a statement to the world: "Here are post quantum pubkeys. If quantum computers hit, you know that the person using these can only be me."
This entire kind 1 event is then hashed and stamped into a block on Bitcoin using OpenTimestamps.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "nostr_quantum_preparation",
"version": "0.1.3",
"version": "0.1.6",
"description": "A migration strategy for bringing post-quantum security to Nostr without breaking the social graph, without requiring consensus on a single post-quantum algorithm, and without forcing existing users to abandon their identities.",
"main": "index.js",
"scripts": {
-6
View File
@@ -629,12 +629,6 @@
</div>
</div>
<div id="divFooter">
<div id="divFooterLeft" class="divFooterBox"></div>
<div id="divFooterCenter" class="divFooterBox"></div>
<div id="divFooterRight" class="divFooterBox"></div>
</div>
<!-- SCRIPTS -->
<script src="/nostr-login-lite/nostr.bundle.js" integrity="sha384-LNnPDD++DaWxljIhMLmfaoEoKB0B1HmACC6gNGLG+Qnmosprf/AX7u84pVY8xMpM" crossorigin="anonymous"></script>
<script src="/nostr-login-lite/nostr-lite.js" integrity="sha384-IQwa65eDC5trGjKn4cuEazmFiHTHD65gIqsjpzDtouc+j0MlyI927SZgHMWSi2aC" crossorigin="anonymous"></script>
+58 -1
View File
@@ -441,9 +441,64 @@
}
resultsWrap.style.display = 'block';
// Only the event owner (signed-in pubkey matches event pubkey) may
// upgrade/republish. Non-owners see the verification result but the
// upgrade action is hidden to avoid confusion and endpoint abuse.
applyOwnershipGate(event);
return allValid;
}
/* ================================================================
OWNERSHIP GATE: only the event owner can upgrade/republish the OTS
proof. Non-owners see the verification result but the upgrade action
buttons are hidden and replaced with an explanatory note.
================================================================ */
// Cache the signed-in pubkey so we don't call getPublicKey repeatedly.
let cachedSignedInPubkey = null;
let cachedSignedInPubkeyResolved = false;
async function getSignedInPubkey() {
if (cachedSignedInPubkeyResolved) return cachedSignedInPubkey;
cachedSignedInPubkeyResolved = true;
if (!window.nostr || !window.nostr.getPublicKey) return null;
try {
cachedSignedInPubkey = await window.nostr.getPublicKey();
} catch (e) {
cachedSignedInPubkey = null;
}
return cachedSignedInPubkey;
}
function applyOwnershipGate(event) {
// Default: hide the upgrade action row until we confirm ownership.
const actionRow = otsUpgradeWrap.querySelector('.pq-button-row');
if (!actionRow) return;
getSignedInPubkey().then(signedInPubkey => {
const isOwner = signedInPubkey && event && event.pubkey &&
signedInPubkey.toLowerCase() === event.pubkey.toLowerCase();
if (isOwner) {
actionRow.style.display = '';
const note = document.getElementById('pqOtsOwnerNote');
if (note) note.remove();
} else {
// Non-owner (or not signed in): hide the buttons and show a note.
actionRow.style.display = 'none';
let note = document.getElementById('pqOtsOwnerNote');
if (!note) {
note = document.createElement('div');
note.id = 'pqOtsOwnerNote';
note.className = 'pq-info-text';
note.style.fontSize = '13px';
note.style.marginTop = '8px';
otsUpgradeWrap.appendChild(note);
}
note.textContent = signedInPubkey
? 'Only the event owner can upgrade and republish the OpenTimestamps proof. You are signed in as a different identity.'
: 'Only the event owner can upgrade and republish the OpenTimestamps proof. Sign in with the Nostr identity that published this event to enable upgrading.';
}
});
}
/* ================================================================
TAB 1: QUERY RELAY
================================================================ */
@@ -551,7 +606,9 @@
const trustModeNote = selection.canonicalTrustMode === 'pending-only'
? ' ⚠ PENDING-ONLY — no Bitcoin attestation has been verified yet; this is not a trust decision.'
: (selection.canonicalTrustMode === 'none' ? ' ⚠ no trustable anchor found.' : '');
const statusClass = selection.canonicalTrustMode === 'pending-only' ? 'error' : 'success';
// F-D4/L-2: a pending-only selection is informational, not an error —
// it is not a trust decision, so do not render it in the error (red) style.
const statusClass = selection.canonicalTrustMode === 'pending-only' ? 'info' : 'success';
setStatus(queryStatus, statusClass, `Selected canonical proof carrier: ${selection.canonical.id.substring(0, 16)}... (${heightNote}). ${confirmedCount} confirmed, ${pendingCount} pending, ${allCandidates.length} total candidate(s).${trustModeNote}`);
await verifyEvent(selection.canonical);
} else {
+3 -3
View File
@@ -1,5 +1,5 @@
{
"VERSION": "v0.1.3",
"VERSION_NUMBER": "0.1.3",
"BUILD_DATE": "2026-07-29T13:18:27.972Z"
"VERSION": "v0.1.6",
"VERSION_NUMBER": "0.1.6",
"BUILD_DATE": "2026-07-30T10:46:55.076Z"
}
-7
View File
@@ -376,13 +376,6 @@
</div>
</div>
<!-- FOOTER -->
<div id="divFooter">
<div id="divFooterLeft" class="divFooterBox"></div>
<div id="divFooterCenter" class="divFooterBox"></div>
<div id="divFooterRight" class="divFooterBox"></div>
</div>
<!-- SCRIPTS -->
<script src="/nostr-login-lite/nostr.bundle.js" integrity="sha384-LNnPDD++DaWxljIhMLmfaoEoKB0B1HmACC6gNGLG+Qnmosprf/AX7u84pVY8xMpM" crossorigin="anonymous"></script>
<script src="/nostr-login-lite/nostr-lite.js" integrity="sha384-IQwa65eDC5trGjKn4cuEazmFiHTHD65gIqsjpzDtouc+j0MlyI927SZgHMWSi2aC" crossorigin="anonymous"></script>