<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" ipr="trust200902" docName="draft-irtf-cfrg-aegis-aead-18" category="info" consensus="true" submissionType="IRTF" xml:lang="en" number="10032" tocInclude="true" sortRefs="true" symRefs="true" prepTime="2026-09-19T03:49:41" indexInclude="true" scripts="Common,Inherited,Latin" tocDepth="3">
  <link href="https://dx.doi.org/10.17487/rfc10032" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <link href="https://datatracker.ietf.org/doc/draft-irtf-cfrg-aegis-aead-18" rel="prev"/>
  <front>
    <title abbrev="AEGIS Authenticated Encryption Algorithms">The AEGIS Authenticated Encryption Algorithms</title>
    <seriesInfo name="RFC" value="10032" stream="IRTF"/>
    <author initials="F." surname="Denis" fullname="Frank Denis">
      <organization showOnFrontPage="true">Fastly Inc.</organization>
      <address>
        <email>fde@00f.net</email>
      </address>
    </author>
    <author initials="S." surname="Lucas" fullname="Samuel Lucas">
      <organization showOnFrontPage="true">Individual Contributor</organization>
      <address>
        <email>specifications@samuellucas.com</email>
      </address>
    </author>
    <date month="09" year="2026"/>
    <workgroup>Crypto Forum</workgroup>
    <keyword>AEAD</keyword>
    <keyword>AES</keyword>
    <keyword>stream cipher</keyword>
    <keyword>Message Authentication Code (MAC)</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">This document describes the AEGIS-128L, AEGIS-256, AEGIS-128X, and AEGIS-256X AES-based authenticated encryption with associated data (AEAD) algorithms designed for high-performance applications. It also specifies their use as stream ciphers and message authentication codes (MACs).</t>
      <t indent="0" pn="section-abstract-2">The document is a product of the Crypto Forum Research Group (CFRG).</t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This document is not an Internet Standards Track specification; it is
            published for informational purposes.  
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document is a product of the Internet Research Task Force
            (IRTF).  The IRTF publishes the results of Internet-related
            research and development activities.  These results might not be
            suitable for deployment.  This RFC represents the consensus of the Crypto Forum
            Research Group of the Internet Research Task Force (IRTF).
            Documents approved for publication by the IRSG are not
            candidates for any level of Internet Standard; see Section 2 of RFC
            7841.   
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc10032" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2026 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" keepWithNext="true" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-conventions-and-definitions">Conventions and Definitions</xref></t>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-aegis-128l-algorithm">The AEGIS-128L Algorithm</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2">
              <li pn="section-toc.1-1.3.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.3.2.1.1"><xref derivedContent="3.1" format="counter" sectionFormat="of" target="section-3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-authenticated-encryption">Authenticated Encryption</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.2">
                <t indent="0" pn="section-toc.1-1.3.2.2.1"><xref derivedContent="3.2" format="counter" sectionFormat="of" target="section-3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-authenticated-decryption">Authenticated Decryption</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.3">
                <t indent="0" pn="section-toc.1-1.3.2.3.1"><xref derivedContent="3.3" format="counter" sectionFormat="of" target="section-3.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-update-function">The Update Function</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.4">
                <t indent="0" pn="section-toc.1-1.3.2.4.1"><xref derivedContent="3.4" format="counter" sectionFormat="of" target="section-3.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-init-function">The Init Function</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.5">
                <t indent="0" pn="section-toc.1-1.3.2.5.1"><xref derivedContent="3.5" format="counter" sectionFormat="of" target="section-3.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-absorb-function">The Absorb Function</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.6">
                <t indent="0" pn="section-toc.1-1.3.2.6.1"><xref derivedContent="3.6" format="counter" sectionFormat="of" target="section-3.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-enc-function">The Enc Function</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.7">
                <t indent="0" pn="section-toc.1-1.3.2.7.1"><xref derivedContent="3.7" format="counter" sectionFormat="of" target="section-3.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-dec-function">The Dec Function</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.8">
                <t indent="0" pn="section-toc.1-1.3.2.8.1"><xref derivedContent="3.8" format="counter" sectionFormat="of" target="section-3.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-decpartial-function">The DecPartial Function</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.9">
                <t indent="0" pn="section-toc.1-1.3.2.9.1"><xref derivedContent="3.9" format="counter" sectionFormat="of" target="section-3.9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-finalize-function">The Finalize Function</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-aegis-256-algorithm">The AEGIS-256 Algorithm</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2">
              <li pn="section-toc.1-1.4.2.1">
                <t indent="0" pn="section-toc.1-1.4.2.1.1"><xref derivedContent="4.1" format="counter" sectionFormat="of" target="section-4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-authenticated-encryption-2">Authenticated Encryption</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.2">
                <t indent="0" pn="section-toc.1-1.4.2.2.1"><xref derivedContent="4.2" format="counter" sectionFormat="of" target="section-4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-authenticated-decryption-2">Authenticated Decryption</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.3">
                <t indent="0" pn="section-toc.1-1.4.2.3.1"><xref derivedContent="4.3" format="counter" sectionFormat="of" target="section-4.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-update-function-2">The Update Function</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.4">
                <t indent="0" pn="section-toc.1-1.4.2.4.1"><xref derivedContent="4.4" format="counter" sectionFormat="of" target="section-4.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-init-function-2">The Init Function</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.5">
                <t indent="0" pn="section-toc.1-1.4.2.5.1"><xref derivedContent="4.5" format="counter" sectionFormat="of" target="section-4.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-absorb-function-2">The Absorb Function</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.6">
                <t indent="0" pn="section-toc.1-1.4.2.6.1"><xref derivedContent="4.6" format="counter" sectionFormat="of" target="section-4.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-enc-function-2">The Enc Function</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.7">
                <t indent="0" pn="section-toc.1-1.4.2.7.1"><xref derivedContent="4.7" format="counter" sectionFormat="of" target="section-4.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-dec-function-2">The Dec Function</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.8">
                <t indent="0" pn="section-toc.1-1.4.2.8.1"><xref derivedContent="4.8" format="counter" sectionFormat="of" target="section-4.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-decpartial-function-2">The DecPartial Function</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.9">
                <t indent="0" pn="section-toc.1-1.4.2.9.1"><xref derivedContent="4.9" format="counter" sectionFormat="of" target="section-4.9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-finalize-function-2">The Finalize Function</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-parallel-modes">Parallel Modes</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2">
              <li pn="section-toc.1-1.5.2.1">
                <t indent="0" pn="section-toc.1-1.5.2.1.1"><xref derivedContent="5.1" format="counter" sectionFormat="of" target="section-5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-additional-conventions-and-">Additional Conventions and Definitions</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.2">
                <t indent="0" pn="section-toc.1-1.5.2.2.1"><xref derivedContent="5.2" format="counter" sectionFormat="of" target="section-5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-authenticated-encryption-3">Authenticated Encryption</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.3">
                <t indent="0" pn="section-toc.1-1.5.2.3.1"><xref derivedContent="5.3" format="counter" sectionFormat="of" target="section-5.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-authenticated-decryption-3">Authenticated Decryption</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.4">
                <t indent="0" pn="section-toc.1-1.5.2.4.1"><xref derivedContent="5.4" format="counter" sectionFormat="of" target="section-5.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegis-128x">AEGIS-128X</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2.4.2">
                  <li pn="section-toc.1-1.5.2.4.2.1">
                    <t indent="0" pn="section-toc.1-1.5.2.4.2.1.1"><xref derivedContent="5.4.1" format="counter" sectionFormat="of" target="section-5.4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-update-function-3">The Update Function</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.4.2.2">
                    <t indent="0" pn="section-toc.1-1.5.2.4.2.2.1"><xref derivedContent="5.4.2" format="counter" sectionFormat="of" target="section-5.4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-init-function-3">The Init Function</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.4.2.3">
                    <t indent="0" pn="section-toc.1-1.5.2.4.2.3.1"><xref derivedContent="5.4.3" format="counter" sectionFormat="of" target="section-5.4.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-absorb-function-3">The Absorb Function</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.4.2.4">
                    <t indent="0" pn="section-toc.1-1.5.2.4.2.4.1"><xref derivedContent="5.4.4" format="counter" sectionFormat="of" target="section-5.4.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-enc-function-3">The Enc Function</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.4.2.5">
                    <t indent="0" pn="section-toc.1-1.5.2.4.2.5.1"><xref derivedContent="5.4.5" format="counter" sectionFormat="of" target="section-5.4.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-dec-function-3">The Dec Function</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.4.2.6">
                    <t indent="0" pn="section-toc.1-1.5.2.4.2.6.1"><xref derivedContent="5.4.6" format="counter" sectionFormat="of" target="section-5.4.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-decpartial-function-3">The DecPartial Function</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.4.2.7">
                    <t indent="0" pn="section-toc.1-1.5.2.4.2.7.1"><xref derivedContent="5.4.7" format="counter" sectionFormat="of" target="section-5.4.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-finalize-function-3">The Finalize Function</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.5.2.5">
                <t indent="0" pn="section-toc.1-1.5.2.5.1"><xref derivedContent="5.5" format="counter" sectionFormat="of" target="section-5.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegis-256x">AEGIS-256X</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2.5.2">
                  <li pn="section-toc.1-1.5.2.5.2.1">
                    <t indent="0" pn="section-toc.1-1.5.2.5.2.1.1"><xref derivedContent="5.5.1" format="counter" sectionFormat="of" target="section-5.5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-update-function-4">The Update Function</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.5.2.2">
                    <t indent="0" pn="section-toc.1-1.5.2.5.2.2.1"><xref derivedContent="5.5.2" format="counter" sectionFormat="of" target="section-5.5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-init-function-4">The Init Function</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.5.2.3">
                    <t indent="0" pn="section-toc.1-1.5.2.5.2.3.1"><xref derivedContent="5.5.3" format="counter" sectionFormat="of" target="section-5.5.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-absorb-function-4">The Absorb Function</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.5.2.4">
                    <t indent="0" pn="section-toc.1-1.5.2.5.2.4.1"><xref derivedContent="5.5.4" format="counter" sectionFormat="of" target="section-5.5.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-enc-function-4">The Enc Function</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.5.2.5">
                    <t indent="0" pn="section-toc.1-1.5.2.5.2.5.1"><xref derivedContent="5.5.5" format="counter" sectionFormat="of" target="section-5.5.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-dec-function-4">The Dec Function</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.5.2.6">
                    <t indent="0" pn="section-toc.1-1.5.2.5.2.6.1"><xref derivedContent="5.5.6" format="counter" sectionFormat="of" target="section-5.5.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-decpartial-function-4">The DecPartial Function</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.5.2.7">
                    <t indent="0" pn="section-toc.1-1.5.2.5.2.7.1"><xref derivedContent="5.5.7" format="counter" sectionFormat="of" target="section-5.5.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-finalize-function-4">The Finalize Function</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.5.2.6">
                <t indent="0" pn="section-toc.1-1.5.2.6.1"><xref derivedContent="5.6" format="counter" sectionFormat="of" target="section-5.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-implementation-consideratio">Implementation Considerations</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.7">
                <t indent="0" pn="section-toc.1-1.5.2.7.1"><xref derivedContent="5.7" format="counter" sectionFormat="of" target="section-5.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-operational-considerations">Operational Considerations</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-encoding-ct-tag-tuples">Encoding (ct, tag) Tuples</xref></t>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegis-as-a-stream-cipher">AEGIS as a Stream Cipher</xref></t>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegis-as-a-message-authenti">AEGIS as a Message Authentication Code</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2">
              <li pn="section-toc.1-1.8.2.1">
                <t indent="0" pn="section-toc.1-1.8.2.1.1"><xref derivedContent="8.1" format="counter" sectionFormat="of" target="section-8.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegismac-128l">AEGISMAC-128L</xref></t>
              </li>
              <li pn="section-toc.1-1.8.2.2">
                <t indent="0" pn="section-toc.1-1.8.2.2.1"><xref derivedContent="8.2" format="counter" sectionFormat="of" target="section-8.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegismac-256">AEGISMAC-256</xref></t>
              </li>
              <li pn="section-toc.1-1.8.2.3">
                <t indent="0" pn="section-toc.1-1.8.2.3.1"><xref derivedContent="8.3" format="counter" sectionFormat="of" target="section-8.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegismac-128x">AEGISMAC-128X</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2.3.2">
                  <li pn="section-toc.1-1.8.2.3.2.1">
                    <t indent="0" pn="section-toc.1-1.8.2.3.2.1.1"><xref derivedContent="8.3.1" format="counter" sectionFormat="of" target="section-8.3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-mac-function">The Mac Function</xref></t>
                  </li>
                  <li pn="section-toc.1-1.8.2.3.2.2">
                    <t indent="0" pn="section-toc.1-1.8.2.3.2.2.1"><xref derivedContent="8.3.2" format="counter" sectionFormat="of" target="section-8.3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-finalizemac-function">The FinalizeMac Function</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.8.2.4">
                <t indent="0" pn="section-toc.1-1.8.2.4.1"><xref derivedContent="8.4" format="counter" sectionFormat="of" target="section-8.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegismac-256x">AEGISMAC-256X</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2.4.2">
                  <li pn="section-toc.1-1.8.2.4.2.1">
                    <t indent="0" pn="section-toc.1-1.8.2.4.2.1.1"><xref derivedContent="8.4.1" format="counter" sectionFormat="of" target="section-8.4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-mac-function-2">The Mac Function</xref></t>
                  </li>
                  <li pn="section-toc.1-1.8.2.4.2.2">
                    <t indent="0" pn="section-toc.1-1.8.2.4.2.2.1"><xref derivedContent="8.4.2" format="counter" sectionFormat="of" target="section-8.4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-finalizemac-function-2">The FinalizeMac Function</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="9" format="counter" sectionFormat="of" target="section-9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2">
              <li pn="section-toc.1-1.9.2.1">
                <t indent="0" pn="section-toc.1-1.9.2.1.1"><xref derivedContent="9.1" format="counter" sectionFormat="of" target="section-9.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-usage-guidelines">Usage Guidelines</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2.1.2">
                  <li pn="section-toc.1-1.9.2.1.2.1">
                    <t indent="0" pn="section-toc.1-1.9.2.1.2.1.1"><xref derivedContent="9.1.1" format="counter" sectionFormat="of" target="section-9.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-key-and-nonce-selection">Key and Nonce Selection</xref></t>
                  </li>
                  <li pn="section-toc.1-1.9.2.1.2.2">
                    <t indent="0" pn="section-toc.1-1.9.2.1.2.2.1"><xref derivedContent="9.1.2" format="counter" sectionFormat="of" target="section-9.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-committing-security">Committing Security</xref></t>
                  </li>
                  <li pn="section-toc.1-1.9.2.1.2.3">
                    <t indent="0" pn="section-toc.1-1.9.2.1.2.3.1"><xref derivedContent="9.1.3" format="counter" sectionFormat="of" target="section-9.1.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-multi-user-security">Multi-User Security</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.9.2.2">
                <t indent="0" pn="section-toc.1-1.9.2.2.1"><xref derivedContent="9.2" format="counter" sectionFormat="of" target="section-9.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-implementation-security">Implementation Security</xref></t>
              </li>
              <li pn="section-toc.1-1.9.2.3">
                <t indent="0" pn="section-toc.1-1.9.2.3.1"><xref derivedContent="9.3" format="counter" sectionFormat="of" target="section-9.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-guarantees">Security Guarantees</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.10">
            <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="10" format="counter" sectionFormat="of" target="section-10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.11">
            <t indent="0" pn="section-toc.1-1.11.1"><xref derivedContent="11" format="counter" sectionFormat="of" target="section-11"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.11.2">
              <li pn="section-toc.1-1.11.2.1">
                <t indent="0" pn="section-toc.1-1.11.2.1.1"><xref derivedContent="11.1" format="counter" sectionFormat="of" target="section-11.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.2">
                <t indent="0" pn="section-toc.1-1.11.2.2.1"><xref derivedContent="11.2" format="counter" sectionFormat="of" target="section-11.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.12">
            <t indent="0" pn="section-toc.1-1.12.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vectors">Test Vectors</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.12.2">
              <li pn="section-toc.1-1.12.2.1">
                <t indent="0" pn="section-toc.1-1.12.2.1.1"><xref derivedContent="A.1" format="counter" sectionFormat="of" target="section-appendix.a.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aesround-test-vector">AESRound Test Vector</xref></t>
              </li>
              <li pn="section-toc.1-1.12.2.2">
                <t indent="0" pn="section-toc.1-1.12.2.2.1"><xref derivedContent="A.2" format="counter" sectionFormat="of" target="section-appendix.a.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegis-128l-test-vectors">AEGIS-128L Test Vectors</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.12.2.2.2">
                  <li pn="section-toc.1-1.12.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.12.2.2.2.1.1"><xref derivedContent="A.2.1" format="counter" sectionFormat="of" target="section-appendix.a.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-update-test-vector">Update Test Vector</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.2.2.2">
                    <t indent="0" pn="section-toc.1-1.12.2.2.2.2.1"><xref derivedContent="A.2.2" format="counter" sectionFormat="of" target="section-appendix.a.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-1">Test Vector 1</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.2.2.3">
                    <t indent="0" pn="section-toc.1-1.12.2.2.2.3.1"><xref derivedContent="A.2.3" format="counter" sectionFormat="of" target="section-appendix.a.2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-2">Test Vector 2</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.2.2.4">
                    <t indent="0" pn="section-toc.1-1.12.2.2.2.4.1"><xref derivedContent="A.2.4" format="counter" sectionFormat="of" target="section-appendix.a.2.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-3">Test Vector 3</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.2.2.5">
                    <t indent="0" pn="section-toc.1-1.12.2.2.2.5.1"><xref derivedContent="A.2.5" format="counter" sectionFormat="of" target="section-appendix.a.2.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-4">Test Vector 4</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.2.2.6">
                    <t indent="0" pn="section-toc.1-1.12.2.2.2.6.1"><xref derivedContent="A.2.6" format="counter" sectionFormat="of" target="section-appendix.a.2.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-5">Test Vector 5</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.2.2.7">
                    <t indent="0" pn="section-toc.1-1.12.2.2.2.7.1"><xref derivedContent="A.2.7" format="counter" sectionFormat="of" target="section-appendix.a.2.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-6">Test Vector 6</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.2.2.8">
                    <t indent="0" pn="section-toc.1-1.12.2.2.2.8.1"><xref derivedContent="A.2.8" format="counter" sectionFormat="of" target="section-appendix.a.2.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-7">Test Vector 7</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.2.2.9">
                    <t indent="0" pn="section-toc.1-1.12.2.2.2.9.1"><xref derivedContent="A.2.9" format="counter" sectionFormat="of" target="section-appendix.a.2.9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-8">Test Vector 8</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.2.2.10">
                    <t indent="0" pn="section-toc.1-1.12.2.2.2.10.1"><xref derivedContent="A.2.10" format="counter" sectionFormat="of" target="section-appendix.a.2.10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-9">Test Vector 9</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.12.2.3">
                <t indent="0" pn="section-toc.1-1.12.2.3.1"><xref derivedContent="A.3" format="counter" sectionFormat="of" target="section-appendix.a.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegis-256-test-vectors">AEGIS-256 Test Vectors</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.12.2.3.2">
                  <li pn="section-toc.1-1.12.2.3.2.1">
                    <t indent="0" pn="section-toc.1-1.12.2.3.2.1.1"><xref derivedContent="A.3.1" format="counter" sectionFormat="of" target="section-appendix.a.3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-update-test-vector-2">Update Test Vector</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.3.2.2">
                    <t indent="0" pn="section-toc.1-1.12.2.3.2.2.1"><xref derivedContent="A.3.2" format="counter" sectionFormat="of" target="section-appendix.a.3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-1-2">Test Vector 1</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.3.2.3">
                    <t indent="0" pn="section-toc.1-1.12.2.3.2.3.1"><xref derivedContent="A.3.3" format="counter" sectionFormat="of" target="section-appendix.a.3.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-2-2">Test Vector 2</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.3.2.4">
                    <t indent="0" pn="section-toc.1-1.12.2.3.2.4.1"><xref derivedContent="A.3.4" format="counter" sectionFormat="of" target="section-appendix.a.3.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-3-2">Test Vector 3</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.3.2.5">
                    <t indent="0" pn="section-toc.1-1.12.2.3.2.5.1"><xref derivedContent="A.3.5" format="counter" sectionFormat="of" target="section-appendix.a.3.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-4-2">Test Vector 4</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.3.2.6">
                    <t indent="0" pn="section-toc.1-1.12.2.3.2.6.1"><xref derivedContent="A.3.6" format="counter" sectionFormat="of" target="section-appendix.a.3.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-5-2">Test Vector 5</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.3.2.7">
                    <t indent="0" pn="section-toc.1-1.12.2.3.2.7.1"><xref derivedContent="A.3.7" format="counter" sectionFormat="of" target="section-appendix.a.3.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-6-2">Test Vector 6</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.3.2.8">
                    <t indent="0" pn="section-toc.1-1.12.2.3.2.8.1"><xref derivedContent="A.3.8" format="counter" sectionFormat="of" target="section-appendix.a.3.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-7-2">Test Vector 7</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.3.2.9">
                    <t indent="0" pn="section-toc.1-1.12.2.3.2.9.1"><xref derivedContent="A.3.9" format="counter" sectionFormat="of" target="section-appendix.a.3.9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-8-2">Test Vector 8</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.3.2.10">
                    <t indent="0" pn="section-toc.1-1.12.2.3.2.10.1"><xref derivedContent="A.3.10" format="counter" sectionFormat="of" target="section-appendix.a.3.10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-9-2">Test Vector 9</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.12.2.4">
                <t indent="0" pn="section-toc.1-1.12.2.4.1"><xref derivedContent="A.4" format="counter" sectionFormat="of" target="section-appendix.a.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegis-128x2-test-vectors">AEGIS-128X2 Test Vectors</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.12.2.4.2">
                  <li pn="section-toc.1-1.12.2.4.2.1">
                    <t indent="0" pn="section-toc.1-1.12.2.4.2.1.1"><xref derivedContent="A.4.1" format="counter" sectionFormat="of" target="section-appendix.a.4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-state">Initial State</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.4.2.2">
                    <t indent="0" pn="section-toc.1-1.12.2.4.2.2.1"><xref derivedContent="A.4.2" format="counter" sectionFormat="of" target="section-appendix.a.4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-1-3">Test Vector 1</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.4.2.3">
                    <t indent="0" pn="section-toc.1-1.12.2.4.2.3.1"><xref derivedContent="A.4.3" format="counter" sectionFormat="of" target="section-appendix.a.4.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-2-3">Test Vector 2</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.12.2.5">
                <t indent="0" pn="section-toc.1-1.12.2.5.1"><xref derivedContent="A.5" format="counter" sectionFormat="of" target="section-appendix.a.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegis-128x4-test-vectors">AEGIS-128X4 Test Vectors</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.12.2.5.2">
                  <li pn="section-toc.1-1.12.2.5.2.1">
                    <t indent="0" pn="section-toc.1-1.12.2.5.2.1.1"><xref derivedContent="A.5.1" format="counter" sectionFormat="of" target="section-appendix.a.5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-state-2">Initial State</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.5.2.2">
                    <t indent="0" pn="section-toc.1-1.12.2.5.2.2.1"><xref derivedContent="A.5.2" format="counter" sectionFormat="of" target="section-appendix.a.5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-1-4">Test Vector 1</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.5.2.3">
                    <t indent="0" pn="section-toc.1-1.12.2.5.2.3.1"><xref derivedContent="A.5.3" format="counter" sectionFormat="of" target="section-appendix.a.5.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-2-4">Test Vector 2</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.12.2.6">
                <t indent="0" pn="section-toc.1-1.12.2.6.1"><xref derivedContent="A.6" format="counter" sectionFormat="of" target="section-appendix.a.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegis-256x2-test-vectors">AEGIS-256X2 Test Vectors</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.12.2.6.2">
                  <li pn="section-toc.1-1.12.2.6.2.1">
                    <t indent="0" pn="section-toc.1-1.12.2.6.2.1.1"><xref derivedContent="A.6.1" format="counter" sectionFormat="of" target="section-appendix.a.6.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-state-3">Initial State</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.6.2.2">
                    <t indent="0" pn="section-toc.1-1.12.2.6.2.2.1"><xref derivedContent="A.6.2" format="counter" sectionFormat="of" target="section-appendix.a.6.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-1-5">Test Vector 1</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.6.2.3">
                    <t indent="0" pn="section-toc.1-1.12.2.6.2.3.1"><xref derivedContent="A.6.3" format="counter" sectionFormat="of" target="section-appendix.a.6.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-2-5">Test Vector 2</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.12.2.7">
                <t indent="0" pn="section-toc.1-1.12.2.7.1"><xref derivedContent="A.7" format="counter" sectionFormat="of" target="section-appendix.a.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegis-256x4-test-vectors">AEGIS-256X4 Test Vectors</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.12.2.7.2">
                  <li pn="section-toc.1-1.12.2.7.2.1">
                    <t indent="0" pn="section-toc.1-1.12.2.7.2.1.1"><xref derivedContent="A.7.1" format="counter" sectionFormat="of" target="section-appendix.a.7.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-state-4">Initial State</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.7.2.2">
                    <t indent="0" pn="section-toc.1-1.12.2.7.2.2.1"><xref derivedContent="A.7.2" format="counter" sectionFormat="of" target="section-appendix.a.7.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-1-6">Test Vector 1</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.7.2.3">
                    <t indent="0" pn="section-toc.1-1.12.2.7.2.3.1"><xref derivedContent="A.7.3" format="counter" sectionFormat="of" target="section-appendix.a.7.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-test-vector-2-6">Test Vector 2</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.12.2.8">
                <t indent="0" pn="section-toc.1-1.12.2.8.1"><xref derivedContent="A.8" format="counter" sectionFormat="of" target="section-appendix.a.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegismac-test-vectors">AEGISMAC Test Vectors</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.12.2.8.2">
                  <li pn="section-toc.1-1.12.2.8.2.1">
                    <t indent="0" pn="section-toc.1-1.12.2.8.2.1.1"><xref derivedContent="A.8.1" format="counter" sectionFormat="of" target="section-appendix.a.8.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegismac-128l-test-vector">AEGISMAC-128L Test Vector</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.8.2.2">
                    <t indent="0" pn="section-toc.1-1.12.2.8.2.2.1"><xref derivedContent="A.8.2" format="counter" sectionFormat="of" target="section-appendix.a.8.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegismac-128x2-test-vector">AEGISMAC-128X2 Test Vector</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.8.2.3">
                    <t indent="0" pn="section-toc.1-1.12.2.8.2.3.1"><xref derivedContent="A.8.3" format="counter" sectionFormat="of" target="section-appendix.a.8.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegismac-128x4-test-vector">AEGISMAC-128X4 Test Vector</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.8.2.4">
                    <t indent="0" pn="section-toc.1-1.12.2.8.2.4.1"><xref derivedContent="A.8.4" format="counter" sectionFormat="of" target="section-appendix.a.8.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegismac-256-test-vector">AEGISMAC-256 Test Vector</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.8.2.5">
                    <t indent="0" pn="section-toc.1-1.12.2.8.2.5.1"><xref derivedContent="A.8.5" format="counter" sectionFormat="of" target="section-appendix.a.8.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegismac-256x2-test-vector">AEGISMAC-256X2 Test Vector</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.8.2.6">
                    <t indent="0" pn="section-toc.1-1.12.2.8.2.6.1"><xref derivedContent="A.8.6" format="counter" sectionFormat="of" target="section-appendix.a.8.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-aegismac-256x4-test-vector">AEGISMAC-256X4 Test Vector</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.13">
            <t indent="0" pn="section-toc.1-1.13.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgments">Acknowledgments</xref></t>
          </li>
          <li pn="section-toc.1-1.14">
            <t indent="0" pn="section-toc.1-1.14.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.c"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" removeInRFC="false" toc="include" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">This document describes the AEGIS family of authenticated encryption with associated data (AEAD) algorithms <xref target="AEGIS" format="default" sectionFormat="of" derivedContent="AEGIS"/>, which were chosen for high-performance applications in the CAESAR (Competition for Authenticated Encryption: Security, Applicability, and Robustness) competition.</t>
      <t indent="0" pn="section-1-2">Among the finalists, AEGIS-128 was chosen as the winner for this category. However, AEGIS-128L, another finalist, offers enhanced performance and a stronger security margin <xref target="ENP20" format="default" sectionFormat="of" derivedContent="ENP20"/> <xref target="JLD22" format="default" sectionFormat="of" derivedContent="JLD22"/> <xref target="LIMS21" format="default" sectionFormat="of" derivedContent="LIMS21"/> <xref target="STSI23" format="default" sectionFormat="of" derivedContent="STSI23"/>.
