<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp    "&#8203;">
  <!ENTITY nbhy    "&#8209;">
  <!ENTITY wj      "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     docName="draft-ietf-sidrops-moa-profile-06"
     ipr="trust200902"
     category="std"
     submissionType="IETF"
     consensus="true"
     xml:lang="en"
     symRefs="true"
     sortRefs="true"
     tocInclude="true"
     tocDepth="3"
     version="3">

  <front>
    <title abbrev="MOA Profile">A Profile for Mapping Origin Authorizations (MOAs)</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-sidrops-moa-profile-06"/>

    <author initials="C." surname="Xie" fullname="Chongfeng Xie">
      <organization>China Telecom</organization>
      <address>
        <postal>
          <street>Beiqijia Town, Changping District</street>
          <city>Beijing</city>
          <code>102209</code>
          <country>China</country>
        </postal>
        <email>xiechf@chinatelecom.cn</email>
      </address>
    </author>

    <author initials="G." surname="Dong" fullname="Guozhen Dong">
      <organization>China Telecom</organization>
      <address>
        <postal>
          <street>Beiqijia Town, Changping District</street>
          <city>Beijing</city>
          <code>102209</code>
          <country>China</country>
        </postal>
        <email>donggz@chinatelecom.cn</email>
      </address>
    </author>

    <author initials="X." surname="Li" fullname="Xing Li">
      <organization>CERNET Center/Tsinghua University</organization>
      <address>
        <postal>
          <street>Shuangqing Road No.30, Haidian District</street>
          <city>Beijing</city>
          <code>100084</code>
          <country>China</country>
        </postal>
        <email>xing@cernet.edu.cn</email>
      </address>
    </author>

    <author initials="G." surname="Huston" fullname="Geoff Huston">
      <organization>APNIC</organization>
      <address>
        <email>gih@apnic.net</email>
      </address>
    </author>

    <author initials="D." surname="Ma" fullname="Di Ma">
      <organization>ZDNS</organization>
      <address>
        <postal>
          <street>Floor 21, Block B, Greenland Center</street>
          <city>Beijing</city>
          <code>100102</code>
          <country>China</country>
        </postal>
        <email>madi@zdns.cn</email>
      </address>
    </author>

    <date year="2026" month="November" day="29"/>
    <area>Operations and Management</area>
    <workgroup>SIDR Operations</workgroup>

    <abstract>
      <t>
        This document proposes a new approach by leveraging Resource Public
        Key Infrastructure (RPKI) architecture to verify the authenticity of
        the mapping origin of an IPv4 address block.  MOA is a newly defined
        cryptographically signed object that provides a means for the
        address holder to authorize an IPv6 mapping prefix to originate
        mapping for one or more IPv4 prefixes.  When receiving the MOA
        objects from the relying parties, PE devices can verify and discard
        invalid address mapping announcements from unauthorized IPv6
        mapping prefixes to prevent IPv4 prefix hijacking.
      </t>
    </abstract>
  </front>

  <middle>

    <!-- ================================================================ -->
    <section anchor="sec-intro" numbered="true">
      <name>Introduction</name>

      <t>
        This document defines a security enhancement for the address mapping
        announcement in multi-domain IPv6-only underlay networks
        <xref target="I-D.ietf-v6ops-framework-md-ipv6only-underlay"/>.  For IPv4 service
        delivery in an IPv6-only network, IPv6 mapping prefixes are
        configured at the PE devices to identify the location of IPv4
        address blocks, for any given IPv4 address block, its corresponding
        IPv6 mapping prefix is considered as the mapping origin.  In
        <xref target="I-D.ietf-idr-mpbgp-extension-4map6"/>, a PE device at the edge of the
        IPv6-only network distributes the mapping between an IPv4 address
        block and its mapping origin through 4map6 extension of MP-BGP.
        Based on the obtained mapping data, the ingress PE can statelessly
        transform the incoming IPv4 packets into IPv6 ones and send them to
        the correct egress PE.
      </t>

      <t>
        From the above, it can be seen that the correctness of transmitting
        IPv4 service data in an IPv6-only network lies on the authenticity
        of the address mapping relationship.  This can be further explained
        by the case where if an attacker maps an IPv4 address block using a
        fake IPv6 mapping prefix, IPv4 service data will be sent to the
        wrong egress PE, resulting in a situation of IPv4 prefix hijacking.
        In a small-scale controlled network, this problem may not be too
        serious.  However, as the scale of IPv6-only deployment increases
        and there is interconnection among multiple operators, it is
        necessary to guarantee the authenticity of mapping relationship.
        This document proposes a new approach by leveraging Resource Public
        Key Infrastructure (RPKI) architecture to verify the authenticity of
        the mapping origin of an IPv4 address block.  RPKI is a security
        framework by which network owners can validate and secure the
        critical route updates or BGP announcements between public Internet
        networks [RFC6480].  For the scenario discussed, a new object,
        namely Mapping Origin Authorization (MOA), under the RPKI framework
        is defined in this document.  MOA is a cryptographically signed
        mapping object between an IPv4 address block and its right mapping
        origin that is allowed to be declared in the announcement of
        MP-BGP.  With this architecture, a legitimate holder of IPv4 address
        block, e.g. an ISP, can authorize an IPv6 mapping prefix to map IPv4
        address block.
      </t>

      <t>
        A distributed repository system stores and disseminates the data
        objects that comprise the RPKI, as well as other signed objects
        necessary for improved mapping data and routing security.  When
        receiving MOA objects from the relying parties, the PE routers can
        use them for Mapping Origin Validation (MOV) of IPv4 address
        blocks: verifying and discarding "invalid" address mapping
        announcements to prevent IPv4 prefix hijacking in an IPv6 network.
      </t>

      <section anchor="sec-req-lang" numbered="true">
        <name>Requirements Language</name>
        <t>
          The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
          NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "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>
      </section>
    </section>

    <!-- ================================================================ -->
    <section anchor="sec-term" numbered="true">
      <name>Terminology, Abbreviations and Acronyms</name>

      <dl>
        <dt>AFI:</dt>
        <dd>Address Family Identifier</dd>
        <dt>CMS:</dt>
        <dd>Cryptographic Message Syntax</dd>
        <dt>MOA:</dt>
        <dd>Mapping Origin Authorization</dd>
        <dt>MOV:</dt>
        <dd>Mapping Origin Validation</dd>
        <dt>MP-BGP:</dt>
        <dd>Multiprotocol BGP</dd>
        <dt>PE:</dt>
        <dd>Provider Edge</dd>
        <dt>PKI:</dt>
        <dd>Public Key Infrastructure</dd>
        <dt>RPKI:</dt>
        <dd>Resource Public Key Infrastructure</dd>
        <dt>ROA:</dt>
        <dd>Route Origin Authorization <xref target="RFC9582"/></dd>
        <dt>SAFI:</dt>
        <dd>Subsequent Address Family Identifier</dd>
      </dl>
    </section>

    <!-- ================================================================ -->
    <section anchor="sec-ct" numbered="true">
      <name>The MOA Content-Type</name>

      <t>
        The content-type for a MOA is defined as MappingOriginAuthz and has
        the numerical value of 1.2.840.113549.1.9.16.1.TBD1.  TBD1 is
        assigned by IANA as described in <xref target="sec-iana"/>.
      </t>

      <t>
        This OID MUST appear both within the eContentType in the
        encapContentInfo object and in the content-type signed attribute in
        the signerInfo object (see <xref target="RFC6488"/>).
      </t>

      <t>
        A MOA is an RPKI signed object and MUST conform to the signed object
        template specified in <xref target="RFC6488"/>.  The end-entity
        (EE) certificate contained in a MOA MUST conform to <xref
        target="RFC6487"/>.
      </t>
    </section>

    <!-- ================================================================ -->
    <section anchor="sec-econtent" numbered="true">
      <name>The MOA eContent</name>

      <t>
        A MOA identifies a single IPv6 mapping prefix that has been
        authorized by the address holder to originate mappings for one or
        more IPv4 prefixes.  If the address holder needs to authorize
        multiple IPv6 mapping prefixes to map the same set of IPv4
        prefixes, the holder issues multiple MOAs, one per IPv6 mapping
        prefix.  A MOA is formally defined as:
      </t>

      <artwork type="asn.1"><![CDATA[
MappingOriginAttestation ::= SEQUENCE {
    version  [0] INTEGER DEFAULT 0,
    mapping  MOAIPMapping }

MOAIPMapping ::= SEQUENCE {
    v6MappingPrefix  MOAIPv6AddressFamily,
    v4Prefixes       MOAIPv4AddressFamily }

MOAIPv6AddressFamily ::= SEQUENCE {
    addressFamily  OCTET STRING (SIZE (2)),
    addresses      SEQUENCE (SIZE (1)) OF IPv6MappingPrefix }

MOAIPv4AddressFamily ::= SEQUENCE {
    addressFamily  OCTET STRING (SIZE (3)),
    addresses      SEQUENCE (SIZE (1..MAX)) OF IPv4Prefix }

IPv6MappingPrefix ::= BIT STRING (SIZE (0..ub-IPv6))
IPv4Prefix        ::= BIT STRING (SIZE (0..ub-IPv4))

ub-IPv6 INTEGER ::= 96
ub-IPv4 INTEGER ::= 32
]]></artwork>

      <t>
        The MOAIPv6AddressFamily and MOAIPv4AddressFamily structures follow
        the addressFamily element defined in Section 2.2.3.3 of <xref
        target="RFC3779"/> and are modelled on ROAIPAddressFamily in <xref
        target="RFC9582"/>.  Each addressFamily element carries the AFI and,
        for IPv4, the 4map6 SAFI, so that the address family of every
        resource in the MOA is explicit.
      </t>

      <t>
        In MOAIPv6AddressFamily, addressFamily is the two-octet value 0002
        (hexadecimal), i.e., the IPv6 AFI, with no SAFI, and addresses
        contains exactly one IPv6MappingPrefix.
      </t>

      <t>
        In MOAIPv4AddressFamily, addressFamily is the three-octet value
        0001 (hexadecimal), i.e., the IPv4 AFI, followed by the one-octet
        SAFI value registered for 4map6, and addresses contains one or more
        IPv4Prefix values.
      </t>

      <t>
        IPv6MappingPrefix MUST NOT be longer than 96 bits; prefixes of any
        shorter length are permitted, and Section 4.2.1 lists the lengths
        currently used in deployment.  The 4map6 encoding places the IPv4
        prefix, which is at most 32 bits long, after the IPv6 mapping
        prefix, so a mapping prefix longer than 96 bits would leave less
        than 32 bits for the IPv4 address.  IPv4Prefix MUST NOT be longer
        than 32 bits.  A value outside these bounds does not conform to the
        syntax of this profile and MUST be rejected.
      </t>

      <t>
        Because the 4map6 data plane forms a synthesized prefix whose
        length is the sum of the lengths of the IPv6 mapping prefix and the
        IPv4 prefix, the bound of 96 guarantees that an IPv4 prefix of any
        length up to 32 bits is representable with any mapping prefix
        permitted by this profile.  The bound itself is what makes this
        checkable in the ASN.1 syntax alone, rather than per entry.
        Shorter mapping prefixes, such as the /48 prefix in the example in
        Appendix B.1, are the common case in deployment.
      </t>

      <t>
        The 4map6 SAFI is carried by the eContent only.  The EE certificate
        contained in a MOA is a resource certificate as profiled in <xref
        target="RFC6487"/>, and, per Section 4.8.10 of that document, its IP
        address delegation extension does not carry a SAFI.  It is the
        eContent that binds the IPv4 resources of the EE certificate to the
        4map6 use.
      </t>

      <t>
        Each prefix MUST be encoded as specified in Section 2.1.1 of
        <xref target="RFC3779"/>, that is, as a left-justified DER BIT
        STRING in which all unused bits are set to zero.
      </t>

      <t>
        Note that this content appears as the eContent within the
        encapContentInfo object (see <xref target="RFC6488"/>).
      </t>

      <section anchor="sec-version" numbered="true">
        <name>Element version</name>
        <t>
          The version number of the MappingOriginAttestation MUST be 0.
          Because 0 is the default value of the version element, it is
          absent from the DER encoding.  A MOA that carries a version
          element with any other value is malformed.
        </t>
      </section>

      <section anchor="sec-mapping" numbered="true">
        <name>Element mapping</name>
        <t>
          The mapping element encodes a single authorization: the IPv6
          mapping prefix in v6MappingPrefix is authorized to originate
          mappings for the set of IPv4 prefixes in v4Prefixes.  A MOA that
          contains more than one MOAIPMapping is malformed.
        </t>

        <section anchor="sec-moamapping" numbered="true">
          <name>Type MOAIPMapping</name>

          <t>
            The v6MappingPrefix element contains the IPv6 prefix that is
            used to originate mappings for a set of IPv4 prefixes.  Prefix
            lengths of 40, 48, 56, 64 and 96 are RECOMMENDED for
            deployment; 96 is the largest value that the encoding permits
            (Section 4).
          </t>

          <t>
            The v4Prefixes element represents the IPv4 prefixes that the
            IPv6 mapping prefix is authorized to map, encoded as a sequence
            of IPv4Prefix values.
          </t>

          <t>
            The addresses element in v4Prefixes MUST be sorted as specified
            in Section 2.2.3.6 of <xref target="RFC3779"/>.  It MUST NOT
            contain duplicate entries, entries that are equal to or
            contained within another entry, or adjacent entries that can be
            combined into a single entry.  A MOA that violates any of these
            requirements is malformed.
          </t>

          <t>
            Both address family structures carry address prefixes only, so
            the "inherit" element and the addressRange alternative defined
            in <xref target="RFC3779"/> cannot be expressed in a MOA.
          </t>
        </section>
      </section>
    </section>

    <!-- ================================================================ -->
    <section anchor="sec-validation" numbered="true">
      <name>Validation</name>

      <t>
        This section specifies how a relying party validates a MOA and how
        it applies the result to a received mapping announcement.
      </t>

      <section anchor="sec-moa-validation" numbered="true">
        <name>MOA Validation</name>

        <t>
          Before a relying party can use a MOA to validate a mapping
          announcement, the relying party MUST first validate the MOA.  To
          validate a MOA, the relying party MUST perform all the validation
          checks specified in <xref target="RFC6488"/> as well as the
          following additional MOA-specific validation checks:
        </t>

        <ul>
          <li>
            The IP address delegation extension <xref target="RFC3779"/>
            MUST be present in the EE certificate contained within the MOA.
          </li>
          <li>
            The EE certificate's IP address delegation extension MUST NOT
            contain any "inherit" elements (Section 2.2.3.5 of <xref
            target="RFC3779"/>).
          </li>
          <li>
            The EE certificate's IP address delegation extension MUST NOT
            contain any IPv6 resources; that is, every IPAddressFamily entry
            in that extension MUST have an AFI of 0001.
          </li>
          <li>
            Each IPv4 prefix in the MOA MUST be contained within the set of
            IPv4 addresses authorized by the EE certificate's IP address
            delegation extension.
          </li>
          <li>
            The Autonomous System identifier delegation extension (Section 3
            of <xref target="RFC3779"/>) MUST NOT be present in the EE
            certificate.
          </li>
          <li>
            The eContent MUST satisfy the canonical form and minimality
            requirements of Section 4; otherwise the MOA is malformed.
          </li>
        </ul>

        <t>
          A MOA that fails any of these checks MUST be considered invalid
          and MUST NOT be used for Mapping Origin Validation.
        </t>
      </section>

      <section anchor="sec-mov" numbered="true">
        <name>Mapping Origin Validation</name>

        <t>
          A relying party, typically an ingress PE, applies MOV to a
          received 4map6 route, that is, a BGP route whose AFI/SAFI is
          2/4map6 and whose Network Layer Reachability Information (NLRI)
          carries an IPv6 mapping prefix P and an IPv4 prefix A
          <xref target="I-D.ietf-idr-mpbgp-extension-4map6"/>.
        </t>

        <t>
          The route is "Valid" if there exists at least one MOA that has
          been validated as specified in <xref target="sec-moa-validation"/>
          and that contains a v6MappingPrefix equal to P and a v4Prefixes
          entry equal to A.
        </t>

        <t>
          The route is "Invalid" if at least one validated MOA contains a
          v4Prefixes entry equal to A, but no validated MOA that contains A
          also authorizes P.
        </t>

        <t>
          Otherwise, the route is "NotFound".
        </t>

        <t>
          Comparison is by exact prefix value and exact prefix length.  A
          MOA does not carry a maxLength equivalent, so a less specific
          entry does not authorize a more specific route.  How these
          outcomes are used in route selection is a matter of local policy
          and is out of scope of this document.
        </t>
      </section>
    </section>

    <!-- ================================================================ -->
    <section anchor="sec-publication" numbered="true">
      <name>Publication</name>

      <t>
        A MOA is published in the RPKI repository system as a signed object
        (see <xref target="RFC6481"/>).  When naming a MOA, the Certification
        Authority SHOULD apply the naming rules for signed objects in
        Section 2.2 of <xref target="RFC6481"/>, that is, the Base 64
        encoding with the URL and Filename Safe Alphabet (Section 5 of
        <xref target="RFC4648"/>) of the hash of the EE certificate's public
        key.
      </t>

      <t>
        Using a new, fixed-length, high-entropy filename for each issuance,
        together with a one-time-use EE certificate (Section 3 of <xref
        target="RFC6487"/>), avoids the synchronization hazards that arise
        when a publication point reuses a filename for different content.
        Section 5.7 of <xref
        target="I-D.ietf-sidrops-publication-server-bcp"/> discusses these
        hazards and recommends filenames shorter than 32 characters.
      </t>
    </section>

    <!-- ================================================================ -->
    <section anchor="sec-security" numbered="true">
      <name>Security Considerations</name>

      <t>
        There is no assumption of confidentiality for the data in a MOA; it
        is anticipated that MOAs will be stored in repositories that are
        accessible to all ISPs, and perhaps to all Internet users.  There is
        no explicit authentication associated with a MOA, since the PKI used
        for MOA validation provides authorization but not authentication.
      </t>

      <t>
        Although the MOA is a signed, application-layer object, there is no
        intent to convey non-repudiation via a MOA.
      </t>

      <t>
        The purpose of a MOA is to convey authorization for an IPv6 mapping
        prefix to originate a mapping to the prefix(es) in the MOA.  Thus,
        the integrity of a MOA MUST be established.  The MOA specification
        makes use of the RPKI signed object format; thus, all security
        considerations in <xref target="RFC6488"/> also apply to MOAs.
        Additionally, the signed object profile uses the CMS signed message
        format for integrity; thus, MOAs inherit all security considerations
        associated with that data structure.
      </t>

      <t>
        The right of the MOA signer to authorize the target IPv6 mapping
        prefix to originate mappings to the prefix(es) is established
        through use of the address space PKI described in <xref
        target="RFC6480"/>.  Specifically, one MUST verify the signature on
        the MOA using an X.509 certificate issued under this PKI, and check
        that the prefix(es) in the MOA match those in the certificate's
        address space extension.
      </t>

      <t>
        A MOA does not assert that its signer holds the IPv6 mapping
        prefix.  The signer authorizes another party's IPv6 mapping prefix
        to map its own IPv4 block, so the legitimacy of that IPv6 mapping
        prefix is established by IPv6 ROA validation and not by the MOA
        itself.  This is why the EE certificate of a MOA carries IPv4
        resources only, as required in <xref
        target="sec-moa-validation"/>.
      </t>

      <t>
        As mentioned in <xref target="I-D.ietf-idr-mpbgp-extension-4map6"/>, the 4map6
        extension is mainly used for controlled IPv6-only networks operated
        by a single or multiple ISPs.  In this scenario, as the IPv6 mapping
        prefix indicates the direction of IPv4 service data transmission in
        the IPv6-only network, and MOA is used to validate the mapping
        origin of an IPv4 address block, there is no need to use IPv4 ROAs
        for the validation of IPv4 BGP announcements.  On the other hand, as
        the operation of MOA depends on the authenticity of address
        authorization in the underlying IPv6 network, if the IPv6 address
        prefix is maliciously originated by a third-party AS, even if the
        IPv4 address block is legitimately authorized to its corresponding
        IPv6 mapping prefix, traffic hijacking may occur due to the
        malicious announcement of the IPv6 mapping prefix.  Therefore, it is
        RECOMMENDED to also deploy IPv6 ROA validation where MOA is
        deployed.
      </t>
    </section>

    <!-- ================================================================ -->
    <section anchor="sec-iana" numbered="true">
      <name>IANA Considerations</name>

      <t>
        With this document, IANA is requested to allocate a code for MOA in
        the "RPKI Signed Objects" registry.  In addition, two OIDs need to
        be assigned by IANA, one for the module identifier (TBD2) and one
        for the content type (TBD1).  The codes will use this document as
        the reference.
      </t>

      <t>
        IANA is also requested to register the filename extension ".moa" for
        Mapping Origin Authorizations in the "RPKI Repository Name Schemes"
        registry created by <xref target="RFC6481"/>.
      </t>

      <t>
        The SAFI value used in the addressFamily of the v4Prefixes element
        is the value registered for 4map6 in the "Subsequent Address Family
        Identifiers (SAFI) Parameters" registry by
        <xref target="I-D.ietf-idr-mpbgp-extension-4map6"/>.  This document requests no
        IANA action for that registry.
      </t>
    </section>

    <!-- ================================================================ -->
    <section anchor="sec-ack" numbered="true">
      <name>Acknowledgements</name>
      <t>
        The authors would like to express sincere thanks to Russ Housley and
        Job Snijders for their review, suggestions and contributions.
        Thanks are also given to Nan Geng, Lancheng Qin, Jie Dong, Linda
        Dunbar, Jiankang Yao, Sriram Kotikalapudi, Giuseppe Fioccola, Yu Fu,
        Shunwan Zhuang, Aijun Wang, Shengnan Yue and Cong Li for their
        review and comments.
      </t>
    </section>

    <!-- ================================================================ -->
  </middle>

  <back>

  <references>
    <name>References</name>

    <references>
    <name>Normative References</name>

    <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"/>
      </front>
      <seriesInfo name="BCP" value="14"/>
      <seriesInfo name="RFC" value="2119"/>
      <seriesInfo name="DOI" value="10.17487/RFC2119"/>
    </reference>

    <reference anchor="RFC3779" target="https://www.rfc-editor.org/info/rfc3779">
      <front>
        <title>X.509 Extensions for IP Addresses and AS Identifiers</title>
        <author fullname="C. Lynn" initials="C." surname="Lynn"/>
        <author fullname="S. Kent" initials="S." surname="Kent"/>
        <author fullname="K. Seo" initials="K." surname="Seo"/>
        <date month="June" year="2004"/>
      </front>
      <seriesInfo name="RFC" value="3779"/>
      <seriesInfo name="DOI" value="10.17487/RFC3779"/>
    </reference>

    <reference anchor="RFC4648" target="https://www.rfc-editor.org/info/rfc4648">
      <front>
        <title>The Base16, Base32, and Base64 Data Encodings</title>
        <author fullname="S. Josefsson" initials="S." surname="Josefsson"/>
        <date month="October" year="2006"/>
      </front>
      <seriesInfo name="RFC" value="4648"/>
      <seriesInfo name="DOI" value="10.17487/RFC4648"/>
    </reference>

    <reference anchor="RFC6487" target="https://www.rfc-editor.org/info/rfc6487">
      <front>
        <title>A Profile for X.509 PKIX Resource Certificates</title>
        <author fullname="G. Huston" initials="G." surname="Huston"/>
        <author fullname="G. Michaelson" initials="G." surname="Michaelson"/>
        <author fullname="R. Loomans" initials="R." surname="Loomans"/>
        <date month="February" year="2012"/>
      </front>
      <seriesInfo name="RFC" value="6487"/>
      <seriesInfo name="DOI" value="10.17487/RFC6487"/>
    </reference>

    <reference anchor="RFC6488" target="https://www.rfc-editor.org/info/rfc6488">
      <front>
        <title>Signed Object Template for the Resource Public Key Infrastructure (RPKI)</title>
        <author fullname="M. Lepinski" initials="M." surname="Lepinski"/>
        <author fullname="A. Chi" initials="A." surname="Chi"/>
        <author fullname="S. Kent" initials="S." surname="Kent"/>
        <date month="February" year="2012"/>
      </front>
      <seriesInfo name="RFC" value="6488"/>
      <seriesInfo name="DOI" value="10.17487/RFC6488"/>
    </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"/>
      </front>
      <seriesInfo name="BCP" value="14"/>
      <seriesInfo name="RFC" value="8174"/>
      <seriesInfo name="DOI" value="10.17487/RFC8174"/>
    </reference>

    <reference anchor="RFC6481" target="https://www.rfc-editor.org/info/rfc6481">
      <front>
        <title>A Profile for Resource Certificate Repository Structure</title>
        <author fullname="G. Huston" initials="G." surname="Huston"/>
        <author fullname="R. Loomans" initials="R." surname="Loomans"/>
        <author fullname="G. Michaelson" initials="G." surname="Michaelson"/>
        <date month="February" year="2012"/>
      </front>
      <seriesInfo name="RFC" value="6481"/>
      <seriesInfo name="DOI" value="10.17487/RFC6481"/>
    </reference>

    <reference anchor="RFC9582" target="https://www.rfc-editor.org/info/rfc9582">
      <front>
        <title>A Profile for Route Origin Authorizations (ROAs)</title>
        <author fullname="J. Snijders" initials="J." surname="Snijders"/>
        <author fullname="B. Maddison" initials="B." surname="Maddison"/>
        <author fullname="M. Lepinski" initials="M." surname="Lepinski"/>
        <author fullname="D. Kong" initials="D." surname="Kong"/>
        <author fullname="S. Kent" initials="S." surname="Kent"/>
        <date month="May" year="2024"/>
      </front>
      <seriesInfo name="RFC" value="9582"/>
      <seriesInfo name="DOI" value="10.17487/RFC9582"/>
    </reference>
    </references>

    <references>
      <name>Informative References</name>

    <reference anchor="I-D.ietf-idr-mpbgp-extension-4map6"
               target="https://datatracker.ietf.org/doc/html/draft-ietf-idr-mpbgp-extension-4map6-06">
      <front>
        <title>MP-BGP Extension and the Procedures for IPv4/IPv6 Mapping Advertisement</title>
        <author fullname="C. Xie" initials="C." surname="Xie"/>
        <author fullname="G. Dong" initials="G." surname="Dong"/>
        <author fullname="X. Li" initials="X." surname="Li"/>
        <author fullname="G. Han" initials="G." surname="Han"/>
        <author fullname="Z. Guo" initials="Z." surname="Guo"/>
        <date month="June" year="2026" day="7"/>
      </front>
      <seriesInfo name="Internet-Draft" value="draft-ietf-idr-mpbgp-extension-4map6-06"/>
    </reference>

    <reference anchor="I-D.ietf-v6ops-framework-md-ipv6only-underlay"
               target="https://datatracker.ietf.org/doc/html/draft-ietf-v6ops-framework-md-ipv6only-underlay-33">
      <front>
        <title>Framework for Multi-domain IPv6-only Underlay Network and IPv4-as-a-Service</title>
        <author fullname="C. Xie" initials="C." surname="Xie"/>
        <author fullname="C. Ma" initials="C." surname="Ma"/>
        <author fullname="X. Li" initials="X." surname="Li"/>
        <author fullname="G. S. Mishra" initials="G. S." surname="Mishra"/>
        <author fullname="T. Graf" initials="T." surname="Graf"/>
        <date month="November" year="2026"/>
      </front>
      <seriesInfo name="Internet-Draft" value="draft-ietf-v6ops-framework-md-ipv6only-underlay-33"/>
    </reference>

    <reference anchor="I-D.ietf-sidrops-publication-server-bcp"
               target="https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-publication-server-bcp-12">
      <front>
        <title>Best Practices for Operating Resource Public Key Infrastructure (RPKI) Publication Services</title>
        <author fullname="T. Bruijnzeels" initials="T." surname="Bruijnzeels"/>
        <author fullname="T. de Kock" initials="T." surname="de Kock"/>
        <author fullname="F. Hill" initials="F." surname="Hill"/>
        <author fullname="T. Harrison" initials="T." surname="Harrison"/>
        <author fullname="J. Snijders" initials="J." surname="Snijders"/>
        <date month="November" year="2026"/>
      </front>
      <seriesInfo name="Internet-Draft" value="draft-ietf-sidrops-publication-server-bcp-12"/>
    </reference>

    <reference anchor="RFC6480" target="https://www.rfc-editor.org/info/rfc6480">
      <front>
        <title>An Infrastructure to Support Secure Internet Routing</title>
        <author fullname="M. Lepinski" initials="M." surname="Lepinski"/>
        <author fullname="S. Kent" initials="S." surname="Kent"/>
        <date month="February" year="2012"/>
      </front>
      <seriesInfo name="RFC" value="6480"/>
      <seriesInfo name="DOI" value="10.17487/RFC6480"/>
    </reference>
  </references>
  </references>

    <!-- ================================================================ -->
    <section anchor="sec-asn1" numbered="true">
      <name>ASN.1 Module</name>

      <t>
        This normative appendix provides an ASN.1 module that specifies the
        MOA content in ASN.1 syntax.
      </t>

      <artwork type="asn.1"><![CDATA[
RPKIMappingOriginAuthz-2024
    { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
      pkcs9(9) smime(16) mod(0) TBD2 }

DEFINITIONS EXPLICIT TAGS ::= BEGIN

IMPORTS
    CONTENT-TYPE
    FROM CryptographicMessageSyntax-2009
        { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
          pkcs9(9) smime(16) modules(0) id-mod-cms-2004-02(41) };

ct-MappingOriginAuthz CONTENT-TYPE ::=
    { TYPE MappingOriginAttestation
      IDENTIFIED BY id-ct-MappingOriginAuthz }

id-ct-MappingOriginAuthz OBJECT IDENTIFIER ::=
    { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
      pkcs9(9) smime(16) ct(1) TBD1 }

MappingOriginAttestation ::= SEQUENCE {
    version  [0] INTEGER DEFAULT 0,
    mapping  MOAIPMapping }

MOAIPMapping ::= SEQUENCE {
    v6MappingPrefix  MOAIPv6AddressFamily,
    v4Prefixes       MOAIPv4AddressFamily }

MOAIPv6AddressFamily ::= SEQUENCE {
    addressFamily  OCTET STRING (SIZE (2)),
    addresses      SEQUENCE (SIZE (1)) OF IPv6MappingPrefix }

MOAIPv4AddressFamily ::= SEQUENCE {
    addressFamily  OCTET STRING (SIZE (3)),
    addresses      SEQUENCE (SIZE (1..MAX)) OF IPv4Prefix }

IPv6MappingPrefix ::= BIT STRING (SIZE (0..ub-IPv6))
IPv4Prefix        ::= BIT STRING (SIZE (0..ub-IPv4))

ub-IPv6 INTEGER ::= 96
ub-IPv4 INTEGER ::= 32

END
]]></artwork>
    </section>

    <!-- ================================================================ -->
    <section anchor="sec-examples" numbered="true">
      <name>Examples</name>

      <section anchor="sec-example-econtent" numbered="true">
        <name>MOA eContent</name>

        <t>
          In this example, the address holder authorizes the IPv6 mapping
          prefix 2001:db8:100::/48 to originate mappings for the IPv4
          prefixes 192.0.2.0/24 and 198.51.100.0/24.  The value 04 is used
          as a placeholder for the one-octet SAFI value that IANA registers
          for 4map6.
        </t>

        <t>
          The DER encoding of the eContent is 42 octets:
        </t>

        <artwork type="hex"><![CDATA[
30 28 30 26 30 0f 04 02 00 02 30 09 03 07 00 20 01 0d
b8 01 00 30 13 04 03 00 01 04 30 0c 03 04 00 c0 00 02
03 04 00 c6 33 64
]]></artwork>

        <t>
          The Base64 encoding of the same eContent is:
        </t>

        <artwork type="base64"><![CDATA[
MCgwJjAPBAIAAjAJAwcAIAENuAEAMBMEAwABBDAMAwQAwAACAwQAxjNk
]]></artwork>

        <t>
          Decoding the structure gives:
        </t>

        <artwork type="hex"><![CDATA[
SEQUENCE (40 octets)
  SEQUENCE (38 octets)                 -- MOAIPMapping
    SEQUENCE (15 octets)               -- v6MappingPrefix
      OCTET STRING: 00 02              -- AFI 2, no SAFI
      SEQUENCE (9 octets)
        BIT STRING: unused=0 value=20 01 0d b8 01 00
                                       -- 2001:db8:100::/48
    SEQUENCE (19 octets)               -- v4Prefixes
      OCTET STRING: 00 01 04           -- AFI 1, SAFI 4map6
      SEQUENCE (12 octets)
        BIT STRING: unused=0 value=c0 00 02
                                       -- 192.0.2.0/24
        BIT STRING: unused=0 value=c6 33 64
                                       -- 198.51.100.0/24
]]></artwork>

        <t>
          The version element does not appear in the encoding, because its
          value is the default value 0.
        </t>

        <t>
          The IP address delegation extension of the EE certificate that
          validates this MOA carries the two IPv4 prefixes without a SAFI.
          Its DER encoding is 39 octets:
        </t>

        <artwork type="hex"><![CDATA[
30 25 06 08 2b 06 01 05 05 07 01 07 01 01 ff 04 16 30 14
30 12 04 02 00 01 30 0c 03 04 00 c0 00 02 03 04 00 c6 33
64
]]></artwork>

        <t>
          Here 2b 06 01 05 05 07 01 07 is the OID 1.3.6.1.5.5.7.1.7
          (id-pe-ipAddrBlocks), 01 01 ff marks the extension critical, and
          the extnValue contains an IPAddrBlocks structure with a single
          IPAddressFamily whose addressFamily is 00 01 and whose
          addressesOrRanges holds the two prefixes shown above.  The
          containment check of <xref target="sec-moa-validation"/>
          therefore succeeds.
        </t>
      </section>

      <section anchor="sec-example-negative" numbered="true">
        <name>Invalid Examples</name>

        <t>
          The following cases MUST be treated as described below.
        </t>

        <ul>
          <li>
            The addresses element in v4Prefixes lists 198.51.100.0/24
            before 192.0.2.0/24: the eContent violates the ordering rule of
            Section 2.2.3.6 of <xref target="RFC3779"/>, so the MOA is
            malformed.
          </li>
          <li>
            The addresses element lists 192.0.2.0/24 twice: the eContent
            violates the minimality rule of <xref target="sec-moamapping"/>,
            so the MOA is malformed.
          </li>
          <li>
            The addresses element lists both 192.0.0.0/16 and
            192.0.2.0/24: the more specific entry is contained in the less
            specific one, so the MOA is malformed.
          </li>
          <li>
            The EE certificate contains an IPv6 resource in addition to the
            IPv4 resources: the MOA is invalid per <xref
            target="sec-moa-validation"/>, regardless of the eContent.
          </li>
          <li>
            The eContent lists 203.0.113.0/24, which is not contained in
            the IPv4 resource set of the EE certificate: the MOA is
            invalid.
          </li>
        </ul>
      </section>
    </section>
  </back>
</rfc>
