<?xml version="1.0" encoding="utf-8"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3"
     ipr="trust200902" docName="draft-yarmohammadi-maram-00"
     category="exp" submissionType="independent"
     xml:lang="en">
  <front>
    <title abbrev="MARAM">MARAM: Multi-layer Address Randomization and Authentication Mechanism</title>
    <seriesInfo name="Internet-Draft" value="draft-yarmohammadi-maram-00"/>
    <author fullname="Reza Yarmohammadi" initials="R." surname="Yarmohammadi">
      <address>
        <email>rezayarmohammadi730@gmail.com</email>
      </address>
    </author>
    <author fullname="MohammadMehdi Vahed" initials="M. M." surname="Vahed">
      <address>
        <email>mohammadmahdi.Vahed@gmail.com</email>
      </address>
    </author>
    <author fullname="Amirreza Shams" initials="A." surname="Shams">
      <address>
        <email>theamirrezashams@gmail.com</email>
      </address>
    </author>
    <author fullname="Amirhossien Fayazbakhsh" initials="A." surname="Fayazbakhsh">
      <address>
        <email>fayazamirh@gmail.com</email>
      </address>
    </author>
    <author fullname="Mahdyar Entezami" initials="M." surname="Entezami">
      <address>
        <email>mahdyaren@gmail.com</email>
      </address>
    </author>
    <date day="11" month="6" year="2026"/>
    <area>Internet</area>
    <workgroup>Independent Submission</workgroup>
    <keyword>MARAM</keyword>
    <keyword>IPv6</keyword>
    <keyword>Privacy</keyword>
    <keyword>Anti-Spoofing</keyword>
    <keyword>Address Randomization</keyword>
    <abstract>
      <t>This document specifies MARAM (Multi-layer Address Randomization and Authentication Mechanism), an IPv6 extension that encrypts real endpoint addresses inside a Destination Option and uses ephemeral outer addresses with per-packet authentication. The key exchange is FYES (Fayazbakhsh, Yarmohammadi, Entezami, Shams), and a dedicated Vahed's Seal ensures protocol identification. The key derivation (FYES-KDF) uses domain separation strings for deriving independent keys.</t>
    </abstract>
    <note title="Status of This Memo" removeInRFC="true">
      <t>This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at <eref target="https://datatracker.ietf.org/drafts/current/"/>.</t>
      <t>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."</t>
      <t>This Internet-Draft will expire on 13 December 2026.</t>
    </note>
    <note title="Copyright Notice" removeInRFC="true">
      <t>Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" toc="default">
      <name>Introduction</name>
      <t>The Internet Protocol exposes source and destination addresses in cleartext, enabling traffic analysis <xref target="RFC7258"/>, source spoofing, and packet injection. MARAM (Multi-layer Address Randomization and Authentication Mechanism) defeats these threats by encrypting the real addresses and authenticating each packet via a MAC derived from a shared secret established through the FYES key exchange. The protocol design ensures endpoint privacy without requiring changes to core routing infrastructure.</t>
    </section>
    <section anchor="terminology" numbered="true" toc="default">
      <name>Terminology and Requirements Notation</name>
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>
      <t>Additional terms:</t>
      <ul spacing="normal">
        <li><strong>Inner address:</strong> The actual, stable IPv6 address of the source or destination.</li>
        <li><strong>Outer address:</strong> An ephemeral, cryptographically generated IPv6 address placed in the IP header and used for routing.</li>
        <li><strong>Vahed's Seal:</strong> A 64-bit constant marker embedded in the MARAM Destination Option that identifies the protocol and provides a first-level integrity check.</li>
      </ul>
    </section>
    <section anchor="overview" numbered="true" toc="default">
      <name>Protocol Overview</name>
      <t>MARAM operates between two endpoints that both support the extension. The protocol proceeds in two phases:</t>
      <dl newline="true" spacing="normal">
        <dt>Phase 1 – FYES Key Exchange:</dt>
        <dd>Endpoints perform an Elliptic Curve Diffie-Hellman (ECDH) exchange on X25519. The exchange MUST be authenticated using long-term keys or a trust-on-first-use (TOFU) model; the exact authentication mechanism is out of scope for this document. FYES refers to Fayazbakhsh, Yarmohammadi, Entezami, and Shams. From the shared secret, the FYES-KDF derives three session keys using HKDF <xref target="RFC5869"/> with domain separation strings.</dd>
        <dt>Phase 2 – Data Transfer:</dt>
        <dd>
          <t>For each packet, the sender:</t>
          <ol spacing="normal" type="1">
            <li>Generates fresh outer source and destination addresses from the base secret and a packet counter.</li>
            <li>Encrypts the real source/destination addresses and ports into a MARAM Destination Option.</li>
            <li>Constructs the IPv6 header using the ephemeral outer addresses.</li>
            <li>Inserts the constant Vahed's Seal into the option.</li>
            <li>Computes a MAC over the packet (with the MAC field zeroed) and places it in the option.</li>
            <li>Sends the packet.</li>
          </ol>
          <t>The receiver validates the seal, verifies the MAC, decrypts the inner addresses, and restores the original packet.</t>
        </dd>
      </dl>
    </section>
    <section anchor="fyes-kex" numbered="true" toc="default">
      <name>FYES Key Exchange and Key Derivation</name>
      <t>FYES (Fayazbakhsh, Yarmohammadi, Entezami, Shams) is a minimal authenticated Elliptic Curve Diffie-Hellman (ECDH) key exchange performed over the X25519 curve. It establishes a shared secret between a Requestor and a Reference without requiring prior coordination beyond static or trust-on-first-use credentials. The exchange consists of a single round-trip where each side generates an ephemeral key pair. After successful authentication (out of scope for this document), both sides compute the shared secret and derive session keys through the FYES-KDF.</t>
      <figure>
        <artwork align="center"><![CDATA[
Requestor                Reference
---------------------------------------------------------------
ephemeral_pub_I = x25519(priv_I, G) ---->
                                         <----- ephemeral_pub_R

Both sides compute:
shared_secret = x25519(priv, peer_pub)
]]></artwork>
      </figure>
      <t>The FYES-KDF then expands the shared secret using HKDF with SHA-256:</t>
      <figure>
        <artwork align="left"><![CDATA[
PRK = HKDF-Extract(salt=0x00, IKM=shared_secret)

KE = HKDF-Expand(PRK, "maram layer encryption", 32)
KM = HKDF-Expand(PRK, "mdyrm mac", 32)
S  = HKDF-Expand(PRK, "Vahed's Keystone", 32)
]]></artwork>
      </figure>
      <t>KE is used for AEAD encryption of the inner address block (AES-256-GCM). KM is the key for the per-packet MAC (HMAC-SHA-256). S is the base secret for generating ephemeral outer addresses; it is referred to as Vahed's Keystone.</t>
      <t>The labels are arbitrary domain separation strings and do not affect the cryptographic properties of the derived keys.</t>
    </section>
    <section anchor="header" numbered="true" toc="default">
      <name>MARAM Destination Option Header</name>
      <t>The MARAM information is carried in an IPv6 Destination Option, identified by Option Type TBD (to be assigned by IANA). The option data is aligned to 8n+2 bytes by adding zero-padding (PadN) if necessary.</t>
      <figure>
        <artwork align="center"><![CDATA[
 0                   1                   2                   3
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Option Type  |  Opt Data Len |       Counter (16 bits)      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+                   Vahed's Seal (64 bits)                      +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~            Encrypted Inner Address Block (variable)          ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+                       MAC (128 bits)                          +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>
      <dl newline="true" spacing="normal">
        <dt>Option Type:</dt><dd>TBD (act=00, chg=1).</dd>
        <dt>Vahed's Seal:</dt><dd>A 64-bit constant set to 0x454D414D46415354. Receivers MUST reject any packet with a different value.</dd>
        <dt>Encrypted Inner Address Block:</dt><dd>The true source and destination IPv6 addresses (each 128 bits) and the true source and destination ports (each 16 bits), encrypted with AES-256-GCM using key KE. The 12-byte nonce is formed as: 0x00000000 || Counter || 0x000000000000. The GCM authentication tag (128 bits) is appended to the ciphertext.</dd>
        <dt>MAC:</dt><dd>128-bit truncated HMAC-SHA-256 (first 128 bits) over the entire packet (with the MAC field set to zero), using key KM.</dd>
      </dl>
    </section>
    <section anchor="addressing" numbered="true" toc="default">
      <name>Address Hiding and Packet Construction</name>
      <t>Outer addresses are built from a documentation prefix and the base secret S. For the examples in this document, the prefix 2001:db8::/48 is used. The lower 80 bits are taken from the HMAC-SHA-256 computation, as follows:</t>
      <figure>
        <artwork align="left"><![CDATA[
Outer_Src = 2001:db8:0:0:0:0:0:0/48 |
           HMAC-SHA-256(S, "MARAM outer src" || Counter)
           truncated to 80 bits

Outer_Dst = 2001:db8:0:0:0:0:0:0/48 |
           HMAC-SHA-256(S, "MARAM outer dst" || Counter)
           truncated to 80 bits
]]></artwork>
      </figure>
      <t>The inner (real) addresses remain unchanged and are encrypted in the Destination Option. For illustration, the following inner addresses are used in this document:</t>
      <ul spacing="normal">
        <li>Requestor: 2001:db8::6661:7961:7a00:0</li>
        <li>Reference: 2001:db8::7661:6865:6400:0</li>
      </ul>
      <t>(These addresses lie within the documentation prefix and their lower 64 bits are arbitrary identifiers.)</t>
      <t>When the Requestor communicates with the Reference, the outer addresses change every packet, while the inner addresses stay encrypted.</t>
    </section>
    <section anchor="security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>MARAM enforces the following properties:</t>
      <ul spacing="normal">
        <li><strong>Confidentiality of real endpoints:</strong> On-path observers see only ephemeral addresses. Inner addresses are AEAD-encrypted.</li>
        <li><strong>Anti-spoofing:</strong> Without KM, an attacker cannot generate a valid MAC, even with knowledge of the static Vahed's Seal.</li>
        <li><strong>Replay protection:</strong> The receiver maintains a sliding window of acceptable counter values. Packets with counters outside the window or already received are discarded, preventing replay attacks.</li>
        <li><strong>Resistance to traffic analysis:</strong> Constant address changes prevent flow correlation, aligning with <xref target="RFC7258"/>.</li>
        <li><strong>Resilience against injection:</strong> Any forged RST or data packet fails MAC validation and is discarded.</li>
      </ul>
      <t>An adversary (e.g., an on-path "Shams") cannot distinguish different flows or inject traffic. The protocol provides strong protection against DDoS, man-in-the-middle, and surveillance.</t>
      <t>The use of a static salt in HKDF-Extract (salt=0x00) is acceptable if the input keying material (shared_secret) has sufficient entropy. The domain separation strings are arbitrary and do not weaken the key derivation.</t>
    </section>
    <section anchor="iana" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>IANA is requested to allocate a Destination Option type from the "Destination Options and Hop-by-Hop Options" registry under "IPv6 Parameters". The act bits are "00", the chg bit is "1". The suggested mnemonic is MARAM. The assigned value is TBD.</t>
    </section>
  </middle>
  <back>
    <references title="References">
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner"/>
          <date month="March" year="1997"/>
          <abstract><t>This document defines key words for requirement levels.</t></abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
          <abstract><t>This document clarifies the use of RFC 2119 key words.</t></abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
      <reference anchor="RFC5869" target="https://www.rfc-editor.org/info/rfc5869">
        <front>
          <title>HMAC-based Extract-and-Expand Key Derivation Function (HKDF)</title>
          <author fullname="H. Krawczyk" initials="H." surname="Krawczyk"/>
          <author fullname="P. Eronen" initials="P." surname="Eronen"/>
          <date month="May" year="2010"/>
          <abstract><t>This document specifies HKDF, a simple key derivation function.</t></abstract>
        </front>
        <seriesInfo name="RFC" value="5869"/>
        <seriesInfo name="DOI" value="10.17487/RFC5869"/>
      </reference>
      <reference anchor="RFC5116" target="https://www.rfc-editor.org/info/rfc5116">
        <front>
          <title>An Interface and Algorithms for Authenticated Encryption</title>
          <author fullname="D. McGrew" initials="D." surname="McGrew"/>
          <date month="January" year="2008"/>
          <abstract><t>This document defines authenticated encryption algorithms.</t></abstract>
        </front>
        <seriesInfo name="RFC" value="5116"/>
        <seriesInfo name="DOI" value="10.17487/RFC5116"/>
      </reference>
      <reference anchor="RFC7258" target="https://www.rfc-editor.org/info/rfc7258">
        <front>
          <title>Pervasive Monitoring Is an Attack</title>
          <author fullname="S. Farrell" initials="S." surname="Farrell"/>
          <author fullname="H. Tschofenig" initials="H." surname="Tschofenig"/>
          <date month="May" year="2014"/>
          <abstract><t>This document states that pervasive monitoring is a technical attack.</t></abstract>
        </front>
        <seriesInfo name="BCP" value="188"/>
        <seriesInfo name="RFC" value="7258"/>
        <seriesInfo name="DOI" value="10.17487/RFC7258"/>
      </reference>
      <reference anchor="RFC3849" target="https://www.rfc-editor.org/info/rfc3849">
        <front>
          <title>IPv6 Documentation Prefix</title>
          <author fullname="G. Huston" initials="G." surname="Huston"/>
          <date month="July" year="2004"/>
          <abstract><t>This document reserves the 2001:db8::/32 prefix for documentation.</t></abstract>
        </front>
        <seriesInfo name="RFC" value="3849"/>
        <seriesInfo name="DOI" value="10.17487/RFC3849"/>
      </reference>
    </references>
    <section anchor="appendix" numbered="true" toc="default">
      <name>Enhanced Security Against Modern Threats</name>
      <t>MARAM addresses several modern attack vectors:</t>
      <dl newline="true" spacing="normal">
        <dt>Spoofing and DDoS:</dt>
        <dd>By authenticating every packet with a MAC, source address spoofing is completely prevented, cutting off reflection and amplification DDoS attacks at the root.</dd>
        <dt>Man-in-the-Middle (MitM):</dt>
        <dd>Without the shared KM, an interceptor cannot decrypt or modify the inner addresses, rendering MitM attacks ineffective.</dd>
        <dt>Eavesdropping and Traffic Analysis:</dt>
        <dd>The ephemeral outer headers and encrypted inner addresses ensure that even a pervasive monitor cannot map communication patterns to stable identities, thereby defeating traffic correlation.</dd>
        <dt>Packet Injection:</dt>
        <dd>Any unsolicited packet (e.g., TCP RST) fails MAC validation, protecting established connections.</dd>
      </dl>
      <t>These properties make MARAM a robust privacy and anti-attack layer for the modern Internet.</t>
    </section>
  </back>
</rfc>