Additionally, AEGIS-256, which also reached the final round, provides 256-bit security and supports higher usage limits.</t>
      <t indent="0" pn="section-1-3">Therefore, this document specifies the following variants:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-1-4">
        <li pn="section-1-4.1">
          <t indent="0" pn="section-1-4.1.1">AEGIS-128L, which has a 128-bit key, a 128-bit nonce, a 1024-bit state, a 128- or 256-bit authentication tag, and processes 256-bit input blocks.</t>
        </li>
        <li pn="section-1-4.2">
          <t indent="0" pn="section-1-4.2.1">AEGIS-256, which has a 256-bit key, a 256-bit nonce, a 768-bit state, a 128- or 256-bit authentication tag, and processes 128-bit input blocks.</t>
        </li>
        <li pn="section-1-4.3">
          <t indent="0" pn="section-1-4.3.1">AEGIS-128X, which is a mode based on AEGIS-128L, specialized for CPUs with large vector registers and vector AES instructions.</t>
        </li>
        <li pn="section-1-4.4">
          <t indent="0" pn="section-1-4.4.1">AEGIS-256X, which is a mode based on AEGIS-256, specialized for CPUs with large vector registers and vector AES instructions.</t>
        </li>
      </ul>
      <t indent="0" pn="section-1-5">All variants are inverse-free and constructed from the AES encryption round function <xref target="FIPS-AES" format="default" sectionFormat="of" derivedContent="FIPS-AES"/>.</t>
      <t indent="0" pn="section-1-6">The AEGIS cipher family offers performance that significantly exceeds AES-GCM on CPUs with AES instructions. Similarly, software implementations not using AES instructions can also be faster, although to a lesser extent.</t>
      <t indent="0" pn="section-1-7">Unlike with AES-GCM, nonces can be safely chosen at random with no practical limit when using AEGIS-256 and AEGIS-256X. AEGIS-128L and AEGIS-128X also allow for more messages to be safely encrypted when using random nonces.</t>
      <t indent="0" pn="section-1-8">With some existing AEAD schemes, such as AES-GCM, an attacker can generate a ciphertext that successfully decrypts under multiple different keys (a partitioning oracle attack) <xref target="LGR21" format="default" sectionFormat="of" derivedContent="LGR21"/>. This ability to craft a (ciphertext, authentication tag) pair that verifies under multiple keys significantly reduces the number of required interactions with the oracle to perform an exhaustive search, making it practical if the key space is small. For example, with password-based encryption, an attacker can guess a large number of passwords at a time by recursively submitting such a ciphertext to an oracle, which speeds up a password search by reducing it to a binary search.</t>
      <t indent="0" pn="section-1-9">With AEGIS, finding distinct (key, nonce) pairs that successfully decrypt a given (associated data, ciphertext, authentication tag) tuple is believed to have a complexity that depends on the tag size. A 128-bit tag provides 64-bit committing security, which is generally acceptable for interactive protocols. With a 256-bit tag, finding a collision becomes impractical.</t>
      <t indent="0" pn="section-1-10">Unlike most other AES-based AEAD constructions, leaking a state does not leak the key or previous states.</t>
      <t indent="0" pn="section-1-11">Finally, an AEGIS key is not required after the initialization function, and there is no key schedule. Thus, ephemeral keys can be erased from memory before any data has been encrypted or decrypted, mitigating cold boot attacks.</t>
      <t indent="0" pn="section-1-12">Note that an earlier version of Hongjun Wu and Bart Preneel's paper introducing AEGIS specified AEGIS-128L and AEGIS-256 with a different <tt>Finalize</tt> function. We follow AEGIS v1.1 <xref target="AEGIS" format="default" sectionFormat="of" derivedContent="AEGIS"/>.</t>
      <t indent="0" pn="section-1-13">This document represents the consensus of the Crypto Forum Research Group (CFRG). It is not an IETF product and is not a standard.</t>
    </section>
    <section anchor="conventions-and-definitions" numbered="true" removeInRFC="false" toc="include" pn="section-2">
      <name slugifiedName="name-conventions-and-definitions">Conventions and Definitions</name>
      <t indent="0" pn="section-2-1">The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <t indent="0" pn="section-2-2">Throughout this document, "byte" is used interchangeably with "octet" and refers to an 8-bit sequence.</t>
      <t indent="0" pn="section-2-3">Primitives:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-2-4">
        <li pn="section-2-4.1">
          <t indent="0" pn="section-2-4.1.1"><tt>{}</tt>: an empty bit array.</t>
        </li>
        <li pn="section-2-4.2">
          <t indent="0" pn="section-2-4.2.1"><tt>|x|</tt>: the length of <tt>x</tt> in bits.</t>
        </li>
        <li pn="section-2-4.3">
          <t indent="0" pn="section-2-4.3.1"><tt>a ^ b</tt>: the bitwise exclusive OR operation between <tt>a</tt> and <tt>b</tt>.</t>
        </li>
        <li pn="section-2-4.4">
          <t indent="0" pn="section-2-4.4.1"><tt>a &amp; b</tt>: the bitwise AND operation between <tt>a</tt> and <tt>b</tt>.</t>
        </li>
        <li pn="section-2-4.5">
          <t indent="0" pn="section-2-4.5.1"><tt>a || b</tt>: the concatenation of <tt>a</tt> and <tt>b</tt>.</t>
        </li>
        <li pn="section-2-4.6">
          <t indent="0" pn="section-2-4.6.1"><tt>a mod b</tt>: the remainder obtained when dividing <tt>a</tt> (the dividend) by <tt>b</tt> (the divisor) using Euclidean division.</t>
        </li>
        <li pn="section-2-4.7">
          <t indent="0" pn="section-2-4.7.1"><tt>LE64(x)</tt>: returns the little-endian encoding of unsigned 64-bit integer <tt>x</tt>.</t>
        </li>
        <li pn="section-2-4.8">
          <t indent="0" pn="section-2-4.8.1"><tt>Byte(x)</tt>: the value <tt>x</tt> encoded as 8 bits.</t>
        </li>
        <li pn="section-2-4.9">
          <t indent="0" pn="section-2-4.9.1"><tt>Zeros(n)</tt>: returns an <tt>n</tt>-bit array containing only zero bits.</t>
        </li>
        <li pn="section-2-4.10">
          <t indent="0" pn="section-2-4.10.1"><tt>ZeroPad(x, n)</tt>: returns <tt>x</tt> after appending zeros until its length is a multiple of <tt>n</tt> bits. No padding is added if the length of <tt>x</tt> is already a multiple of <tt>n</tt>, including when <tt>x</tt> is empty.</t>
        </li>
        <li pn="section-2-4.11">
          <t indent="0" pn="section-2-4.11.1"><tt>Truncate(x, n)</tt>: returns the first <tt>n</tt> bits of <tt>x</tt>.</t>
        </li>
        <li pn="section-2-4.12">
          <t indent="0" pn="section-2-4.12.1"><tt>Split(x, n)</tt>: returns <tt>x</tt> split into <tt>n</tt>-bit blocks, ignoring partial blocks.</t>
        </li>
        <li pn="section-2-4.13">
          <t indent="0" pn="section-2-4.13.1"><tt>Tail(x, n)</tt>: returns the last <tt>n</tt> bits of <tt>x</tt>. <tt>Tail(x, 0)</tt> returns <tt>{}</tt>.</t>
        </li>
        <li pn="section-2-4.14">
          <t indent="0" pn="section-2-4.14.1"><tt>AESRound(in, rk)</tt>: a single round of the AES encryption round function, which is the composition of the <tt>SubBytes</tt>, <tt>ShiftRows</tt>, <tt>MixColumns</tt>, and <tt>AddRoundKey</tt> transformations, as defined in Section 5 of <xref target="FIPS-AES" format="default" sectionFormat="of" derivedContent="FIPS-AES"/>. Here, <tt>in</tt> is the 128-bit AES input state, and <tt>rk</tt> is the 128-bit round key.</t>
        </li>
        <li pn="section-2-4.15">
          <t indent="0" pn="section-2-4.15.1"><tt>Repeat(n, F)</tt>: <tt>n</tt> sequential evaluations of the function <tt>F</tt>.</t>
        </li>
        <li pn="section-2-4.16">
          <t indent="0" pn="section-2-4.16.1"><tt>CtEq(a, b)</tt>: compares <tt>a</tt> and <tt>b</tt> in constant time, returning <tt>True</tt> for an exact match and <tt>False</tt> otherwise.</t>
        </li>
      </ul>
      <t indent="0" pn="section-2-5">AEGIS internal functions:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-2-6">
        <li pn="section-2-6.1">
          <t indent="0" pn="section-2-6.1.1"><tt>Update(M0, M1)</tt> or <tt>Update(M)</tt>: the state update function.</t>
        </li>
        <li pn="section-2-6.2">
          <t indent="0" pn="section-2-6.2.1"><tt>Init(key, nonce)</tt>: the initialization function.</t>
        </li>
        <li pn="section-2-6.3">
          <t indent="0" pn="section-2-6.3.1"><tt>Absorb(ai)</tt>: the input block absorption function.</t>
        </li>
        <li pn="section-2-6.4">
          <t indent="0" pn="section-2-6.4.1"><tt>Enc(xi)</tt>: the input block encryption function.</t>
        </li>
        <li pn="section-2-6.5">
          <t indent="0" pn="section-2-6.5.1"><tt>Dec(ci)</tt>: the input block decryption function.</t>
        </li>
        <li pn="section-2-6.6">
          <t indent="0" pn="section-2-6.6.1"><tt>DecPartial(cn)</tt>: the input block decryption function for the last ciphertext bits when they do not fill an entire block.</t>
        </li>
        <li pn="section-2-6.7">
          <t indent="0" pn="section-2-6.7.1"><tt>Finalize(ad_len_bits, msg_len_bits)</tt>: the authentication tag generation function.</t>
        </li>
      </ul>
      <t indent="0" pn="section-2-7">Input blocks are 256 bits for AEGIS-128L and 128 bits for AEGIS-256.</t>
      <t indent="0" pn="section-2-8">AES blocks:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-2-9">
        <li pn="section-2-9.1">
          <t indent="0" pn="section-2-9.1.1"><tt>Si</tt>: the <tt>i</tt>-th AES block of the current state.</t>
        </li>
        <li pn="section-2-9.2">
          <t indent="0" pn="section-2-9.2.1"><tt>S'i</tt>: the <tt>i</tt>-th AES block of the next state.</t>
        </li>
        <li pn="section-2-9.3">
          <t indent="0" pn="section-2-9.3.1"><tt>{Si, ...Sj}</tt>: the vector of the <tt>i</tt>-th AES block of the current state to the <tt>j</tt>-th block of the current state.</t>
        </li>
        <li pn="section-2-9.4">
          <t indent="0" pn="section-2-9.4.1"><tt>C0</tt>: an AES block built from the following bytes in hexadecimal format: <tt>{ 0x00, 0x01, 0x01, 0x02, 0x03, 0x05, 0x08, 0x0d, 0x15, 0x22, 0x37, 0x59, 0x90, 0xe9, 0x79, 0x62 }</tt>.</t>
        </li>
        <li pn="section-2-9.5">
          <t indent="0" pn="section-2-9.5.1"><tt>C1</tt>: an AES block built from the following bytes in hexadecimal format: <tt>{ 0xdb, 0x3d, 0x18, 0x55, 0x6d, 0xc2, 0x2f, 0xf1, 0x20, 0x11, 0x31, 0x42, 0x73, 0xb5, 0x28, 0xdd }</tt>.</t>
        </li>
      </ul>
      <t indent="0" pn="section-2-10">AES blocks are always 128 bits in length.</t>
      <t indent="0" pn="section-2-11">Input and output values:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-2-12">
        <li pn="section-2-12.1">
          <t indent="0" pn="section-2-12.1.1"><tt>key</tt>: the encryption key (128 bits for AEGIS-128L, 256 bits for AEGIS-256).</t>
        </li>
        <li pn="section-2-12.2">
          <t indent="0" pn="section-2-12.2.1"><tt>nonce</tt>: the public nonce (128 bits for AEGIS-128L, 256 bits for AEGIS-256).</t>
        </li>
        <li pn="section-2-12.3">
          <t indent="0" pn="section-2-12.3.1"><tt>ad</tt>: the associated data.</t>
        </li>
        <li pn="section-2-12.4">
          <t indent="0" pn="section-2-12.4.1"><tt>msg</tt>: the plaintext.</t>
        </li>
        <li pn="section-2-12.5">
          <t indent="0" pn="section-2-12.5.1"><tt>ct</tt>: the ciphertext.</t>
        </li>
        <li pn="section-2-12.6">
          <t indent="0" pn="section-2-12.6.1"><tt>tag</tt>: the authentication tag (128 or 256 bits).</t>
        </li>
      </ul>
    </section>
    <section anchor="the-aegis-128l-algorithm" numbered="true" removeInRFC="false" toc="include" pn="section-3">
      <name slugifiedName="name-the-aegis-128l-algorithm">The AEGIS-128L Algorithm</name>
      <t indent="0" pn="section-3-1">AEGIS-128L has a 1024-bit state, made of eight 128-bit blocks <tt>{S0, ...S7}</tt>.</t>
      <t indent="0" pn="section-3-2">The parameters for this algorithm, as defined in <xref section="4" sectionFormat="of" target="RFC5116" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5116#section-4" derivedContent="RFC5116"/>, are:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3-3">
        <li pn="section-3-3.1">
          <t indent="0" pn="section-3-3.1.1"><tt>K_LEN</tt> (key length) is 16 bytes (128 bits).</t>
        </li>
        <li pn="section-3-3.2">
          <t indent="0" pn="section-3-3.2.1"><tt>P_MAX</tt> (maximum length of the plaintext) is 2<sup>61</sup> - 1 bytes (2<sup>64</sup> - 8 bits).</t>
        </li>
        <li pn="section-3-3.3">
          <t indent="0" pn="section-3-3.3.1"><tt>A_MAX</tt> (maximum length of the associated data) is 2<sup>61</sup> - 1 bytes (2<sup>64</sup> - 8 bits).</t>
        </li>
        <li pn="section-3-3.4">
          <t indent="0" pn="section-3-3.4.1"><tt>N_MIN</tt> (minimum nonce length) = <tt>N_MAX</tt> (maximum nonce length) and is 16 bytes (128 bits).</t>
        </li>
        <li pn="section-3-3.5">
          <t indent="0" pn="section-3-3.5.1"><tt>C_MAX</tt> (maximum ciphertext length) is <tt>P_MAX</tt> + 16 bytes for a 128-bit tag or <tt>P_MAX</tt> + 32 bytes for a 256-bit tag. In bits, these limits are (2<sup>64</sup> - 8) + 128 and (2<sup>64</sup> - 8) + 256 bits, respectively.</t>
        </li>
      </ul>
      <t indent="0" pn="section-3-4">Distinct associated data inputs, as described in <xref section="3" sectionFormat="of" target="RFC5116" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5116#section-3" derivedContent="RFC5116"/>, <bcp14>MUST</bcp14> be unambiguously encoded as a single input.
It is up to the application to create a structure in the associated data input if needed.</t>
      <section anchor="authenticated-encryption" numbered="true" removeInRFC="false" toc="include" pn="section-3.1">
        <name slugifiedName="name-authenticated-encryption">Authenticated Encryption</name>
        <sourcecode type="pseudocode" markers="false" pn="section-3.1-1">
Encrypt(msg, ad, key, nonce)
</sourcecode>
        <t indent="0" pn="section-3.1-2">The <tt>Encrypt</tt> function encrypts a message and returns the ciphertext along with an authentication tag that verifies the authenticity of the message and associated data, if provided.</t>
        <t indent="0" pn="section-3.1-3">Security:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.1-4">
          <li pn="section-3.1-4.1">
            <t indent="0" pn="section-3.1-4.1.1">For a given key, the nonce <bcp14>MUST NOT</bcp14> be reused under any circumstances; doing so allows an attacker to recover the internal state.</t>
          </li>
          <li pn="section-3.1-4.2">
            <t indent="0" pn="section-3.1-4.2.1">The key <bcp14>MUST</bcp14> be randomly chosen from a uniform distribution.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.1-5">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.1-6">
          <li pn="section-3.1-6.1">
            <t indent="0" pn="section-3.1-6.1.1"><tt>msg</tt>: the message to be encrypted (length <bcp14>MUST</bcp14> be less than or equal to <tt>P_MAX</tt>).</t>
          </li>
          <li pn="section-3.1-6.2">
            <t indent="0" pn="section-3.1-6.2.1"><tt>ad</tt>: the associated data to authenticate (length <bcp14>MUST</bcp14> be less than or equal to <tt>A_MAX</tt>).</t>
          </li>
          <li pn="section-3.1-6.3">
            <t indent="0" pn="section-3.1-6.3.1"><tt>key</tt>: the encryption key.</t>
          </li>
          <li pn="section-3.1-6.4">
            <t indent="0" pn="section-3.1-6.4.1"><tt>nonce</tt>: the public nonce.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.1-7">Outputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.1-8">
          <li pn="section-3.1-8.1">
            <t indent="0" pn="section-3.1-8.1.1"><tt>ct</tt>: the ciphertext.</t>
          </li>
          <li pn="section-3.1-8.2">
            <t indent="0" pn="section-3.1-8.2.1"><tt>tag</tt>: the authentication tag.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.1-9">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-3.1-10">
Init(key, nonce)

ct = {}

ad_blocks = Split(ZeroPad(ad, 256), 256)
for ai in ad_blocks:
    Absorb(ai)

