<rss
      xmlns:atom="http://www.w3.org/2005/Atom"
      xmlns:media="http://search.yahoo.com/mrss/"
      xmlns:content="http://purl.org/rss/1.0/modules/content/"
      xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
      xmlns:dc="http://purl.org/dc/elements/1.1/"
      version="2.0"
    >
      <channel>
        <title><![CDATA[freedomfete@npub.cash]]></title>
        <description><![CDATA[Onchain
Layer-2
Liquid
Accepted
☆.𓋼𓍊 𓆏 𓍊𓋼𓍊.☆
Passionate about Learninglanguages and writing, I'm dedicated to programming and literature adjunction. With a background in web development, I thrive on the moments when I discover my spontaneity.

🌐 Let's Connect:

Npub Address: freedomfete@npub.cash
Email Address: https://flowcrypt.com/me/parityday
Lightning Address: parityday@vlt.ge

Feel free to reach out for collaboration opportunities, inquiries, or just to say hello! 🚀✨]]></description>
        <link>https://npub.libretechsystems.xyz/tag/nip-eshgham/</link>
        <atom:link href="https://npub.libretechsystems.xyz/tag/nip-eshgham/rss/" rel="self" type="application/rss+xml"/>
        <itunes:new-feed-url>https://npub.libretechsystems.xyz/tag/nip-eshgham/rss/</itunes:new-feed-url>
        <itunes:author><![CDATA[▄︻デʟɨɮʀɛȶɛֆƈɦ-ֆʏֆȶɛʍֆ══━一,]]></itunes:author>
        <itunes:subtitle><![CDATA[Onchain
Layer-2
Liquid
Accepted
☆.𓋼𓍊 𓆏 𓍊𓋼𓍊.☆
Passionate about Learninglanguages and writing, I'm dedicated to programming and literature adjunction. With a background in web development, I thrive on the moments when I discover my spontaneity.

🌐 Let's Connect:

Npub Address: freedomfete@npub.cash
Email Address: https://flowcrypt.com/me/parityday
Lightning Address: parityday@vlt.ge

Feel free to reach out for collaboration opportunities, inquiries, or just to say hello! 🚀✨]]></itunes:subtitle>
        <itunes:type>episodic</itunes:type>
        <itunes:owner>
          <itunes:name><![CDATA[▄︻デʟɨɮʀɛȶɛֆƈɦ-ֆʏֆȶɛʍֆ══━一,]]></itunes:name>
          <itunes:email><![CDATA[▄︻デʟɨɮʀɛȶɛֆƈɦ-ֆʏֆȶɛʍֆ══━一,]]></itunes:email>
        </itunes:owner>
            
      <pubDate>Tue, 22 Apr 2025 04:00:00 GMT</pubDate>
      <lastBuildDate>Tue, 22 Apr 2025 04:00:00 GMT</lastBuildDate>
      
      <itunes:image href="https://image.nostr.build/4b98ff743d2220977596fa08663e1e3d56680e7d19738fbaeb20743d2703cac0.jpg" />
      <image>
        <title><![CDATA[freedomfete@npub.cash]]></title>
        <link>https://npub.libretechsystems.xyz/tag/nip-eshgham/</link>
        <url>https://image.nostr.build/4b98ff743d2220977596fa08663e1e3d56680e7d19738fbaeb20743d2703cac0.jpg</url>
      </image>
      <item>
      <title><![CDATA[A Conceptual Exploration Using ECDH, Schnorr, and Encrypted Tunnels : Federated Nostr Communication]]></title>
      <description><![CDATA[Federated communication for Nostr relays, with a focus on ECDH, Schnorr signatures, and encrypted tunnels]]></description>
             <itunes:subtitle><![CDATA[Federated communication for Nostr relays, with a focus on ECDH, Schnorr signatures, and encrypted tunnels]]></itunes:subtitle>
      <pubDate>Tue, 22 Apr 2025 04:00:00 GMT</pubDate>
      <link>https://npub.libretechsystems.xyz/post/nip-eshgham/</link>
      <comments>https://npub.libretechsystems.xyz/post/nip-eshgham/</comments>
      <guid isPermaLink="false">naddr1qq95uj2s9ejhx6r8dpsk6q3q6d8gxt2z4k9e8sdpc0yyqzf5gp0np09ls4lnn630qzxzvwpl0rgqxpqqqp65w860st6</guid>
      <category>NIP.eshgham</category>
      
        <media:content url="https://image.nostr.build/d219ee5b8d936b11d97b020e4d658950a082b613bf4de36c26927a17b764ecac.gif" medium="image"/>
        <enclosure 
          url="https://image.nostr.build/d219ee5b8d936b11d97b020e4d658950a082b613bf4de36c26927a17b764ecac.gif" length="0" 
          type="image/gif" 
        />
      <noteId>naddr1qq95uj2s9ejhx6r8dpsk6q3q6d8gxt2z4k9e8sdpc0yyqzf5gp0np09ls4lnn630qzxzvwpl0rgqxpqqqp65w860st6</noteId>
      <npub>npub16d8gxt2z4k9e8sdpc0yyqzf5gp0np09ls4lnn630qzxzvwpl0rgq5h4rzv</npub>
      <dc:creator><![CDATA[▄︻デʟɨɮʀɛȶɛֆƈɦ-ֆʏֆȶɛʍֆ══━一,]]></dc:creator>
      <content:encoded><![CDATA[<p>Proof Of Concept</p>
<p>In a world where decentralization often hinges on the strength of its weakest node, the idea of federation—applied not to content moderation or identity, but strictly to <strong>communication protocols</strong>—opens up intriguing possibilities. In this model, <strong>Nostr relays</strong> do not operate in total isolation, nor do they function in a single cohesive mesh. Instead, they <strong>form selective, encrypted alliances</strong>, communicating through <strong>secure tunnels</strong> while preserving autonomy.</p>
<hr>
<h3>💡 The Core Idea</h3>
<p><strong>Relays remain sovereign</strong>, but may establish <strong>peer-to-peer encrypted channels</strong> with other trusted relays using <strong>Elliptic Curve Diffie-Hellman (ECDH)</strong> to generate shared secrets. These secrets are then used to encrypt communication tunnels—facilitating a federated communication layer.</p>
<p>Each relay is free to choose:</p>
<ul>
<li><strong>Whom it speaks to</strong></li>
<li><strong>How often</strong></li>
<li><strong>What types of events are relayed through the tunnel</strong></li>
</ul>
<p>But <em>never</em> must it rely on a central coordinator.</p>
<hr>
<h3>🔁 Schnorr for Authentication</h3>
<p>While ECDH can create the secure tunnel, <strong>Schnorr signatures</strong> (already a part of Nostr’s pubkey-based design) can be used to <strong>authenticate the origin</strong> of the data inside. This keeps the integrity of messages intact even when traveling over shared or hostile networks. </p>
<p>Use case:</p>
<ul>
<li>Relay A and Relay B establish an ECDH-based shared key.</li>
<li>All communication is tunnel-encrypted with this shared key.</li>
<li>Inside the tunnel, every message still carries a Schnorr signature, proving its source.</li>
</ul>
<p>This separation of <strong>transport-level encryption</strong> from <strong>message-level authenticity</strong> provides an elegant layering of security.</p>
<hr>
<h3>🌐 Practical Benefits</h3>
<ul>
<li><strong>Obfuscation</strong>: Encrypted tunnels reduce visibility into relay-to-relay traffic patterns.</li>
<li><strong>Privacy</strong>: Federation over encrypted channels shields metadata and protects against surveillance.</li>
<li><strong>Resilience</strong>: Relays can route around censorship by tunneling through less obvious peers.</li>
<li><strong>Synergy</strong>: Specific relay clusters can form ephemeral or long-term alliances—say, art relays or academic relays—without disclosing their full graph to the world.</li>
</ul>
<hr>
<h3>🧩 Optional Enhancements</h3>
<ul>
<li><strong>Noise Protocol Framework</strong> to standardize encrypted relay tunnels.</li>
<li><strong>Tor Hidden Services</strong> or <strong>I2P</strong> for transport obfuscation.</li>
<li><strong>Relay Reputation Systems</strong> to gauge trust before federation.</li>
<li><strong>Dynamic Federation Negotiation</strong>: using NIP-like proposals over encrypted handshakes to initiate or terminate communication agreements.</li>
</ul>
<hr>
<h3>🌱 Case In Point</h3>
<p>This is not about governing content, users, or identities—this is about strengthening how relays <em>talk</em>. By embracing federated communication via ECDH and Schnorr-secured tunnels, Nostr relays could evolve into a resilient underground of trust-minimized, pseudonymous routers that defy surveillance while amplifying decentralization.</p>
<hr>
<p><strong>federated communication via ECDH and Schnorr-authenticated encrypted tunnels between Nostr relays</strong>:</p>
<hr>
<pre><code class="language-markdown">NIP-xyz: Federated Encrypted Relay Communication
Status: Draft
Type: Relay
Created: 2025-04-22
</code></pre>
<hr>
<h2>Summary</h2>
<p>This NIP proposes a method for <strong>encrypted, authenticated communication between Nostr relays</strong> using <strong>ECDH-based tunnels</strong> for transport encryption and <strong>Schnorr signatures</strong> for payload integrity. This federation model allows relays to communicate securely while maintaining full autonomy, enhancing privacy, censorship resistance, and interoperability.</p>
<hr>
<h2>Motivation</h2>
<p>Nostr’s decentralized architecture relies heavily on relays, which currently operate in isolated or broadcast modes. There is no standard for secure, peer-to-peer communication <strong>between relays themselves</strong>, outside of client interactions.</p>
<p>Introducing encrypted tunnels between relays offers:</p>
<ul>
<li><strong>Privacy</strong>: Reduces metadata leakage across public or adversarial networks.</li>
<li><strong>Resilience</strong>: Allows relays to forward events and metadata through trusted peers when direct access is blocked or filtered.</li>
<li><strong>Autonomy</strong>: Federation is opt-in and purely communicational—no centralized authority or directory is involved.</li>
<li><strong>Extensibility</strong>: Enables experimental protocols or content-specific subnets without altering the global Nostr model.</li>
</ul>
<hr>
<h2>Specification</h2>
<h3>1. Key Exchange via ECDH</h3>
<p>Each relay maintains:</p>
<ul>
<li>A persistent <strong>relay keypair</strong>: <code>relay_pubkey</code>, <code>relay_privkey</code></li>
<li>Optionally: rotating session keys for forward secrecy</li>
</ul>
<p>When two relays (A and B) wish to establish communication:</p>
<ul>
<li>They exchange their public keys (<code>relay_pubkey_A</code> and <code>relay_pubkey_B</code>)</li>
<li>Both calculate a shared secret using ECDH over <code>secp256k1</code>:</li>
</ul>
<pre><code class="language-plaintext">shared_secret = SHA256(ECDH(relay_privkey_A, relay_pubkey_B))
</code></pre>
<p>This <code>shared_secret</code> is used to derive an encryption key for an <strong>authenticated symmetric cipher</strong>, such as AES-GCM or ChaCha20-Poly1305.</p>
<hr>
<h3>2. Encrypted Tunnel Establishment</h3>
<p>Once the shared secret is derived:</p>
<ul>
<li>All messages between relays are sent through an <strong>encrypted tunnel</strong></li>
<li>Transport can be TCP, WebSocket, or HTTP/3 over QUIC, optionally via Tor or I2P</li>
</ul>
<p>A <strong>RelayHello</strong> message is exchanged encrypted, optionally containing:</p>
<pre><code class="language-json">{
  "type": "relay_hello",
  "relay_name": "nostr.relay.example",
  "features": ["forwarding", "dedup", "metadata"],
  "timestamp": 1684000000,
  "sig": "&lt;Schnorr-signed payload&gt;"
}
</code></pre>
<p>The <code>sig</code> is a Schnorr signature from the <code>relay_pubkey</code>, verifying the message content.</p>
<hr>
<h3>3. Event Forwarding</h3>
<p>Relays may forward selected event types across tunnels, such as:</p>
<ul>
<li>Kind 1 (Text Note)</li>
<li>Kind 3 (Contacts)</li>
<li>Kind 5 (Deletion Notices)</li>
<li>Custom kinds (with mutual agreement)</li>
</ul>
<p>All forwarded events MUST retain original client-level signatures. Relay-to-relay metadata (like timestamps, relay hints, or scores) may be added in a separate metadata envelope.</p>
<hr>
<h3>4. Access Control and Policies</h3>
<p>Each relay maintains a <strong>federation list</strong>, including:</p>
<ul>
<li>Public key of the peer relay</li>
<li>Features enabled</li>
<li>Rate limits and quotas</li>
<li>Last active session or rotation timestamp</li>
</ul>
<p>Relays MAY:</p>
<ul>
<li>Deny tunnel requests</li>
<li>Rotate keys periodically</li>
<li>Restrict communication to a whitelist</li>
<li>Use Proof-of-Work or tokens for DoS protection</li>
</ul>
<hr>
<h3>5. Optional Features</h3>
<ul>
<li><strong>Forward Secrecy</strong>: ephemeral key pairs with HKDF for short sessions</li>
<li><strong>Relay Reputation</strong>: signed relay trust scores (future NIP)</li>
<li><strong>Message Compression</strong>: gzip or zstd on tunnel payloads</li>
<li><strong>Encrypted Gossip</strong>: tunnel-specific metadata routing</li>
</ul>
<hr>
<h2>Compatibility</h2>
<p>This NIP is <strong>backward-compatible</strong>. Relays that do not implement it will simply not participate in tunnel-based communication.</p>
<p>No changes are required from Nostr clients.</p>
<hr>
<h2>Reference Implementation (Proposed)</h2>
<ul>
<li><code>nostr-tunnel-relay</code>: Rust-based relay that supports federated encrypted tunnels</li>
<li><code>nostr-relay-link</code>: CLI tool to establish and monitor tunnels</li>
<li>Example configs for federation policies in JSON or TOML</li>
</ul>
<hr>
<h2>Rationale</h2>
<ul>
<li>ECDH ensures only the two relays involved can decrypt tunnel data</li>
<li>Schnorr signatures authenticate content without duplicating identity schemes</li>
<li>Federation is scoped <strong>only to communication</strong>, preserving Nostr’s core simplicity</li>
</ul>
<hr>
<h2>Security Considerations</h2>
<ul>
<li>Relay pubkeys must be carefully verified to prevent MITM</li>
<li>Session expiration and key rotation should be configurable</li>
<li>Replay protection and nonce management are required for AEAD ciphers</li>
<li>Metadata leakage minimized by default obfuscation or Tor-based transport</li>
</ul>
<hr>
<p>NIP.eshgham</p>
]]></content:encoded>
      <itunes:author><![CDATA[▄︻デʟɨɮʀɛȶɛֆƈɦ-ֆʏֆȶɛʍֆ══━一,]]></itunes:author>
      <itunes:summary><![CDATA[<p>Proof Of Concept</p>
<p>In a world where decentralization often hinges on the strength of its weakest node, the idea of federation—applied not to content moderation or identity, but strictly to <strong>communication protocols</strong>—opens up intriguing possibilities. In this model, <strong>Nostr relays</strong> do not operate in total isolation, nor do they function in a single cohesive mesh. Instead, they <strong>form selective, encrypted alliances</strong>, communicating through <strong>secure tunnels</strong> while preserving autonomy.</p>
<hr>
<h3>💡 The Core Idea</h3>
<p><strong>Relays remain sovereign</strong>, but may establish <strong>peer-to-peer encrypted channels</strong> with other trusted relays using <strong>Elliptic Curve Diffie-Hellman (ECDH)</strong> to generate shared secrets. These secrets are then used to encrypt communication tunnels—facilitating a federated communication layer.</p>
<p>Each relay is free to choose:</p>
<ul>
<li><strong>Whom it speaks to</strong></li>
<li><strong>How often</strong></li>
<li><strong>What types of events are relayed through the tunnel</strong></li>
</ul>
<p>But <em>never</em> must it rely on a central coordinator.</p>
<hr>
<h3>🔁 Schnorr for Authentication</h3>
<p>While ECDH can create the secure tunnel, <strong>Schnorr signatures</strong> (already a part of Nostr’s pubkey-based design) can be used to <strong>authenticate the origin</strong> of the data inside. This keeps the integrity of messages intact even when traveling over shared or hostile networks. </p>
<p>Use case:</p>
<ul>
<li>Relay A and Relay B establish an ECDH-based shared key.</li>
<li>All communication is tunnel-encrypted with this shared key.</li>
<li>Inside the tunnel, every message still carries a Schnorr signature, proving its source.</li>
</ul>
<p>This separation of <strong>transport-level encryption</strong> from <strong>message-level authenticity</strong> provides an elegant layering of security.</p>
<hr>
<h3>🌐 Practical Benefits</h3>
<ul>
<li><strong>Obfuscation</strong>: Encrypted tunnels reduce visibility into relay-to-relay traffic patterns.</li>
<li><strong>Privacy</strong>: Federation over encrypted channels shields metadata and protects against surveillance.</li>
<li><strong>Resilience</strong>: Relays can route around censorship by tunneling through less obvious peers.</li>
<li><strong>Synergy</strong>: Specific relay clusters can form ephemeral or long-term alliances—say, art relays or academic relays—without disclosing their full graph to the world.</li>
</ul>
<hr>
<h3>🧩 Optional Enhancements</h3>
<ul>
<li><strong>Noise Protocol Framework</strong> to standardize encrypted relay tunnels.</li>
<li><strong>Tor Hidden Services</strong> or <strong>I2P</strong> for transport obfuscation.</li>
<li><strong>Relay Reputation Systems</strong> to gauge trust before federation.</li>
<li><strong>Dynamic Federation Negotiation</strong>: using NIP-like proposals over encrypted handshakes to initiate or terminate communication agreements.</li>
</ul>
<hr>
<h3>🌱 Case In Point</h3>
<p>This is not about governing content, users, or identities—this is about strengthening how relays <em>talk</em>. By embracing federated communication via ECDH and Schnorr-secured tunnels, Nostr relays could evolve into a resilient underground of trust-minimized, pseudonymous routers that defy surveillance while amplifying decentralization.</p>
<hr>
<p><strong>federated communication via ECDH and Schnorr-authenticated encrypted tunnels between Nostr relays</strong>:</p>
<hr>
<pre><code class="language-markdown">NIP-xyz: Federated Encrypted Relay Communication
Status: Draft
Type: Relay
Created: 2025-04-22
</code></pre>
<hr>
<h2>Summary</h2>
<p>This NIP proposes a method for <strong>encrypted, authenticated communication between Nostr relays</strong> using <strong>ECDH-based tunnels</strong> for transport encryption and <strong>Schnorr signatures</strong> for payload integrity. This federation model allows relays to communicate securely while maintaining full autonomy, enhancing privacy, censorship resistance, and interoperability.</p>
<hr>
<h2>Motivation</h2>
<p>Nostr’s decentralized architecture relies heavily on relays, which currently operate in isolated or broadcast modes. There is no standard for secure, peer-to-peer communication <strong>between relays themselves</strong>, outside of client interactions.</p>
<p>Introducing encrypted tunnels between relays offers:</p>
<ul>
<li><strong>Privacy</strong>: Reduces metadata leakage across public or adversarial networks.</li>
<li><strong>Resilience</strong>: Allows relays to forward events and metadata through trusted peers when direct access is blocked or filtered.</li>
<li><strong>Autonomy</strong>: Federation is opt-in and purely communicational—no centralized authority or directory is involved.</li>
<li><strong>Extensibility</strong>: Enables experimental protocols or content-specific subnets without altering the global Nostr model.</li>
</ul>
<hr>
<h2>Specification</h2>
<h3>1. Key Exchange via ECDH</h3>
<p>Each relay maintains:</p>
<ul>
<li>A persistent <strong>relay keypair</strong>: <code>relay_pubkey</code>, <code>relay_privkey</code></li>
<li>Optionally: rotating session keys for forward secrecy</li>
</ul>
<p>When two relays (A and B) wish to establish communication:</p>
<ul>
<li>They exchange their public keys (<code>relay_pubkey_A</code> and <code>relay_pubkey_B</code>)</li>
<li>Both calculate a shared secret using ECDH over <code>secp256k1</code>:</li>
</ul>
<pre><code class="language-plaintext">shared_secret = SHA256(ECDH(relay_privkey_A, relay_pubkey_B))
</code></pre>
<p>This <code>shared_secret</code> is used to derive an encryption key for an <strong>authenticated symmetric cipher</strong>, such as AES-GCM or ChaCha20-Poly1305.</p>
<hr>
<h3>2. Encrypted Tunnel Establishment</h3>
<p>Once the shared secret is derived:</p>
<ul>
<li>All messages between relays are sent through an <strong>encrypted tunnel</strong></li>
<li>Transport can be TCP, WebSocket, or HTTP/3 over QUIC, optionally via Tor or I2P</li>
</ul>
<p>A <strong>RelayHello</strong> message is exchanged encrypted, optionally containing:</p>
<pre><code class="language-json">{
  "type": "relay_hello",
  "relay_name": "nostr.relay.example",
  "features": ["forwarding", "dedup", "metadata"],
  "timestamp": 1684000000,
  "sig": "&lt;Schnorr-signed payload&gt;"
}
</code></pre>
<p>The <code>sig</code> is a Schnorr signature from the <code>relay_pubkey</code>, verifying the message content.</p>
<hr>
<h3>3. Event Forwarding</h3>
<p>Relays may forward selected event types across tunnels, such as:</p>
<ul>
<li>Kind 1 (Text Note)</li>
<li>Kind 3 (Contacts)</li>
<li>Kind 5 (Deletion Notices)</li>
<li>Custom kinds (with mutual agreement)</li>
</ul>
<p>All forwarded events MUST retain original client-level signatures. Relay-to-relay metadata (like timestamps, relay hints, or scores) may be added in a separate metadata envelope.</p>
<hr>
<h3>4. Access Control and Policies</h3>
<p>Each relay maintains a <strong>federation list</strong>, including:</p>
<ul>
<li>Public key of the peer relay</li>
<li>Features enabled</li>
<li>Rate limits and quotas</li>
<li>Last active session or rotation timestamp</li>
</ul>
<p>Relays MAY:</p>
<ul>
<li>Deny tunnel requests</li>
<li>Rotate keys periodically</li>
<li>Restrict communication to a whitelist</li>
<li>Use Proof-of-Work or tokens for DoS protection</li>
</ul>
<hr>
<h3>5. Optional Features</h3>
<ul>
<li><strong>Forward Secrecy</strong>: ephemeral key pairs with HKDF for short sessions</li>
<li><strong>Relay Reputation</strong>: signed relay trust scores (future NIP)</li>
<li><strong>Message Compression</strong>: gzip or zstd on tunnel payloads</li>
<li><strong>Encrypted Gossip</strong>: tunnel-specific metadata routing</li>
</ul>
<hr>
<h2>Compatibility</h2>
<p>This NIP is <strong>backward-compatible</strong>. Relays that do not implement it will simply not participate in tunnel-based communication.</p>
<p>No changes are required from Nostr clients.</p>
<hr>
<h2>Reference Implementation (Proposed)</h2>
<ul>
<li><code>nostr-tunnel-relay</code>: Rust-based relay that supports federated encrypted tunnels</li>
<li><code>nostr-relay-link</code>: CLI tool to establish and monitor tunnels</li>
<li>Example configs for federation policies in JSON or TOML</li>
</ul>
<hr>
<h2>Rationale</h2>
<ul>
<li>ECDH ensures only the two relays involved can decrypt tunnel data</li>
<li>Schnorr signatures authenticate content without duplicating identity schemes</li>
<li>Federation is scoped <strong>only to communication</strong>, preserving Nostr’s core simplicity</li>
</ul>
<hr>
<h2>Security Considerations</h2>
<ul>
<li>Relay pubkeys must be carefully verified to prevent MITM</li>
<li>Session expiration and key rotation should be configurable</li>
<li>Replay protection and nonce management are required for AEAD ciphers</li>
<li>Metadata leakage minimized by default obfuscation or Tor-based transport</li>
</ul>
<hr>
<p>NIP.eshgham</p>
]]></itunes:summary>
      <itunes:image href="https://image.nostr.build/d219ee5b8d936b11d97b020e4d658950a082b613bf4de36c26927a17b764ecac.gif"/>
      </item>
      
      </channel>
      </rss>
    