<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
  <!ENTITY RFC2119 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
  <!ENTITY RFC4033 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4033.xml">
  <!ENTITY RFC4648 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4648.xml">
  <!ENTITY RFC6234 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6234.xml">
  <!ENTITY RFC6376 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6376.xml">
  <!ENTITY RFC7208 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7208.xml">
  <!ENTITY RFC7489 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7489.xml">
  <!ENTITY RFC7671 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7671.xml">
  <!ENTITY RFC8032 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8032.xml">
  <!ENTITY RFC8174 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
  <!ENTITY RFC8617 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8617.xml">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     ipr="trust200902"
     docName="draft-kadjo-zi2cert-00"
     category="info"
     submissionType="independent">

  <front>
    <title abbrev="ZI2 Certified">ZI2 Certified Email Server Attestation Protocol</title>

    <author fullname="Joseph-Israel Kadjo" initials="J-I." surname="Kadjo">
      <organization>Zenith Intelligence Technologies Inc.</organization>
      <address>
        <postal>
          <city>Hagerstown</city>
          <region>MD</region>
          <code>21740</code>
          <country>US</country>
        </postal>
        <email>dev@zi2.app</email>
        <uri>https://zi2.app</uri>
      </address>
    </author>

    <date year="2026" month="April" day="22"/>

    <area>Applications and Real-Time</area>
    <keyword>email</keyword>
    <keyword>authentication</keyword>
    <keyword>server attestation</keyword>
    <keyword>Ed25519</keyword>
    <keyword>spoofing</keyword>

    <abstract>
      <t>This document specifies the ZI2 Certified Email Server Attestation
      Protocol, a mechanism for cryptographic attestation of email origin at
      the mail server level. Unlike existing email authentication protocols
      (SPF, DKIM, DMARC), which operate at the domain level, ZI2 Certified
      operates at the server-instance level, enabling definitive identification
      of the specific server that dispatched a given email message. The protocol
      introduces two custom mail headers (X-ZI2-Certified and X-ZI2-Verified),
      a DNS TXT record publication format, a graduated trust model with four
      levels, and an integration interface for AI-based email classification
      systems. The protocol operates complementarily to existing email
      authentication infrastructure and does not require modification of SPF,
      DKIM, or DMARC.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="introduction" numbered="true" toc="default">
      <name>Introduction</name>

      <section anchor="problem" numbered="true" toc="default">
        <name>Problem Statement</name>
        <t>The current email authentication ecosystem relies on three principal
        protocols: SPF <xref target="RFC7208"/>, DKIM <xref target="RFC6376"/>,
        and DMARC <xref target="RFC7489"/>. Each of these protocols operates at
        the domain level, answering questions about whether a domain authorized
        the sending of a message. None of these protocols, individually or in
        combination, answer a more fundamental question: "Did this specific
        server actually send this email?"</t>

        <t>This distinction is critical in multi-tenant mail server environments,
        where a single server hosts multiple domains under a shared IP address
        and MTA process. In such environments, domain-level authentication
        cannot distinguish between legitimate email from one co-hosted domain
        and spoofed email purporting to originate from another co-hosted domain.
        An attacker who compromises one domain's DNS records or DKIM keys can
        forge emails that pass SPF, DKIM, and DMARC validation for any domain
        on the shared server.</t>
      </section>

      <section anchor="scope" numbered="true" toc="default">
        <name>Scope</name>
        <t>This document specifies a server-level cryptographic attestation
        protocol that:</t>
        <ol>
          <li>Generates a unique Ed25519 <xref target="RFC8032"/> key pair per
          server instance.</li>
          <li>Signs outbound email with a server-specific attestation header.</li>
          <li>Publishes the server's public key via DNS TXT records, HTTPS
          well-known endpoints, and direct server-to-server exchange.</li>
          <li>Verifies inbound email bearing the attestation header against the
          published public key.</li>
          <li>Assigns graduated trust levels reflecting the strength of the
          verification method.</li>
          <li>Integrates with AI-based email classification systems as a primary
          trust signal.</li>
        </ol>
      </section>

      <section anchor="relationship" numbered="true" toc="default">
        <name>Relationship to Existing Protocols</name>
        <t>ZI2 Certified does not modify, replace, or interfere with SPF, DKIM,
        DMARC, ARC <xref target="RFC8617"/>, BIMI, MTA-STS, or DANE
        <xref target="RFC7671"/>. It operates as a complementary attestation
        layer that addresses the server-level authentication gap left by
        existing domain-level protocols. Existing protocols SHOULD continue to
        be deployed alongside ZI2 Certified.</t>
      </section>
    </section>

    <section anchor="terminology" numbered="true" toc="default">
      <name>Terminology</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
      <xref target="RFC2119"/> and <xref target="RFC8174"/>.</t>

      <dl>
        <dt>Certification</dt>
        <dd>The process by which a sending mail server generates a cryptographic
        attestation of email origin and injects the attestation into the email
        as a structured header.</dd>

        <dt>Verification</dt>
        <dd>The process by which a receiving mail server validates a certification
        header by retrieving the sender server's public key and verifying the
        cryptographic signature.</dd>

        <dt>Certifying Server</dt>
        <dd>A mail server that generates and injects ZI2 Certified headers on
        outbound email originating from its locally-hosted domains.</dd>

        <dt>Verifying Server</dt>
        <dd>A mail server that validates ZI2 Certified headers on inbound email.</dd>

        <dt>Trust Level</dt>
        <dd>A graduated integer value (0 through 3) representing the confidence
        in the verification result based on the method of public key retrieval.</dd>

        <dt>Key Identifier (kid)</dt>
        <dd>A unique string identifying a specific public/private key pair,
        formatted as "zi2-cert-YYYY-MM".</dd>

        <dt>Server Identifier (sid)</dt>
        <dd>The fully-qualified domain name (FQDN) of the certifying server.</dd>

        <dt>Intra-Server Email</dt>
        <dd>Email transmitted between two domains hosted on the same physical or
        virtual server instance.</dd>
      </dl>
    </section>

    <section anchor="protocol" numbered="true" toc="default">
      <name>Protocol Specification</name>

      <section anchor="crypto" numbered="true" toc="default">
        <name>Cryptographic Primitives</name>
        <t>The protocol uses Ed25519 <xref target="RFC8032"/> for signing
        (approximately 128 bits of security, deterministic signatures, 32-byte
        public keys, 64-byte signatures), SHA-256 <xref target="RFC6234"/>
        for body hash computation, and Base64 <xref target="RFC4648"/> for
        encoding.</t>
      </section>

      <section anchor="keygen" numbered="true" toc="default">
        <name>Key Generation</name>
        <t>Upon initial deployment, the certifying server MUST generate an
        Ed25519 key pair. The private key MUST be stored with restricted
        filesystem permissions and MUST NOT be transmitted outside the server
        boundary. The key identifier MUST follow the format "zi2-cert-YYYY-MM".</t>
      </section>

      <section anchor="outbound" numbered="true" toc="default">
        <name>Outbound Certification</name>
        <t>The certifying server MUST construct a canonical certification payload
        containing: protocol version, lowercase sender address, lowercase
        recipient address, Unix timestamp, Message-ID, server hostname, Base64
        SHA-256 hash of the complete message body, and Base64 128-bit random
        nonce. The payload MUST be signed with Ed25519 and injected as the
        X-ZI2-Certified header.</t>
      </section>

      <section anchor="inbound" numbered="true" toc="default">
        <name>Inbound Verification</name>
        <t>The verifying server MUST check for the X-ZI2-Certified header,
        retrieve the public key (from local store, trust store cache, direct
        exchange, DNS TXT, or HTTPS endpoint), reconstruct the canonical
        payload, and verify the Ed25519 signature. Additional checks include
        timestamp freshness (24-hour window), body hash integrity (SHA-256 of
        complete body), and optional nonce uniqueness.</t>
      </section>
    </section>

    <section anchor="headers" numbered="true" toc="default">
      <name>Header Format</name>
      <t>The X-ZI2-Certified header uses tag=value format: v (version),
      t (timestamp), sid (server ID), bh (body hash), n (nonce), sig
      (Ed25519 signature), kid (key identifier). All tags are REQUIRED.</t>
      <t>The X-ZI2-Verified header uses: result (pass/fail/missing/expired/tampered),
      level (0-3), reason (machine-readable code), sid, ts (verification timestamp).</t>
    </section>

    <section anchor="dns" numbered="true" toc="default">
      <name>DNS Publication</name>
      <t>A certifying server MUST publish a DNS TXT record at _zi2cert.&lt;domain&gt;
      for each hosted domain. Format: "v=ZI2CERT1; k=ed25519; p=&lt;base64_key&gt;;
      kid=&lt;key_id&gt;". All domains on the same server share the same public key
      because attestation is server-level. During key rotation, two records MAY
      coexist.</t>
    </section>

    <section anchor="trust" numbered="true" toc="default">
      <name>Trust Levels</name>
      <t>Level 3 (ABSOLUTE): Intra-server verification using local key store.
      Level 2 (VERIFIED): Key obtained via direct server-to-server exchange.
      Level 1 (DNS): Key obtained via DNS TXT record.
      Level 0 (UNKNOWN): No certification present or verification failed.</t>
      <t>Level 3 is unique to this protocol. When both sender and recipient
      domains are co-hosted, verification uses the same key pair that generated
      the certification, providing mathematical certainty with no external
      dependencies.</t>
    </section>

    <section anchor="security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>Key compromise impact is bounded by the 24-hour freshness window and
      key rotation interval. DNS poisoning affects Trust Level 1 only; DNSSEC
      <xref target="RFC4033"/> SHOULD be deployed. Header injection is mitigated
      by Ed25519 signature verification. Replay attacks are mitigated by nonce,
      timestamp, and Message-ID binding. Body modification by intermediaries
      causes body hash mismatch. Ed25519 is vulnerable to quantum computing;
      post-quantum algorithms may be adopted via the version and algorithm tags.</t>
    </section>

    <section anchor="iana" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document requests registration of header fields X-ZI2-Certified
      and X-ZI2-Verified, DNS underscore label _zi2cert, and well-known URI
      zi2-cert.json.</t>
    </section>
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        &RFC2119;
        &RFC4648;
        &RFC6234;
        &RFC8032;
        &RFC8174;
      </references>
      <references>
        <name>Informative References</name>
        &RFC4033;
        &RFC6376;
        &RFC7208;
        &RFC7489;
        &RFC7671;
        &RFC8617;
      </references>
    </references>
  </back>
</rfc>