msg_blocks = Split(ZeroPad(msg, 256), 256)
for xi in msg_blocks:
    ct = ct || Enc(xi)

tag = Finalize(|ad|, |msg|)
ct = Truncate(ct, |msg|)

return ct and tag
</sourcecode>
      </section>
      <section anchor="authenticated-decryption" numbered="true" removeInRFC="false" toc="include" pn="section-3.2">
        <name slugifiedName="name-authenticated-decryption">Authenticated Decryption</name>
        <sourcecode type="pseudocode" markers="false" pn="section-3.2-1">
Decrypt(ct, tag, ad, key, nonce)
</sourcecode>
        <t indent="0" pn="section-3.2-2">The <tt>Decrypt</tt> function decrypts a ciphertext, verifies that the authentication tag is correct, and returns the message on success or an error if tag verification fails.</t>
        <t indent="0" pn="section-3.2-3">Security:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.2-4">
          <li pn="section-3.2-4.1">
            <t indent="0" pn="section-3.2-4.1.1">If tag verification fails, the decrypted message and wrong authentication tag <bcp14>MUST NOT</bcp14> be given as output. The decrypted message <bcp14>MUST</bcp14> be overwritten with zeros before the function returns.</t>
          </li>
          <li pn="section-3.2-4.2">
            <t indent="0" pn="section-3.2-4.2.1">The comparison of the input <tt>tag</tt> with the <tt>expected_tag</tt> <bcp14>MUST</bcp14> be done in constant time.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.2-5">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.2-6">
          <li pn="section-3.2-6.1">
            <t indent="0" pn="section-3.2-6.1.1"><tt>ct</tt>: the ciphertext to decrypt (length <bcp14>MUST</bcp14> be less than or equal to <tt>P_MAX</tt>).</t>
          </li>
          <li pn="section-3.2-6.2">
            <t indent="0" pn="section-3.2-6.2.1"><tt>tag</tt>: the authentication tag.</t>
          </li>
          <li pn="section-3.2-6.3">
            <t indent="0" pn="section-3.2-6.3.1"><tt>ad</tt>: the associated data to authenticate (length <bcp14>MUST</bcp14> be less than or equal to <tt>A_MAX</tt>).</t>
          </li>
          <li pn="section-3.2-6.4">
            <t indent="0" pn="section-3.2-6.4.1"><tt>key</tt>: the encryption key.</t>
          </li>
          <li pn="section-3.2-6.5">
            <t indent="0" pn="section-3.2-6.5.1"><tt>nonce</tt>: the public nonce.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.2-7">Outputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.2-8">
          <li pn="section-3.2-8.1">
            <t indent="0" pn="section-3.2-8.1.1">Either the decrypted message <tt>msg</tt> or an error indicating that the authentication tag is invalid for the given inputs.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.2-9">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-3.2-10">
Init(key, nonce)

msg = {}

ad_blocks = Split(ZeroPad(ad, 256), 256)
for ai in ad_blocks:
    Absorb(ai)

ct_blocks = Split(ct, 256)
cn = Tail(ct, |ct| mod 256)

for ci in ct_blocks:
    msg = msg || Dec(ci)

if cn is not empty:
    msg = msg || DecPartial(cn)

expected_tag = Finalize(|ad|, |msg|)

if CtEq(tag, expected_tag) is False:
    erase msg
    erase expected_tag
    return "verification failed" error
else:
    return msg
</sourcecode>
      </section>
      <section anchor="the-update-function" numbered="true" removeInRFC="false" toc="include" pn="section-3.3">
        <name slugifiedName="name-the-update-function">The Update Function</name>
        <sourcecode type="pseudocode" markers="false" pn="section-3.3-1">
Update(M0, M1)
</sourcecode>
        <t indent="0" pn="section-3.3-2">The <tt>Update</tt> function is the core of the AEGIS-128L algorithm.
It updates the state <tt>{S0, ...S7}</tt> using two 128-bit values.</t>
        <t indent="0" pn="section-3.3-3">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.3-4">
          <li pn="section-3.3-4.1">
            <t indent="0" pn="section-3.3-4.1.1"><tt>M0</tt>: the first 128-bit block to be absorbed.</t>
          </li>
          <li pn="section-3.3-4.2">
            <t indent="0" pn="section-3.3-4.2.1"><tt>M1</tt>: the second 128-bit block to be absorbed.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.3-5">Modifies:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.3-6">
          <li pn="section-3.3-6.1">
            <t indent="0" pn="section-3.3-6.1.1"><tt>{S0, ...S7}</tt>: the state.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.3-7">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-3.3-8">
S'0 = AESRound(S7, S0 ^ M0)
S'1 = AESRound(S0, S1)
S'2 = AESRound(S1, S2)
S'3 = AESRound(S2, S3)
S'4 = AESRound(S3, S4 ^ M1)
S'5 = AESRound(S4, S5)
S'6 = AESRound(S5, S6)
S'7 = AESRound(S6, S7)

S0  = S'0
S1  = S'1
S2  = S'2
S3  = S'3
S4  = S'4
S5  = S'5
S6  = S'6
S7  = S'7
</sourcecode>
      </section>
      <section anchor="the-init-function" numbered="true" removeInRFC="false" toc="include" pn="section-3.4">
        <name slugifiedName="name-the-init-function">The Init Function</name>
        <sourcecode type="pseudocode" markers="false" pn="section-3.4-1">
Init(key, nonce)
</sourcecode>
        <t indent="0" pn="section-3.4-2">The <tt>Init</tt> function constructs the initial state <tt>{S0, ...S7}</tt> using the given <tt>key</tt> and <tt>nonce</tt>.</t>
        <t indent="0" pn="section-3.4-3">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.4-4">
          <li pn="section-3.4-4.1">
            <t indent="0" pn="section-3.4-4.1.1"><tt>key</tt>: the encryption key.</t>
          </li>
          <li pn="section-3.4-4.2">
            <t indent="0" pn="section-3.4-4.2.1"><tt>nonce</tt>: the public nonce.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.4-5">Defines:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.4-6">
          <li pn="section-3.4-6.1">
            <t indent="0" pn="section-3.4-6.1.1"><tt>{S0, ...S7}</tt>: the initial state.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.4-7">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-3.4-8">
S0 = key ^ nonce
S1 = C1
S2 = C0
S3 = C1
S4 = key ^ nonce
S5 = key ^ C0
S6 = key ^ C1
S7 = key ^ C0

Repeat(10, Update(nonce, key))
</sourcecode>
      </section>
      <section anchor="the-absorb-function" numbered="true" removeInRFC="false" toc="include" pn="section-3.5">
        <name slugifiedName="name-the-absorb-function">The Absorb Function</name>
        <sourcecode type="pseudocode" markers="false" pn="section-3.5-1">
Absorb(ai)
</sourcecode>
        <t indent="0" pn="section-3.5-2">The <tt>Absorb</tt> function absorbs a 256-bit input block <tt>ai</tt> into the state <tt>{S0, ...S7}</tt>.</t>
        <t indent="0" pn="section-3.5-3">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.5-4">
          <li pn="section-3.5-4.1">
            <t indent="0" pn="section-3.5-4.1.1"><tt>ai</tt>: the 256-bit input block.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.5-5">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-3.5-6">
t0, t1 = Split(ai, 128)
Update(t0, t1)
</sourcecode>
      </section>
      <section anchor="the-enc-function" numbered="true" removeInRFC="false" toc="include" pn="section-3.6">
        <name slugifiedName="name-the-enc-function">The Enc Function</name>
        <sourcecode type="pseudocode" markers="false" pn="section-3.6-1">
Enc(xi)
</sourcecode>
        <t indent="0" pn="section-3.6-2">The <tt>Enc</tt> function encrypts a 256-bit input block <tt>xi</tt> using the state <tt>{S0, ...S7}</tt>.</t>
        <t indent="0" pn="section-3.6-3">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.6-4">
          <li pn="section-3.6-4.1">
            <t indent="0" pn="section-3.6-4.1.1"><tt>xi</tt>: the 256-bit input block.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.6-5">Outputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.6-6">
          <li pn="section-3.6-6.1">
            <t indent="0" pn="section-3.6-6.1.1"><tt>ci</tt>: the 256-bit encrypted block.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.6-7">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-3.6-8">
z0 = S1 ^ S6 ^ (S2 &amp; S3)
z1 = S2 ^ S5 ^ (S6 &amp; S7)

t0, t1 = Split(xi, 128)
out0 = t0 ^ z0
out1 = t1 ^ z1

Update(t0, t1)
ci = out0 || out1

return ci
</sourcecode>
      </section>
      <section anchor="the-dec-function" numbered="true" removeInRFC="false" toc="include" pn="section-3.7">
        <name slugifiedName="name-the-dec-function">The Dec Function</name>
        <sourcecode type="pseudocode" markers="false" pn="section-3.7-1">
Dec(ci)
</sourcecode>
        <t indent="0" pn="section-3.7-2">The <tt>Dec</tt> function decrypts a 256-bit input block <tt>ci</tt> using the state <tt>{S0, ...S7}</tt>.</t>
        <t indent="0" pn="section-3.7-3">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.7-4">
          <li pn="section-3.7-4.1">
            <t indent="0" pn="section-3.7-4.1.1"><tt>ci</tt>: the 256-bit encrypted block.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.7-5">Outputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.7-6">
          <li pn="section-3.7-6.1">
            <t indent="0" pn="section-3.7-6.1.1"><tt>xi</tt>: the 256-bit decrypted block.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.7-7">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-3.7-8">
z0 = S1 ^ S6 ^ (S2 &amp; S3)
z1 = S2 ^ S5 ^ (S6 &amp; S7)

t0, t1 = Split(ci, 128)
out0 = t0 ^ z0
out1 = t1 ^ z1

Update(out0, out1)
xi = out0 || out1

return xi
</sourcecode>
      </section>
      <section anchor="the-decpartial-function" numbered="true" removeInRFC="false" toc="include" pn="section-3.8">
        <name slugifiedName="name-the-decpartial-function">The DecPartial Function</name>
        <sourcecode type="pseudocode" markers="false" pn="section-3.8-1">
DecPartial(cn)
</sourcecode>
        <t indent="0" pn="section-3.8-2">The <tt>DecPartial</tt> function decrypts the last ciphertext bits <tt>cn</tt> using the state <tt>{S0, ...S7}</tt> when they do not fill an entire block.</t>
        <t indent="0" pn="section-3.8-3">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.8-4">
          <li pn="section-3.8-4.1">
            <t indent="0" pn="section-3.8-4.1.1"><tt>cn</tt>: the encrypted input.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.8-5">Outputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.8-6">
          <li pn="section-3.8-6.1">
            <t indent="0" pn="section-3.8-6.1.1"><tt>xn</tt>: the decryption of <tt>cn</tt>.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.8-7">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-3.8-8">
z0 = S1 ^ S6 ^ (S2 &amp; S3)
z1 = S2 ^ S5 ^ (S6 &amp; S7)

t0, t1 = Split(ZeroPad(cn, 256), 128)
out0 = t0 ^ z0
out1 = t1 ^ z1

xn = Truncate(out0 || out1, |cn|)

v0, v1 = Split(ZeroPad(xn, 256), 128)
Update(v0, v1)

return xn
</sourcecode>
      </section>
      <section anchor="the-finalize-function" numbered="true" removeInRFC="false" toc="include" pn="section-3.9">
        <name slugifiedName="name-the-finalize-function">The Finalize Function</name>
        <sourcecode type="pseudocode" markers="false" pn="section-3.9-1">
Finalize(ad_len_bits, msg_len_bits)
</sourcecode>
        <t indent="0" pn="section-3.9-2">The <tt>Finalize</tt> function computes a 128- or 256-bit tag that authenticates the message and associated data.</t>
        <t indent="0" pn="section-3.9-3">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.9-4">
          <li pn="section-3.9-4.1">
            <t indent="0" pn="section-3.9-4.1.1"><tt>ad_len_bits</tt>: the length of the associated data in bits.</t>
          </li>
          <li pn="section-3.9-4.2">
            <t indent="0" pn="section-3.9-4.2.1"><tt>msg_len_bits</tt>: the length of the message in bits.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.9-5">Outputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.9-6">
          <li pn="section-3.9-6.1">
            <t indent="0" pn="section-3.9-6.1.1"><tt>tag</tt>: the authentication tag.</t>
          </li>
        </ul>
        <t indent="0" pn="section-3.9-7">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-3.9-8">
t = S2 ^ (LE64(ad_len_bits) || LE64(msg_len_bits))

Repeat(7, Update(t, t))

if tag_len_bits == 128:
    tag = S0 ^ S1 ^ S2 ^ S3 ^ S4 ^ S5 ^ S6
else:            # 256 bits
    tag = (S0 ^ S1 ^ S2 ^ S3) || (S4 ^ S5 ^ S6 ^ S7)

return tag
</sourcecode>
      </section>
    </section>
    <section anchor="the-aegis-256-algorithm" numbered="true" removeInRFC="false" toc="include" pn="section-4">
      <name slugifiedName="name-the-aegis-256-algorithm">The AEGIS-256 Algorithm</name>
      <t indent="0" pn="section-4-1">AEGIS-256 has a 768-bit state, made of six 128-bit blocks <tt>{S0, ...S5}</tt>.</t>
      <t indent="0" pn="section-4-2">The parameters for this algorithm, as defined in <xref section="4" sectionFormat="of" target="RFC5116" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5116#section-4" derivedContent="RFC5116"/>, are:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4-3">
        <li pn="section-4-3.1">
          <t indent="0" pn="section-4-3.1.1"><tt>K_LEN</tt> (key length) is 32 bytes (256 bits).</t>
        </li>
        <li pn="section-4-3.2">
          <t indent="0" pn="section-4-3.2.1"><tt>P_MAX</tt> (maximum length of the plaintext) is 2<sup>61</sup> - 1 bytes (2<sup>64</sup> - 8 bits).</t>
        </li>
        <li pn="section-4-3.3">
          <t indent="0" pn="section-4-3.3.1"><tt>A_MAX</tt> (maximum length of the associated data) is 2<sup>61</sup> - 1 bytes (2<sup>64</sup> - 8 bits).</t>
        </li>
        <li pn="section-4-3.4">
          <t indent="0" pn="section-4-3.4.1"><tt>N_MIN</tt> (minimum nonce length) = <tt>N_MAX</tt> (maximum nonce length) and is 32 bytes (256 bits).</t>
        </li>
        <li pn="section-4-3.5">
          <t indent="0" pn="section-4-3.5.1"><tt>C_MAX</tt> (maximum ciphertext length) is <tt>P_MAX</tt> + 16 bytes for a 128-bit tag or <tt>P_MAX</tt> + 32 bytes for a 256-bit tag. In bits, these limits are (2<sup>64</sup> - 8) + 128 and (2<sup>64</sup> - 8) + 256 bits, respectively.</t>
        </li>
      </ul>
      <t indent="0" pn="section-4-4">Distinct associated data inputs, as described in <xref section="3" sectionFormat="of" target="RFC5116" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5116#section-3" derivedContent="RFC5116"/>, <bcp14>MUST</bcp14> be unambiguously encoded as a single input.
It is up to the application to create a structure in the associated data input if needed.</t>
      <section anchor="authenticated-encryption-1" numbered="true" removeInRFC="false" toc="include" pn="section-4.1">
        <name slugifiedName="name-authenticated-encryption-2">Authenticated Encryption</name>
        <sourcecode type="pseudocode" markers="false" pn="section-4.1-1">
Encrypt(msg, ad, key, nonce)
</sourcecode>
        <t indent="0" pn="section-4.1-2">The <tt>Encrypt</tt> function encrypts a message and returns the ciphertext along with an authentication tag that verifies the authenticity of the message and associated data, if provided.</t>
        <t indent="0" pn="section-4.1-3">Security:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.1-4">
          <li pn="section-4.1-4.1">
            <t indent="0" pn="section-4.1-4.1.1">For a given key, the nonce <bcp14>MUST NOT</bcp14> be reused under any circumstances; doing so allows an attacker to recover the internal state.</t>
          </li>
          <li pn="section-4.1-4.2">
            <t indent="0" pn="section-4.1-4.2.1">The key <bcp14>MUST</bcp14> be randomly chosen from a uniform distribution.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.1-5">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.1-6">
          <li pn="section-4.1-6.1">
            <t indent="0" pn="section-4.1-6.1.1"><tt>msg</tt>: the message to be encrypted (length <bcp14>MUST</bcp14> be less than or equal to <tt>P_MAX</tt>).</t>
          </li>
          <li pn="section-4.1-6.2">
            <t indent="0" pn="section-4.1-6.2.1"><tt>ad</tt>: the associated data to authenticate (length <bcp14>MUST</bcp14> be less than or equal to <tt>A_MAX</tt>).</t>
          </li>
          <li pn="section-4.1-6.3">
            <t indent="0" pn="section-4.1-6.3.1"><tt>key</tt>: the encryption key.</t>
          </li>
          <li pn="section-4.1-6.4">
            <t indent="0" pn="section-4.1-6.4.1"><tt>nonce</tt>: the public nonce.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.1-7">Outputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.1-8">
          <li pn="section-4.1-8.1">
            <t indent="0" pn="section-4.1-8.1.1"><tt>ct</tt>: the ciphertext.</t>
          </li>
          <li pn="section-4.1-8.2">
            <t indent="0" pn="section-4.1-8.2.1"><tt>tag</tt>: the authentication tag.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.1-9">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-4.1-10">
Init(key, nonce)

ct = {}

ad_blocks = Split(ZeroPad(ad, 128), 128)
for ai in ad_blocks:
    Absorb(ai)

msg_blocks = Split(ZeroPad(msg, 128), 128)
for xi in msg_blocks:
    ct = ct || Enc(xi)

tag = Finalize(|ad|, |msg|)
ct = Truncate(ct, |msg|)

return ct and tag
</sourcecode>
      </section>
      <section anchor="authenticated-decryption-1" numbered="true" removeInRFC="false" toc="include" pn="section-4.2">
        <name slugifiedName="name-authenticated-decryption-2">Authenticated Decryption</name>
        <sourcecode type="pseudocode" markers="false" pn="section-4.2-1">
Decrypt(ct, tag, ad, key, nonce)
</sourcecode>
        <t indent="0" pn="section-4.2-2">The <tt>Decrypt</tt> function decrypts a ciphertext, verifies that the authentication tag is correct, and returns the message on success or an error if tag verification fails.</t>
        <t indent="0" pn="section-4.2-3">Security:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.2-4">
          <li pn="section-4.2-4.1">
            <t indent="0" pn="section-4.2-4.1.1">If tag verification fails, the decrypted message and wrong authentication tag <bcp14>MUST NOT</bcp14> be given as output. The decrypted message <bcp14>MUST</bcp14> be overwritten with zeros before the function returns.</t>
          </li>
          <li pn="section-4.2-4.2">
            <t indent="0" pn="section-4.2-4.2.1">The comparison of the input <tt>tag</tt> with the <tt>expected_tag</tt> <bcp14>MUST</bcp14> be done in constant time.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.2-5">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.2-6">
          <li pn="section-4.2-6.1">
            <t indent="0" pn="section-4.2-6.1.1"><tt>ct</tt>: the ciphertext to decrypt (length <bcp14>MUST</bcp14> be less than or equal to <tt>P_MAX</tt>).</t>
          </li>
          <li pn="section-4.2-6.2">
            <t indent="0" pn="section-4.2-6.2.1"><tt>tag</tt>: the authentication tag.</t>
          </li>
          <li pn="section-4.2-6.3">
            <t indent="0" pn="section-4.2-6.3.1"><tt>ad</tt>: the associated data to authenticate (length <bcp14>MUST</bcp14> be less than or equal to <tt>A_MAX</tt>).</t>
          </li>
          <li pn="section-4.2-6.4">
            <t indent="0" pn="section-4.2-6.4.1"><tt>key</tt>: the encryption key.</t>
          </li>
          <li pn="section-4.2-6.5">
            <t indent="0" pn="section-4.2-6.5.1"><tt>nonce</tt>: the public nonce.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.2-7">Outputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.2-8">
          <li pn="section-4.2-8.1">
            <t indent="0" pn="section-4.2-8.1.1">Either the decrypted message <tt>msg</tt> or an error indicating that the authentication tag is invalid for the given inputs.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.2-9">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-4.2-10">
Init(key, nonce)

msg = {}

ad_blocks = Split(ZeroPad(ad, 128), 128)
for ai in ad_blocks:
    Absorb(ai)

ct_blocks = Split(ct, 128)
cn = Tail(ct, |ct| mod 128)

for ci in ct_blocks:
    msg = msg || Dec(ci)

if cn is not empty:
    msg = msg || DecPartial(cn)

expected_tag = Finalize(|ad|, |msg|)

if CtEq(tag, expected_tag) is False:
    erase msg
    erase expected_tag
    return "verification failed" error
else:
    return msg
</sourcecode>
      </section>
      <section anchor="the-update-function-1" numbered="true" removeInRFC="false" toc="include" pn="section-4.3">
        <name slugifiedName="name-the-update-function-2">The Update Function</name>
        <sourcecode type="pseudocode" markers="false" pn="section-4.3-1">
Update(M)
</sourcecode>
        <t indent="0" pn="section-4.3-2">The <tt>Update</tt> function is the core of the AEGIS-256 algorithm.
It updates the state <tt>{S0, ...S5}</tt> using a 128-bit value.</t>
        <t indent="0" pn="section-4.3-3">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.3-4">
          <li pn="section-4.3-4.1">
            <t indent="0" pn="section-4.3-4.1.1"><tt>M</tt>: the 128-bit block to be absorbed.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.3-5">Modifies:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.3-6">
          <li pn="section-4.3-6.1">
            <t indent="0" pn="section-4.3-6.1.1"><tt>{S0, ...S5}</tt>: the state.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.3-7">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-4.3-8">
S'0 = AESRound(S5, S0 ^ M)
S'1 = AESRound(S0, S1)
S'2 = AESRound(S1, S2)
S'3 = AESRound(S2, S3)
S'4 = AESRound(S3, S4)
S'5 = AESRound(S4, S5)

S0  = S'0
S1  = S'1
S2  = S'2
S3  = S'3
S4  = S'4
S5  = S'5
</sourcecode>
      </section>
      <section anchor="the-init-function-1" numbered="true" removeInRFC="false" toc="include" pn="section-4.4">
        <name slugifiedName="name-the-init-function-2">The Init Function</name>
        <sourcecode type="pseudocode" markers="false" pn="section-4.4-1">
Init(key, nonce)
</sourcecode>
        <t indent="0" pn="section-4.4-2">The <tt>Init</tt> function constructs the initial state <tt>{S0, ...S5}</tt> using the given <tt>key</tt> and <tt>nonce</tt>.</t>
        <t indent="0" pn="section-4.4-3">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.4-4">
          <li pn="section-4.4-4.1">
            <t indent="0" pn="section-4.4-4.1.1"><tt>key</tt>: the encryption key.</t>
          </li>
          <li pn="section-4.4-4.2">
            <t indent="0" pn="section-4.4-4.2.1"><tt>nonce</tt>: the public nonce.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.4-5">Defines:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.4-6">
          <li pn="section-4.4-6.1">
            <t indent="0" pn="section-4.4-6.1.1"><tt>{S0, ...S5}</tt>: the initial state.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.4-7">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-4.4-8">
k0, k1 = Split(key, 128)
n0, n1 = Split(nonce, 128)

S0 = k0 ^ n0
S1 = k1 ^ n1
S2 = C1
S3 = C0
S4 = k0 ^ C0
S5 = k1 ^ C1

Repeat(4,
  Update(k0)
  Update(k1)
  Update(k0 ^ n0)
  Update(k1 ^ n1)
)
</sourcecode>
      </section>
      <section anchor="the-absorb-function-1" numbered="true" removeInRFC="false" toc="include" pn="section-4.5">
        <name slugifiedName="name-the-absorb-function-2">The Absorb Function</name>
        <sourcecode type="pseudocode" markers="false" pn="section-4.5-1">
Absorb(ai)
</sourcecode>
        <t indent="0" pn="section-4.5-2">The <tt>Absorb</tt> function absorbs a 128-bit input block <tt>ai</tt> into the state <tt>{S0, ...S5}</tt>.</t>
        <t indent="0" pn="section-4.5-3">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.5-4">
          <li pn="section-4.5-4.1">
            <t indent="0" pn="section-4.5-4.1.1"><tt>ai</tt>: the 128-bit input block.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.5-5">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-4.5-6">
Update(ai)
</sourcecode>
      </section>
      <section anchor="the-enc-function-1" numbered="true" removeInRFC="false" toc="include" pn="section-4.6">
        <name slugifiedName="name-the-enc-function-2">The Enc Function</name>
        <sourcecode type="pseudocode" markers="false" pn="section-4.6-1">
Enc(xi)
</sourcecode>
        <t indent="0" pn="section-4.6-2">The <tt>Enc</tt> function encrypts a 128-bit input block <tt>xi</tt> using the state <tt>{S0, ...S5}</tt>.</t>
        <t indent="0" pn="section-4.6-3">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.6-4">
          <li pn="section-4.6-4.1">
            <t indent="0" pn="section-4.6-4.1.1"><tt>xi</tt>: the 128-bit input block.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.6-5">Outputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.6-6">
          <li pn="section-4.6-6.1">
            <t indent="0" pn="section-4.6-6.1.1"><tt>ci</tt>: the 128-bit encrypted block.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.6-7">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-4.6-8">
z = S1 ^ S4 ^ S5 ^ (S2 &amp; S3)

Update(xi)

ci = xi ^ z

return ci
</sourcecode>
      </section>
      <section anchor="the-dec-function-1" numbered="true" removeInRFC="false" toc="include" pn="section-4.7">
        <name slugifiedName="name-the-dec-function-2">The Dec Function</name>
        <sourcecode type="pseudocode" markers="false" pn="section-4.7-1">
Dec(ci)
</sourcecode>
        <t indent="0" pn="section-4.7-2">The <tt>Dec</tt> function decrypts a 128-bit input block <tt>ci</tt> using the state <tt>{S0, ...S5}</tt>.</t>
        <t indent="0" pn="section-4.7-3">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.7-4">
          <li pn="section-4.7-4.1">
            <t indent="0" pn="section-4.7-4.1.1"><tt>ci</tt>: the 128-bit encrypted block.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.7-5">Outputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.7-6">
          <li pn="section-4.7-6.1">
            <t indent="0" pn="section-4.7-6.1.1"><tt>xi</tt>: the 128-bit decrypted block.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.7-7">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-4.7-8">
z = S1 ^ S4 ^ S5 ^ (S2 &amp; S3)

xi = ci ^ z

Update(xi)

return xi
</sourcecode>
      </section>
      <section anchor="the-decpartial-function-1" numbered="true" removeInRFC="false" toc="include" pn="section-4.8">
        <name slugifiedName="name-the-decpartial-function-2">The DecPartial Function</name>
        <sourcecode type="pseudocode" markers="false" pn="section-4.8-1">
DecPartial(cn)
</sourcecode>
        <t indent="0" pn="section-4.8-2">The <tt>DecPartial</tt> function decrypts the last ciphertext bits <tt>cn</tt> using the state <tt>{S0, ...S5}</tt> when they do not fill an entire block.</t>
        <t indent="0" pn="section-4.8-3">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.8-4">
          <li pn="section-4.8-4.1">
            <t indent="0" pn="section-4.8-4.1.1"><tt>cn</tt>: the encrypted input.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.8-5">Outputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.8-6">
          <li pn="section-4.8-6.1">
            <t indent="0" pn="section-4.8-6.1.1"><tt>xn</tt>: the decryption of <tt>cn</tt>.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.8-7">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-4.8-8">
z = S1 ^ S4 ^ S5 ^ (S2 &amp; S3)

t = ZeroPad(cn, 128)
out = t ^ z

xn = Truncate(out, |cn|)

v = ZeroPad(xn, 128)
Update(v)

return xn
</sourcecode>
      </section>
      <section anchor="the-finalize-function-1" numbered="true" removeInRFC="false" toc="include" pn="section-4.9">
        <name slugifiedName="name-the-finalize-function-2">The Finalize Function</name>
        <sourcecode type="pseudocode" markers="false" pn="section-4.9-1">
Finalize(ad_len_bits, msg_len_bits)
</sourcecode>
        <t indent="0" pn="section-4.9-2">The <tt>Finalize</tt> function computes a 128- or 256-bit tag that authenticates the message and associated data.</t>
        <t indent="0" pn="section-4.9-3">Inputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.9-4">
          <li pn="section-4.9-4.1">
            <t indent="0" pn="section-4.9-4.1.1"><tt>ad_len_bits</tt>: the length of the associated data in bits.</t>
          </li>
          <li pn="section-4.9-4.2">
            <t indent="0" pn="section-4.9-4.2.1"><tt>msg_len_bits</tt>: the length of the message in bits.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.9-5">Outputs:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.9-6">
          <li pn="section-4.9-6.1">
            <t indent="0" pn="section-4.9-6.1.1"><tt>tag</tt>: the authentication tag.</t>
          </li>
        </ul>
        <t indent="0" pn="section-4.9-7">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-4.9-8">
t = S3 ^ (LE64(ad_len_bits) || LE64(msg_len_bits))

Repeat(7, Update(t))

if tag_len_bits == 128:
    tag = S0 ^ S1 ^ S2 ^ S3 ^ S4 ^ S5
else:            # 256 bits
    tag = (S0 ^ S1 ^ S2) || (S3 ^ S4 ^ S5)

return tag
</sourcecode>
      </section>
    </section>
    <section anchor="parallel-modes" numbered="true" removeInRFC="false" toc="include" pn="section-5">
      <name slugifiedName="name-parallel-modes">Parallel Modes</name>
      <t indent="0" pn="section-5-1">Some CPUs, such as Intel and Intel-compatible CPUs with the Vectorized AES (VAES) extensions, include instructions to efficiently apply the AES round function to a vector of AES blocks.</t>
      <t indent="0" pn="section-5-2">AEGIS-128X and AEGIS-256X are optional, specialized modes designed to take advantage of these instructions. They share the same properties as the ciphers they are based on but can be significantly faster on these platforms, even for short messages.</t>
      <t indent="0" pn="section-5-3">AEGIS-128X and AEGIS-256X are parallel evaluations of multiple AEGIS-128L and AEGIS-256 instances, respectively, with distinct initial states. On CPUs with wide vector registers, different states can be stored in different 128-bit lanes of the same vector register, allowing parallel updates using vector instructions.</t>
      <t indent="0" pn="section-5-4">The modes are parameterized by the parallelism degree. With 256-bit registers, two parallel operations can be applied to 128-bit AES blocks. With 512-bit registers, the number of instances can be raised to four.</t>
      <t indent="0" pn="section-5-5">The state of a parallel mode is represented as a vector of AEGIS-128L or AEGIS-256 states.</t>
      <section anchor="additional-conventions-and-definitions" numbered="true" removeInRFC="false" toc="include" pn="section-5.1">
        <name slugifiedName="name-additional-conventions-and-">Additional Conventions and Definitions</name>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.1-1">
          <li pn="section-5.1-1.1">
            <t indent="0" pn="section-5.1-1.1.1"><tt>D</tt>: the degree of parallelism.</t>
          </li>
          <li pn="section-5.1-1.2">
            <t indent="0" pn="section-5.1-1.2.1"><tt>R</tt>: the absorption and output rate of the mode. With AEGIS-128X, the rate is <tt>256 * D</tt> bits. With AEGIS-256X, the rate is <tt>128 * D</tt> bits.</t>
          </li>
          <li pn="section-5.1-1.3">
            <t indent="0" pn="section-5.1-1.3.1"><tt>V[j,i]</tt>: the <tt>j</tt>-th AES block of the <tt>i</tt>-th state. <tt>i</tt> is in the <tt>[0..D)</tt> range. For AEGIS-128X, <tt>j</tt> is in the <tt>[0..8)</tt> range, while for AEGIS-256X, <tt>j</tt> is in the <tt>[0..6)</tt> range.</t>
          </li>
          <li pn="section-5.1-1.4">
            <t indent="0" pn="section-5.1-1.4.1"><tt>V'[j,i]</tt>: the <tt>j</tt>-th AES block of the next <tt>i</tt>-th state.</t>
          </li>
          <li pn="section-5.1-1.5">
            <t indent="0" pn="section-5.1-1.5.1"><tt>ctx[i]</tt>: the <tt>i</tt>-th context separator. This is a 128-bit mask made of a byte representing the state index, followed by a byte representing the highest index and 112 all-zero bits.</t>
          </li>
        </ul>
      </section>
      <section anchor="authenticated-encryption-2" numbered="true" removeInRFC="false" toc="include" pn="section-5.2">
        <name slugifiedName="name-authenticated-encryption-3">Authenticated Encryption</name>
        <sourcecode type="pseudocode" markers="false" pn="section-5.2-1">
Encrypt(msg, ad, key, nonce)
</sourcecode>
        <t indent="0" pn="section-5.2-2">The <tt>Encrypt</tt> function of AEGIS-128X resembles that of AEGIS-128L. Similarly, the <tt>Encrypt</tt> function of AEGIS-256X mirrors that of AEGIS-256. However, both process <tt>R</tt>-bit input blocks per update.</t>
        <t indent="0" pn="section-5.2-3">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-5.2-4">
Init(key, nonce)

ct = {}

ad_blocks = Split(ZeroPad(ad, R), R)
for ai in ad_blocks:
    Absorb(ai)

msg_blocks = Split(ZeroPad(msg, R), R)
for xi in msg_blocks:
    ct = ct || Enc(xi)

tag = Finalize(|ad|, |msg|)
ct = Truncate(ct, |msg|)

return ct and tag
</sourcecode>
      </section>
      <section anchor="authenticated-decryption-2" numbered="true" removeInRFC="false" toc="include" pn="section-5.3">
        <name slugifiedName="name-authenticated-decryption-3">Authenticated Decryption</name>
        <sourcecode type="pseudocode" markers="false" pn="section-5.3-1">
Decrypt(ct, tag, ad, key, nonce)
</sourcecode>
        <t indent="0" pn="section-5.3-2">The <tt>Decrypt</tt> function of AEGIS-128X resembles that of AEGIS-128L. Similarly, the <tt>Decrypt</tt> function of AEGIS-256X mirrors that of AEGIS-256. However, both process <tt>R</tt>-bit input blocks per update.</t>
        <t indent="0" pn="section-5.3-3">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-5.3-4">
Init(key, nonce)

msg = {}

ad_blocks = Split(ZeroPad(ad, R), R)
for ai in ad_blocks:
    Absorb(ai)

ct_blocks = Split(ct, R)
cn = Tail(ct, |ct| mod R)

for ci in ct_blocks:
    msg = msg || Dec(ci)

if cn is not empty:
    msg = msg || DecPartial(cn)

expected_tag = Finalize(|ad|, |msg|)

if CtEq(tag, expected_tag) is False:
    erase msg
    erase expected_tag
    return "verification failed" error
else:
    return msg
</sourcecode>
      </section>
      <section anchor="aegis-128x" numbered="true" removeInRFC="false" toc="include" pn="section-5.4">
        <name slugifiedName="name-aegis-128x">AEGIS-128X</name>
        <section anchor="the-update-function-2" numbered="true" removeInRFC="false" toc="include" pn="section-5.4.1">
          <name slugifiedName="name-the-update-function-3">The Update Function</name>
          <sourcecode type="pseudocode" markers="false" pn="section-5.4.1-1">
Update(M0, M1)
</sourcecode>
          <t indent="0" pn="section-5.4.1-2">The AEGIS-128X <tt>Update</tt> function is similar to the AEGIS-128L <tt>Update</tt> function but absorbs <tt>R</tt> (= <tt>256 * D</tt>) bits at once. <tt>M0</tt> and <tt>M1</tt> are <tt>128 * D</tt> bits instead of 128 bits, but they are split into 128-bit blocks, each of which updates a different AEGIS-128L state.</t>
          <t indent="0" pn="section-5.4.1-3">Steps:</t>
          <sourcecode type="pseudocode" markers="false" pn="section-5.4.1-4">
m0 = Split(M0, 128)
m1 = Split(M1, 128)

for i in 0..D:
    V'[0,i] = AESRound(V[7,i], V[0,i] ^ m0[i])
    V'[1,i] = AESRound(V[0,i], V[1,i])
    V'[2,i] = AESRound(V[1,i], V[2,i])
    V'[3,i] = AESRound(V[2,i], V[3,i])
    V'[4,i] = AESRound(V[3,i], V[4,i] ^ m1[i])
    V'[5,i] = AESRound(V[4,i], V[5,i])
    V'[6,i] = AESRound(V[5,i], V[6,i])
    V'[7,i] = AESRound(V[6,i], V[7,i])

    V[0,i]  = V'[0,i]
    V[1,i]  = V'[1,i]
    V[2,i]  = V'[2,i]
    V[3,i]  = V'[3,i]
    V[4,i]  = V'[4,i]
    V[5,i]  = V'[5,i]
    V[6,i]  = V'[6,i]
    V[7,i]  = V'[7,i]
</sourcecode>
        </section>
        <section anchor="the-init-function-2" numbered="true" removeInRFC="false" toc="include" pn="section-5.4.2">
          <name slugifiedName="name-the-init-function-3">The Init Function</name>
          <sourcecode type="pseudocode" markers="false" pn="section-5.4.2-1">
Init(key, nonce)
</sourcecode>
          <t indent="0" pn="section-5.4.2-2">The <tt>Init</tt> function initializes a vector of <tt>D</tt> AEGIS-128L states with the same <tt>key</tt> and <tt>nonce</tt> but a different context <tt>ctx[i]</tt>. Before every initialization update, <tt>ctx[i]</tt> is XORed into <tt>V[3,i]</tt> and <tt>V[7,i]</tt>.</t>
          <t indent="0" pn="section-5.4.2-3">Steps:</t>
          <sourcecode type="pseudocode" markers="false" pn="section-5.4.2-4">
for i in 0..D:
    V[0,i] = key ^ nonce
    V[1,i] = C1
    V[2,i] = C0
    V[3,i] = C1
    V[4,i] = key ^ nonce
    V[5,i] = key ^ C0
    V[6,i] = key ^ C1
    V[7,i] = key ^ C0

nonce_v = {}
key_v = {}
for i in 0..D:
    nonce_v = nonce_v || nonce
    key_v = key_v || key

for i in 0..D:
    ctx[i] = ZeroPad(Byte(i) || Byte(D - 1), 128)

Repeat(10,
    for i in 0..D:
        V[3,i] = V[3,i] ^ ctx[i]
        V[7,i] = V[7,i] ^ ctx[i]

    Update(nonce_v, key_v)
)
</sourcecode>
        </section>
        <section anchor="the-absorb-function-2" numbered="true" removeInRFC="false" toc="include" pn="section-5.4.3">
          <name slugifiedName="name-the-absorb-function-3">The Absorb Function</name>
          <sourcecode type="pseudocode" markers="false" pn="section-5.4.3-1">
Absorb(ai)
</sourcecode>
          <t indent="0" pn="section-5.4.3-2">The <tt>Absorb</tt> function is similar to the AEGIS-128L <tt>Absorb</tt> function but absorbs <tt>R</tt> bits instead of 256 bits.</t>
          <t indent="0" pn="section-5.4.3-3">Steps:</t>
          <sourcecode type="pseudocode" markers="false" pn="section-5.4.3-4">
t0, t1 = Split(ai, R)
Update(t0, t1)
</sourcecode>
        </section>
        <section anchor="the-enc-function-2" numbered="true" removeInRFC="false" toc="include" pn="section-5.4.4">
          <name slugifiedName="name-the-enc-function-3">The Enc Function</name>
          <sourcecode type="pseudocode" markers="false" pn="section-5.4.4-1">
Enc(xi)
</sourcecode>
          <t indent="0" pn="section-5.4.4-2">The <tt>Enc</tt> function is similar to the AEGIS-128L <tt>Enc</tt> function but encrypts <tt>R</tt> bits instead of 256 bits.</t>
          <t indent="0" pn="section-5.4.4-3">Steps:</t>
          <sourcecode type="pseudocode" markers="false" pn="section-5.4.4-4">
z0 = {}
z1 = {}
for i in 0..D:
    z0 = z0 || (V[1,i] ^ V[6,i] ^ (V[2,i] &amp; V[3,i]))
    z1 = z1 || (V[2,i] ^ V[5,i] ^ (V[6,i] &amp; V[7,i]))

t0, t1 = Split(xi, R)
out0 = t0 ^ z0
out1 = t1 ^ z1

Update(t0, t1)
ci = out0 || out1

return ci
</sourcecode>
        </section>
        <section anchor="the-dec-function-2" numbered="true" removeInRFC="false" toc="include" pn="section-5.4.5">
          <name slugifiedName="name-the-dec-function-3">The Dec Function</name>
          <sourcecode type="pseudocode" markers="false" pn="section-5.4.5-1">
Dec(ci)
</sourcecode>
          <t indent="0" pn="section-5.4.5-2">The <tt>Dec</tt> function is similar to the AEGIS-128L <tt>Dec</tt> function but decrypts <tt>R</tt> bits instead of 256 bits.</t>
          <t indent="0" pn="section-5.4.5-3">Steps:</t>
          <sourcecode type="pseudocode" markers="false" pn="section-5.4.5-4">
z0 = {}
z1 = {}
for i in 0..D:
    z0 = z0 || (V[1,i] ^ V[6,i] ^ (V[2,i] &amp; V[3,i]))
    z1 = z1 || (V[2,i] ^ V[5,i] ^ (V[6,i] &amp; V[7,i]))

t0, t1 = Split(ci, R)
out0 = t0 ^ z0
out1 = t1 ^ z1

Update(out0, out1)
xi = out0 || out1

return xi
</sourcecode>
        </section>
        <section anchor="the-decpartial-function-2" numbered="true" removeInRFC="false" toc="include" pn="section-5.4.6">
          <name slugifiedName="name-the-decpartial-function-3">The DecPartial Function</name>
          <sourcecode type="pseudocode" markers="false" pn="section-5.4.6-1">
DecPartial(cn)
</sourcecode>
          <t indent="0" pn="section-5.4.6-2">The <tt>DecPartial</tt> function is similar to the AEGIS-128L <tt>DecPartial</tt> function but decrypts a non-empty final ciphertext block shorter than <tt>R</tt> bits.</t>
          <t indent="0" pn="section-5.4.6-3">Steps:</t>
          <sourcecode type="pseudocode" markers="false" pn="section-5.4.6-4">
z0 = {}
z1 = {}
for i in 0..D:
    z0 = z0 || (V[1,i] ^ V[6,i] ^ (V[2,i] &amp; V[3,i]))
    z1 = z1 || (V[2,i] ^ V[5,i] ^ (V[6,i] &amp; V[7,i]))

t0, t1 = Split(ZeroPad(cn, R), 128 * D)
out0 = t0 ^ z0
out1 = t1 ^ z1

xn = Truncate(out0 || out1, |cn|)

v0, v1 = Split(ZeroPad(xn, R), 128 * D)
Update(v0, v1)

return xn
</sourcecode>
        </section>
        <section anchor="the-finalize-function-2" numbered="true" removeInRFC="false" toc="include" pn="section-5.4.7">
          <name slugifiedName="name-the-finalize-function-3">The Finalize Function</name>
          <sourcecode type="pseudocode" markers="false" pn="section-5.4.7-1">
Finalize(ad_len_bits, msg_len_bits)
</sourcecode>
          <t indent="0" pn="section-5.4.7-2">The <tt>Finalize</tt> function finalizes every AEGIS-128L instance and combines the resulting authentication tags using the bitwise exclusive OR operation.</t>
          <t indent="0" pn="section-5.4.7-3">Steps:</t>
          <sourcecode type="pseudocode" markers="false" pn="section-5.4.7-4">
t = {}
u = LE64(ad_len_bits) || LE64(msg_len_bits)
for i in 0..D:
    t = t || (V[2,i] ^ u)

Repeat(7, Update(t, t))

if tag_len_bits == 128:
    tag = Zeros(128)
    for i in 0..D:
        ti = V[0,i] ^ V[1,i] ^ V[2,i] ^ V[3,i] ^
             V[4,i] ^ V[5,i] ^ V[6,i]
        tag = tag ^ ti

else:            # 256 bits
    ti0 = Zeros(128)
    ti1 = Zeros(128)
    for i in 0..D:
        ti0 = ti0 ^ V[0,i] ^ V[1,i] ^ V[2,i] ^ V[3,i]
        ti1 = ti1 ^ V[4,i] ^ V[5,i] ^ V[6,i] ^ V[7,i]
    tag = ti0 || ti1

return tag
</sourcecode>
        </section>
      </section>
      <section anchor="aegis-256x" numbered="true" removeInRFC="false" toc="include" pn="section-5.5">
        <name slugifiedName="name-aegis-256x">AEGIS-256X</name>
        <section anchor="the-update-function-3" numbered="true" removeInRFC="false" toc="include" pn="section-5.5.1">
          <name slugifiedName="name-the-update-function-4">The Update Function</name>
          <sourcecode type="pseudocode" markers="false" pn="section-5.5.1-1">
Update(M)
</sourcecode>
          <t indent="0" pn="section-5.5.1-2">The AEGIS-256X <tt>Update</tt> function is similar to the AEGIS-256 <tt>Update</tt> function but absorbs <tt>R</tt> (= <tt>128 * D</tt>) bits at once. <tt>M</tt> is <tt>128 * D</tt> bits instead of 128 bits and is split into 128-bit blocks, each of which updates a different AEGIS-256 state.</t>
          <t indent="0" pn="section-5.5.1-3">Steps:</t>
          <sourcecode type="pseudocode" markers="false" pn="section-5.5.1-4">
m = Split(M, 128)

for i in 0..D:
    V'[0,i] = AESRound(V[5,i], V[0,i] ^ m[i])
    V'[1,i] = AESRound(V[0,i], V[1,i])
    V'[2,i] = AESRound(V[1,i], V[2,i])
    V'[3,i] = AESRound(V[2,i], V[3,i])
    V'[4,i] = AESRound(V[3,i], V[4,i])
    V'[5,i] = AESRound(V[4,i], V[5,i])

    V[0,i]  = V'[0,i]
    V[1,i]  = V'[1,i]
    V[2,i]  = V'[2,i]
    V[3,i]  = V'[3,i]
    V[4,i]  = V'[4,i]
    V[5,i]  = V'[5,i]
</sourcecode>
        </section>
        <section anchor="the-init-function-3" numbered="true" removeInRFC="false" toc="include" pn="section-5.5.2">
          <name slugifiedName="name-the-init-function-4">The Init Function</name>
          <sourcecode type="pseudocode" markers="false" pn="section-5.5.2-1">
Init(key, nonce)
</sourcecode>
          <t indent="0" pn="section-5.5.2-2">The <tt>Init</tt> function initializes a vector of <tt>D</tt> AEGIS-256 states with the same <tt>key</tt> and <tt>nonce</tt> but a different context <tt>ctx[i]</tt>. Before every initialization update, <tt>ctx[i]</tt> is XORed into <tt>V[3,i]</tt> and <tt>V[5,i]</tt>.</t>
          <t indent="0" pn="section-5.5.2-3">Steps:</t>
          <sourcecode type="pseudocode" markers="false" pn="section-5.5.2-4">
k0, k1 = Split(key, 128)
n0, n1 = Split(nonce, 128)

for i in 0..D:
    V[0,i] = k0 ^ n0
    V[1,i] = k1 ^ n1
    V[2,i] = C1
    V[3,i] = C0
    V[4,i] = k0 ^ C0
    V[5,i] = k1 ^ C1

k0_v, k1_v = {}, {}
k0n0_v, k1n1_v = {}, {}
for i in 0..D:
    k0_v = k0_v || k0
    k1_v = k1_v || k1
    k0n0_v = k0n0_v || (k0 ^ n0)
    k1n1_v = k1n1_v || (k1 ^ n1)

for i in 0..D:
    ctx[i] = ZeroPad(Byte(i) || Byte(D - 1), 128)

Repeat(4,
    for i in 0..D:
        V[3,i] = V[3,i] ^ ctx[i]
        V[5,i] = V[5,i] ^ ctx[i]

    Update(k0_v)
    for i in 0..D:
        V[3,i] = V[3,i] ^ ctx[i]
        V[5,i] = V[5,i] ^ ctx[i]

    Update(k1_v)
    for i in 0..D:
        V[3,i] = V[3,i] ^ ctx[i]
        V[5,i] = V[5,i] ^ ctx[i]

    Update(k0n0_v)
    for i in 0..D:
        V[3,i] = V[3,i] ^ ctx[i]
        V[5,i] = V[5,i] ^ ctx[i]

    Update(k1n1_v)
)
</sourcecode>
        </section>
        <section anchor="the-absorb-function-3" numbered="true" removeInRFC="false" toc="include" pn="section-5.5.3">
          <name slugifiedName="name-the-absorb-function-4">The Absorb Function</name>
          <sourcecode type="pseudocode" markers="false" pn="section-5.5.3-1">
Absorb(ai)
</sourcecode>
          <t indent="0" pn="section-5.5.3-2">The <tt>Absorb</tt> function is similar to the AEGIS-256 <tt>Absorb</tt> function but absorbs <tt>R</tt> bits instead of 128 bits.</t>
          <t indent="0" pn="section-5.5.3-3">Steps:</t>
          <sourcecode type="pseudocode" markers="false" pn="section-5.5.3-4">
Update(ai)
</sourcecode>
        </section>
        <section anchor="the-enc-function-3" numbered="true" removeInRFC="false" toc="include" pn="section-5.5.4">
          <name slugifiedName="name-the-enc-function-4">The Enc Function</name>
          <sourcecode type="pseudocode" markers="false" pn="section-5.5.4-1">
Enc(xi)
</sourcecode>
          <t indent="0" pn="section-5.5.4-2">The <tt>Enc</tt> function is similar to the AEGIS-256 <tt>Enc</tt> function but encrypts <tt>R</tt> bits instead of 128 bits.</t>
          <t indent="0" pn="section-5.5.4-3">Steps:</t>
          <sourcecode type="pseudocode" markers="false" pn="section-5.5.4-4">
z = {}
for i in 0..D:
    z = z || (V[1,i] ^ V[4,i] ^ V[5,i] ^ (V[2,i] &amp; V[3,i]))

Update(xi)

ci = xi ^ z

return ci
</sourcecode>
        </section>
        <section anchor="the-dec-function-3" numbered="true" removeInRFC="false" toc="include" pn="section-5.5.5">
          <name slugifiedName="name-the-dec-function-4">The Dec Function</name>
          <sourcecode type="pseudocode" markers="false" pn="section-5.5.5-1">
Dec(ci)
</sourcecode>
          <t indent="0" pn="section-5.5.5-2">The <tt>Dec</tt> function is similar to the AEGIS-256 <tt>Dec</tt> function but decrypts <tt>R</tt> bits instead of 128 bits.</t>
          <t indent="0" pn="section-5.5.5-3">Steps:</t>
          <sourcecode type="pseudocode" markers="false" pn="section-5.5.5-4">
z = {}
for i in 0..D:
    z = z || (V[1,i] ^ V[4,i] ^ V[5,i] ^ (V[2,i] &amp; V[3,i]))

xi = ci ^ z

Update(xi)

return xi
</sourcecode>
        </section>
        <section anchor="the-decpartial-function-3" numbered="true" removeInRFC="false" toc="include" pn="section-5.5.6">
          <name slugifiedName="name-the-decpartial-function-4">The DecPartial Function</name>
          <sourcecode type="pseudocode" markers="false" pn="section-5.5.6-1">
DecPartial(cn)
</sourcecode>
          <t indent="0" pn="section-5.5.6-2">The <tt>DecPartial</tt> function is similar to the AEGIS-256 <tt>DecPartial</tt> function but decrypts a non-empty final ciphertext block shorter than <tt>R</tt> bits.</t>
          <t indent="0" pn="section-5.5.6-3">Steps:</t>
          <sourcecode type="pseudocode" markers="false" pn="section-5.5.6-4">
z = {}
for i in 0..D:
    z = z || (V[1,i] ^ V[4,i] ^ V[5,i] ^ (V[2,i] &amp; V[3,i]))

t = ZeroPad(cn, R)
out = t ^ z

xn = Truncate(out, |cn|)

v = ZeroPad(xn, 128 * D)
Update(v)

return xn
</sourcecode>
        </section>
        <section anchor="the-finalize-function-3" numbered="true" removeInRFC="false" toc="include" pn="section-5.5.7">
          <name slugifiedName="name-the-finalize-function-4">The Finalize Function</name>
          <sourcecode type="pseudocode" markers="false" pn="section-5.5.7-1">
Finalize(ad_len_bits, msg_len_bits)
</sourcecode>
          <t indent="0" pn="section-5.5.7-2">The <tt>Finalize</tt> function finalizes every AEGIS-256 instance and combines the resulting authentication tags using the bitwise exclusive OR operation.</t>
          <t indent="0" pn="section-5.5.7-3">Steps:</t>
          <sourcecode type="pseudocode" markers="false" pn="section-5.5.7-4">
t = {}
u = LE64(ad_len_bits) || LE64(msg_len_bits)
for i in 0..D:
    t = t || (V[3,i] ^ u)

Repeat(7, Update(t))

if tag_len_bits == 128:
    tag = Zeros(128)
    for i in 0..D:
        ti = V[0,i] ^ V[1,i] ^ V[2,i] ^ V[3,i] ^ V[4,i] ^ V[5,i]
        tag = tag ^ ti

else:            # 256 bits
    ti0 = Zeros(128)
    ti1 = Zeros(128)
    for i in 0..D:
        ti0 = ti0 ^ V[0,i] ^ V[1,i] ^ V[2,i]
        ti1 = ti1 ^ V[3,i] ^ V[4,i] ^ V[5,i]
    tag = ti0 || ti1

return tag
</sourcecode>
        </section>
      </section>
      <section anchor="implementation-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-5.6">
        <name slugifiedName="name-implementation-consideratio">Implementation Considerations</name>
        <t indent="0" pn="section-5.6-1">AEGIS-128X and AEGIS-256X with a degree of <tt>1</tt> are identical to AEGIS-128L and AEGIS-256, respectively. This property can be used to reduce the size of a generic implementation.</t>
        <t indent="0" pn="section-5.6-2">In AEGIS-128X, <tt>V</tt> can be represented as eight 256-bit registers (when <tt>D = 2</tt>) or eight 512-bit registers (when <tt>D = 4</tt>). In AEGIS-256X, <tt>V</tt> can be represented as six 256-bit registers (when <tt>D = 2</tt>) or six 512-bit registers (when <tt>D = 4</tt>). With this representation, loops over <tt>0..D</tt> in the above pseudocode can be replaced by vector instructions.</t>
      </section>
      <section anchor="operational-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-5.7">
        <name slugifiedName="name-operational-considerations">Operational Considerations</name>
        <t indent="0" pn="section-5.7-1">The AEGIS parallel modes are specialized and can only improve performance on specific CPUs.</t>
        <t indent="0" pn="section-5.7-2">The degrees of parallelism that implementations are encouraged to support are <tt>2</tt> (for CPUs with 256-bit registers) and <tt>4</tt> (for CPUs with 512-bit registers). The resulting algorithms are called <tt>AEGIS-128X2</tt>, <tt>AEGIS-128X4</tt>, <tt>AEGIS-256X2</tt>, and <tt>AEGIS-256X4</tt>.</t>
        <t indent="0" pn="section-5.7-3">The following table summarizes how many bits are processed in parallel (rate), the memory requirements (state size), and the minimum vector register size a CPU should support for optimal performance.</t>
        <table align="center" pn="table-1">
          <name slugifiedName="name-aegis-parallel-mode-paramet">AEGIS Parallel Mode Parameters</name>
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Algorithm</th>
              <th align="right" colspan="1" rowspan="1">Rate (Bits)</th>
              <th align="center" colspan="1" rowspan="1">Optimal Register Size</th>
              <th align="right" colspan="1" rowspan="1">State Size (Bits)</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">AEGIS-128L</td>
              <td align="right" colspan="1" rowspan="1">256</td>
              <td align="center" colspan="1" rowspan="1">128 bits</td>
              <td align="right" colspan="1" rowspan="1">1024</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">AEGIS-128X2</td>
              <td align="right" colspan="1" rowspan="1">512</td>
              <td align="center" colspan="1" rowspan="1">256 bits</td>
              <td align="right" colspan="1" rowspan="1">2048</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">AEGIS-128X4</td>
              <td align="right" colspan="1" rowspan="1">1024</td>
              <td align="center" colspan="1" rowspan="1">512 bits</td>
              <td align="right" colspan="1" rowspan="1">4096</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">AEGIS-256</td>
              <td align="right" colspan="1" rowspan="1">128</td>
              <td align="center" colspan="1" rowspan="1">128 bits</td>
              <td align="right" colspan="1" rowspan="1">768</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">AEGIS-256X2</td>
              <td align="right" colspan="1" rowspan="1">256</td>
              <td align="center" colspan="1" rowspan="1">256 bits</td>
              <td align="right" colspan="1" rowspan="1">1536</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">AEGIS-256X4</td>
              <td align="right" colspan="1" rowspan="1">512</td>
              <td align="center" colspan="1" rowspan="1">512 bits</td>
              <td align="right" colspan="1" rowspan="1">3072</td>
            </tr>
          </tbody>
        </table>
        <t indent="0" pn="section-5.7-5">Note that architectures with smaller vector registers, but with many registers and large pipelines, may still benefit from the parallel modes.</t>
        <t indent="0" pn="section-5.7-6">Protocols <bcp14>SHOULD</bcp14> opt for a parallel mode only when all the involved parties agree on a specific variant. AEGIS-128L and AEGIS-256 <bcp14>SHOULD</bcp14> remain the default choices.</t>
        <t indent="0" pn="section-5.7-7">Implementations <bcp14>MAY</bcp14> choose not to include the parallel AEGIS modes.</t>
      </section>
    </section>
    <section anchor="encoding-ct-tag-tuples" numbered="true" removeInRFC="false" toc="include" pn="section-6">
      <name slugifiedName="name-encoding-ct-tag-tuples">Encoding (ct, tag) Tuples</name>
      <t indent="0" pn="section-6-1">Applications <bcp14>MAY</bcp14> keep the ciphertext and the authentication tag in distinct structures or encode both as a single string.</t>
      <t indent="0" pn="section-6-2">In the latter case, the tag <bcp14>MUST</bcp14> immediately follow the ciphertext:</t>
      <sourcecode type="pseudocode" markers="false" pn="section-6-3">
combined_ct = ct || tag
</sourcecode>
      <t indent="0" pn="section-6-4">The length of <tt>combined_ct</tt> <bcp14>MUST</bcp14> be less than or equal to <tt>C_MAX</tt>.</t>
    </section>
    <section anchor="aegis-as-a-stream-cipher" numbered="true" removeInRFC="false" toc="include" pn="section-7">
      <name slugifiedName="name-aegis-as-a-stream-cipher">AEGIS as a Stream Cipher</name>
      <t indent="0" pn="section-7-1">All AEGIS variants can also be used as stream ciphers.</t>
      <sourcecode type="pseudocode" markers="false" pn="section-7-2">
Stream(len, key, nonce)
</sourcecode>
      <t indent="0" pn="section-7-3">The <tt>Stream</tt> function expands a key and an optional nonce into a variable-length keystream.</t>
      <t indent="0" pn="section-7-4">Inputs:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-7-5">
        <li pn="section-7-5.1">
          <t indent="0" pn="section-7-5.1.1"><tt>len</tt>: the length of the keystream to generate in bits.</t>
        </li>
        <li pn="section-7-5.2">
          <t indent="0" pn="section-7-5.2.1"><tt>key</tt>: the AEGIS key.</t>
        </li>
        <li pn="section-7-5.3">
          <t indent="0" pn="section-7-5.3.1"><tt>nonce</tt>: the AEGIS nonce. If unspecified, it is set to <tt>N_MAX</tt> zero bytes.</t>
        </li>
      </ul>
      <t indent="0" pn="section-7-6">Outputs:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-7-7">
        <li pn="section-7-7.1">
          <t indent="0" pn="section-7-7.1.1"><tt>stream</tt>: the keystream.</t>
        </li>
      </ul>
      <t indent="0" pn="section-7-8">Steps:</t>
      <sourcecode type="pseudocode" markers="false" pn="section-7-9">
if len == 0:
    return {}
else:
    stream, tag = Encrypt(Zeros(len), {}, key, nonce)
    return stream
</sourcecode>
      <t indent="0" pn="section-7-10">This is equivalent to encrypting a <tt>len</tt> all-zero bits message without associated data and discarding the authentication tag.</t>
      <t indent="0" pn="section-7-11">Instead of relying on the generic <tt>Encrypt</tt> function, implementations can omit the <tt>Finalize</tt> function.</t>
      <t indent="0" pn="section-7-12">After initialization, the <tt>Update</tt> function is called with constant parameters, allowing further optimizations.</t>
    </section>
    <section anchor="aegis-as-a-message-authentication-code" numbered="true" removeInRFC="false" toc="include" pn="section-8">
      <name slugifiedName="name-aegis-as-a-message-authenti">AEGIS as a Message Authentication Code</name>
      <t indent="0" pn="section-8-1">All AEGIS variants can be used to construct a message authentication code (MAC).</t>
      <t indent="0" pn="section-8-2">For all variants, the <tt>Mac</tt> function takes a key, a nonce, and data as input and produces a 128- or 256-bit tag as output.</t>
      <sourcecode type="pseudocode" markers="false" pn="section-8-3">
Mac(data, key, nonce)
</sourcecode>
      <t indent="0" pn="section-8-4">Security:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-8-5">
        <li pn="section-8-5.1">
          <t indent="0" pn="section-8-5.1.1">This is the only function that allows the reuse of <tt>(key, nonce)</tt> pairs with different inputs.</t>
        </li>
        <li pn="section-8-5.2">
          <t indent="0" pn="section-8-5.2.1">AEGIS-based MAC functions <bcp14>MUST NOT</bcp14> be used as hash functions. If the key is known, inputs causing state collisions can easily be crafted.</t>
        </li>
        <li pn="section-8-5.3">
          <t indent="0" pn="section-8-5.3.1">Unlike hash-based MACs, tags <bcp14>MUST NOT</bcp14> be used for key derivation because there is no guarantee that they are uniformly random.</t>
        </li>
      </ul>
      <t indent="0" pn="section-8-6">Inputs:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-8-7">
        <li pn="section-8-7.1">
          <t indent="0" pn="section-8-7.1.1"><tt>data</tt>: the input data to authenticate (length <bcp14>MUST</bcp14> be less than or equal to <tt>A_MAX</tt>).</t>
        </li>
        <li pn="section-8-7.2">
          <t indent="0" pn="section-8-7.2.1"><tt>key</tt>: the secret key.</t>
        </li>
        <li pn="section-8-7.3">
          <t indent="0" pn="section-8-7.3.1"><tt>nonce</tt>: the public nonce.</t>
        </li>
      </ul>
      <t indent="0" pn="section-8-8">Outputs:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-8-9">
        <li pn="section-8-9.1">
          <t indent="0" pn="section-8-9.1.1"><tt>tag</tt>: the authentication tag.</t>
        </li>
      </ul>
      <section anchor="aegismac-128l" numbered="true" removeInRFC="false" toc="include" pn="section-8.1">
        <name slugifiedName="name-aegismac-128l">AEGISMAC-128L</name>
        <t indent="0" pn="section-8.1-1">AEGISMAC-128L refers to the <tt>Mac</tt> function based on the building blocks of AEGIS-128L.</t>
        <t indent="0" pn="section-8.1-2">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-8.1-3">
Init(key, nonce)
data_blocks = Split(ZeroPad(data, 256), 256)
for di in data_blocks:
    Absorb(di)
tag = Finalize(|data|, tag_len_bits)
return tag
</sourcecode>
      </section>
      <section anchor="aegismac-256" numbered="true" removeInRFC="false" toc="include" pn="section-8.2">
        <name slugifiedName="name-aegismac-256">AEGISMAC-256</name>
        <t indent="0" pn="section-8.2-1">AEGISMAC-256 refers to the <tt>Mac</tt> function based on the building blocks of AEGIS-256.</t>
        <t indent="0" pn="section-8.2-2">Steps:</t>
        <sourcecode type="pseudocode" markers="false" pn="section-8.2-3">
Init(key, nonce)
data_blocks = Split(ZeroPad(data, 128), 128)
for di in data_blocks:
    Absorb(di)
tag = Finalize(|data|, tag_len_bits)
return tag
</sourcecode>
      </section>
      <section anchor="aegismac-128x" numbered="true" removeInRFC="false" toc="include" pn="section-8.3">
        <name slugifiedName="name-aegismac-128x">AEGISMAC-128X</name>
        <t indent="0" pn="section-8.3-1">AEGISMAC-128X is based on the building blocks of AEGIS-128X but replaces the <tt>Finalize</tt> function with a dedicated <tt>FinalizeMac</tt> function.</t>
        <section anchor="the-mac-function" numbered="true" removeInRFC="false" toc="include" pn="section-8.3.1">
          <name slugifiedName="name-the-mac-function">The Mac Function</name>
          <t indent="0" pn="section-8.3.1-1">Steps:</t>
          <sourcecode type="pseudocode" markers="false" pn="section-8.3.1-2">
Init(key, nonce)
data_blocks = Split(ZeroPad(data, R), R)
for di in data_blocks:
    Absorb(di)
tag = FinalizeMac(|data|)
return tag
</sourcecode>
        </section>
        <section anchor="the-finalizemac-function" numbered="true" removeInRFC="false" toc="include" pn="section-8.3.2">
          <name slugifiedName="name-the-finalizemac-function">The FinalizeMac Function</name>
          <sourcecode type="pseudocode" markers="false" pn="section-8.3.2-1">
FinalizeMac(data_len_bits)
</sourcecode>
          <t indent="0" pn="section-8.3.2-2">The <tt>FinalizeMac</tt> function computes a 128- or 256-bit tag that authenticates the input data.</t>
          <t indent="0" pn="section-8.3.2-3">It finalizes all the instances, absorbs the resulting tags into the first state, and computes the final tag using that single state, as done in AEGIS-128L.</t>
          <t indent="0" pn="section-8.3.2-4">Steps:</t>
          <sourcecode type="pseudocode" markers="false" pn="section-8.3.2-5">
t = {}
u = LE64(data_len_bits) || LE64(tag_len_bits)
for i in 0..D:
    t = t || (V[2,i] ^ u)

Repeat(7, Update(t, t))

tags = {}
if tag_len_bits == 128:
    for i in 0..D: # tag from state 0 is included
        ti = V[0,i] ^ V[1,i] ^ V[2,i] ^ V[3,i] ^
             V[4,i] ^ V[5,i] ^ V[6,i]
        tags = tags || ti

else:              # 256 bits
    for i in 1..D: # tag from state 0 is skipped
        ti0 = V[0,i] ^ V[1,i] ^ V[2,i] ^ V[3,i]
        ti1 = V[4,i] ^ V[5,i] ^ V[6,i] ^ V[7,i]
        tags = tags || (ti0 || ti1)

if D &gt; 1:
    # Absorb tags into state 0; other states are not used anymore
    for v in Split(tags, 256):
        x0, x1 = Split(v, 128)
        Absorb(ZeroPad(x0, R / 2) || ZeroPad(x1, R / 2))

    u = LE64(D) || LE64(tag_len_bits)
    t = ZeroPad(V[2,0] ^ u, R)
    Repeat(7, Update(t, t))

if tag_len_bits == 128:
    tag = V[0,0] ^ V[1,0] ^ V[2,0] ^ V[3,0] ^
          V[4,0] ^ V[5,0] ^ V[6,0]
else:            # 256 bits
    t0 = V[0,0] ^ V[1,0] ^ V[2,0] ^ V[3,0]
    t1 = V[4,0] ^ V[5,0] ^ V[6,0] ^ V[7,0]
    tag = t0 || t1

return tag
</sourcecode>
        </section>
      </section>
      <section anchor="aegismac-256x" numbered="true" removeInRFC="false" toc="include" pn="section-8.4">
        <name slugifiedName="name-aegismac-256x">AEGISMAC-256X</name>
        <t indent="0" pn="section-8.4-1">AEGISMAC-256X is based on the building blocks of AEGIS-256X but replaces the <tt>Finalize</tt> function with a dedicated <tt>FinalizeMac</tt> function.</t>
        <section anchor="the-mac-function-1" numbered="true" removeInRFC="false" toc="include" pn="section-8.4.1">
          <name slugifiedName="name-the-mac-function-2">The Mac Function</name>
          <t indent="0" pn="section-8.4.1-1">Steps:</t>
          <sourcecode type="pseudocode" markers="false" pn="section-8.4.1-2">
Init(key, nonce)
data_blocks = Split(ZeroPad(data, R), R)
for di in data_blocks:
    Absorb(di)
tag = FinalizeMac(|data|)
return tag
</sourcecode>
        </section>
        <section anchor="the-finalizemac-function-1" numbered="true" removeInRFC="false" toc="include" pn="section-8.4.2">
          <name slugifiedName="name-the-finalizemac-function-2">The FinalizeMac Function</name>
          <sourcecode type="pseudocode" markers="false" pn="section-8.4.2-1">
FinalizeMac(data_len_bits)
</sourcecode>
          <t indent="0" pn="section-8.4.2-2">The <tt>FinalizeMac</tt> function computes a 128- or 256-bit tag that authenticates the input data.</t>
          <t indent="0" pn="section-8.4.2-3">It finalizes all the instances, absorbs the resulting tags into the first state, and computes the final tag using that single state, as done in AEGIS-256.</t>
          <sourcecode type="pseudocode" markers="false" pn="section-8.4.2-4">
t = {}
u = LE64(data_len_bits) || LE64(tag_len_bits)
for i in 0..D:
    t = t || (V[3,i] ^ u)

Repeat(7, Update(t))

tags = {}
if tag_len_bits == 128:
    for i in 1..D: # tag from state 0 is skipped
        ti = V[0,i] ^ V[1,i] ^ V[2,i] ^ V[3,i] ^ V[4,i] ^ V[5,i]
        tags = tags || ti

else:              # 256 bits
    for i in 1..D: # tag from state 0 is skipped
        ti0 = V[0,i] ^ V[1,i] ^ V[2,i]
        ti1 = V[3,i] ^ V[4,i] ^ V[5,i]
        tags = tags || (ti0 || ti1)

if D &gt; 1:
    # Absorb tags into state 0; other states are not used anymore
    for v in Split(tags, 128):
        Absorb(ZeroPad(v, R))

    u = LE64(D) || LE64(tag_len_bits)
    t = ZeroPad(V[3,0] ^ u, R)
    Repeat(7, Update(t))

if tag_len_bits == 128:
    tag = V[0,0] ^ V[1,0] ^ V[2,0] ^ V[3,0] ^ V[4,0] ^ V[5,0]
else:            # 256 bits
    t0 = V[0,0] ^ V[1,0] ^ V[2,0]
    t1 = V[3,0] ^ V[4,0] ^ V[5,0]
    tag = t0 || t1

return tag
</sourcecode>
        </section>
      </section>
    </section>
    <section anchor="security-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-9">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <section anchor="usage-guidelines" numbered="true" removeInRFC="false" toc="include" pn="section-9.1">
        <name slugifiedName="name-usage-guidelines">Usage Guidelines</name>
        <section anchor="key-and-nonce-selection" numbered="true" removeInRFC="false" toc="include" pn="section-9.1.1">
          <name slugifiedName="name-key-and-nonce-selection">Key and Nonce Selection</name>
          <t indent="0" pn="section-9.1.1-1">When AEGIS is used for encryption, a <tt>nonce</tt> <bcp14>MUST</bcp14> only be used once for a given <tt>key</tt>, even with different <tt>tag</tt> lengths. Failure to do so would immediately reveal the bitwise difference between two messages.</t>
          <t indent="0" pn="section-9.1.1-2">Every key <bcp14>MUST</bcp14> be randomly chosen from a uniform distribution.</t>
          <t indent="0" pn="section-9.1.1-3">The nonce <bcp14>MAY</bcp14> be public or predictable. It can be a counter, the output of a permutation, or a generator with a long period.</t>
          <t indent="0" pn="section-9.1.1-4">With AEGIS-128L and AEGIS-128X, random nonces can safely encrypt up to 2<sup>48</sup> messages using the same key with negligible (~2<sup>-33</sup>) collision probability. This is consistent with Section 8 of <xref target="SP800-38D" format="default" sectionFormat="of" derivedContent="SP800-38D"/>.</t>
          <t indent="0" pn="section-9.1.1-5">With AEGIS-256 and AEGIS-256X, random nonces can be used with no practical limits.</t>
        </section>
        <section anchor="committing-security" numbered="true" removeInRFC="false" toc="include" pn="section-9.1.2">
          <name slugifiedName="name-committing-security">Committing Security</name>
          <t indent="0" pn="section-9.1.2-1">An authentication tag may verify under multiple keys, nonces, or associated data, but AEGIS is assumed to be key committing in the receiver-binding game. This mitigates common attacks when used with low-entropy keys such as passwords. Finding distinct keys and/or nonces that successfully verify the same <tt>(ad, ct, tag)</tt> tuple is expected to require ~2<sup>64</sup> attempts with a 128-bit authentication tag and ~2<sup>128</sup> attempts with a 256-bit tag.</t>
          <t indent="0" pn="section-9.1.2-2">AEGIS is fully committing in the restricted setting where an adversary cannot control the associated data. As shown in <xref target="IR23" format="default" sectionFormat="of" derivedContent="IR23"/>, with the ability to alter the associated data, it is possible to efficiently find multiple keys that will verify the same authenticated ciphertext.</t>
          <t indent="0" pn="section-9.1.2-3">Protocols mandating a fully committing scheme without that restriction can provide the associated data as input to a cryptographic hash function and use the output as the <tt>ad</tt> parameter of the <tt>Encrypt</tt> and <tt>Decrypt</tt> functions. The selected hash function must ensure a minimum of 128-bit collision and preimage resistance. An instance of such a function is SHA-256 <xref target="RFC6234" format="default" sectionFormat="of" derivedContent="RFC6234"/>.</t>
          <t indent="0" pn="section-9.1.2-4">Alternatively, the associated data can be fed into a collision-resistant key derivation function (KDF), such as the HMAC-based key derivation function (HKDF) <xref target="RFC5869" format="default" sectionFormat="of" derivedContent="RFC5869"/>, via the <tt>info</tt> input to derive the <tt>key</tt> parameter. The <tt>ad</tt> parameter can then be left empty. Note that the <tt>salt</tt> input <bcp14>MUST NOT</bcp14> be used since large salts get hashed, which affects commitment. Furthermore, this requires values concatenated to form the <tt>info</tt> input to be unambiguously encoded, like by appending their lengths.</t>
        </section>
        <section anchor="multi-user-security" numbered="true" removeInRFC="false" toc="include" pn="section-9.1.3">
          <name slugifiedName="name-multi-user-security">Multi-User Security</name>
          <t indent="0" pn="section-9.1.3-1">AEGIS nonces match the size of the key. AEGIS-128L and AEGIS-128X feature 128-bit nonces, offering an extra 32 bits compared to the commonly used AEADs in IETF protocols at the time of writing. The AEGIS-256 and AEGIS-256X variants provide even larger nonces. With 192 random bits, 64 bits remain available to optionally encode additional information.</t>
          <t indent="0" pn="section-9.1.3-2">In all these variants, unused nonce bits can encode a key identifier, enhancing multi-user security. If every key has a unique identifier, multi-target attacks do not provide any advantage over single-target attacks.</t>
        </section>
      </section>
      <section anchor="implementation-security" numbered="true" removeInRFC="false" toc="include" pn="section-9.2">
        <name slugifiedName="name-implementation-security">Implementation Security</name>
        <t indent="0" pn="section-9.2-1">If tag verification fails, the unverified plaintext and computed authentication tag <bcp14>MUST NOT</bcp14> be released. As shown in <xref target="VV18" format="default" sectionFormat="of" derivedContent="VV18"/>, even a partial leak of the plaintext without verification facilitates chosen ciphertext attacks.</t>
        <t indent="0" pn="section-9.2-2">The security of AEGIS against timing and physical attacks is limited by the implementation of the underlying <tt>AESRound</tt> function. Failure to implement <tt>AESRound</tt> in a fashion safe against timing and physical attacks, such as differential power analysis, timing analysis, or fault injection attacks, may lead to leakage of secret key material or state information. The exact mitigations required for timing and physical attacks depend on the threat model in question.</t>
        <t indent="0" pn="section-9.2-3">Regardless of the variant, the <tt>key</tt> and <tt>nonce</tt> are only required by the <tt>Init</tt> function; other functions only depend on the resulting state. Therefore, implementations can overwrite ephemeral keys with zeros right after the last <tt>Update</tt> call of the initialization function.</t>
      </section>
      <section anchor="security-guarantees" numbered="true" removeInRFC="false" toc="include" pn="section-9.3">
        <name slugifiedName="name-security-guarantees">Security Guarantees</name>
        <t indent="0" pn="section-9.3-1">AEGIS-256 offers 256-bit security against plaintext and state recovery, whereas AEGIS-128L offers 128-bit security.</t>
        <t indent="0" pn="section-9.3-2">Under the assumption that the secret key is unknown to the attacker, all AEGIS variants offer at least 128-bit security against forgery attacks.</t>
        <t indent="0" pn="section-9.3-3">Encrypting the same message with the same key and nonce but different associated data generates distinct ciphertexts that do not reveal any additional information about the message.
However, <tt>(key, nonce)</tt> pairs <bcp14>MUST NOT</bcp14> be reused, even if the associated data differs.</t>
        <t indent="0" pn="section-9.3-4">AEGIS has been shown to have reforgeability resilience in <xref target="FLLW17" format="default" sectionFormat="of" derivedContent="FLLW17"/>. Without the ability to set the associated data, a successful forgery does not increase the probability of subsequent forgeries.</t>
        <t indent="0" pn="section-9.3-5">AEGIS-128X and AEGIS-256X share the same security properties and requirements as AEGIS-128L and AEGIS-256, respectively. In particular, the security level and usage limits remain the same <xref target="D23" format="default" sectionFormat="of" derivedContent="D23"/>.</t>
        <t indent="0" pn="section-9.3-6">AEGIS is considered secure against guess-and-determine attacks aimed at recovering the state from observed ciphertexts.</t>
        <t indent="0" pn="section-9.3-7">This resilience extends to quantum adversaries operating within the Q1 model, where the attacker has access to a quantum computer but is restricted to classical (non-quantum) communications with the systems under attack. In this model, quantum attacks offer no practical advantage in decrypting previously recorded ciphertexts or in recovering the encryption key.</t>
        <t indent="0" pn="section-9.3-8">This document extends the AEGIS specification <xref target="AEGIS" format="default" sectionFormat="of" derivedContent="AEGIS"/> by introducing optional support for 256-bit authentication tags, which are constructed similarly to the 128-bit tags.
As shown in <xref target="SSI24" format="default" sectionFormat="of" derivedContent="SSI24"/>, with 256-bit tags, all AEGIS variants achieve more than 128-bit security against forgery by differential attacks.</t>
        <t indent="0" pn="section-9.3-9">Security analyses of AEGIS can be found in <xref target="AEGIS" format="default" sectionFormat="of" derivedContent="AEGIS"/>, <xref target="M14" format="default" sectionFormat="of" derivedContent="M14"/>, <xref target="FLLW17" format="default" sectionFormat="of" derivedContent="FLLW17"/>, <xref target="ENP20" format="default" sectionFormat="of" derivedContent="ENP20"/>, <xref target="LIMS21" format="default" sectionFormat="of" derivedContent="LIMS21"/>, <xref target="JLD22" format="default" sectionFormat="of" derivedContent="JLD22"/>, <xref target="STSI23" format="default" sectionFormat="of" derivedContent="STSI23"/>, <xref target="IR23" format="default" sectionFormat="of" derivedContent="IR23"/>, <xref target="BS23" format="default" sectionFormat="of" derivedContent="BS23"/>, <xref target="AIKRS24" format="default" sectionFormat="of" derivedContent="AIKRS24"/>, and <xref target="SSI24" format="default" sectionFormat="of" derivedContent="SSI24"/>.</t>
      </section>
    </section>
    <section anchor="iana-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-10">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t indent="0" pn="section-10-1">IANA has assigned the following identifiers in the "AEAD Algorithms" registry and added this document as the reference for each:</t>
      <table align="center" pn="table-2">
        <name slugifiedName="name-aegis-entries-in-the-aead-a">AEGIS Entries in the AEAD Algorithms Registry</name>
        <thead>
          <tr>
            <th align="left" colspan="1" rowspan="1">Numeric ID</th>
            <th align="left" colspan="1" rowspan="1">Name</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left" colspan="1" rowspan="1">
              <tt>32</tt></td>
            <td align="left" colspan="1" rowspan="1">
              <tt>AEAD_AEGIS128L</tt></td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">
              <tt>33</tt></td>
            <td align="left" colspan="1" rowspan="1">
              <tt>AEAD_AEGIS256</tt></td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">
              <tt>34</tt></td>
            <td align="left" colspan="1" rowspan="1">
              <tt>AEAD_AEGIS128X2</tt></td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">
              <tt>35</tt></td>
            <td align="left" colspan="1" rowspan="1">
              <tt>AEAD_AEGIS128X4</tt></td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">
              <tt>36</tt></td>
            <td align="left" colspan="1" rowspan="1">
              <tt>AEAD_AEGIS256X2</tt></td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">
              <tt>37</tt></td>
            <td align="left" colspan="1" rowspan="1">
              <tt>AEAD_AEGIS256X4</tt></td>
          </tr>
        </tbody>
      </table>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references" pn="section-11">
      <name slugifiedName="name-references">References</name>
      <references anchor="sec-normative-references" pn="section-11.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="FIPS-AES" quoteTitle="true" target="https://doi.org/10.6028/NIST.FIPS.197-upd1" derivedAnchor="FIPS-AES">
          <front>
            <title>Advanced Encryption Standard (AES)</title>
            <author>
              <organization showOnFrontPage="true">NIST</organization>
            </author>
            <date year="2023" month="May"/>
          </front>
          <seriesInfo name="NIST FIPS" value="197"/>
          <seriesInfo name="DOI" value="10.6028/NIST.FIPS.197-upd1"/>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="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 indent="0">In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC5116" target="https://www.rfc-editor.org/info/rfc5116" quoteTitle="true" derivedAnchor="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 indent="0">This document defines algorithms for Authenticated Encryption with Associated Data (AEAD), and defines a uniform interface and a registry for such algorithms. The interface and registry can be used as an application-independent set of cryptoalgorithm suites. This approach provides advantages in efficiency and security, and promotes the reuse of crypto implementations. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5116"/>
          <seriesInfo name="DOI" value="10.17487/RFC5116"/>
        </reference>
        <reference anchor="RFC5869" target="https://www.rfc-editor.org/info/rfc5869" quoteTitle="true" derivedAnchor="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 indent="0">This document specifies a simple Hashed Message Authentication Code (HMAC)-based key derivation function (HKDF), which can be used as a building block in various protocols and applications. The key derivation function (KDF) is intended to support a wide range of applications and requirements, and is conservative in its use of cryptographic hash functions. This document is not an Internet Standards Track specification; it is published for informational purposes.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5869"/>
          <seriesInfo name="DOI" value="10.17487/RFC5869"/>
        </reference>
        <reference anchor="RFC6234" target="https://www.rfc-editor.org/info/rfc6234" quoteTitle="true" derivedAnchor="RFC6234">
          <front>
            <title>US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)</title>
            <author fullname="D. Eastlake 3rd" initials="D." surname="Eastlake 3rd"/>
            <author fullname="T. Hansen" initials="T." surname="Hansen"/>
            <date month="May" year="2011"/>
            <abstract>
              <t indent="0">Federal Information Processing Standard, FIPS</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6234"/>
          <seriesInfo name="DOI" value="10.17487/RFC6234"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="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 indent="0">RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
      </references>
      <references anchor="sec-informative-references" pn="section-11.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="AEGIS" target="https://competitions.cr.yp.to/round3/aegisv11.pdf" quoteTitle="true" derivedAnchor="AEGIS">
          <front>
            <title>AEGIS: A Fast Authenticated Encryption Algorithm (v1.1)</title>
            <author initials="H." surname="Wu" fullname="Hongjun Wu">
              <organization showOnFrontPage="true">Nanyang Technological University</organization>
            </author>
            <author initials="B." surname="Preneel" fullname="Bart Preneel">
              <organization showOnFrontPage="true">KU Leuven</organization>
            </author>
            <date year="2016"/>
          </front>
        </reference>
        <reference anchor="AIKRS24" quoteTitle="true" target="https://doi.org/10.1007/s13389-024-00360-6" derivedAnchor="AIKRS24">
          <front>
            <title>Differential fault attack on AES-based encryption schemes: application to B5G/6G ciphers-Rocca, Rocca-S and AEGIS</title>
            <author initials="R." surname="Anand" fullname="Ravi Anand">
              <organization showOnFrontPage="true">Indraprastha Institute of Information Technology Delhi; University of Hyogo</organization>
            </author>
            <author initials="T." surname="Isobe" fullname="Takanori Isobe">
              <organization showOnFrontPage="true">University of Hyogo</organization>
            </author>
            <author initials="A. K." surname="Kundu" fullname="Anup Kumar Kundu">
              <organization showOnFrontPage="true">Indian Statistical Institute Kolkata</organization>
            </author>
            <author initials="M." surname="Rahman" fullname="Mostafizar Rahman">
              <organization showOnFrontPage="true">University of Hyogo</organization>
            </author>
            <author initials="S." surname="Suryawanshi" fullname="Sahiba Suryawanshi">
              <organization showOnFrontPage="true">University of Hyogo; Indian Institute of Technology Bhilai</organization>
            </author>
            <date year="2024"/>
          </front>
          <seriesInfo name="DOI" value="10.1007/s13389-024-00360-6"/>
          <refcontent>Journal of Cryptographic Engineering, vol. 14, pp. 595-607</refcontent>
        </reference>
        <reference anchor="BS23" target="https://eprint.iacr.org/2023/1306" quoteTitle="true" derivedAnchor="BS23">
          <front>
            <title>Single-query Quantum Hidden Shift Attacks</title>
            <author initials="X." surname="Bonnetain" fullname="Xavier Bonnetain">
              <organization showOnFrontPage="true">Université de Lorraine, CNRS, Inria, LORIA</organization>
            </author>
            <author initials="A." surname="Schrottenloher" fullname="André Schrottenloher">
              <organization showOnFrontPage="true">Université de Rennes, CNRS, Inria, IRISA</organization>
            </author>
            <date year="2023"/>
          </front>
          <refcontent>Cryptology ePrint Archive, Paper 2023/1306</refcontent>
        </reference>
        <reference anchor="D23" target="https://eprint.iacr.org/2023/523" quoteTitle="true" derivedAnchor="D23">
          <front>
            <title>Adding more parallelism to the AEGIS authenticated encryption algorithms</title>
            <author initials="F." surname="Denis" fullname="Frank Denis">
              <organization showOnFrontPage="true">Fastly Inc.</organization>
            </author>
            <date year="2023"/>
          </front>
          <refcontent>Cryptology ePrint Archive, Paper 2023/523</refcontent>
        </reference>
        <reference anchor="ENP20" quoteTitle="true" target="https://doi.org/10.13154/tosc.v2019.i4.348-368" derivedAnchor="ENP20">
          <front>
            <title>Analyzing the Linear Keystream Biases in AEGIS</title>
            <author initials="M." surname="Eichlseder" fullname="Maria Eichlseder">
              <organization showOnFrontPage="true">Graz University of Technology</organization>
            </author>
            <author initials="M." surname="Nageler" fullname="Marcel Nageler">
              <organization showOnFrontPage="true">Graz University of Technology</organization>
            </author>
            <author initials="R." surname="Primas" fullname="Robert Primas">
              <organization showOnFrontPage="true">Graz University of Technology</organization>
            </author>
            <date year="2020"/>
          </front>
          <seriesInfo name="DOI" value="10.13154/tosc.v2019.i4.348-368"/>
          <refcontent>IACR Transactions on Symmetric Cryptology, vol. 2019, no. 4, pp. 348-368</refcontent>
        </reference>
        <reference anchor="FLLW17" target="https://eprint.iacr.org/2017/332" quoteTitle="true" derivedAnchor="FLLW17">
          <front>
            <title>Reforgeability of Authenticated Encryption Schemes</title>
            <author initials="C." surname="Forler" fullname="Christian Forler">
              <organization showOnFrontPage="true">Beuth Hochschule für Technik Berlin</organization>
            </author>
            <author initials="E." surname="List" fullname="Eik List">
              <organization showOnFrontPage="true">Bauhaus-Universität Weimar</organization>
            </author>
            <author initials="S." surname="Lucks" fullname="Stefan Lucks">
              <organization showOnFrontPage="true">Bauhaus-Universität Weimar</organization>
            </author>
            <author initials="J." surname="Wenzel" fullname="Jakob Wenzel">
              <organization showOnFrontPage="true">Bauhaus-Universität Weimar</organization>
            </author>
            <date year="2017"/>
          </front>
          <refcontent>Cryptology ePrint Archive, Paper 2017/332</refcontent>
        </reference>
        <reference anchor="IR23" target="https://eprint.iacr.org/2023/1495" quoteTitle="true" derivedAnchor="IR23">
          <front>
            <title>Key Committing Security Analysis of AEGIS</title>
            <author initials="T." surname="Isobe" fullname="Takanori Isobe">
              <organization showOnFrontPage="true">University of Hyogo</organization>
            </author>
            <author initials="M." surname="Rahman" fullname="Mostafizar Rahman">
              <organization showOnFrontPage="true">University of Hyogo</organization>
            </author>
            <date year="2023"/>
          </front>
          <refcontent>Cryptology ePrint Archive, Paper 2023/1495</refcontent>
        </reference>
        <reference anchor="JLD22" quoteTitle="true" target="https://doi.org/10.1093/comjnl/bxab059" derivedAnchor="JLD22">
          <front>
            <title>Guess-and-Determine Attacks on AEGIS</title>
            <author initials="L." surname="Jiao" fullname="Lin Jiao">
              <organization showOnFrontPage="true">State Key Laboratory of Cryptology</organization>
            </author>
            <author initials="Y." surname="Li" fullname="Yongqiang Li">
              <organization showOnFrontPage="true">State Key Laboratory of Information Security, Institute of Information Engineering, Chinese Academy of Sciences; School of Cyber Security, University of Chinese Academy of Sciences</organization>
            </author>
            <author initials="S." surname="Du" fullname="Shaoyu Du">
              <organization showOnFrontPage="true">State Key Laboratory of Cryptology</organization>
            </author>
            <date year="2022"/>
          </front>
          <seriesInfo name="DOI" value="10.1093/comjnl/bxab059"/>
          <refcontent>The Computer Journal, vol. 65, no. 8, pp. 2221-2230</refcontent>
        </reference>
        <reference anchor="LGR21" target="https://www.usenix.org/conference/usenixsecurity21/presentation/len" quoteTitle="true" derivedAnchor="LGR21">
          <front>
            <title>Partitioning Oracle Attacks</title>
            <author initials="J." surname="Len" fullname="Julia Len">
              <organization showOnFrontPage="true">Cornell Tech</organization>
            </author>
            <author initials="P." surname="Grubbs" fullname="Paul Grubbs">
              <organization showOnFrontPage="true">Cornell Tech</organization>
            </author>
            <author initials="T." surname="Ristenpart" fullname="Thomas Ristenpart">
              <organization showOnFrontPage="true">Cornell Tech</organization>
            </author>
            <date year="2021"/>
          </front>
          <refcontent>30th USENIX Security Symposium (USENIX Security 21), pp. 195-212</refcontent>
        </reference>
        <reference anchor="LIMS21" quoteTitle="true" target="https://doi.org/10.46586/tosc.v2021.i2.104-139" derivedAnchor="LIMS21">
          <front>
            <title>Weak Keys in Reduced AEGIS and Tiaoxin</title>
            <author initials="F." surname="Liu" fullname="Fukang Liu">
              <organization showOnFrontPage="true">East China Normal University; University of Hyogo</organization>
            </author>
            <author initials="T." surname="Isobe" fullname="Takanori Isobe">
              <organization showOnFrontPage="true">University of Hyogo; National Institute of Information and Communications Technology; PRESTO, Japan Science and Technology Agency</organization>
            </author>
            <author initials="W." surname="Meier" fullname="Willi Meier">
              <organization showOnFrontPage="true">University of Applied Sciences and Arts Northwestern Switzerland</organization>
            </author>
            <author initials="K." surname="Sakamoto" fullname="Kosei Sakamoto">
              <organization showOnFrontPage="true">University of Hyogo</organization>
            </author>
            <date year="2021"/>
          </front>
          <seriesInfo name="DOI" value="10.46586/tosc.v2021.i2.104-139"/>
          <refcontent>IACR Transactions on Symmetric Cryptology, vol. 2021, no. 2, pp. 104-139</refcontent>
        </reference>
        <reference anchor="M14" quoteTitle="true" target="https://doi.org/10.1007/978-3-319-13051-4_18" derivedAnchor="M14">
          <front>
            <title>Linear Biases in AEGIS Keystream</title>
            <author initials="B." surname="Minaud" fullname="Brice Minaud">
              <organization showOnFrontPage="true">ANSSI</organization>
            </author>
            <date year="2014"/>
          </front>
          <seriesInfo name="DOI" value="10.1007/978-3-319-13051-4_18"/>
          <refcontent>Selected Areas in Cryptography (SAC 2014), Lecture Notes in Computer Science, vol. 8781, pp. 290-305</refcontent>
        </reference>
        <reference anchor="SP800-38D" quoteTitle="true" target="https://doi.org/10.6028/NIST.SP.800-38D" derivedAnchor="SP800-38D">
          <front>
            <title>Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC</title>
            <author>
              <organization showOnFrontPage="true">NIST</organization>
            </author>
            <date year="2007" month="November"/>
          </front>
          <seriesInfo name="NIST SP" value="800-38D"/>
          <seriesInfo name="DOI" value="10.6028/NIST.SP.800-38D"/>
        </reference>
        <reference anchor="SSI24" quoteTitle="true" target="https://doi.org/10.1007/978-981-97-7737-2_1" derivedAnchor="SSI24">
          <front>
            <title>Bit-Wise Analysis for Forgery Attacks on AES-Based AEAD Schemes</title>
            <author initials="T." surname="Shiraya" fullname="Takuro Shiraya">
              <organization showOnFrontPage="true">University of Hyogo</organization>
            </author>
            <author initials="K." surname="Sakamoto" fullname="Kosei Sakamoto">
              <organization showOnFrontPage="true">Mitsubishi Electric Corporation</organization>
            </author>
            <author initials="T." surname="Isobe" fullname="Takanori Isobe">
              <organization showOnFrontPage="true">University of Hyogo</organization>
            </author>
            <date year="2024"/>
          </front>
          <seriesInfo name="DOI" value="10.1007/978-981-97-7737-2_1"/>
          <refcontent>Advances in Information and Computer Security (IWSEC 2024), Lecture Notes in Computer Science, vol. 14977, pp. 3-22</refcontent>
        </reference>
        <reference anchor="STSI23" quoteTitle="true" target="https://doi.org/10.1049/ise2.12109" derivedAnchor="STSI23">
          <front>
            <title>MILP-based security evaluation for AEGIS/Tiaoxin-346/Rocca</title>
            <author initials="T." surname="Shiraya" fullname="Takuro Shiraya">
              <organization showOnFrontPage="true">University of Hyogo</organization>
            </author>
            <author initials="N." surname="Takeuchi" fullname="Nobuyuki Takeuchi">
              <organization showOnFrontPage="true">University of Hyogo</organization>
            </author>
            <author initials="K." surname="Sakamoto" fullname="Kosei Sakamoto">
              <organization showOnFrontPage="true">University of Hyogo</organization>
            </author>
            <author initials="T." surname="Isobe" fullname="Takanori Isobe">
              <organization showOnFrontPage="true">University of Hyogo; National Institute of Information and Communications Technology</organization>
            </author>
            <date year="2023"/>
          </front>
          <seriesInfo name="DOI" value="10.1049/ise2.12109"/>
          <refcontent>IET Information Security, vol 17, no. 3, pp. 458-467</refcontent>
        </reference>
        <reference anchor="TEST-VECTORS" target="https://github.com/cfrg/draft-irtf-cfrg-aegis-aead/tree/d3ef9984/test-vectors" quoteTitle="true" derivedAnchor="TEST-VECTORS">
          <front>
            <title>AEGIS Test Vectors</title>
            <author>
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2025" month="February" day="17"/>
          </front>
          <refcontent>commit 8e289c4</refcontent>
        </reference>
        <reference anchor="VV18" quoteTitle="true" target="https://doi.org/10.1007/978-3-319-93387-0_25" derivedAnchor="VV18">
          <front>
            <title>Can Caesar Beat Galois?</title>
            <author initials="S." surname="Vaudenay" fullname="Serge Vaudenay">
              <organization showOnFrontPage="true">EPFL</organization>
            </author>
            <author initials="D." surname="Vizár" fullname="Damian Vizár">
              <organization showOnFrontPage="true">EPFL</organization>
            </author>
            <date year="2018"/>
          </front>
          <seriesInfo name="DOI" value="10.1007/978-3-319-93387-0_25"/>
          <refcontent>Applied Cryptography and Network Security (ACNS 2018), Lecture Notes in Computer Science, vol. 10892, pp. 476-494</refcontent>
        </reference>
      </references>
    </references>
    <section anchor="test-vectors" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a">
      <name slugifiedName="name-test-vectors">Test Vectors</name>
      <t indent="0" pn="section-appendix.a-1">The following test vectors are also available in JSON format at <xref target="TEST-VECTORS" format="default" sectionFormat="of" derivedContent="TEST-VECTORS"/>. In this format, byte strings are represented as JSON strings containing their hexadecimal encoding.</t>
      <section anchor="aesround-test-vector" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.1">
        <name slugifiedName="name-aesround-test-vector">AESRound Test Vector</name>
        <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.1-1">
in   : 000102030405060708090a0b0c0d0e0f

rk   : 101112131415161718191a1b1c1d1e1f

out  : 7a7b4e5638782546a8c0477a3b813f43
</sourcecode>
      </section>
      <section anchor="aegis-128l-test-vectors" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.2">
        <name slugifiedName="name-aegis-128l-test-vectors">AEGIS-128L Test Vectors</name>
        <section anchor="update-test-vector" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.2.1">
          <name slugifiedName="name-update-test-vector">Update Test Vector</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.2.1-1">
S0   : 9b7e60b24cc873ea894ecc07911049a3
S1   : 330be08f35300faa2ebf9a7b0d274658
S2   : 7bbd5bd2b049f7b9b515cf26fbe7756c
S3   : c35a00f55ea86c3886ec5e928f87db18
S4   : 9ebccafce87cab446396c4334592c91f
S5   : 58d83e31f256371e60fc6bb257114601
S6   : 1639b56ea322c88568a176585bc915de
S7   : 640818ffb57dc0fbc2e72ae93457e39a

M0   : 033e6975b94816879e42917650955aa0
M1   : fcc1968a46b7e97861bd6e89af6aa55f

After Update:

S0   : 596ab773e4433ca0127c73f60536769d
S1   : 790394041a3d26ab697bde865014652d
S2   : 38cf49e4b65248acd533041b64dd0611
S3   : 16d8e58748f437bfff1797f780337cee
S4   : 9689ecdf08228c74d7e3360cca53d0a5
S5   : a21746bb193a569e331e1aa985d0d729
S6   : 09d714e6fcf9177a8ed1cde7e3d259a6
S7   : 61279ba73167f0ab76f0a11bf203bdff
</sourcecode>
        </section>
        <section anchor="test-vector-1" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.2.2">
          <name slugifiedName="name-test-vector-1">Test Vector 1</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.2.2-1">
key   : 10010000000000000000000000000000

nonce : 10000200000000000000000000000000

ad    :

msg   : 00000000000000000000000000000000

ct    : c1c0e58bd913006feba00f4b3cc3594e

tag128: abe0ece80c24868a226a35d16bdae37a

tag256: 25835bfbb21632176cf03840687cb968
        cace4617af1bd0f7d064c639a5c79ee4
</sourcecode>
        </section>
        <section anchor="test-vector-2" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.2.3">
          <name slugifiedName="name-test-vector-2">Test Vector 2</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.2.3-1">
key   : 10010000000000000000000000000000

nonce : 10000200000000000000000000000000

ad    :

msg   :

ct    :

tag128: c2b879a67def9d74e6c14f708bbcc9b4

tag256: 1360dc9db8ae42455f6e5b6a9d488ea4
        f2184c4e12120249335c4ee84bafe25d
</sourcecode>
        </section>
        <section anchor="test-vector-3" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.2.4">
          <name slugifiedName="name-test-vector-3">Test Vector 3</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.2.4-1">
key   : 10010000000000000000000000000000

nonce : 10000200000000000000000000000000

ad    : 0001020304050607

msg   : 000102030405060708090a0b0c0d0e0f
        101112131415161718191a1b1c1d1e1f

ct    : 79d94593d8c2119d7e8fd9b8fc77845c
        5c077a05b2528b6ac54b563aed8efe84

tag128: cc6f3372f6aa1bb82388d695c3962d9a

tag256: 022cb796fe7e0ae1197525ff67e30948
        4cfbab6528ddef89f17d74ef8ecd82b3
</sourcecode>
        </section>
        <section anchor="test-vector-4" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.2.5">
          <name slugifiedName="name-test-vector-4">Test Vector 4</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.2.5-1">
key   : 10010000000000000000000000000000

nonce : 10000200000000000000000000000000

ad    : 0001020304050607

msg   : 000102030405060708090a0b0c0d

ct    : 79d94593d8c2119d7e8fd9b8fc77

tag128: 5c04b3dba849b2701effbe32c7f0fab7

tag256: 86f1b80bfb463aba711d15405d094baf
        4a55a15dbfec81a76f35ed0b9c8b04ac
</sourcecode>
        </section>
        <section anchor="test-vector-5" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.2.6">
          <name slugifiedName="name-test-vector-5">Test Vector 5</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.2.6-1">
key   : 10010000000000000000000000000000

nonce : 10000200000000000000000000000000

ad    : 000102030405060708090a0b0c0d0e0f
        101112131415161718191a1b1c1d1e1f
        20212223242526272829

msg   : 101112131415161718191a1b1c1d1e1f
        202122232425262728292a2b2c2d2e2f
        3031323334353637

ct    : b31052ad1cca4e291abcf2df3502e6bd
        b1bfd6db36798be3607b1f94d34478aa
        7ede7f7a990fec10

tag128: 7542a745733014f9474417b337399507

tag256: b91e2947a33da8bee89b6794e647baf0
        fc835ff574aca3fc27c33be0db2aff98
</sourcecode>
        </section>
        <section anchor="test-vector-6" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.2.7">
          <name slugifiedName="name-test-vector-6">Test Vector 6</name>
          <t indent="0" pn="section-appendix.a.2.7-1">This test <bcp14>MUST</bcp14> return a "verification failed" error.</t>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.2.7-2">
key   : 10000200000000000000000000000000

nonce : 10010000000000000000000000000000

ad    : 0001020304050607

ct    : 79d94593d8c2119d7e8fd9b8fc77

tag128: 5c04b3dba849b2701effbe32c7f0fab7

tag256: 86f1b80bfb463aba711d15405d094baf
        4a55a15dbfec81a76f35ed0b9c8b04ac
</sourcecode>
        </section>
        <section anchor="test-vector-7" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.2.8">
          <name slugifiedName="name-test-vector-7">Test Vector 7</name>
          <t indent="0" pn="section-appendix.a.2.8-1">This test <bcp14>MUST</bcp14> return a "verification failed" error.</t>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.2.8-2">
key   : 10010000000000000000000000000000

nonce : 10000200000000000000000000000000

ad    : 0001020304050607

ct    : 79d94593d8c2119d7e8fd9b8fc78

tag128: 5c04b3dba849b2701effbe32c7f0fab7

tag256: 86f1b80bfb463aba711d15405d094baf
        4a55a15dbfec81a76f35ed0b9c8b04ac
</sourcecode>
        </section>
        <section anchor="test-vector-8" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.2.9">
          <name slugifiedName="name-test-vector-8">Test Vector 8</name>
          <t indent="0" pn="section-appendix.a.2.9-1">This test <bcp14>MUST</bcp14> return a "verification failed" error.</t>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.2.9-2">
key   : 10010000000000000000000000000000

nonce : 10000200000000000000000000000000

ad    : 0001020304050608

ct    : 79d94593d8c2119d7e8fd9b8fc77

tag128: 5c04b3dba849b2701effbe32c7f0fab7

tag256: 86f1b80bfb463aba711d15405d094baf
        4a55a15dbfec81a76f35ed0b9c8b04ac
</sourcecode>
        </section>
        <section anchor="test-vector-9" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.2.10">
          <name slugifiedName="name-test-vector-9">Test Vector 9</name>
          <t indent="0" pn="section-appendix.a.2.10-1">This test <bcp14>MUST</bcp14> return a "verification failed" error.</t>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.2.10-2">
key   : 10010000000000000000000000000000

nonce : 10000200000000000000000000000000

ad    : 0001020304050607

ct    : 79d94593d8c2119d7e8fd9b8fc77

tag128: 6c04b3dba849b2701effbe32c7f0fab8

tag256: 86f1b80bfb463aba711d15405d094baf
        4a55a15dbfec81a76f35ed0b9c8b04ad
</sourcecode>
        </section>
      </section>
      <section anchor="aegis-256-test-vectors" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3">
        <name slugifiedName="name-aegis-256-test-vectors">AEGIS-256 Test Vectors</name>
        <section anchor="update-test-vector-1" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3.1">
          <name slugifiedName="name-update-test-vector-2">Update Test Vector</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.3.1-1">
S0   : 1fa1207ed76c86f2c4bb40e8b395b43e
S1   : b44c375e6c1e1978db64bcd12e9e332f
S2   : 0dab84bfa9f0226432ff630f233d4e5b
S3   : d7ef65c9b93e8ee60c75161407b066e7
S4   : a760bb3da073fbd92bdc24734b1f56fb
S5   : a828a18d6a964497ac6e7e53c5f55c73

M    : b165617ed04ab738afb2612c6d18a1ec

After Update:

S0   : e6bc643bae82dfa3d991b1b323839dcd
S1   : 648578232ba0f2f0a3677f617dc052c3
S2   : ea788e0e572044a46059212dd007a789
S3   : 2f1498ae19b80da13fba698f088a8590
S4   : a54c2ee95e8c2a2c3dae2ec743ae6b86
S5   : a3240fceb68e32d5d114df1b5363ab67
</sourcecode>
        </section>
        <section anchor="test-vector-1-1" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3.2">
          <name slugifiedName="name-test-vector-1-2">Test Vector 1</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.3.2-1">
key   : 10010000000000000000000000000000
        00000000000000000000000000000000

nonce : 10000200000000000000000000000000
        00000000000000000000000000000000

ad    :

msg   : 00000000000000000000000000000000

ct    : 754fc3d8c973246dcc6d741412a4b236

tag128: 3fe91994768b332ed7f570a19ec5896e

tag256: 1181a1d18091082bf0266f66297d167d
        2e68b845f61a3b0527d31fc7b7b89f13
</sourcecode>
        </section>
        <section anchor="test-vector-2-1" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3.3">
          <name slugifiedName="name-test-vector-2-2">Test Vector 2</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.3.3-1">
key   : 10010000000000000000000000000000
        00000000000000000000000000000000

nonce : 10000200000000000000000000000000
        00000000000000000000000000000000

ad    :

msg   :

ct    :

tag128: e3def978a0f054afd1e761d7553afba3

tag256: 6a348c930adbd654896e1666aad67de9
        89ea75ebaa2b82fb588977b1ffec864a
</sourcecode>
        </section>
        <section anchor="test-vector-3-1" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3.4">
          <name slugifiedName="name-test-vector-3-2">Test Vector 3</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.3.4-1">
key   : 10010000000000000000000000000000
        00000000000000000000000000000000

nonce : 10000200000000000000000000000000
        00000000000000000000000000000000

ad    : 0001020304050607

msg   : 000102030405060708090a0b0c0d0e0f
        101112131415161718191a1b1c1d1e1f

ct    : f373079ed84b2709faee373584585d60
        accd191db310ef5d8b11833df9dec711

tag128: 8d86f91ee606e9ff26a01b64ccbdd91d

tag256: b7d28d0c3c0ebd409fd22b4416050307
        3a547412da0854bfb9723020dab8da1a
</sourcecode>
        </section>
        <section anchor="test-vector-4-1" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3.5">
          <name slugifiedName="name-test-vector-4-2">Test Vector 4</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.3.5-1">
key   : 10010000000000000000000000000000
        00000000000000000000000000000000

nonce : 10000200000000000000000000000000
        00000000000000000000000000000000

ad    : 0001020304050607

msg   : 000102030405060708090a0b0c0d

ct    : f373079ed84b2709faee37358458

tag128: c60b9c2d33ceb058f96e6dd03c215652

tag256: 8c1cc703c81281bee3f6d9966e14948b
        4a175b2efbdc31e61a98b4465235c2d9
</sourcecode>
        </section>
        <section anchor="test-vector-5-1" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3.6">
          <name slugifiedName="name-test-vector-5-2">Test Vector 5</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.3.6-1">
key   : 10010000000000000000000000000000
        00000000000000000000000000000000

nonce : 10000200000000000000000000000000
        00000000000000000000000000000000

ad    : 000102030405060708090a0b0c0d0e0f
        101112131415161718191a1b1c1d1e1f
        20212223242526272829

msg   : 101112131415161718191a1b1c1d1e1f
        202122232425262728292a2b2c2d2e2f
        3031323334353637

ct    : 57754a7d09963e7c787583a2e7b859bb
        24fa1e04d49fd550b2511a358e3bca25
        2a9b1b8b30cc4a67

tag128: ab8a7d53fd0e98d727accca94925e128

tag256: a3aca270c006094d71c20e6910b5161c
        0826df233d08919a566ec2c05990f734
</sourcecode>
        </section>
        <section anchor="test-vector-6-1" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3.7">
          <name slugifiedName="name-test-vector-6-2">Test Vector 6</name>
          <t indent="0" pn="section-appendix.a.3.7-1">This test <bcp14>MUST</bcp14> return a "verification failed" error.</t>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.3.7-2">
key   : 10000200000000000000000000000000
        00000000000000000000000000000000

nonce : 10010000000000000000000000000000
        00000000000000000000000000000000

ad    : 0001020304050607

ct    : f373079ed84b2709faee37358458

tag128: c60b9c2d33ceb058f96e6dd03c215652

tag256: 8c1cc703c81281bee3f6d9966e14948b
        4a175b2efbdc31e61a98b4465235c2d9
</sourcecode>
        </section>
        <section anchor="test-vector-7-1" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3.8">
          <name slugifiedName="name-test-vector-7-2">Test Vector 7</name>
          <t indent="0" pn="section-appendix.a.3.8-1">This test <bcp14>MUST</bcp14> return a "verification failed" error.</t>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.3.8-2">
key   : 10010000000000000000000000000000
        00000000000000000000000000000000

nonce : 10000200000000000000000000000000
        00000000000000000000000000000000

ad    : 0001020304050607

ct    : f373079ed84b2709faee37358459

tag128: c60b9c2d33ceb058f96e6dd03c215652

tag256: 8c1cc703c81281bee3f6d9966e14948b
        4a175b2efbdc31e61a98b4465235c2d9
</sourcecode>
        </section>
        <section anchor="test-vector-8-1" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3.9">
          <name slugifiedName="name-test-vector-8-2">Test Vector 8</name>
          <t indent="0" pn="section-appendix.a.3.9-1">This test <bcp14>MUST</bcp14> return a "verification failed" error.</t>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.3.9-2">
key   : 10010000000000000000000000000000
        00000000000000000000000000000000

nonce : 10000200000000000000000000000000
        00000000000000000000000000000000

ad    : 0001020304050608

ct    : f373079ed84b2709faee37358458

tag128: c60b9c2d33ceb058f96e6dd03c215652

tag256: 8c1cc703c81281bee3f6d9966e14948b
        4a175b2efbdc31e61a98b4465235c2d9
</sourcecode>
        </section>
        <section anchor="test-vector-9-1" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.3.10">
          <name slugifiedName="name-test-vector-9-2">Test Vector 9</name>
          <t indent="0" pn="section-appendix.a.3.10-1">This test <bcp14>MUST</bcp14> return a "verification failed" error.</t>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.3.10-2">
key   : 10010000000000000000000000000000
        00000000000000000000000000000000

nonce : 10000200000000000000000000000000
        00000000000000000000000000000000

ad    : 0001020304050607

ct    : f373079ed84b2709faee37358458

tag128: c60b9c2d33ceb058f96e6dd03c215653

tag256: 8c1cc703c81281bee3f6d9966e14948b
        4a175b2efbdc31e61a98b4465235c2da
</sourcecode>
        </section>
      </section>
      <section anchor="aegis-128x2-test-vectors" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.4">
        <name slugifiedName="name-aegis-128x2-test-vectors">AEGIS-128X2 Test Vectors</name>
        <section anchor="initial-state" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.4.1">
          <name slugifiedName="name-initial-state">Initial State</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.4.1-1">
key   : 000102030405060708090a0b0c0d0e0f

nonce : 101112131415161718191a1b1c1d1e1f

ctx[0]: 00010000000000000000000000000000
ctx[1]: 01010000000000000000000000000000
</sourcecode>
          <t indent="0" pn="section-appendix.a.4.1-2">After initialization:</t>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.4.1-3">
V[0,0]: a4fc1ad9a72942fb88bd2cabbba6509a
V[0,1]: 80a40e392fc71084209b6c3319bdc6cc

V[1,0]: 380f435cf801763b1f0c2a2f7212052d
V[1,1]: 73796607b59b1b650ee91c152af1f18a

V[2,0]: 6ee1de433ea877fa33bc0782abff2dcb
V[2,1]: b9fab2ab496e16d1facaffd5453cbf14

V[3,0]: 85f94b0d4263bfa86fdf45a603d8b6ac
V[3,1]: 90356c8cadbaa2c969001da02e3feca0

V[4,0]: 09bd69ad3730174bcd2ce9a27cd1357e
V[4,1]: e610b45125796a4fcf1708cef5c4f718

V[5,0]: fcdeb0cf0a87bf442fc82383ddb0f6d6
V[5,1]: 61ad32a4694d6f3cca313a2d3f4687aa

V[6,0]: 571c207988659e2cdfbdaae77f4f37e3
V[6,1]: 32e6094e217573bf91fb28c145a3efa8

V[7,0]: ca549badf8faa58222412478598651cf
V[7,1]: 3407279a54ce76d2e2e8a90ec5d108eb
</sourcecode>
        </section>
        <section anchor="test-vector-1-2" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.4.2">
          <name slugifiedName="name-test-vector-1-3">Test Vector 1</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.4.2-1">
key   : 000102030405060708090a0b0c0d0e0f

nonce : 101112131415161718191a1b1c1d1e1f

ad    :

msg   :

ct    :

tag128: 63117dc57756e402819a82e13eca8379

tag256: b92c71fdbd358b8a4de70b27631ace90
        cffd9b9cfba82028412bac41b4f53759
</sourcecode>
        </section>
        <section anchor="test-vector-2-2" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.4.3">
          <name slugifiedName="name-test-vector-2-3">Test Vector 2</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.4.3-1">
key   : 000102030405060708090a0b0c0d0e0f

nonce : 101112131415161718191a1b1c1d1e1f

ad    : 0102030401020304

msg   : 04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        0405060704050607

ct    : 5795544301997f93621b278809d6331b
        3bfa6f18e90db12c4aa35965b5e98c5f
        c6fb4e54bcb6111842c20637252eff74
        7cb3a8f85b37de80919a589fe0f24872
        bc926360696739e05520647e390989e1
        eb5fd42f99678a0276a498f8c454761c
        9d6aacb647ad56be62b29c22cd4b5761
        b38f43d5a5ee062f

tag128: 1aebc200804f405cab637f2adebb6d77

tag256: c471876f9b4978c44f2ae1ce770cdb11
        a094ee3feca64e7afcd48bfe52c60eca
</sourcecode>
        </section>
      </section>
      <section anchor="aegis-128x4-test-vectors" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.5">
        <name slugifiedName="name-aegis-128x4-test-vectors">AEGIS-128X4 Test Vectors</name>
        <section anchor="initial-state-1" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.5.1">
          <name slugifiedName="name-initial-state-2">Initial State</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.5.1-1">
key   : 000102030405060708090a0b0c0d0e0f

nonce : 101112131415161718191a1b1c1d1e1f

ctx[0]: 00030000000000000000000000000000
ctx[1]: 01030000000000000000000000000000
ctx[2]: 02030000000000000000000000000000
ctx[3]: 03030000000000000000000000000000
</sourcecode>
          <t indent="0" pn="section-appendix.a.5.1-2">After initialization:</t>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.5.1-3">
V[0,0]: 924eb07635003a37e6c6575ba8ce1929
V[0,1]: c8b6a5d91475445e936d48e794be0ce2
V[0,2]: fcd37d050e24084befe3bbb219d64760
V[0,3]: 2e9f58cfb893a8800220242c373a8b18

V[1,0]: 1a1f60c4fab64e5471dc72edfcf6fe6b
V[1,1]: c1e525ebea2d6375a9edd045dce96381
V[1,2]: 97a3e25abd228a44d4a14a6d3fe9185c
V[1,3]: c2d4cf7f4287a98744645674265d4ca8

V[2,0]: 7bb50c534f6ec4780530ff1cce8a16e8
V[2,1]: 7b08d57557da0b5ef7b5f7d98b0ba189
V[2,2]: 6bfcac34ddb68404821a4d665303cb0f
V[2,3]: d95626f6dfad1aed7467622c38529932

V[3,0]: af339fd2d50ee45fc47665c647cf6586
V[3,1]: d0669b39d140f0e118a4a511efe2f95a
V[3,2]: 7a94330f35c194fadda2a87e42cdeccc
V[3,3]: 233b640d1f4d56e2757e72c1a9d8ecb1

V[4,0]: 9f93737d699ba05c11e94f2b201bef5e
V[4,1]: 61caf387cf7cfd3f8300ac7680ccfd76
V[4,2]: 5825a671ecef03b7a9c98a601ae32115
V[4,3]: 87a1fe4d558161a8f4c38731f3223032

V[5,0]: 7a5aca78d636c05bbc702b2980196ab6
V[5,1]: 915d868408495d07eb527789f282c575
V[5,2]: d0947bfbc1d3309cdffc9be1503aea62
V[5,3]: 8834ea57a15b9fbdc0245464a4b8cbef

V[6,0]: e46f4cf71a95ac45b6f0823e3aba1a86
V[6,1]: 8c4ecef682fc44a8eba911b3fc7d99f9
V[6,2]: a4fb61e2c928a2ca760b8772f2ea5f2e
V[6,3]: 3d34ea89da73caa3016c280500a155a3

V[7,0]: 85075f0080e9d618e7eb40f57c32d9f7
V[7,1]: d2ab2b320c6e93b155a3787cb83e5281
V[7,2]: 0b3af0250ae36831a1b072e499929bcb
V[7,3]: 5cce4d00329d69f1aae36aa541347512
</sourcecode>
        </section>
        <section anchor="test-vector-1-3" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.5.2">
          <name slugifiedName="name-test-vector-1-4">Test Vector 1</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.5.2-1">
key   : 000102030405060708090a0b0c0d0e0f

nonce : 101112131415161718191a1b1c1d1e1f

ad    :

msg   :

ct    :

tag128: 5bef762d0947c00455b97bb3af30dfa3

tag256: a4b25437f4be93cfa856a2f27e4416b4
        2cac79fd4698f2cdbe6af25673e10a68
</sourcecode>
        </section>
        <section anchor="test-vector-2-3" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.5.3">
          <name slugifiedName="name-test-vector-2-4">Test Vector 2</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.5.3-1">
key   : 000102030405060708090a0b0c0d0e0f

nonce : 101112131415161718191a1b1c1d1e1f

ad    : 0102030401020304

msg   : 04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        0405060704050607

ct    : e836118562f4479c9d35c17356a83311
        4c21f9aa39e4dda5e5c87f4152a00fce
        9a7c38f832eafe8b1c12f8a7cf12a81a
        1ad8a9c24ba9dedfbdaa586ffea67ddc
        801ea97d9ab4a872f42d0e352e2713da
        cd609f9442c17517c5a29daf3e2a3fac
        4ff6b1380c4e46df7b086af6ce6bc1ed
        594b8dd64aed2a7e

tag128: 0e56ab94e2e85db80f9d54010caabfb4

tag256: 69abf0f64a137dd6e122478d777e98bc
        422823006cf57f5ee822dd78397230b2
</sourcecode>
        </section>
      </section>
      <section anchor="aegis-256x2-test-vectors" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.6">
        <name slugifiedName="name-aegis-256x2-test-vectors">AEGIS-256X2 Test Vectors</name>
        <section anchor="initial-state-2" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.6.1">
          <name slugifiedName="name-initial-state-3">Initial State</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.6.1-1">
key   : 000102030405060708090a0b0c0d0e0f
        101112131415161718191a1b1c1d1e1f

nonce : 101112131415161718191a1b1c1d1e1f
        202122232425262728292a2b2c2d2e2f

ctx[0]: 00010000000000000000000000000000
ctx[1]: 01010000000000000000000000000000
</sourcecode>
          <t indent="0" pn="section-appendix.a.6.1-2">After initialization:</t>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.6.1-3">
V[0,0]: eca2bf4538442e8712d4972595744039
V[0,1]: 201405efa9264f07911db58101903087

V[1,0]: 3e536a998799408a97f3479a6f779d48
V[1,1]: 0d79a7d822a5d215f78c3bf2feb33ae1

V[2,0]: cf8c63d6f2b4563cdd9231107c85950e
V[2,1]: 78d17ed7d8d563ff11bd202c76864839

V[3,0]: d7e0707e6bfbbad913bc94b6993a9fa0
V[3,1]: 097e4b1bff40d4c19cb29dfd125d62f2

V[4,0]: a373cf6d537dd66bc0ef0f2f9285359f
V[4,1]: c0d0ae0c48f9df3faaf0e7be7768c326

V[5,0]: 9f76560dcae1efacabdcce446ae283bc
V[5,1]: bd52a6b9c8f976a26ec1409df19e8bfe
</sourcecode>
        </section>
        <section anchor="test-vector-1-4" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.6.2">
          <name slugifiedName="name-test-vector-1-5">Test Vector 1</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.6.2-1">
key   : 000102030405060708090a0b0c0d0e0f
        101112131415161718191a1b1c1d1e1f

nonce : 101112131415161718191a1b1c1d1e1f
        202122232425262728292a2b2c2d2e2f

ad    :

msg   :

ct    :

tag128: 62cdbab084c83dacdb945bb446f049c8

tag256: 25d7e799b49a80354c3f881ac2f1027f
        471a5d293052bd9997abd3ae84014bb7
</sourcecode>
        </section>
        <section anchor="test-vector-2-4" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.6.3">
          <name slugifiedName="name-test-vector-2-5">Test Vector 2</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.6.3-1">
key   : 000102030405060708090a0b0c0d0e0f
        101112131415161718191a1b1c1d1e1f

nonce : 101112131415161718191a1b1c1d1e1f
        202122232425262728292a2b2c2d2e2f

ad    : 0102030401020304

msg   : 04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        0405060704050607

ct    : 72120c2ea8236180d67859001f472907
        7b7064c414384fe3a7b52f1571f4f8a7
        d0f01e18db4f3bc0adb150702e5d147a
        8d36522132761b994c1bd395589e2ccf
        0790dfe2a3d12d61cd666b2859827739
        db4037dd3124c78424459376f6cac08e
        1a7223a2a43e398ce6385cd654a19f48
        1cba3b8f25910b42

tag128: 635d391828520bf1512763f0c8f5cdbd

tag256: b5668d3317159e9cc5d46e4803c3a76a
        d63bb42b3f47956d94f30db8cb366ad7
</sourcecode>
        </section>
      </section>
      <section anchor="aegis-256x4-test-vectors" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.7">
        <name slugifiedName="name-aegis-256x4-test-vectors">AEGIS-256X4 Test Vectors</name>
        <section anchor="initial-state-3" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.7.1">
          <name slugifiedName="name-initial-state-4">Initial State</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.7.1-1">
key   : 000102030405060708090a0b0c0d0e0f
        101112131415161718191a1b1c1d1e1f

nonce : 101112131415161718191a1b1c1d1e1f
        202122232425262728292a2b2c2d2e2f

ctx[0]: 00030000000000000000000000000000
ctx[1]: 01030000000000000000000000000000
ctx[2]: 02030000000000000000000000000000
ctx[3]: 03030000000000000000000000000000
</sourcecode>
          <t indent="0" pn="section-appendix.a.7.1-2">After initialization:</t>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.7.1-3">
V[0,0]: 482a86e8436cd2361063a4b2702769b9
V[0,1]: d95a2be81c9245b22996f68eea0122f9
V[0,2]: 0c2a3b348b1a5e256c6751377318c41e
V[0,3]: f64436a21653fe7cf2e0829a177db383

V[1,0]: e705e8866267717d96092e58e78b574c
V[1,1]: d1dd412142df9806cc267af2fe1d830e
V[1,2]: 30e7dfd3c9941b8394e95bdf5bac99d9
V[1,3]: 9f27186f8a4fab86820689822c3c74d2

V[2,0]: e1aa6af5d9e31dde8d94a48a0810fa89
V[2,1]: 63555cdf0d98f18fb75b029ad80786c0
V[2,2]: a3ee0e4a3429a9539e4fcec385475608
V[2,3]: 28ea527d31ef61df498dc107fe02df99

V[3,0]: 37f06808410c8f3954525ae44584d3be
V[3,1]: 8fcc23bca2fe2209f93d34e2da35b33d
V[3,2]: 33156347df89eaa69ab11096362daccf
V[3,3]: bbe58d9dbe8c5b0469be5a87086db5d4

V[4,0]: d1c9eb37fecbc5ada7b351fa4f501f32
V[4,1]: 0b9b803283c1538628b507c8f6432434
V[4,2]: bfb8b6d4f87cce28825c7e92f54b8728
V[4,3]: 8917bb5b09c32f900c6a5a1d63c46264

V[5,0]: 4f6110c2ef0c3c687e90c1e5532ddf8e
V[5,1]: 031bd85d99f64684d23728a0453c72a1
V[5,2]: 10bc7ec34d4119b5bdeb6c7dfc458247
V[5,3]: 591ece530aeaa5c9867220156f5c25e3
</sourcecode>
        </section>
        <section anchor="test-vector-1-5" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.7.2">
          <name slugifiedName="name-test-vector-1-6">Test Vector 1</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.7.2-1">
key   : 000102030405060708090a0b0c0d0e0f
        101112131415161718191a1b1c1d1e1f

nonce : 101112131415161718191a1b1c1d1e1f
        202122232425262728292a2b2c2d2e2f

ad    :

msg   :

ct    :

tag128: 3b7fee6cee7bf17888ad11ed2397beb4

tag256: 6093a1a8aab20ec635dc1ca71745b01b
        5bec4fc444c9ffbebd710d4a34d20eaf
</sourcecode>
        </section>
        <section anchor="test-vector-2-5" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.7.3">
          <name slugifiedName="name-test-vector-2-6">Test Vector 2</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.7.3-1">
key   : 000102030405060708090a0b0c0d0e0f
        101112131415161718191a1b1c1d1e1f

nonce : 101112131415161718191a1b1c1d1e1f
        202122232425262728292a2b2c2d2e2f

ad    : 0102030401020304

msg   : 04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        04050607040506070405060704050607
        0405060704050607

ct    : bfc2085b7e8017da99b0b6d646ae4d01
        f4ba8f2e7dfca1d759ae48a135139b9a
        aac6b4f5db810d426be1fdaff4e14541
        53a34b11da78ed7e418ee2ee9853042e
        95536aecbb694cea1b16a478eb0d4d1b
        f6509b1ce652a45af58e0e46ffccfa2d
        0426e702391d2ff5813808b81748a490
        dd656465fed61f09

tag128: b63b611b13975e2f3dc3cb6c2397bfcd

tag256: 7847eace74409ee56c8f4cf63a9c2841
        ce7c8bd567d7c0ca514c879a190b978c
</sourcecode>
        </section>
      </section>
      <section anchor="aegismac-test-vectors" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.8">
        <name slugifiedName="name-aegismac-test-vectors">AEGISMAC Test Vectors</name>
        <section anchor="aegismac-128l-test-vector" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.8.1">
          <name slugifiedName="name-aegismac-128l-test-vector">AEGISMAC-128L Test Vector</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.8.1-1">
key    : 10010000000000000000000000000000

nonce  : 10000200000000000000000000000000

data   : 000102030405060708090a0b0c0d0e0f
         101112131415161718191a1b1c1d1e1f
         202122

tag128 : d3f09b2842ad301687d6902c921d7818

tag256 : 9490e7c89d420c9f37417fa625eb38e8
         cad53c5cbec55285e8499ea48377f2a3
</sourcecode>
        </section>
        <section anchor="aegismac-128x2-test-vector" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.8.2">
          <name slugifiedName="name-aegismac-128x2-test-vector">AEGISMAC-128X2 Test Vector</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.8.2-1">
key    : 10010000000000000000000000000000

nonce  : 10000200000000000000000000000000

data   : 000102030405060708090a0b0c0d0e0f
         101112131415161718191a1b1c1d1e1f
         202122

tags128: 9f5f69928fa481fa86e8a51e072a9b29
         eeaa77a356f796b427f6a54f52ae0e20

tag128 : 6873ee34e6b5c59143b6d35c5e4f2c6e

tags256: 22cdcf558d0338b6ad8fbba4da7307d3
         0bd685fff23dc9d41f598c2a7ea44055

tag256 : afcba3fc2d63c8d6c7f2d63f3ec8fbbb
         af022e15ac120e78ffa7755abccd959c
</sourcecode>
        </section>
        <section anchor="aegismac-128x4-test-vector" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.8.3">
          <name slugifiedName="name-aegismac-128x4-test-vector">AEGISMAC-128X4 Test Vector</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.8.3-1">
key    : 10010000000000000000000000000000

nonce  : 10000200000000000000000000000000

data   : 000102030405060708090a0b0c0d0e0f
         101112131415161718191a1b1c1d1e1f
         202122

tags128: 7fecd913a7cb0011b6c4c88e0c6f8578
         19a98fbeaf21d1092c32953fff82c8a9
         c7b5e6625a5765d04af26cf22adc1282
         4c8cf3b4dbb85f379e13b04a8d06bca7

tag128 : c45a98fd9ab8956ce616eb008cfe4e53

tags256: d595732bdf230a1441978414cd8cfa39
         ecef6ad0ee1e65ae530006ca5d5f4481
         f9ec5edfa64e9c3d76d3a5eda9fe5bd1
         fb9d842373f7c90bedb8bfe383740b23
         1264a15143eb8c3d9f17754099f147e3
         401c83c0d5afc70fd0d68bfd17f9280f

tag256 : 26fdc76f41b1da7aec7779f6e964beae
         8904e662f05aca8345ae3befb357412a
</sourcecode>
        </section>
        <section anchor="aegismac-256-test-vector" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.8.4">
          <name slugifiedName="name-aegismac-256-test-vector">AEGISMAC-256 Test Vector</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.8.4-1">
key    : 10010000000000000000000000000000
         00000000000000000000000000000000

nonce  : 10000200000000000000000000000000
         00000000000000000000000000000000

data   : 000102030405060708090a0b0c0d0e0f
         101112131415161718191a1b1c1d1e1f
         202122

tag128 : c08e20cfc56f27195a46c9cef5c162d4

tag256 : a5c906ede3d69545c11e20afa360b221
         f936e946ed2dba3d7c75ad6dc2784126
</sourcecode>
        </section>
        <section anchor="aegismac-256x2-test-vector" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.8.5">
          <name slugifiedName="name-aegismac-256x2-test-vector">AEGISMAC-256X2 Test Vector</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.8.5-1">
key    : 10010000000000000000000000000000
         00000000000000000000000000000000

nonce  : 10000200000000000000000000000000
         00000000000000000000000000000000

data   : 000102030405060708090a0b0c0d0e0f
         101112131415161718191a1b1c1d1e1f
         202122

tags128: db8852ea2c03f22b0d0694ea4e88e4b1

tag128 : fb319cb6dd728a764606fb14d37f2a5e

tags256: b4d124976b34b2aa8bc3fa0b55396cf7
         fb83f4ef5ba607681cddf5ba3e925727

tag256 : 0844b20ed5147ceae89c7a160263afd4
         b1382d6b154ecf560ce8a342cb6a8fd1
</sourcecode>
        </section>
        <section anchor="aegismac-256x4-test-vector" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a.8.6">
          <name slugifiedName="name-aegismac-256x4-test-vector">AEGISMAC-256X4 Test Vector</name>
          <sourcecode type="test-vectors" markers="false" pn="section-appendix.a.8.6-1">
key    : 10010000000000000000000000000000
         00000000000000000000000000000000

nonce  : 10000200000000000000000000000000
         00000000000000000000000000000000

data   : 000102030405060708090a0b0c0d0e0f
         101112131415161718191a1b1c1d1e1f
         202122

tags128: 702d595e74962d073a0d68c883d80deb
         41ab207e43b16659d556d7467218a9ec
         113406e7cb56e0f6b63c95c88421dfee

tag128 : a51f9bc5beae60cce77f0dbc60761edd

tags256: a46ebcd10939b42012a3f9b6147172af
         3b74aec5d0070e8d6a81498ccbcdb41a
         d57cd7a50fa8621dfea2e81cd941def5
         57094251a24527a4d97fc4c825368180
         3973129d07cc20811a8b3c34574f6ce0
         10165dd0e856e797f70731e78e32f764

tag256 : b36a16ef07c36d75a91f437502f24f54
         5b8dfa88648ed116943c29fead3bf10c
</sourcecode>
        </section>
      </section>
    </section>
    <section numbered="false" anchor="acknowledgments" removeInRFC="false" toc="include" pn="section-appendix.b">
      <name slugifiedName="name-acknowledgments">Acknowledgments</name>
      <t indent="0" pn="section-appendix.b-1">The AEGIS family of authenticated encryption algorithms was invented by <contact fullname="Hongjun Wu"/> and <contact fullname="Bart Preneel"/>.</t>
      <t indent="0" pn="section-appendix.b-2">The state update function leverages the AES permutation invented by <contact fullname="Joan Daemen"/> and <contact fullname="Vincent Rijmen"/>. They also authored the Pelican MAC, which partly motivated the design of the AEGIS MAC.</t>
      <t indent="0" pn="section-appendix.b-3">We would like to thank the following individuals for their contributions:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-appendix.b-4">
        <li pn="section-appendix.b-4.1">
          <t indent="0" pn="section-appendix.b-4.1.1"><contact fullname="Eric Lagergren"/>, <contact fullname="Daniel Bleichenbacher"/>, and <contact fullname="Conrad Ludgate"/> for catching invalid test vectors, and <contact fullname="Daniel Bleichenbacher"/> for many helpful suggestions.</t>
        </li>
        <li pn="section-appendix.b-4.2">
          <t indent="0" pn="section-appendix.b-4.2.1"><contact fullname="Soatok Dreamseeker"/> for his early review of the document and for suggesting the addition of negative test vectors.</t>
        </li>
        <li pn="section-appendix.b-4.3">
          <t indent="0" pn="section-appendix.b-4.3.1"><contact fullname="John Preuß Mattsson"/> for his review of the document and for suggesting how AEGIS should be used in the context of DTLS and QUIC.</t>
        </li>
        <li pn="section-appendix.b-4.4">
          <t indent="0" pn="section-appendix.b-4.4.1"><contact fullname="Bart Mennink"/> and <contact fullname="Charlotte Lefevre"/>, as well as <contact fullname="Takanori Isobe"/> and <contact fullname="Mostafizar Rahman"/>, for investigating the committing security of the schemes specified in this document.</t>
        </li>
        <li pn="section-appendix.b-4.5">
          <t indent="0" pn="section-appendix.b-4.5.1"><contact fullname="Scott Fluhrer"/> for his review of the document as a member of the CFRG Crypto Review Panel.</t>
        </li>
        <li pn="section-appendix.b-4.6">
          <t indent="0" pn="section-appendix.b-4.6.1"><contact fullname="Yawning Angel"/>, <contact fullname="Chris Barber"/>, and <contact fullname="Neil Madden"/> for their review of the document.</t>
        </li>
        <li pn="section-appendix.b-4.7">
          <t indent="0" pn="section-appendix.b-4.7.1"><contact fullname="Gilles Van Assche"/> for reviewing the document and providing insightful comments on the implications of nonce reuse in AEGIS-128X and AEGIS-256X.</t>
        </li>
        <li pn="section-appendix.b-4.8">
          <t indent="0" pn="section-appendix.b-4.8.1"><contact fullname="Jane Coffin"/> for taking the time to review the document on behalf of the IRSG.</t>
        </li>
      </ul>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.c">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author initials="F." surname="Denis" fullname="Frank Denis">
        <organization showOnFrontPage="true">Fastly Inc.</organization>
        <address>
          <email>fde@00f.net</email>
        </address>
      </author>
      <author initials="S." surname="Lucas" fullname="Samuel Lucas">
        <organization showOnFrontPage="true">Individual Contributor</organization>
        <address>
          <email>specifications@samuellucas.com</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
