<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes"?>
<!-- generate a table of contents -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<?rfc compact="no" ?>
<!-- do start each main section on a new page -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="info" docName="draft-iplir-protocol-09" ipr="trust200902" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" tocDepth="4" symRefs="true" sortRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.32.0 -->
  <front>
    <title abbrev="Abbreviated Title">
            IPlir network layer security protocol
    </title>
    <seriesInfo name="Internet-Draft" value="draft-iplir-protocol-09"/>
    <author fullname="Martishina Alexandra" initials="A." role="editor" surname="Martishina">
      <organization>InfoTeCS</organization>
      <address>
        <postal>
          <street>2B stroenie 1, ul. Otradnaya </street>
          <city>Moscow</city>
          <code>127273</code>
          <country>Russian Federation</country>
        </postal>
        <phone>+7 (495) 737-61-92</phone>
        <email>Aleksandra.Martishina@infotecs.ru</email>
      </address>
    </author>
    <author fullname="Urivskiy Alexey" initials="A." surname="Urivskiy">
      <organization>InfoTeCS</organization>
      <address>
        <postal>
          <street>2B stroenie 1, ul. Otradnaya </street>
          <city>Moscow</city>
          <code>127273</code>
          <country>Russian Federation</country>
        </postal>
        <phone>+7 (495) 737-61-92</phone>
        <email>urivskiy@infotecs.ru</email>
      </address>
    </author>
    <author fullname="Rybkin Andrey" initials="A." surname="Rybkin">
      <organization>InfoTeCS</organization>
      <address>
        <postal>
          <street>2B stroenie 1, ul. Otradnaya </street>
          <city>Moscow</city>
          <code>127273</code>
          <country>Russian Federation</country>
        </postal>
        <phone>+7 (495) 737-61-92</phone>
        <email>Andrey.Rybkin@infotecs.ru</email>
      </address>
    </author>
    <author fullname="Tychina Leonid" initials="L." surname="Tychina">
      <organization>InfoTeCS</organization>
      <address>
        <postal>
          <street>2B stroenie 1, ul. Otradnaya </street>
          <city>Moscow</city>
          <code>127273</code>
          <country>Russian Federation</country>
        </postal>
        <phone>+7 (495) 737-61-92</phone>
        <email>tychina@infotecs.ru</email>
      </address>
    </author>
    <author fullname="Parshin Ilia" initials="I." surname="Parshin">
      <organization>InfoTeCS</organization>
      <address>
        <postal>
          <street>2B stroenie 1, ul. Otradnaya </street>
          <city>Moscow</city>
          <code>127273</code>
          <country>Russian Federation</country>
        </postal>
        <phone>+7 (495) 737-61-92</phone>
        <email>Parshin.Ilia@infotecs.ru</email>
      </address>
    </author>
    <date year="2026"/>
    <!--если не указываем число и месяц, они подставляются автоматически-->
        <area>General</area>
    <!--как в rfc7748-->
        <workgroup>Network Working Group</workgroup>
    <keyword>list of keywords</keyword>
    <abstract>
      <t>
                This document specifies the IPlir network layer security protocol. It 
				describes how to provide a set of security services for traffic over 
				public and corporate networks using the TCP/IP stack.
      </t>
    </abstract>
  </front>
  <middle>
    <section anchor="Introduction" numbered="true" toc="default">
      <name>Introduction</name>
      <section anchor="Scope" numbered="true" toc="default">
        <name>Scope</name>
        <t>
					The IPlir protocol may be used to protect IP packets during their 
					transmission via communication channels. IP packet protection means 
					ensuring data integrity and authenticity of the data source of the packets. 
					For this purpose, when IPlir is applied, encapsulation of original IP packets, 
					calculation of message authentication codes for the encapsulated packets and service 
					information are used. IP packet protection also means option of ensuring their 
					confidentiality and uses packet encryption for this purpose. In addition, 
					the IPlir protocol allows for protection against replay attacks based on 
					the use of counter values and/or timestamps.
        </t>
        <t>
					The IPlir protocol can be used to create Virtual Private Networks at the 
					network layer of the basic ISO OSI reference model. Data is 
					protected during transfer of IP packets between any two hosts supporting 
					the IPlir protocol, including options of data exchange between two end 
					hosts, an end host and a security gateway, and two security gateways. 
					All protection mechanisms are implemented without establishing a 
					connection (in terms of network) between the two interacting hosts.
        </t>
        <t>
					This document is not a Security Architecture for the Internet; it 
					addresses security only at the network layer, provided through the 
					use of a combination of cryptographic and protocol security mechanisms.
        </t>
        <t>
					This document does not have IETF consensus and does not imply IETF 
					support for IPlir.
        </t>
      </section>
      <section anchor="Audience" numbered="true" toc="default">
        <name>Audience</name>
        <t>
					The target audience for this document is primarily individuals who 
					implement this network layer security technology or who architect 
					systems that will use this technology. Technically adept users of this 
					technology (end users or system administrators) also are part of the 
					target audience.  
        </t>
        <t>
					This document assumes that the reader is familiar with the Internet 
					Protocol (IP), related networking technology, and general information 
					system security terms and concepts.
        </t>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Conventions Used in This Document</name>
      <t>
                The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", 
				"SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this 
				document are to be interpreted as described in BCP 14 <xref target="RFC2119" format="default"/>
        <xref target="RFC8174" format="default"/> when, and only when, they appear in all capitals, as shown here.
      </t>
    </section>
    <section anchor="Notations" numbered="true" toc="default">
      <name>Notations</name>
      <t>
				The following notations are used in this document:
      </t>
      <ul empty="true" spacing="normal">
        <li>
          <t>LSB_s(x): truncation of binary string x with a length of m, m &gt;= s, to a binary string 
					with a length of s according to the following rule: 
					LSB_s(x_{m-1} || ... || x_1 || x_0) = x_{s-1} || ... || x_1 || x_0, x_i \in V_1, 
					i = 0,1,…,m-1.</t>
        </li>
        <li>
          <t>IntToVec_s(x): representation of the ring element x \in Z_{2^s} as a binary string 
					with a length of s: for x = x_0 + 2 * x_1 + ... + 2^{s-1} * x_{s-1}, 
					where x_i \in V_1, i = 0,1,…,s-1, the following equation is true: 
					IntToVec_s(x) = x_{s-1} || ... || x_1 || x_0.</t>
        </li>
        <li>
          <t>CharToByte('c'): representation of the 'c' symbol as a binary string of length 8 calculated 
					according to the following rule: CharToByte('c') = 0 || IntToVec_7(ASCII('c')), 
					where ASCII('c') \in Z_{2^7} is the ASCII representation of the 'c' symbol.</t>
        </li>
        <li>
          <t>StrToVec_s('string'): representation of the string of symbols 'string' = 'c_{m-1}c_{m-2}...c_0' consisting 
					of m symbols as a binary string with a length of s, s &gt;= 8*m according to 
					the following rule: StrToVec_s('c_{m-1}c_{m-2}...c_0') = 
					0^{s-8*m} || CharToByte('c_{m-1}') || CharToByte('c_{m-2}') || ... || CharToByte('c_0').</t>
        </li>
      </ul>
    </section>
    <section anchor="System" numbered="true" toc="default">
      <name>System overview</name>
      <section anchor="Packet" numbered="true" toc="default">
        <name>IPlir packet format</name>
        <t>
				An IPlir packet is an IP packet protected by IPlir. Its format is shown in Figure 1. 

        </t>
        <figure>
          <name>IPlir packet structure</name>
          <artwork align="center" name="" type="" alt=""><![CDATA[
+------------+------------+--------------------+
| IP header  | UDP header | IPlir message      |
+------------+------------+--------------------+
				]]></artwork>
        </figure>
        <t>
				The IP header is the header of a standard IP packet, where the Protocol field for IPv4 
				and the NextHeader field for IPv6 contain the value 99.
        </t>
        <t>
				The UDP header is a standard UDP header used to multiplex by port number, i.e. to choose 
				an appropriate application program at a target host to process an incoming IPlir message. 
        </t>
        <t>
				The IPlir message is the main part of the IPlir packet that includes protected data from 
				the original IP packet and plaintext data required for the IPlir message processing.
        </t>
      </section>
      <section anchor="Message" numbered="true" toc="default">
        <name>IPlir message format</name>
        <t>
				The IPlir message contains:
        </t>
        <ul spacing="normal">
          <li>
            <t>IPlir header containing plaintext information related to encapsulation and protection 
					of the original IP packet;</t>
          </li>
          <li>
            <t>IPlir body containing information the encryption of which is optional;</t>
          </li>
          <li>
            <t>IPlir trailer containing MACs, the transit host (the host implementing the function of routing IPlir packets) identifier, and the transit initialization value.</t>
          </li>
        </ul>
        <t>
				The IPlir message structure is shown in Figure 2.
				
        </t>
        <figure>
          <name>IPlir message structure</name>
          <artwork align="left" name="" type="" alt=""><![CDATA[
+---+---------------+---------------+---------------+---------------+
|   |       0       |       1       |       2       |       3       |
+---+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Bit|7|6|5|4|3|2|1|0|7|6|5|4|3|2|1|0|7|6|5|4|3|2|1|0|7|6|5|4|3|2|1|0|
+---+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   |               |               | | |E|E| |     |       |       |
| I |               |               | | |x|x|D|     |       |       |
| P |    Version    |      CS       |T|D|t|t|A| R1  |  KN   |  TKN  |
| l |               |               | | |I|S|R|     |       |       |
| i |               |               | | |D|N| |     |       |       |
| r +---------------+---------------+-+-+-+-+-+-----+-------+-------+
|   |   Timestamp                                                   |
|   +---------------------------------------------------------------+
| h |   SourceIdentifier                                            |
| e +---------------------------------------------------------------+
| a |   DestinationIdentifier                                       |
| d +---------------------------------------------------------------+
| e |   SequenceNumber                                              |
| r +---------------------------------------------------------------+
|   |   InitValue (IV)                                              |
+---+---------------+---------------+-------------------------------+
|   |   Type_1      |   Length_1    |   Value_1 (Length_1 bytes)    |
|   +---------------+---------------+-------------------------------+
| I |   ...                                                         |
| P +---------------+---------------+-------------------------------+
| l |   Type_n      |   Length_n    |   Value_n (Length_n bytes)    |
| i +---------------+---------------+-------------------------------+
| r |   PayloadData                                                 |
|   +---------------------------------------------------------------+
| b |   Staffing                                                    |
| o |               +---------------+---+-+-+---+-+-+---------------+
| d |               |               | M |T| |   |f|t|               |
| y |               |      SL       | o |L|S| R2|r|o|  NextHeader   |
|   |               |               | d |V| |   |T|T|               |
|   |               |               | e | | |   |n|n|               |
+---+---------------+---------------+---+-+-+---+-+-+---------------+
|  t|   IntegrityCheckValue (ICV)                                   |
|I r+---------------------------------------------------------------+
|P a|   TransitIdentifier                                           |
|l i+---------------------------------------------------------------+
|i l|   TransitInitValue (TIV)                                      |
|r e+---------------------------------------------------------------+
|  r|   TransitIntegrityCheckValue (TICV)                           |
+---+---------------------------------------------------------------+
				]]></artwork>
        </figure>
        <t>
				The IPlir message fields have a big-endian order of bytes. The numbering is left-to-right, 
				the high bytes have lower numbers. Numbering of bits inside bytes is right-to-left, the high 
				bits have higher numbers.
        </t>
        <section anchor="Version" numbered="true" toc="default">
          <name>Version</name>
          <t>IPlir header version. This document describes the IPlir header of Version = 1. 
					The field length is 8 bit.</t>
        </section>
        <section anchor="CS" numbered="true" toc="default">
          <name>CS</name>
          <t>Cryptographic suite identifier determining the contents of cryptographic mechanisms 
					and their parameters used to create the IPlir packet. The field length is 8 bit.</t>
        </section>
        <section anchor="T" numbered="true" toc="default">
          <name>T</name>
          <t>The transit MAC flag. If T = 1, the IPlir trailer contains fields TransitIdentifier, TransitIntegrityCheckValue 
					and TransitInitValue, otherwise the fields are absent. 
					T field has to be set to 0 when calculating and checking the end-to-end MAC (ICV). 
					The field length is 1 bit.</t>
        </section>
        <section anchor="D" numbered="true" toc="default">
          <name>D</name>
          <t>The DestinationIdentifier field flag. If D = 1, the header contains the 
					DestinationIdentifier field, otherwise the field is absent. The destination 
					host identifier is required for routing of IPlir packets. The field length is 
					1 bit.</t>
        </section>
        <section anchor="ExtID" numbered="true" toc="default">
          <name>ExtID</name>
          <t>The extended network host identifiers flag. If ExtID = 0, 
					the SourceIdentifier field and, if available, DestinationIdentifier 
					and TransitIdentifier fields are 32 bits long. 
					If ExtID = 1, all these network host identifiers are 64 bits long. 
					The field length is 1 bit.</t>
        </section>
        <section anchor="ExtSN" numbered="true" toc="default">
          <name>ExtSN</name>
          <t>The packet extended sequence number flag. If ExtSN=0, the SequenceNumber 
					field is 32 bits long. If ExtSN = 1, the SequenceNumber field is 64 bits long. 
					The field length is 1 bit.</t>
        </section>
        <section anchor="DAR" numbered="true" toc="default">
          <name>DAR</name>
          <t>The flag of disabling the anti-replay mechanism. The use of the flag is regulated 
					by security policies. The field length is 1 bit.</t>
        </section>
        <section anchor="R1" numbered="true" toc="default">
          <name>R1</name>
          <t>The field reserved for future use. When IPlir header is generated, the field must 
					contain all zeros. The receiving end must not analyze the field content. 
					The field length is 3 bits.</t>
        </section>
        <section anchor="KN" numbered="true" toc="default">
          <name>KN</name>
          <t>The number of the exchange key used to encrypt and calculate the end-to-end MAC. 
					The field length is 4 bits.</t>
        </section>
        <section anchor="TKN" numbered="true" toc="default">
          <name>TKN</name>
          <t>The number of the exchange key used to calculate the transit MAC. 
					If the transit MAC is not used, i.e., T = 0, the field value should be 0. 
					When calculating and checking the end-to-end MAC (ICV), the TKN field must be 
					filled with zeros. The field length is 4 bits.</t>
        </section>
        <section anchor="Timestamp" numbered="true" toc="default">
          <name>Timestamp</name>
          <t>Packet send time. The field contains the send time value based on the astronomical 
					clock of the source host in the POSIX time format less 0x40000000 seconds. 
					The estimated overflow time is the year 2140. The field length is 32 bits.</t>
        </section>
        <section anchor="SourceIdentifier" numbered="true" toc="default">
          <name>SourceIdentifier</name>
          <t>The source host identifier is used by the destination host to identify the IPlir 
					packet source and the related context of the source host for packet processing. 
					The field length is 32 bits with ExtID = 0, or 64 bits with ExtID = 1.</t>
        </section>
        <section anchor="DestinationIdentifier" numbered="true" toc="default">
          <name>DestinationIdentifier</name>
          <t>The destination host identifier is required for routing of IPlir packets. 
					The field is available, if D = 1. The field length is 32 bits with ExtID = 0, 
					or 64 bits with ExtID = 1.</t>
        </section>
        <section anchor="SequenceNumber" numbered="true" toc="default">
          <name>SequenceNumber</name>
          <t>The packet sequence number; an unsigned integer. The field length is 32 bits 
					with ExtSN = 0, or 64 bits with ExtSN = 1.</t>
        </section>
        <section anchor="IV" numbered="true" toc="default">
          <name>InitValue (IV)</name>
          <t>An end-to-end initialization value that can be used to execute encryption 
					operations and calculate an end-to-end MAC, as well as to derive keys for 
					these operations. The field length is determined by the used cryptographic suite.</t>
        </section>
        <section anchor="Tuples" numbered="true" toc="default">
          <name>Tuples (Type, Length, Value)</name>
          <t>
					Tuples (Type, Length, Value) enable transmission of additional information within the IPlir 
					message. The Type field contains the type of the value in the Value field. 
					The Type field length is 8 bit. The Length field contains the byte length of the Value field. 
					The Length field length is 8 bit. The Value field contains a data of the Type field type.
					The Value field length of any tuple should be divisible by 8 bits and be less than 255 bytes.
          </t>
          <t>
					Permissible Type field values for the tuples are provided in Table 1.
          </t>
          <table align="left">
            <name>Type Field Values for Tuples</name>
            <thead>
              <tr>
                <th align="center">Type value</th>
                <th align="center">Description</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="center">0</td>
                <td align="center">the last tuple in the IPlir message; can be used by the vendor for its own needs</td>
              </tr>
              <tr>
                <td align="center">1</td>
                <td align="center">a pair of IPv4 addresses</td>
              </tr>
              <tr>
                <td align="center">2</td>
                <td align="center">a pair of IPv6 addresses</td>
              </tr>
              <tr>
                <td align="center">3-128</td>
                <td align="center">not in use</td>
              </tr>
              <tr>
                <td align="center">129-254</td>
                <td align="center">can be used by the vendor for its own needs</td>
              </tr>
              <tr>
                <td align="center">255</td>
                <td align="center">not in use</td>
              </tr>
            </tbody>
          </table>
          <t>
					The last tuple in the message always has type 0. The length of this tuple should be chosen so 
					as to ensure effective IPlir message processing.
          </t>
          <section anchor="IPv4" numbered="true" toc="default">
            <name>Pair of IPv4 addresses</name>
            <t>
						The Value field of the tuple of this type contains a pair of IPv4 addresses. The source 
						address comes first, followed by the destination address. The addresses are transmitted 
						in the big-endian order of bytes. 
            </t>
            <t>
						The main function of the tuple of this type is to preserve the IPv4 addresses from 
						the original IP packet in the light tunnel mode.
            </t>
            <t>
						The tuple structure is shown in Figure 3.
            </t>
            <figure>
              <name>Type = 1 Tuple Structure</name>
              <artwork align="left" name="" type="" alt=""><![CDATA[
+------+--------------+--------------+--------------+--------------+
|Bytes |      0       |      1       |      2       |      3       |
+------+--------------+--------------+--------------+--------------+
|      |              |              |Source IPv4   |              |
|      |   Type = 1   |  Length = 8  |address, byte |     ...      |
|      |              |              |No.1 (high)   |              |
|      +--------------+--------------+--------------+--------------+
| TLV  |              |Source IPv4   |Destination   |              |
|      |     ...      |address, byte |IPv4 address, |     ...      |
| area |              |No.4 (low)    |byte No.1     |              |
|      |              |              |(high)        |              |
|      +--------------+--------------+--------------+--------------+
|      |              |Destination   |              |              |
|      |     ...      |IPv4 address, |  Not in use  |  Not in use  |
|      |              |byte No.4     |              |              |
|      |              |(low)         |              |              |
+------+--------------+--------------+--------------+--------------+
					]]></artwork>
            </figure>
            <t>
						Note: Bytes labeled “not in use” contain information related to the following tuple.
            </t>
          </section>
          <section anchor="IPv6" numbered="true" toc="default">
            <name>Pair of IPv6 addresses</name>
            <t>
						The Value field of the tuple of this type contains a pair of IPv6 addresses. 
						The source address comes first, followed by the destination address. 
						The addresses are transmitted in the big-endian order of bytes. 
            </t>
            <t>
						The main function of the tuple of this type is to preserve the IPv6 addresses 
						from the original IP packet in the light tunnel mode.
            </t>
            <t>
						The tuple structure is shown in Figure 4.
            </t>
            <figure>
              <name>Type = 2 Tuple Structure</name>
              <artwork align="left" name="" type="" alt=""><![CDATA[
+------+--------------+--------------+--------------+--------------+
|Bytes |      0       |      1       |      2       |      3       |
+------+--------------+--------------+--------------+--------------+
|      |              |              |Source IPv6   |              |
|      |   Type = 2   |  Length = 32 |address, byte |     ...      |
|      |              |              |No.1 (high)   |              |
|      +--------------+--------------+--------------+--------------+
|      |                            ...                            |
|      +--------------+--------------+--------------+--------------+
| TLV  |              |Source IPv6   |Destination   |              |
|      |     ...      |address, byte |IPv6 address, |     ...      |
| area |              |No.16 (low)   |byte No.1     |              |
|      |              |              |(high)        |              |
|      +--------------+--------------+--------------+--------------+
|      |              |Destination   |              |              |
|      |     ...      |IPv6 address, |  Not in use  |  Not in use  |
|      |              |byte No.16    |              |              |
|      |              |(low)         |              |              |
+------+--------------+--------------+--------------+--------------+
					]]></artwork>
            </figure>
            <t>
						Note: Bytes labeled “not in use” contain information related to the following tuple.
            </t>
          </section>
        </section>
        <section anchor="PayloadData" numbered="true" toc="default">
          <name>PayloadData</name>
          <t>A variable-length field containing the original IP packet or its part, 
					depending on the IPlir operation mode.</t>
        </section>
        <section anchor="Staffing" numbered="true" toc="default">
          <name>Staffing</name>
          <t>A (network) filler to make the length of the IPlir message more suitable for efficient 
					processing. The Staffing field contains a sequence 
					of integers in a binary form: the first byte contains 1, the second one 
					contains 2, etc. The field length is determined by the SL field value, if SL is 
					absent (S = 0) or has the value 0, there is no Staffing field.</t>
        </section>
        <section anchor="SL" numbered="true" toc="default">
          <name>SL</name>
          <t>The number of bytes in the Staffing field. The field is available, if S = 1. 
					The field length is 8 bit.</t>
        </section>
        <section anchor="Mode" numbered="true" toc="default">
          <name>Mode</name>
          <t>The mode in which the IPlir packet was generated in. The field length is 2 bits.</t>
        </section>
        <section anchor="TLV" numbered="true" toc="default">
          <name>TLV</name>
          <t>Type, Length and Value fields flag. If TLV = 1, the IPlir body begins with tuples 
					(Type, Length, Value), otherwise there are no tuples. The field length is 1 bit.</t>
        </section>
        <section anchor="S" numbered="true" toc="default">
          <name>S</name>
          <t>The SL field flag. If S = 1, the IPlir body contains the SL field, otherwise this 
					field is absent. The field length is 1 bit.</t>
        </section>
        <section anchor="R2" numbered="true" toc="default">
          <name>R2</name>
          <t>The field reserved for future use. When an IPlir message is generated, the field 
					must contain all zeros. The receiving end must not analyze the field content. 
					The field length is 2 bits.</t>
        </section>
        <section anchor="frTN" numbered="true" toc="default">
          <name>frTN</name>
          <t>The field reserved for future use. An originating security (VPN) gateway uses this flag 
					to mark IPlir packets that were created from routed packets originally sent by other 
					network devices. This flag cannot be set if the DAR flag is set.
					The field length is 1 bit.</t>
        </section>
        <section anchor="toTN" numbered="true" toc="default">
          <name>toTN</name>
          <t>The field reserved for future use. An originating host uses this flag to mark IPlir packets 
					that are destined to other network devices but not to the destination host specified by 
					the DestinationId field. This flag cannot be set if the DAR flag is set. 
					The field length is 1 bit.</t>
        </section>
        <section anchor="NextHeader" numbered="true" toc="default">
          <name>NextHeader</name>
          <t>The original IP packet protocol number. The field length is 8 bit.</t>
        </section>
        <section anchor="ICV" numbered="true" toc="default">
          <name>IntegrityCheckValue (ICV)</name>
          <t>An end-to-end MAC calculated for the data from the IPlir message start to the 
					NextHeader field inclusive. The field length is determined by the used 
					cryptographic suite.</t>
        </section>
        <section anchor="TransitIdentifier" numbered="true" toc="default">
          <name>TransitIdentifier</name>
          <t>The identifier of the transit host that routed the IPlir packet last. 
					Each transit host updates the field value with its identifier. 
					The field is available, if T = 1. The field length is 32 bits with ExtID = 0, 
					or 64 bits with ExtID = 1.</t>
        </section>
        <section anchor="TIV" numbered="true" toc="default">
          <name>TransitInitValue (TIV)</name>
          <t>The transit initialization value used to calculate a transit MAC and derive keys 
					for this operation. The field is available, if T = 1. The field length is 
					determined by the used cryptographic suite.</t>
        </section>
        <section anchor="TICV" numbered="true" toc="default">
          <name>TransitIntegrityCheckValue (TICV)</name>
          <t>A transit MAC calculated for the data from the IPlir message start to the 
					TransitInitValue field inclusive. The field is available, if T = 1. 
					The field length is determined by the used cryptographic suite.</t>
        </section>
      </section>
      <section anchor="Structure" numbered="true" toc="default">
        <name>IPlir packet structure and IPlir header location</name>
        <t>
				The IPlir protocol can operate in three modes: transport, tunnel, and light tunnel. 
				The transport and light tunnel modes ensure protection of the data generated by protocols 
				above the IP level in the basic ISO OSI reference model, in particular, by the transport 
				layer. The tunnel mode ensures protection of the entire original IP packet.
        </t>
        <t>
				The receiving end determines based on the value of the Mode field in what mode the packet was sent. 
				Possible field values are shown in Table 2.
        </t>
        <table align="left">
          <name>Mode Field Values</name>
          <thead>
            <tr>
              <th align="center">Mode field value</th>
              <th align="center">Mode description</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="center">0</td>
              <td align="center">transport mode</td>
            </tr>
            <tr>
              <td align="center">1</td>
              <td align="center">light tunnel mode</td>
            </tr>
            <tr>
              <td align="center">2</td>
              <td align="center">tunnel mode</td>
            </tr>
            <tr>
              <td align="center">3</td>
              <td align="center">reserved for future needs</td>
            </tr>
          </tbody>
        </table>
        <section anchor="Transport" numbered="true" toc="default">
          <name>Transport mode</name>
          <t>
					In the transport mode, the header for transport layer (UDP) and the IPlir header with (Type, Length, Value)-tuples follow the 
					IP header and precede the header of the next layer (e.g., TCP, UDP, ICMP, etc.). 
					For IPv4 it means that the IPlir header is located after the IP header, 
					including all options in the original IP packet, but before the header of the next level 
					protocol. 
          </t>
          <t>
					For IPv6 the IPlir header is addressed to the destination endpoint. 
					Therefore, it should be placed after the Hop-by-hop, Routing, and Fragmentation extension headers. 
					The Destination Options extension headers can be located before, after, or on both sides of the 
					IPlir header, depending on the required semantics. However, since the IPlir protocol can ensure 
					privacy of only the fields following the IPlir header, the destination options should follow 
					the IPlir header.
          </t>
          <t>
					Figure 5 shows an example of IP packet protection using the IPlir in the transport mode.
          </t>
          <figure>
            <name>IP Packet Protection Using IPlir in the Transport Mode</name>
            <artwork align="left" name="" type="" alt=""><![CDATA[
+-------------------------+     +--------------------------+
|   Original IP packet    |     |       IPlir packet       |
|  +-------------------+  |     |  +--------------------+  |
|  |     IP header     |---------->|     IP header      |  |
|  +-------------------+  |     |  +--------------------+  |
|  |  IP packet data   |-----+  |  |  Transport header  |  |
|  +-------------------+  |  |  |  +--------------------+  |
+-------------------------+  |  |  |    IPlir header    |  |
                             |  |  +--------------------+  |
							 |  |  |     IPlir body     |  |
							 |  |  | +----------------+ |  |			 
							 +------>| IP packet data | |  |
                                |  | +----------------+ |  |
                                |  +--------------------+  |
                                |  |    IPlir trailer   |  |
                                |  +--------------------+  |
                                +--------------------------+				
				]]></artwork>
          </figure>
        </section>
        <section anchor="Light" numbered="true" toc="default">
          <name>Light tunnel mode</name>
          <t>
					Location of the header for transport layer (UDP), the extra headers and the IPlir header with (Type, Length, Value)-tuples 
					in the light tunnel mode is the same as in the transport mode. An exception is that the set of tuples 
					in the IPlir body must include a type 1 tuple (two IPv4 addresses) or a type 2 tuple (two IPv6 addresses), 
					wherein the source and destination addresses are specified from the IP header of the original IP packet. 
					The tuple type is defined by the version of the IP header of the original IP packet. 
          </t>
          <t>
					The destination host can restore the original IP addresses from the available tuple Value field.
          </t>
          <t>
					Unlike the transport mode, the light tunnel mode makes it possible to change addresses in the IPlir packet IP header.
          </t>
          <t>
					Figure 6 shows an example of IP packet protection using the IPlir in the light tunnel mode. 
          </t>
          <figure>
            <name>IP Packet Protection Using IPlir in the Light Tunnel Mode</name>
            <artwork align="left" name="" type="" alt=""><![CDATA[
+--------------------------+     +------------------------------+
|    Original IP packet    |     |         IPlir packet         |
|  +--------------------+  |     |  +------------------------+  |
|  |     IP header      |  |     |  |       IP header        |  |
|  | +----------------+ |  |     |  | +--------------------+ |  |
|  | |   Source IP    | |  |     |  | |     Source IP      | |  |
|  | +----------------+ |---------->| +--------------------+-------+
|  | | Destination IP | |  |     |  | |   Destination IP   | |  |  |
|  | +----------------+ |  |     |  | +--------------------+ |  |  |
|  +--------------------+  |     |  +------------------------+  |  |
|  |   IP packet data   |-----+  |  |    Transport header    |  |  |
|  +--------------------+  |  |  |  +------------------------+  |  |
+--------------------------+  |  |  |      IPlir header      |  |  |
							  |	 |  +------------------------+  |  |
							  |  |  |       IPlir body       |  |  |
                              |  |  | +--------------------+ |  |  |
                              |  |  | |        TLV         | |  |  |
                              |  |  | | +----------------+ | |  |  |
                              |  |  | | |   Source IP    | | |  |  |
                              |  |  | | +----------------+<--------+
                              |  |  | | | Destination IP | | |  |
                              |  |  | | +----------------+ | |  |
                              |  |  | +--------------------+ |  |
                              +------>|   IP packet data   | |  |
                                 |  | +--------------------+ |  |
                                 |  +------------------------+  |
                                 |  |      IPlir trailer     |  |
                                 |  +------------------------+  |
                                 +------------------------------+				
				]]></artwork>
          </figure>
        </section>
        <section anchor="Tunnel" numbered="true" toc="default">
          <name>Tunnel mode</name>
          <t>
					Unlike the other modes, the tunnel mode protects the entire original IP packet, including its IP header. 
          </t>
          <t>
					In the tunnel mode, a new IP header is generated with its contents based on the destination host 
					context and the source host IP routing table, followed by the extra header for the transport layer (UDP), the header for transport layer (UDP) 
					and the IPlir header with (Type, Length, Value)-tuples. 
					This is followed by the original IP packet.
          </t>
          <t>
					Versions of the original and new IP headers can be different. It means that IPv6 packets can be 
					transmitted via the IPv4 protocol and vice versa.
          </t>
          <t>
					Figure 7 shows an example of IP packet protection using the IPlir in the tunnel mode.  
          </t>
          <figure>
            <name>IP Packet Protection Using IPlir in the Tunnel Mode</name>
            <artwork align="left" name="" type="" alt=""><![CDATA[
+-------------------------+      +--------------------------+
|   Original IP packet    |      |       IPlir packet       |
|  +-------------------+  |      |  +--------------------+  |
|  |     IP header     |-------+ |  |     IP header      |  |
|  +-------------------+  |    | |  +--------------------+  |
|  |  IP packet data   |----+  | |  |  Transport header  |  |
|  +-------------------+  | |  | |  +--------------------+  |
+-------------------------+ |  | |  |    IPlir header    |  |
							|  | |  +--------------------+  |
							|  | |  |     IPlir body     |  |
                            |  | |  | +----------------+ |  |
                            |  +----->|   IP header    | |  |
                            |    |  | +----------------+ |  |
                            +-------->| IP packet data | |  |
                                 |  | +----------------+ |  |
                                 |  +--------------------+  |
                                 |  |    IPlir trailer   |  |
                                 |  +--------------------+  |
                                 +--------------------------+				
				]]></artwork>
          </figure>
        </section>
      </section>
    </section>
    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <section anchor="Encryption" numbered="true" toc="default">
        <name>Encryption and MAC</name>
        <t>
				To ensure the confidentiality of the packet, it is possible to 
				encrypt it using a symmetric cryptographic algorithm. Packet encryption in IPlir is 
				recommended, but not required. Encryption can be disabled by selecting a separate 
				cryptographic suite clearly indicating that there is no encryption. In case of encryption, 
				it is applied between the source and destination hosts regardless of the transfer network 
				topology and existence of transit hosts.
        </t>
        <t>
				To ensure packet integrity and authenticity of the data source, the IPlir protocol allows for  
				end-to-end or transit MAC. End-to-end MAC is applied between the source and 
				destination hosts. It is mandatory. Transit MAC is applied between two neighbor hosts 
				in a packet transfer chain. It is optional.
        </t>
        <t>
				To ensure confidentiality, packet integrity and authenticity of the data source, 
				either separate encryption and MAC algorithms or AEAD algorithms 
				to encrypt and calculate MAC simultaneously can be used.
        </t>
      </section>
      <section anchor="Key" numbered="true" toc="default">
        <name>Cryptographic keys</name>
        <t>
				It is implied that there is a key system that provides the interacting hosts with necessary 
				exchange keys and controls their synchronization. Exchange key is a key known only to the specified pair of hosts 
				are used to derive keys. Keys can be managed manually or automatically.
        </t>
        <t>
				The exchange keys required to process a specific packet with all their mandatory attributes 
				(meta data) must be available when packet processing starts.
        </t>
        <t>
				The packet encryption keys, end-to-end MAC keys and transit MAC keys are derived from the exchange key  
				to protect each IP packet. Each exchange key related to the specific pair of hosts is 
				indexed with the corresponding pair of their identifiers. It is possible to use key systems 
				in which several exchange keys exist (up to 16) simultaneously for two hosts. To make it possible, 
				each exchange key in the IPlir protocol is additionally indexed with an integer value between 
				0 and 15 (inclusive)  located in the KN or TKN field of the IPlir message. This allows to 
				unambiguously determine the exchange key for the two hosts.
        </t>
        <t>
				The peculiarity of IPlir is that unique packet encryption, end-to-end MAC and transit MAC keys 
				used in the corresponding cryptographic algorithms are derived for each IP packet based on the exchange keys. 
				The packet encryption, end-to-end MAC and transit MAC keys derived for the same IP packet should be different, 
				except when AEAD algorithms are used, where one packet encryption and end-to-end MAC key is used 
				for encryption and end-to-end MAC of the packet.
        </t>
        <t>
				The exchange key used to derive packet encryption and end-to-end MAC keys (or packet encryption and 
				end-to-end MAC key) is determined by the KN field value of the IPlir message and identifiers of the 
				source and destination hosts. The exchange key used to derive the packet transit MAC key is determined 
				by the TKN field value of the IPlir message and identifiers of the interacting (transit) hosts.
        </t>
        <t>
				Exchange key types and methods to derive packet protection keys from them are determined by the cryptographic suite.
        </t>
        <t>
				For any unique key used in the IPlir protocol at any time it should be impossible to calculate it 
				from the other keys, except for calculation of derived keys for packet protection from 
				a specific exchange key.
        </t>
        <t>
				The maximum quantity of material that can be processed using the same key should be determined considering 
				theoretical limits arising from the use of particular cryptographic algorithms and practical limits 
				arising during IPlir implementation. 
        </t>
        <t>
				The maximum number of keys (packet encryption, end-to-end MAC, transit MAC keys or packet encryption and 
				end-to-end MAC keys) derived from one exchange key should be determined considering theoretical limits 
				arising from the use of particular cryptographic algorithms and practical limitations arising during 
				IPlir implementation.
        </t>
        <t>
				When the allowed limit for a specific key is reached, the interacting parties should stop using it. 
				For protection of further interactions, the parties should use a key for which the allowed limit has 
				not been achieved, e.g., a new key.
        </t>
      </section>
      <section anchor="Suites" numbered="true" toc="default">
        <name>Cryptographic suites</name>
        <t>
				The cryptographic algorithms and parameters used in the IPlir protocol make up a cryptographic suite 
				designated by its CS number in the CS field of each IPlir message. There can be up to 256 different 
				cryptographic suites in total. 
        </t>
        <t>
				Permissible CS field values are provided in Table 3:
        </t>
        <table align="left">
          <name>Permissible CS Field Values</name>
          <thead>
            <tr>
              <th align="center">CS value</th>
              <th align="center">Description</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="center">0</td>
              <td align="center">not in use</td>
            </tr>
            <tr>
              <td align="center">1</td>
              <td align="center">MAGMA-MGM cryptographic suite </td>
            </tr>
            <tr>
              <td align="center">2</td>
              <td align="center">KUZN-CTR-CMAC cryptographic suite </td>
            </tr>
            <tr>
              <td align="center">3-128</td>
              <td align="center">not in use</td>
            </tr>
            <tr>
              <td align="center">129</td>
              <td align="center">AES-128-GCM cryptographic suite</td>
            </tr>
            <tr>
              <td align="center">130-131</td>
              <td align="center">can be used by the vendor for its own needs</td>
            </tr>
            <tr>
              <td align="center">132</td>
              <td align="center">AES-256-CTR-CMAC cryptographic suite</td>
            </tr>
            <tr>
              <td align="center">133</td>
              <td align="center">can be used by the vendor for its own needs</td>
            </tr>
            <tr>
              <td align="center">134</td>
              <td align="center">AES-256-CFB-CMAC cryptographic suite</td>
            </tr>
            <tr>
              <td align="center">135-254</td>
              <td align="center">can be used by the vendor for its own needs</td>
            </tr>
            <tr>
              <td align="center">255</td>
              <td align="center">Not in use</td>
            </tr>
          </tbody>
        </table>
        <t>
				The list of main mechanisms and parameters specified in the cryptographic suite 
				is shown in Table 4:
        </t>
        <table align="left">
          <name>Main Mechanisms And Parameters In The Cryptographic Suite</name>
          <thead>
            <tr>
              <th align="center">Parameter</th>
              <th align="center">Description</th>
              <th align="center">Purpose</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="center">EncAlg</td>
              <td align="center">encryption algorithm</td>
              <td align="center">the algorithm is used to encrypt the packet</td>
            </tr>
            <tr>
              <td align="center">MACAlg</td>
              <td align="center">end-to-end MAC algorithm</td>
              <td align="center">the algorithm is used to calculate packet end-to-end MAC</td>
            </tr>
            <tr>
              <td align="center">TMACAlg</td>
              <td align="center">transit MAC algorithm</td>
              <td align="center">the algorithm is used to calculate packet transit MAC</td>
            </tr>
            <tr>
              <td align="center">MACLen</td>
              <td align="center">end-to-end MAC length</td>
              <td align="center"/>
            </tr>
            <tr>
              <td align="center">TMACLen</td>
              <td align="center">transit MAC length</td>
              <td align="center"/>
            </tr>
            <tr>
              <td align="center">IVLen</td>
              <td align="center">end-to-end initialization value length</td>
              <td align="center">the initialization value can be used for packet encryption, end-to-end MAC, 
				and derivation of packet encryption keys and packet end-to-end MAC keys 
				(or packet encryption and end-to-end MAC keys)</td>
            </tr>
            <tr>
              <td align="center">TIVLen</td>
              <td align="center">transit initialization value length</td>
              <td align="center">the transit initialization value can be used for packet transit MAC and derivation of packet transit MAC keys</td>
            </tr>
            <tr>
              <td align="center">KDAlg</td>
              <td align="center">algorithms of deriving packet protection keys from exchange keys</td>
              <td align="center">the algorithms are used to derive packet encryption keys and packet end-to-end MAC keys 
				(or packet encryption and end-to-end MAC keys), and to derive packet transit MAC keys</td>
            </tr>
          </tbody>
        </table>
        <section anchor="MGM" numbered="true" toc="default">
          <name>MAGMA-MGM cryptographic suite: CS = 1</name>
          <t>
					MAGMA-MGM Cryptographic Suite Description is shown in Table 5:
          </t>
          <table align="left">
            <name>MAGMA-MGM cryptographic suite: CS = 1</name>
            <thead>
              <tr>
                <th align="center">Parameter</th>
                <th align="center">Value</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="center">EncAlg</td>
                <td align="center">GOST R 34.12–2015 (Magma) [RFC8891] in the MGM mode [RFC9058]   </td>
              </tr>
              <tr>
                <td align="center">MACAlg</td>
                <td align="center">GOST R 34.12–2015 (Magma) [RFC8891] in the MGM mode [RFC9058]   </td>
              </tr>
              <tr>
                <td align="center">TMACAlg</td>
                <td align="center">GOST R 34.12–2015 (Magma) [RFC8891] in the MGM mode [RFC9058]   </td>
              </tr>
              <tr>
                <td align="center">MACLen</td>
                <td align="center">32 bits</td>
              </tr>
              <tr>
                <td align="center">TMACLen</td>
                <td align="center">32 bits</td>
              </tr>
              <tr>
                <td align="center">IVLen</td>
                <td align="center">64 bits</td>
              </tr>
              <tr>
                <td align="center">TIVLen</td>
                <td align="center">64 bits</td>
              </tr>
              <tr>
                <td align="center">KDAlg</td>
                <td align="center">see the description below </td>
              </tr>
            </tbody>
          </table>
          <section anchor="KeyMGM" numbered="true" toc="default">
            <name>Exchange keys</name>
            <t>
						For each pair of interacting hosts, there is a single exchange key with a length of 
						256 bits used for deriving of packet encryption and end-to-end MAC keys, as well as 
						packet transit MAC keys.
            </t>
          </section>
          <section anchor="IVMGM" numbered="true" toc="default">
            <name>Requirements for initialization values</name>
            <t>
						The end-to-end initialization value InitValue in the InitValue field of the IPlir message should have a 
						length of 64 bits and be unique for each IPlir packet the encryption and end-to-end MAC of which are 
						implemented by the same source host using the same exchange key.
            </t>
            <t>
						The transit initialization value TransitInitValue in the TransitInitValue field of the IPlir message should 
						have a length of 64 bits and be unique for each IPlir packet the transit MAC of which is implemented by 
						the same (transit) host using the same exchange key.
            </t>
          </section>
          <section anchor="KDFMGM" numbered="true" toc="default">
            <name>Key derivation algorithms</name>
            <t>
						The packet encryption and end-to-end MAC key K_AEAD of 256 bit length is calculated as follows:
            </t>
            <t>
						K_AEAD = K_1 || K_2 || K_3 || K_4,
            </t>
            <t>
						where each value of K_i \in V_64, i = 1,2,3,4 is calculated as per GOST R 34.12–2015 (Magma) [RFC8891] 
						in the CMAC mode as per ISO/IEC 9797-1:2011 [ISO9797-1], wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the exchange key is used as the key. The exchange key is specified by the source and destination hosts 
							and the KN field value of the IPlir message,</t>
              </li>
              <li>
                <t>a binary string as shown below is used as the data: IntToVec_8(i)||Label||aL||IV_KDF||SN||Node||cL||oL, where
                </t>
                <ul spacing="normal">
                  <li>
                    <t>Label = StrToVec_48('AEAD'),</t>
                  </li>
                  <li>
                    <t>aL = IntToVec_8(LabelByteLength), where LabelByteLength = 6,</t>
                  </li>
                  <li>
                    <t>IV_KDF = InitValue, where InitValue is initialized by the InitValue field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>SN = SequenceNumber, where SequenceNumber is initialized by the SequenceNumber field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>Node = SourceIdentifier, where SourceIdentifier is initialized by the SourceIdentifier field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>cL = IntToVec_16(ContextByteLength), where ContextByteLength is the sum of byte lengths of the InitValue, 
								SequenceNumber and SourceIdentifier fields of the IPlir message,</t>
                  </li>
                  <li>
                    <t>oL = IntToVec_16(OutputBitLength), where OutputBitLength = 256,</t>
                  </li>
                </ul>
              </li>
              <li>
                <t>the MAC length is 64 bits.</t>
              </li>
            </ul>
            <t>
						The packet transit MAC key K_TMAC of 256 bit length is calculated as follows:
            </t>
            <t>
						K_TMAC = K_1 || K_2 || K_3 || K_4,
            </t>
            <t>
						where each value of K_i \in V_64, i = 1,2,3,4 is calculated as per GOST R 34.12–2015 (Magma) [RFC8891] 
						in the CMAC mode, as per ISO/IEC 9797-1:2011 [ISO9797-1], wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the exchange key is used as the key. The exchange key is specified by the (transit) hosts 
							the IPlir packet passes through and the TKN field value of the IPlir message,</t>
              </li>
              <li>
                <t>a binary string as shown below is used as the data: IntToVec_8(i)||Label||aL||TIV_KDF||SN||Node||cL||oL, where
                </t>
                <ul spacing="normal">
                  <li>
                    <t>Label = StrToVec_48('TMAC'),</t>
                  </li>
                  <li>
                    <t>aL = IntToVec_8(LabelByteLength), where LabelByteLength = 6,</t>
                  </li>
                  <li>
                    <t>TIV_KDF = TransitInitValue, where TransitInitValue is initialized by the TransitInitValue field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>SN = SequenceNumber, where SequenceNumber is initialized by the SequenceNumber field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>Node = TransitIdentifier, where TransitIdentifier is initialized by the TransitIdentifier field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>cL = IntToVec_16(ContextByteLength), where ContextByteLength is the sum of byte lengths of the TransitInitValue, 
								SequenceNumber and TransitIdentifier fields of the IPlir message,</t>
                  </li>
                  <li>
                    <t>oL = IntToVec_16(OutputBitLength), where OutputBitLength = 256,</t>
                  </li>
                </ul>
              </li>
              <li>
                <t>the MAC length is 64 bits.</t>
              </li>
            </ul>
          </section>
          <section anchor="EncMGM" numbered="true" toc="default">
            <name>Encryption and MAC algorithms</name>
            <t>
						Encryption of the IPlir body and calculation of the end-to-end MAC ICV in the IntegrityCheckValue field of the IPlir 
						message are implemented as per GOST R 34.12–2015 (Magma) [RFC8891] in the MGM mode [RFC9058], wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the packet encryption and end-to-end MAC key K_AEAD is used as the encryption key,</t>
              </li>
              <li>
                <t>data in the IPlir header fields in the order of their appearance in the IPlir message are used as associated authenticated data,</t>
              </li>
              <li>
                <t>data in the IPlir body fields in the order of their appearance in the IPlir message are used as plaintext,</t>
              </li>
              <li>
                <t>the value of IV_AEAD \in V_63 is used as the initial counter nonce:
                </t>
                <ul empty="true" spacing="normal">
                  <li>
                    <t>IV_AEAD = LSB_63(InitValue),</t>
                  </li>
                  <li>
                    <t>where InitValue is initialized by the InitValue field value of the IPlir message,</t>
                  </li>
                </ul>
              </li>
              <li>
                <t>the MAC length is 32 bits.</t>
              </li>
            </ul>
            <t>
						The diagram of encryption and end-to-end MAC is shown in Figure 8.
            </t>
            <figure>
              <name>Diagram of Encryption and End-to-End MAC Using the MAGMA-MGM Cryptographic Suite</name>
              <artwork align="left" name="" type="" alt=""><![CDATA[
                +-----------------------------------+   
                |           IPlir header            |  
                |                ...                | 
                |   +---------------------------+   |  
           +--------|     SourceIdentifier      |   |  
           |    |   +---------------------------+   |  
           |    |                ...                |--------+  
           |    |   +---------------------------+   |        |
           +--------|      SequenceNumber       |   |        |
           |    |   +---------------------------+   |        |
           +--------|        InitValue          |---------+  |
           |    |   +---------------------------+   |     |  |
           |    +-----------------------------------+     |  |
           |    |            IPlir body             |--+  |  |  
           |    +-----------------------------------+  |  |  |
           |    |           IPlir trailer           |  |  |  |
           |    |                ...                |  |  |  |
           |    +-----------------------------------+  |  |  |   
           |                                           |  |  |
           v                                           v  v  v
+---------------------------------+            +-------------------+
| KDF based on GOST R 34.12-2015  |  +------+  | GOST R 34.12-2015 |
| (Magma) [RFC8891] in the CMAC   |->|K_AEAD|->| (Magma) [RFC8891] |
|          mode as per            |  +------+  | in the MGM mode   |
| ISO/IEC 9797-1:2011 [ISO9797-1] |            |    [RFC9058]      |
+---------------------------------+            +-------------------+
                 ^                                      |    |      
                 |                                      |    |
     +-----------------------+                          |    |
     |  Exchange key between |                          |    |
     | source and destination|                          |    |
     |        hosts          |                          |    |
     +-----------------------+                          |    |
                                                        |    |
                +-----------------------------------+   |    |
                |           IPlir header            |   |    |
                |                ...                |   |    |
                |   +---------------------------+   |   |    |
                |   |     SourceIdentifier      |   |   |    | 
                |   +---------------------------+   |   |    |
                |                ...                |   |    |
                |   +---------------------------+   |   |    |
                |   |      SequenceNumber       |   |   |    |
                |   +---------------------------+   |   |    |
                |   |        InitValue          |   |   |    |
                |   +---------------------------+   |   |    |
                +-----------------------------------+   |    |
                |       Encrypted IPlir body        |<--+    |  
                +-----------------------------------+        |
                |           IPlir trailer           |        |
                |   +---------------------------+   |        |
                |   |    IntegrityCheckValue    |<-----------+
                |   +---------------------------+   |
                |                ...                |  
                +-----------------------------------+     		
					]]></artwork>
            </figure>
            <t>
						Calculation of the transit MAC TICV in the TransitIntegrityCheckValue field of the 
						IPlir message is implemented as per the GOST R 34.12–2015 (Magma) [RFC8891] 
						in the MGM mode  [RFC9058], wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the packet transit MAC key K_TMAC is used as the encryption key,</t>
              </li>
              <li>
                <t>data in the IPlir header fields, the encrypted IPlir body and IntegrityCheckValue, TransitIdentifier, 
							TransitInitValue fields data in the order of their appearance in the IPlir message are used as the associated authenticated data,</t>
              </li>
              <li>
                <t>plaintext is an empty string,</t>
              </li>
              <li>
                <t>the value of TIV_AEAD \in V_63 is used as the initial counter nonce:
                </t>
                <ul empty="true" spacing="normal">
                  <li>
                    <t>TIV_AEAD = LSB_63(TransitInitValue),</t>
                  </li>
                  <li>
                    <t>where TransitInitValue is initialized by the TransitInitValue field value of the IPlir message,</t>
                  </li>
                </ul>
              </li>
              <li>
                <t>the MAC length is 32 bits.</t>
              </li>
            </ul>
            <t>
						The diagram of transit MAC is shown in Figure 9. The “null” value means an empty binary string.
            </t>
            <figure>
              <name>Diagram of Transit MAC Using the MAGMA-MGM Cryptographic Suite</name>
              <artwork align="left" name="" type="" alt=""><![CDATA[
                +-----------------------------------+--+   
                |           IPlir header            |  |
                |                ...                |  |
                |   +---------------------------+   |  |
           +--------|      SequenceNumber       |   |  |
           |    |   +---------------------------+   |  |
           |    |                ...                |  |
           |    +-----------------------------------+  |
           |    |        Encrypted IPlir body       |  |-------+
           |    +-----------------------------------+  |       |
           |    |           IPlir trailer           |  |       |
           |    |                ...                |  |       |
           |    |   +---------------------------+   |  |       |
           +--------|     TransitIdentifier     |   |  |       |
           |    |   +---------------------------+   |  |       |
           +--------|                           |   |  |       |
           |    |   |     TransitInitValue      |   |  |       |
           |    | +-|                           |   |  |       |
           |    | | +---------------------------+---|--+       |
           |    | |              ...                |          |
           |    +-|---------------------------------+          |   
           |      |                                            |
           |      +--------------------------------------+     |
           |                           +------+          |     |
           |                           | null |----+     |     |
           |                           +------+    |     |     |
           v                                       v     v     v
+---------------------------------+            +-------------------+
| KDF based on GOST R 34.12-2015  |  +------+  | GOST R 34.12-2015 |
| (Magma) [RFC8891] in the CMAC   |->|K_TMAC|->| (Magma) [RFC8891] |
|          mode as per            |  +------+  | in the MGM mode   |
| ISO/IEC 9797-1:2011 [ISO9797-1] |            |    [RFC9058]      |
+---------------------------------+            +-------------------+
                 ^                                    |      |
                 |                                    v      |
     +-----------------------+                    +------+   |
     | Exchange key between  |                    | null |   |
     |     transit hosts     |                    +------+   |
     +-----------------------+                               |
                                                             |
                +------------------------------------+       |
                |            IPlir header            |       |
                |                ...                 |       |
                |   +----------------------------+   |       |
                |   |       SequenceNumber       |   |       |
                |   +----------------------------+   |       |
                |                ...                 |       |
                +------------------------------------+       |
                |        Encrypted IPlir body        |       |
                +------------------------------------+       |
                |           IPlir trailer            |       |
                |                ...                 |       |
                |   +----------------------------+   |       |
                |   |     TransitIdentifier      |   |       |
                |   +----------------------------+   |       |
                |   |                            |   |       |
                |   |      TransitInitValue      |   |       |
                |   |                            |   |       |
                |   +----------------------------+   |       |
                |   | TransitIntegrityCheckValue |<----------+
                |   +----------------------------+   |                 
                +------------------------------------+         		
					]]></artwork>
            </figure>
          </section>
        </section>
        <section anchor="KUZN" numbered="true" toc="default">
          <name>KUZN-CTR-CMAC cryptographic suite: CS=2</name>
          <t>
					KUZN-CTR-CMAC Cryptographic Suite Description is shown in Table 6:
          </t>
          <table align="left">
            <name>KUZN-CTR-CMAC cryptographic suite: CS=2</name>
            <thead>
              <tr>
                <th align="center">Parameter</th>
                <th align="center">Value</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="center">EncAlg</td>
                <td align="center">GOST R 34.12-2015 (Kuznyechik) [RFC7801] in the CTR mode [ISO10116]</td>
              </tr>
              <tr>
                <td align="center">MACAlg</td>
                <td align="center">GOST R 34.12-2015 (Kuznyechik) [RFC7801] in the CMAC mode [ISO9797-1]</td>
              </tr>
              <tr>
                <td align="center">TMACAlg</td>
                <td align="center">GOST R 34.12-2015 (Kuznyechik) [RFC7801] in the CMAC mode [ISO9797-1]</td>
              </tr>
              <tr>
                <td align="center">MACLen</td>
                <td align="center">64 bits</td>
              </tr>
              <tr>
                <td align="center">TMACLen</td>
                <td align="center">64 bits</td>
              </tr>
              <tr>
                <td align="center">IVLen</td>
                <td align="center">64 bits</td>
              </tr>
              <tr>
                <td align="center">TIVLen</td>
                <td align="center">64 bits</td>
              </tr>
              <tr>
                <td align="center">KDAlg</td>
                <td align="center">see the description below </td>
              </tr>
            </tbody>
          </table>
          <section anchor="KeyKUZN" numbered="true" toc="default">
            <name>Exchange keys</name>
            <t>
						For each pair of interacting hosts, there is a single exchange key with a length of 256 bits 
						designed for derivation of packet encryption keys, end-to-end MAC keys, and transit MAC keys.
            </t>
          </section>
          <section anchor="IVKUZN" numbered="true" toc="default">
            <name>Requirements for initialization values</name>
            <t>
						The end-to-end initialization value InitValue in the InitValue field of the IPlir message should 
						have a length of 64 bits and be unique for each IPlir packet the encryption and end-to-end MAC 
						of which are implemented by the same source host using the same exchange key.
            </t>
            <t>
						The transit initialization value TransitInitValue in the TransitInitValue field of the IPlir 
						message should have a length of 64 bits and be unique for each IPlir packet the transit MAC 
						of which is implemented by the same (transit) host using the same exchange key.
            </t>
          </section>
          <section anchor="KDFKUZN" numbered="true" toc="default">
            <name>Key derivation algorithms</name>
            <t>
						The packet encryption key K_ENC of 256 bit length and the packet end-to-end MAC key K_MAC of 
						256 bit length are calculated as follows:
            </t>
            <t>
						K_ENC = K_1 || K_2,
            </t>
            <t>
						K_MAC = K_3 || K_4,
            </t>
            <t>
						where each value of K_i \in V_128, i = 1,2,3,4 is calculated as per GOST R 34.12-2015 
						(Kuznyechik) [RFC7801] in the CMAC mode as per ISO/IEC 9797-1:2011 [ISO9797-1], wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the exchange key is used as the key. The exchange key is specified by the source and destination hosts 
							and the KN field value of the IPlir message,</t>
              </li>
              <li>
                <t>a binary string as shown below is used as the data: IntToVec_8(i)||Label||aL||IV_KDF||SN||Node||cL||oL, where
                </t>
                <ul spacing="normal">
                  <li>
                    <t>Label = StrToVec_48('ENCMAC'),</t>
                  </li>
                  <li>
                    <t>aL = IntToVec_8(LabelByteLength), where LabelByteLength = 6,</t>
                  </li>
                  <li>
                    <t>IV_KDF = InitValue, where InitValue is initialized by the InitValue field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>SN = SequenceNumber, where SequenceNumber is initialized by the SequenceNumber field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>Node = SourceIdentifier, where SourceIdentifier is initialized by the SourceIdentifier field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>cL = IntToVec_16(ContextByteLength), where ContextByteLength is the sum of byte lengths of the InitValue, 
								SequenceNumber and SourceIdentifier fields of the IPlir message,</t>
                  </li>
                  <li>
                    <t>oL = IntToVec_16(OutputBitLength), where OutputBitLength = 512,</t>
                  </li>
                </ul>
              </li>
              <li>
                <t>the MAC length is 128 bits.</t>
              </li>
            </ul>
            <t>
						The packet transit MAC key K_TMAC of 256 bit length is calculated as follows:
            </t>
            <t>
						K_TMAC = K_1 || K_2,
            </t>
            <t>
						where each value of K_i \in V_128, i = 1,2 is calculated as per GOST R 34.12-2015 
						(Kuznyechik) [RFC7801] in the CMAC mode as per ISO/IEC 9797-1:2011 [ISO9797-1], wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the exchange key is used as the key. The exchange key is specified by the (transit) hosts 
							the IPlir packet passes through and the TKN field value of the IPlir message,</t>
              </li>
              <li>
                <t>a binary string as shown below is used as the data: IntToVec_8(i)||Label||aL||TIV_KDF||SN||Node||cL||oL, where
                </t>
                <ul spacing="normal">
                  <li>
                    <t>Label = StrToVec_48('TMAC'),</t>
                  </li>
                  <li>
                    <t>aL = IntToVec_8(LabelByteLength), where LabelByteLength = 6,</t>
                  </li>
                  <li>
                    <t>TIV_KDF = TransitInitValue, where TransitInitValue is initialized by the TransitInitValue field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>SN = SequenceNumber, where SequenceNumber is initialized by the SequenceNumber field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>Node = TransitIdentifier, where TransitIdentifier is initialized by the TransitIdentifier field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>cL = IntToVec_16(ContextByteLength), where ContextByteLength is the sum of byte lengths of the TransitInitValue, 
								SequenceNumber and TransitIdentifier fields of the IPlir message,</t>
                  </li>
                  <li>
                    <t>oL = IntToVec_16(OutputBitLength), where OutputBitLength = 256,</t>
                  </li>
                </ul>
              </li>
              <li>
                <t>the MAC length is 128 bits.</t>
              </li>
            </ul>
          </section>
          <section anchor="EncKUZN" numbered="true" toc="default">
            <name>Encryption and MAC algorithms</name>
            <t>
						The IPlir body is encrypted as per the GOST R 34.12-2015 
						(Kuznyechik) [RFC7801] in the CTR mode as per ISO/IEC 10116:2017 [ISO10116] without padding, wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the packet encryption key K_ENC is used as the key,</t>
              </li>
              <li>
                <t>data in the IPlir body fields in the order of their appearance in the IPlir message are used as plaintext,</t>
              </li>
              <li>
                <t>the value of SV \in V_128 is used as the initialization value:
                </t>
                <ul empty="true" spacing="normal">
                  <li>
                    <t>SV = InitValue||0^64,</t>
                  </li>
                  <li>
                    <t>where InitValue is initialized by the InitValue field value of the IPlir message,</t>
                  </li>
                </ul>
              </li>
              <li>
                <t>the key stream block length is 128 bits.</t>
              </li>
            </ul>
            <t>
						Calculation of the end-to-end MAC ICV in the IntegrityCheckValue field of the IPlir message is implemented 
						as per the GOST R 34.12-2015 (Kuznyechik) [RFC7801] in the CMAC mode as per ISO/IEC 9797-1:2011 [ISO9797-1], wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the packet end-to-end MAC key K_MAC is used as the key,</t>
              </li>
              <li>
                <t>data in the IPlir header fields and the encrypted IPlir body in the order of their appearance in the IPlir message are used as the data,</t>
              </li>
              <li>
                <t>the MAC length is 64 bits.</t>
              </li>
            </ul>
            <t>
						The diagram of encryption and end-to-end MAC is shown in Figure 10.
            </t>
            <figure>
              <name>Diagram of Encryption and End-to-End MAC Using the KUZN-CTR-CMAC Cryptographic Suite</name>
              <artwork align="left" name="" type="" alt=""><![CDATA[
                +-----------------------------------+   
                |           IPlir header            |  
                |                ...                | 
                |   +---------------------------+   |  
           +--------|     SourceIdentifier      |   |  
           |    |   +---------------------------+   |  
           |    |                ...                |   
           |    |   +---------------------------+   |        
           +--------|      SequenceNumber       |   |        
           |    |   +---------------------------+   |        
           +--------|        InitValue          |----------+  
           |    |   +---------------------------+   |      |  
           |    +-----------------------------------+      |  
           |    |            IPlir body             |--+   |    
           |    +-----------------------------------+  |   |  
           |    |           IPlir trailer           |  |   |  
           |    |                ...                |  |   |  
           |    +-----------------------------------+  |   |     
           |                                           |   |  
           v                                           v   v  
+---------------------------------+  +------+  +-------------------+
| KDF based on GOST R 34.12-2015  |->|K_ENC |->| GOST R 34.12-2015 |
| (Kuznyechik) [RFC7801] in the   |  +------+  |   (Kuznyechik)    |
|        CMAC mode as per         |            | [RFC7801] in the  |
| ISO/IEC 9797-1:2011 [ISO9797-1] |  +------+  |     CTR mode      |
|                                 |->|K_MAC |  |    [ISO10116]    |
+---------------------------------+  +------+  +-------------------+
            ^                            |               |          
            |                            v               |    
+-----------------------+       +-------------------+    |    
|  Exchange key between |       | GOST R 34.12-2015 |    |    
| source and destination|   +---|   (Kuznyechik)    |    |    
|        hosts          |   |   | [RFC7801] in the  |    | 
+-----------------------+   |   |     CMAC mode     |    |
                            |   |    [ISO9797-1]    |    |
                            |   +-------------------+    |
    +-----------------------+             ^              |
    |                                     |              |
    |   +---------------------------------+              |
    |   |                                                |    
    |   |   +---+-----------------------------------+    |    
    |   |   |   |           IPlir header            |    |    
    |   |   |   |                ...                |    |    
    |   |   |   |   +---------------------------+   |    |    
    |   |   |   |   |     SourceIdentifier      |   |    |     
    |   |   |   |   +---------------------------+   |    |    
    |   |   |   |                ...                |    |    
    |   +---|   |   +---------------------------+   |    |    
    |       |   |   |      SequenceNumber       |   |    |    
    |       |   |   +---------------------------+   |    |    
    |       |   |   |        InitValue          |   |    |    
    |       |   |   +---------------------------+   |    |    
    |       |   +-----------------------------------+    |    
    |       |   |       Encrypted IPlir body        |<---+      
    |       +---+-----------------------------------+        
    |           |           IPlir trailer           |        
    |           |   +---------------------------+   |        
    +-------------->|    IntegrityCheckValue    |   |         
                |   +---------------------------+   |
                |                ...                |  
                +-----------------------------------+     		
					]]></artwork>
            </figure>
            <t>
						Calculation of the transit MAC TICV in the TransitIntegrityCheckValue field of the 
						IPlir message is implemented as per the GOST R 34.12-2015 (Kuznyechik) [RFC7801] 
						in the CMAC mode as per ISO/IEC 9797-1:2011 [ISO9797-1], wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the packet transit MAC key K_TMAC is used as the key,</t>
              </li>
              <li>
                <t>data in the IPlir header fields, the encrypted IPlir body and IntegrityCheckValue, TransitIdentifier, 
							TransitInitValue fields data in the order of their appearance in the IPlir message are used as the data protected by MAC,</t>
              </li>
              <li>
                <t>the MAC length is 64 bits.</t>
              </li>
            </ul>
            <t>
						The diagram of transit MAC is shown in Figure 11. 
            </t>
            <figure>
              <name>Diagram of Transit MAC Using the KUZN-CTR-CMAC Cryptographic Suite</name>
              <artwork align="left" name="" type="" alt=""><![CDATA[
                +-----------------------------------+--+   
                |           IPlir header            |  |
                |                ...                |  |
                |   +---------------------------+   |  | 
           +--------|      SequenceNumber       |   |  |
           |    |   +---------------------------+   |  |
           |    |                ...                |  |
           |    +-----------------------------------+  |
           |    |        Encrypted IPlir body       |  |---+
           |    +-----------------------------------+  |   |
           |    |           IPlir trailer           |  |   |
           |    |                ...                |  |   |
           |    |   +---------------------------+   |  |   |
           +--------|     TransitIdentifier     |   |  |   |
           |    |   +---------------------------+   |  |   |
           +--------|                           |   |  |   |
           |    |   |     TransitInitValue      |   |  |   |
           |    |   |                           |   |  |   |
           |    |   +---------------------------+---|--+   |
           |    |                ...                |      |
           |    +-----------------------------------+      |   
           |                                               |
           v                                               v
+---------------------------------+            +-------------------+
| KDF based on GOST R 34.12-2015  |  +------+  | GOST R 34.12-2015 |
| (Kuznyechik) [RFC7801] in the   |->|K_TMAC|->|   (Kuznyechik)    |
|        CMAC mode as per         |  +------+  | [RFC7801] in the  |
| ISO/IEC 9797-1:2011 [ISO9797-1] |            |     CMAC mode     |
+---------------------------------+            |    [ISO9797-1]    +
                 ^                             +-------------------+
                 |                                       |
                 |                                       |
     +----------------------+                            |
     | Exchange key between |                            |
     |     transit hosts    |                            |
     +----------------------+                            |
                                                         |
                +------------------------------------+   |
                |            IPlir header            |   |
                |                ...                 |   |
                |   +----------------------------+   |   |
                |   |       SequenceNumber       |   |   |
                |   +----------------------------+   |   |
                |                ...                 |   |
                +------------------------------------+   |
                |        Encrypted IPlir body        |   |
                +------------------------------------+   |
                |           IPlir trailer            |   |
                |                ...                 |   |
                |   +----------------------------+   |   |
                |   |     TransitIdentifier      |   |   |
                |   +----------------------------+   |   |
                |   |                            |   |   |
                |   |      TransitInitValue      |   |   |
                |   |                            |   |   |
                |   +----------------------------+   |   |
                |   | TransitIntegrityCheckValue |<------+
                |   +----------------------------+   |                 
                +------------------------------------+         		
					]]></artwork>
            </figure>
          </section>
        </section>
        <section anchor="GCM" numbered="true" toc="default">
          <name>AES-128-GCM cryptographic suite: CS = 129</name>
          <t>
					AES-128-GCM Cryptographic Suite Description is shown in Table 7:
          </t>
          <table align="left">
            <name>AES-128-GCM cryptographic suite: CS = 129</name>
            <thead>
              <tr>
                <th align="center">Parameter</th>
                <th align="center">Value</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="center">EncAlg</td>
                <td align="center">AES-128 [ISO18033-3] in the GCM mode [ISO19772]</td>
              </tr>
              <tr>
                <td align="center">MACAlg</td>
                <td align="center">AES-128 [ISO18033-3] in the GCM mode [ISO19772]</td>
              </tr>
              <tr>
                <td align="center">TMACAlg</td>
                <td align="center">AES-128 [ISO18033-3] in the GCM mode [ISO19772]</td>
              </tr>
              <tr>
                <td align="center">MACLen</td>
                <td align="center">64 bits</td>
              </tr>
              <tr>
                <td align="center">TMACLen</td>
                <td align="center">64 bits</td>
              </tr>
              <tr>
                <td align="center">IVLen</td>
                <td align="center">96 bits</td>
              </tr>
              <tr>
                <td align="center">TIVLen</td>
                <td align="center">96 bits</td>
              </tr>
              <tr>
                <td align="center">KDAlg</td>
                <td align="center">see the description below </td>
              </tr>
            </tbody>
          </table>
          <section anchor="KeyGCM" numbered="true" toc="default">
            <name>Exchange keys</name>
            <t>
						For each pair of interacting hosts, there is a single exchange key with a length of 
						128 bits used for deriving of packet encryption and end-to-end MAC keys, as well as 
						packet transit MAC keys.
            </t>
          </section>
          <section anchor="IVGCM" numbered="true" toc="default">
            <name>Requirements for initialization values</name>
            <t>
						The end-to-end initialization value InitValue in the InitValue field of the IPlir message should have a 
						length of 96 bits and be unique for each IPlir packet the encryption and end-to-end MAC of which are 
						implemented by the same source host using the same exchange key.
            </t>
            <t>
						The transit initialization value TransitInitValue in the TransitInitValue field of the IPlir message should 
						have a length of 96 bits and be unique for each IPlir packet the transit MAC of which is implemented by 
						the same (transit) host using the same exchange key.
            </t>
          </section>
          <section anchor="KDFGCM" numbered="true" toc="default">
            <name>Key derivation algorithms</name>
            <t>
						The packet encryption and end-to-end MAC key K_AEAD of 128 bit length is calculated as follows:
            </t>
            <t>
						K_AEAD = K_1,
            </t>
            <t>
						where value of K_1 \in V_128 is calculated as per KDF in Counter Mode using AES-128 
						[ISO18033-3] in the CMAC mode [RFC4493] as the PRF, wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the exchange key is used as the key for the PRF. The exchange key is specified by the source and destination hosts 
							and the KN field value of the IPlir message,</t>
              </li>
              <li>
                <t>a binary string as shown below is used as the input data for the PRF: IntToVec_8(1)||Label||aL||IV_KDF||SN||Node||cL||oL, where
                </t>
                <ul spacing="normal">
                  <li>
                    <t>Label = StrToVec_48('AEAD'),</t>
                  </li>
                  <li>
                    <t>aL = IntToVec_8(LabelByteLength), where LabelByteLength = 6,</t>
                  </li>
                  <li>
                    <t>IV_KDF = InitValue, where InitValue is initialized by the InitValue field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>SN = SequenceNumber, where SequenceNumber is initialized by the SequenceNumber field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>Node = SourceIdentifier, where SourceIdentifier is initialized by the SourceIdentifier field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>cL = IntToVec_16(ContextByteLength), where ContextByteLength is the sum of byte lengths of the InitValue, 
								SequenceNumber and SourceIdentifier fields of the IPlir message,</t>
                  </li>
                  <li>
                    <t>oL = IntToVec_8(OutputBitLength), where OutputBitLength = 128,</t>
                  </li>
                </ul>
              </li>
              <li>
                <t>the PRF output length is 128 bits.</t>
              </li>
            </ul>
            <t>
						The packet transit MAC key K_TMAC of 128 bit length is calculated as follows:
            </t>
            <t>
						K_TMAC = K_1,
            </t>
            <t>
						where value of K_1 \in V_128 is calculated as per KDF in Counter Mode using AES-128 
						[ISO18033-3] in the CMAC mode [RFC4493] as the PRF, wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the exchange key is used as the key for the PRF. The exchange key is specified by the (transit) hosts 
							the IPlir packet passes through and the TKN field value of the IPlir message,</t>
              </li>
              <li>
                <t>a binary string as shown below is used as the input data for the PRF: IntToVec_8(1)||Label||aL||TIV_KDF||SN||Node||cL||oL, where
                </t>
                <ul spacing="normal">
                  <li>
                    <t>Label = StrToVec_48('TMAC'),</t>
                  </li>
                  <li>
                    <t>aL = IntToVec_8(LabelByteLength), where LabelByteLength = 6,</t>
                  </li>
                  <li>
                    <t>TIV_KDF = TransitInitValue, where TransitInitValue is initialized by the TransitInitValue field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>SN = SequenceNumber, where SequenceNumber is initialized by the SequenceNumber field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>Node = TransitIdentifier, where TransitIdentifier is initialized by the TransitIdentifier field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>cL = IntToVec_16(ContextByteLength), where ContextByteLength is the sum of byte lengths of the TransitInitValue, 
								SequenceNumber and TransitIdentifier fields of the IPlir message,</t>
                  </li>
                  <li>
                    <t>oL = IntToVec_8(OutputBitLength), where OutputBitLength = 128,</t>
                  </li>
                </ul>
              </li>
              <li>
                <t>the PRF output length is 128 bits.</t>
              </li>
            </ul>
          </section>
          <section anchor="EncGCM" numbered="true" toc="default">
            <name>Encryption and MAC algorithms</name>
            <t>
						Encryption of the IPlir body and calculation of the end-to-end MAC ICV in the IntegrityCheckValue field of the IPlir 
						message are implemented as per the AES-128 [ISO18033-3] in the GCM mode [ISO19772], wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the packet encryption and end-to-end MAC key K_AEAD is used as the key,</t>
              </li>
              <li>
                <t>data in the IPlir header fields in the order of their appearance in the IPlir message are used as additional authenticated data,</t>
              </li>
              <li>
                <t>data in the IPlir body fields in the order of their appearance in the IPlir message are used as plaintext,</t>
              </li>
              <li>
                <t>the value of IV_AEAD \in V_96 is used as initialization vector:
                </t>
                <ul empty="true" spacing="normal">
                  <li>
                    <t>IV_AEAD = InitValue,</t>
                  </li>
                  <li>
                    <t>where InitValue is initialized by the InitValue field value of the IPlir message,</t>
                  </li>
                </ul>
              </li>
              <li>
                <t>the MAC length is 64 bits.</t>
              </li>
            </ul>
            <t>
						The diagram of encryption and end-to-end MAC is shown in Figure 12.
            </t>
            <figure>
              <name>Diagram of Encryption and End-to-End MAC Using the AES-128-GCM Cryptographic Suite</name>
              <artwork align="left" name="" type="" alt=""><![CDATA[
                +-----------------------------------+   
                |           IPlir header            |  
                |                ...                | 
                |   +---------------------------+   |  
           +--------|     SourceIdentifier      |   |  
           |    |   +---------------------------+   |  
           |    |                ...                |--------+  
           |    |   +---------------------------+   |        |
           +--------|      SequenceNumber       |   |        |
           |    |   +---------------------------+   |        |
           +--------|        InitValue          |---------+  |
           |    |   +---------------------------+   |     |  |
           |    +-----------------------------------+     |  |
           |    |            IPlir body             |--+  |  |  
           |    +-----------------------------------+  |  |  |
           |    |           IPlir trailer           |  |  |  |
           |    |                ...                |  |  |  |
           |    +-----------------------------------+  |  |  |   
           |                                           |  |  |
           v                                           v  v  v
+---------------------------------+            +-------------------+
|     KDF in Counter Mode         |  +------+  |      AES-128      |
|   [NIST.SP.800-108] based on    |->|K_AEAD|->|    [ISO18033-3]   |
|   AES-128 [ISO18033-3] in the   |  +------+  |  in the GCM mode  |
|       CMAC mode [RFC4493]       |            |     [ISO19772]    |
+---------------------------------+            +-------------------+
                 ^                                      |    |      
                 |                                      |    |
     +-----------------------+                          |    |
     |  Exchange key between |                          |    |
     | source and destination|                          |    |
     |        hosts          |                          |    |
     +-----------------------+                          |    |
                                                        |    |
                +-----------------------------------+   |    |
                |           IPlir header            |   |    |
                |                ...                |   |    |
                |   +---------------------------+   |   |    |
                |   |     SourceIdentifier      |   |   |    | 
                |   +---------------------------+   |   |    |
                |                ...                |   |    |
                |   +---------------------------+   |   |    |
                |   |      SequenceNumber       |   |   |    |
                |   +---------------------------+   |   |    |
                |   |        InitValue          |   |   |    |
                |   +---------------------------+   |   |    |
                +-----------------------------------+   |    |
                |       Encrypted IPlir body        |<--+    |  
                +-----------------------------------+        |
                |           IPlir trailer           |        |
                |   +---------------------------+   |        |
                |   |    IntegrityCheckValue    |<-----------+
                |   +---------------------------+   |
                |                ...                |  
                +-----------------------------------+     		
					]]></artwork>
            </figure>
            <t>
						Calculation of the transit MAC TICV in the TransitIntegrityCheckValue field of the 
						IPlir message is implemented as per the AES-128 [ISO18033-3] in the GCM mode [ISO19772], wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the packet transit MAC key K_TMAC is used as the key,</t>
              </li>
              <li>
                <t>data in the IPlir header fields, the encrypted IPlir body and IntegrityCheckValue, TransitIdentifier, 
							TransitInitValue fields data in the order of their appearance in the IPlir message are used as additional 
							authenticated data,</t>
              </li>
              <li>
                <t>plaintext is an empty string,</t>
              </li>
              <li>
                <t>the value of TIV_AEAD \in V_96 is used as initialization vector:
                </t>
                <ul empty="true" spacing="normal">
                  <li>
                    <t>TIV_AEAD = TransitInitValue,</t>
                  </li>
                  <li>
                    <t>where TransitInitValue is initialized by the TransitInitValue field value of the IPlir message,</t>
                  </li>
                </ul>
              </li>
              <li>
                <t>the MAC length is 64 bits.</t>
              </li>
            </ul>
            <t>
						The diagram of transit MAC is shown in Figure 13. The “null” value means an empty binary string.
            </t>
            <figure>
              <name>Diagram of Transit MAC Using the AES-128-GCM Cryptographic Suite</name>
              <artwork align="left" name="" type="" alt=""><![CDATA[
                +-----------------------------------+--+   
                |           IPlir header            |  |
                |                ...                |  |
                |   +---------------------------+   |  |
           +--------|      SequenceNumber       |   |  |
           |    |   +---------------------------+   |  |
           |    |                ...                |  |
           |    +-----------------------------------+  |
           |    |        Encrypted IPlir body       |  |-------+
           |    +-----------------------------------+  |       |
           |    |           IPlir trailer           |  |       |
           |    |                ...                |  |       |
           |    |   +---------------------------+   |  |       |
           +--------|     TransitIdentifier     |   |  |       |
           |    |   +---------------------------+   |  |       |
           +--------|                           |   |  |       |
           |    |   |     TransitInitValue      |   |  |       |
           |    | +-|                           |   |  |       |
           |    | | +---------------------------+---|--+       |
           |    | |              ...                |          |
           |    +-|---------------------------------+          |   
           |      |                                            |
           |      +--------------------------------------+     |
           |                           +------+          |     |
           |                           | null |----+     |     |
           |                           +------+    |     |     |
           v                                       v     v     v
+---------------------------------+            +-------------------+
|     KDF in Counter Mode         |  +------+  |      AES-128      |
|   [NIST.SP.800-108] based on    |->|K_TMAC|->|    [ISO18033-3]   |
|   AES-128 [ISO18033-3] in the   |  +------+  |  in the GCM mode  |
|       CMAC mode [RFC4493]       |            |     [ISO19772]    |
+---------------------------------+            +-------------------+
                 ^                                    |      |
                 |                                    v      |
     +-----------------------+                    +------+   |
     | Exchange key between  |                    | null |   |
     |     transit hosts     |                    +------+   |
     +-----------------------+                               |
                                                             |
                +------------------------------------+       |
                |            IPlir header            |       |
                |                ...                 |       |
                |   +----------------------------+   |       |
                |   |       SequenceNumber       |   |       |
                |   +----------------------------+   |       |
                |                ...                 |       |
                +------------------------------------+       |
                |        Encrypted IPlir body        |       |
                +------------------------------------+       |
                |           IPlir trailer            |       |
                |                ...                 |       |
                |   +----------------------------+   |       |
                |   |     TransitIdentifier      |   |       |
                |   +----------------------------+   |       |
                |   |                            |   |       |
                |   |      TransitInitValue      |   |       |
                |   |                            |   |       |
                |   +----------------------------+   |       |
                |   | TransitIntegrityCheckValue |<----------+
                |   +----------------------------+   |                 
                +------------------------------------+         		
					]]></artwork>
            </figure>
          </section>
        </section>
        <section anchor="AESCTRCMAC" numbered="true" toc="default">
          <name>AES-256-CTR-CMAC cryptographic suite: CS = 132</name>
          <t>
					AES-256-CTR-CMAC Cryptographic Suite Description is shown in Table 8:
          </t>
          <table align="left">
            <name>AES-256-CTR-CMAC cryptographic suite: CS = 132</name>
            <thead>
              <tr>
                <th align="center">Parameter</th>
                <th align="center">Value</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="center">EncAlg</td>
                <td align="center">AES-256 [ISO18033-3] in the CTR mode [ISO10116]</td>
              </tr>
              <tr>
                <td align="center">MACAlg</td>
                <td align="center">AES-256 [ISO18033-3] in the CMAC mode [RFC4493]</td>
              </tr>
              <tr>
                <td align="center">TMACAlg</td>
                <td align="center">AES-256 [ISO18033-3] in the CMAC mode [RFC4493]</td>
              </tr>
              <tr>
                <td align="center">MACLen</td>
                <td align="center">64 bits</td>
              </tr>
              <tr>
                <td align="center">TMACLen</td>
                <td align="center">64 bits</td>
              </tr>
              <tr>
                <td align="center">IVLen</td>
                <td align="center">64 bits</td>
              </tr>
              <tr>
                <td align="center">TIVLen</td>
                <td align="center">64 bits</td>
              </tr>
              <tr>
                <td align="center">KDAlg</td>
                <td align="center">see the description below </td>
              </tr>
            </tbody>
          </table>
          <section anchor="KeyAESCTRCMAC" numbered="true" toc="default">
            <name>Exchange keys</name>
            <t>
						For each pair of interacting hosts, there is a single exchange key with a length of 256 bits 
						designed for derivation of packet encryption keys, end-to-end MAC keys, and transit MAC keys.
            </t>
          </section>
          <section anchor="IVAESCTRCMAC" numbered="true" toc="default">
            <name>Requirements for initialization values</name>
            <t>
						The end-to-end initialization value InitValue in the InitValue field of the IPlir message should 
						have a length of 64 bits and be unique for each IPlir packet the encryption and end-to-end MAC 
						of which are implemented by the same source host using the same exchange key.
            </t>
            <t>
						The transit initialization value TransitInitValue in the TransitInitValue field of the IPlir 
						message should have a length of 64 bits and be unique for each IPlir packet the transit MAC 
						of which is implemented by the same (transit) host using the same exchange key.
            </t>
          </section>
          <section anchor="KDFAESCTRCMAC" numbered="true" toc="default">
            <name>Key derivation algorithms</name>
            <t>
						The packet encryption key K_ENC of 256 bit length and the packet end-to-end MAC key K_MAC of 
						256 bit length are calculated as follows:
            </t>
            <t>
						K_ENC = K_1 || K_2,
            </t>
            <t>
						K_MAC = K_3 || K_4,
            </t>
            <t>
						where each value of K_i \in V_128, i = 1,2,3,4 is calculated as per KDF in Counter Mode using AES-256 
						[ISO18033-3] in the CMAC mode [RFC4493] as the PRF, wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the exchange key is used as the key for the PRF. The exchange key is specified by the source and destination hosts 
							and the KN field value of the IPlir message,</t>
              </li>
              <li>
                <t>a binary string as shown below is used as the input data for the PRF: IntToVec_8(i)||Label||aL||IV_KDF||SN||Node||cL||oL, where
                </t>
                <ul spacing="normal">
                  <li>
                    <t>Label = StrToVec_48('ENCMAC'),</t>
                  </li>
                  <li>
                    <t>aL = IntToVec_8(LabelByteLength), where LabelByteLength = 6,</t>
                  </li>
                  <li>
                    <t>IV_KDF = InitValue, where InitValue is initialized by the InitValue field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>SN = SequenceNumber, where SequenceNumber is initialized by the SequenceNumber field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>Node = SourceIdentifier, where SourceIdentifier is initialized by the SourceIdentifier field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>cL = IntToVec_16(ContextByteLength), where ContextByteLength is the sum of byte lengths of the InitValue, 
								SequenceNumber and SourceIdentifier fields of the IPlir message,</t>
                  </li>
                  <li>
                    <t>oL = IntToVec_16(OutputBitLength), where OutputBitLength = 512,</t>
                  </li>
                </ul>
              </li>
              <li>
                <t>the PRF output length is 128 bits.</t>
              </li>
            </ul>
            <t>
						The packet transit MAC key K_TMAC of 256 bit length is calculated as follows:
            </t>
            <t>
						K_TMAC = K_1 || K_2,
            </t>
            <t>
						where each value of K_i \in V_128, i = 1,2 is calculated as per KDF in Counter Mode using AES-256 
						[ISO18033-3] in the CMAC mode [RFC4493] as the PRF, wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the exchange key is used as the key for the PRF. The exchange key is specified by the (transit) hosts 
							the IPlir packet passes through and the TKN field value of the IPlir message,</t>
              </li>
              <li>
                <t>a binary string as shown below is used as the input data for the PRF: IntToVec_8(i)||Label||aL||TIV_KDF||SN||Node||cL||oL, where
                </t>
                <ul spacing="normal">
                  <li>
                    <t>Label = StrToVec_48('TMAC'),</t>
                  </li>
                  <li>
                    <t>aL = IntToVec_8(LabelByteLength), where LabelByteLength = 6,</t>
                  </li>
                  <li>
                    <t>TIV_KDF = TransitInitValue, where TransitInitValue is initialized by the TransitInitValue field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>SN = SequenceNumber, where SequenceNumber is initialized by the SequenceNumber field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>Node = TransitIdentifier, where TransitIdentifier is initialized by the TransitIdentifier field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>cL = IntToVec_16(ContextByteLength), where ContextByteLength is the sum of byte lengths of the TransitInitValue, 
								SequenceNumber and TransitIdentifier fields of the IPlir message,</t>
                  </li>
                  <li>
                    <t>oL = IntToVec_16(OutputBitLength), where OutputBitLength = 256,</t>
                  </li>
                </ul>
              </li>
              <li>
                <t>the PRF output length is 128 bits.</t>
              </li>
            </ul>
          </section>
          <section anchor="EncAESCTRCMAC" numbered="true" toc="default">
            <name>Encryption and MAC algorithms</name>
            <t>
						The IPlir body is encrypted as per the AES-256 [ISO18033-3] in the CTR mode as per ISO/IEC 10116:2017[ISO10116] without padding, wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the packet encryption key K_ENC is used as the key,</t>
              </li>
              <li>
                <t>data in the IPlir header fields and the encrypted IPlir body in the order of their appearance in the IPlir message are used as the data,</t>
              </li>
              <li>
                <t>the values of CTR_i \in V_128 are used as counters in CTR mode:
                </t>
                <ul empty="true" spacing="normal">
                  <li>
                    <t>CTR_i = InitValue || IntToVec_64(i), i = 1, 2, ... , n,</t>
                  </li>
                  <li>
                    <t>where InitValue is initialized by the InitValue field value of the IPlir message.</t>
                  </li>
                </ul>
              </li>
              <li>
                <t>the key stream block length is 128 bits.</t>
              </li>
            </ul>
            <t>
						Calculation of the end-to-end MAC ICV in the IntegrityCheckValue field of the IPlir message is implemented 
						as per the AES-256 [ISO18033-3] in the CMAC mode [RFC4493], wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the packet end-to-end MAC key K_MAC is used as the key,</t>
              </li>
              <li>
                <t>data in the IPlir body fields in the order of their appearance in the IPlir message are used as plaintext,</t>
              </li>
              <li>
                <t>the MAC length is 64 bits.</t>
              </li>
            </ul>
            <t>
						The diagram of encryption and end-to-end MAC is shown in Figure 14.
            </t>
            <figure>
              <name>Diagram of Encryption and End-to-End MAC Using the AES-256-CTR-CMAC Cryptographic Suite</name>
              <artwork align="left" name="" type="" alt=""><![CDATA[
                +-----------------------------------+   
                |           IPlir header            |  
                |                ...                | 
                |   +---------------------------+   |  
           +--------|     SourceIdentifier      |   |  
           |    |   +---------------------------+   |  
           |    |                ...                |   
           |    |   +---------------------------+   |        
           +--------|      SequenceNumber       |   |        
           |    |   +---------------------------+   |        
           +--------|        InitValue          |----------+  
           |    |   +---------------------------+   |      |  
           |    +-----------------------------------+      |  
           |    |            IPlir body             |--+   |    
           |    +-----------------------------------+  |   |  
           |    |           IPlir trailer           |  |   |  
           |    |                ...                |  |   |  
           |    +-----------------------------------+  |   |     
           |                                           |   |  
           v                                           v   v  
+---------------------------------+  +------+  +-------------------+
|     KDF in Counter Mode         |->|K_ENC |->|      AES-256      |
|   [NIST.SP.800-108] based on    |  +------+  |   [ISO18033-3]    |
|   AES-256 [ISO18033-3] in the   |            |  in the CTR mode  |
|       CMAC mode [RFC4493]       |  +------+  |    [ISO10116]     |
|                                 |->|K_MAC |  |                   |
+---------------------------------+  +------+  +-------------------+
            ^                            |               |          
            |                            v               |    
+-----------------------+       +-------------------+    |    
|  Exchange key between |       |      AES-256      |    |    
| source and destination|   +---|   [ISO18033-3]    |    |    
|        hosts          |   |   | in the CMAC mode  |    | 
+-----------------------+   |   |     [RFC4493]     |    |
                            |   +-------------------+    |
    +-----------------------+             ^              |
    |                                     |              |
    |   +---------------------------------+              |
    |   |                                                |    
    |   |   +---+-----------------------------------+    |    
    |   |   |   |           IPlir header            |    |    
    |   |   |   |                ...                |    |    
    |   |   |   |   +---------------------------+   |    |    
    |   |   |   |   |     SourceIdentifier      |   |    |     
    |   |   |   |   +---------------------------+   |    |    
    |   |   |   |                ...                |    |    
    |   +---|   |   +---------------------------+   |    |    
    |       |   |   |      SequenceNumber       |   |    |    
    |       |   |   +---------------------------+   |    |    
    |       |   |   |        InitValue          |   |    |    
    |       |   |   +---------------------------+   |    |    
    |       |   +-----------------------------------+    |    
    |       |   |       Encrypted IPlir body        |<---+      
    |       +---+-----------------------------------+        
    |           |           IPlir trailer           |        
    |           |   +---------------------------+   |        
    +-------------->|    IntegrityCheckValue    |   |         
                |   +---------------------------+   |
                |                ...                |  
                +-----------------------------------+     		
					]]></artwork>
            </figure>
            <t>
						Calculation of the transit MAC TICV in the TransitIntegrityCheckValue field of the 
						IPlir message is implemented as per the AES-256 [ISO18033-3] in the CMAC mode [RFC4493], wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the packet transit MAC key K_TMAC is used as the key,</t>
              </li>
              <li>
                <t>data in the IPlir header fields, the encrypted IPlir body and IntegrityCheckValue, TransitIdentifier, 
							TransitInitValue fields data in the order of their appearance in the IPlir message are used as the data protected by MAC,</t>
              </li>
              <li>
                <t>the MAC length is 64 bits.</t>
              </li>
            </ul>
            <t>
						The diagram of transit MAC is shown in Figure 15. 
            </t>
            <figure>
              <name>Diagram of Transit MAC Using the AES-256-CTR-CMAC Cryptographic Suite</name>
              <artwork align="left" name="" type="" alt=""><![CDATA[
                +-----------------------------------+--+   
                |           IPlir header            |  |
                |                ...                |  |
                |   +---------------------------+   |  |
           +--------|      SequenceNumber       |   |  |
           |    |   +---------------------------+   |  |
           |    |                ...                |  |
           |    +-----------------------------------+  |
           |    |        Encrypted IPlir body       |  |---+
           |    +-----------------------------------+  |   |
           |    |           IPlir trailer           |  |   |
           |    |                ...                |  |   |
           |    |   +---------------------------+   |  |   |
           +--------|     TransitIdentifier     |   |  |   |
           |    |   +---------------------------+   |  |   |
           +--------|                           |   |  |   |
           |    |   |     TransitInitValue      |   |  |   |
           |    |   |                           |   |  |   |
           |    |   +---------------------------+---|--+   |
           |    |                ...                |      |
           |    +-----------------------------------+      |   
           |                                               |
           v                                               v
+---------------------------------+            +-------------------+
|     KDF in Counter Mode         |  +------+  |      AES-256      |
|   [NIST.SP.800-108] based on    |->|K_TMAC|->|    [ISO18033-3]   |
|   AES-256 [ISO18033-3] in the   |  +------+  | in the CMAC mode  |
|       CMAC mode [RFC4493]       |            |     [RFC4493]     |
+---------------------------------+            +-------------------+
                 ^                                       |
                 |                                       |
     +-----------------------+                           |
     | Exchange key between  |                           |
     |     transit hosts     |                           |
     +-----------------------+                           |
                                                         |
                +------------------------------------+   |
                |            IPlir header            |   |
                |                ...                 |   |
                |   +----------------------------+   |   |
                |   |       SequenceNumber       |   |   |
                |   +----------------------------+   |   |
                |                ...                 |   |
                +------------------------------------+   |
                |        Encrypted IPlir body        |   |
                +------------------------------------+   |
                |           IPlir trailer            |   |
                |                ...                 |   |
                |   +----------------------------+   |   |
                |   |     TransitIdentifier      |   |   |
                |   +----------------------------+   |   |
                |   |                            |   |   |
                |   |      TransitInitValue      |   |   |
                |   |                            |   |   |
                |   +----------------------------+   |   |
                |   | TransitIntegrityCheckValue |<------+
                |   +----------------------------+   |                 
                +------------------------------------+         		
					]]></artwork>
            </figure>
          </section>
        </section>
        <section anchor="AESCFBCMAC" numbered="true" toc="default">
          <name>AES-256-CFB-CMAC cryptographic suite: CS = 134</name>
          <t>
					AES-256-CTR-CMAC Cryptographic Suite Description is shown in Table 9:
          </t>
          <table align="left">
            <name>AES-256-CFB-CMAC cryptographic suite: CS = 134</name>
            <thead>
              <tr>
                <th align="center">Parameter</th>
                <th align="center">Value</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="center">EncAlg</td>
                <td align="center">AES-256 [ISO18033-3] in the CFB mode [ISO10116]</td>
              </tr>
              <tr>
                <td align="center">MACAlg</td>
                <td align="center">AES-256 [ISO18033-3] in the CMAC mode [RFC4493]</td>
              </tr>
              <tr>
                <td align="center">TMACAlg</td>
                <td align="center">AES-256 [ISO18033-3] in the CMAC mode [RFC4493]</td>
              </tr>
              <tr>
                <td align="center">MACLen</td>
                <td align="center">64 bits</td>
              </tr>
              <tr>
                <td align="center">TMACLen</td>
                <td align="center">64 bits</td>
              </tr>
              <tr>
                <td align="center">IVLen</td>
                <td align="center">128 bits</td>
              </tr>
              <tr>
                <td align="center">TIVLen</td>
                <td align="center">64 bits</td>
              </tr>
              <tr>
                <td align="center">KDAlg</td>
                <td align="center">see the description below </td>
              </tr>
            </tbody>
          </table>
          <section anchor="KeyAESCFBCMAC" numbered="true" toc="default">
            <name>Exchange keys</name>
            <t>
						For each pair of interacting hosts, there is a single exchange key with a length of 256 bits 
						designed for derivation of packet encryption keys, end-to-end MAC keys, and transit MAC keys.
            </t>
          </section>
          <section anchor="IVAESCFBCMAC" numbered="true" toc="default">
            <name>Requirements for initialization values</name>
            <t>
						The end-to-end initialization value InitValue in the InitValue field of the IPlir message should 
						have a length of 128 bits and be random.
            </t>
            <t>
						The transit initialization value TransitInitValue in the TransitInitValue field of the IPlir 
						message should have a length of 64 bits and be unique for each IPlir packet the transit MAC 
						of which is implemented by the same (transit) host using the same exchange key.
            </t>
          </section>
          <section anchor="KDFAESCFBCMAC" numbered="true" toc="default">
            <name>Key derivation algorithms</name>
            <t>
						The packet encryption key K_ENC of 256 bit length and the packet end-to-end MAC key K_MAC of 
						256 bit length are calculated as follows:
            </t>
            <t>
						K_ENC = K_1 || K_2,
            </t>
            <t>
						K_MAC = K_3 || K_4,
            </t>
            <t>
						where each value of K_i \in V_128, i = 1,2,3,4 is calculated as per KDF in Counter Mode using AES-256 
						[ISO18033-3] in the CMAC mode [RFC4493] as the PRF, wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the exchange key is used as the key for the PRF. The exchange key is specified by the source and destination hosts 
							and the KN field value of the IPlir message,</t>
              </li>
              <li>
                <t>a binary string as shown below is used as the input data for the PRF: IntToVec_8(i)||Label||aL||IV_KDF||SN||Node||cL||oL, where
                </t>
                <ul spacing="normal">
                  <li>
                    <t>Label = StrToVec_48('ENCMAC'),</t>
                  </li>
                  <li>
                    <t>aL = IntToVec_8(LabelByteLength), where LabelByteLength = 6,</t>
                  </li>
                  <li>
                    <t>IV_KDF = InitValue, where InitValue is initialized by the InitValue field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>SN = SequenceNumber, where SequenceNumber is initialized by the SequenceNumber field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>Node = SourceIdentifier, where SourceIdentifier is initialized by the SourceIdentifier field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>cL = IntToVec_16(ContextByteLength), where ContextByteLength is the sum of byte lengths of the InitValue, 
								SequenceNumber and SourceIdentifier fields of the IPlir message,</t>
                  </li>
                  <li>
                    <t>oL = IntToVec_16(OutputBitLength), where OutputBitLength = 512,</t>
                  </li>
                </ul>
              </li>
              <li>
                <t>the PRF output length is 128 bits.</t>
              </li>
            </ul>
            <t>
						The packet transit MAC key K_TMAC of 256 bit length is calculated as follows:
            </t>
            <t>
						K_TMAC = K_1 || K_2,
            </t>
            <t>
						where each value of K_i \in V_128, i = 1,2 is calculated as per KDF in Counter Mode using AES-256 
						[ISO18033-3] in the CMAC mode [RFC4493] as the PRF, wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the exchange key is used as the key for the PRF. The exchange key is specified by the (transit) hosts 
							the IPlir packet passes through and the TKN field value of the IPlir message,</t>
              </li>
              <li>
                <t>a binary string as shown below is used as the input data for the PRF: IntToVec_8(i)||Label||aL||TIV_KDF||SN||Node||cL||oL, where
                </t>
                <ul spacing="normal">
                  <li>
                    <t>Label = StrToVec_48('TMAC'),</t>
                  </li>
                  <li>
                    <t>aL = IntToVec_8(LabelByteLength), where LabelByteLength = 6,</t>
                  </li>
                  <li>
                    <t>TIV_KDF = TransitInitValue, where TransitInitValue is initialized by the TransitInitValue field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>SN = SequenceNumber, where SequenceNumber is initialized by the SequenceNumber field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>Node = TransitIdentifier, where TransitIdentifier is initialized by the TransitIdentifier field value of the IPlir message,</t>
                  </li>
                  <li>
                    <t>cL = IntToVec_16(ContextByteLength), where ContextByteLength is the sum of byte lengths of the TransitInitValue, 
								SequenceNumber and TransitIdentifier fields of the IPlir message,</t>
                  </li>
                  <li>
                    <t>oL = IntToVec_16(OutputBitLength), where OutputBitLength = 256,</t>
                  </li>
                </ul>
              </li>
              <li>
                <t>the PRF output length is 128 bits.</t>
              </li>
            </ul>
          </section>
          <section anchor="EncAESCFBCMAC" numbered="true" toc="default">
            <name>Encryption and MAC algorithms</name>
            <t>
						The IPlir body is encrypted as per the AES-256 [ISO18033-3] in the CFB mode as per ISO/IEC 10116:2017 [ISO10116], wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the packet encryption key K_ENC is used as the key,</t>
              </li>
              <li>
                <t>data in the IPlir body fields in the order of their appearance in the IPlir message are used as plaintext,</t>
              </li>
              <li>
                <t>the value of SV \in V_128 is used as the initialization value:
                </t>
                <ul empty="true" spacing="normal">
                  <li>
                    <t>SV = InitValue,</t>
                  </li>
                  <li>
                    <t>where InitValue is initialized by the InitValue field value of the IPlir message.</t>
                  </li>
                </ul>
              </li>
            </ul>
            <t>
						Calculation of the end-to-end MAC ICV in the IntegrityCheckValue field of the IPlir message is implemented 
						as per the AES-256 [ISO18033-3] in the CMAC mode [RFC4493], wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the packet end-to-end MAC key K_MAC is used as the key,</t>
              </li>
              <li>
                <t>data in the IPlir header fields and the encrypted IPlir body in the order of their appearance in the IPlir message are used as the data,</t>
              </li>
              <li>
                <t>the MAC length is 64 bits.</t>
              </li>
            </ul>
            <t>
						The diagram of encryption and end-to-end MAC is shown in Figure 16.
            </t>
            <figure>
              <name>Diagram of Encryption and End-to-End MAC Using the AES-256-CFB-CMAC Cryptographic Suite</name>
              <artwork align="left" name="" type="" alt=""><![CDATA[
                +-----------------------------------+   
                |           IPlir header            |  
                |                ...                | 
                |   +---------------------------+   |  
           +--------|     SourceIdentifier      |   |  
           |    |   +---------------------------+   |  
           |    |                ...                |   
           |    |   +---------------------------+   |        
           +--------|      SequenceNumber       |   |        
           |    |   +---------------------------+   |        
           +--------|        InitValue          |----------+  
           |    |   +---------------------------+   |      |  
           |    +-----------------------------------+      |  
           |    |            IPlir body             |--+   |    
           |    +-----------------------------------+  |   |  
           |    |           IPlir trailer           |  |   |  
           |    |                ...                |  |   |  
           |    +-----------------------------------+  |   |     
           |                                           |   |  
           v                                           v   v  
+---------------------------------+  +------+  +-------------------+
|     KDF in Counter Mode         |->|K_ENC |->|      AES-256      |
|   [NIST.SP.800-108] based on    |  +------+  |    [ISO18033-3]   |
|   AES-256 [ISO18033-3] in the   |            |  in the CFB mode  |
|       CMAC mode [RFC4493]       |  +------+  |    [ISO10116]     |
|                                 |->|K_MAC |  |                   |
+---------------------------------+  +------+  +-------------------+
            ^                            |               |          
            |                            v               |    
+-----------------------+       +-------------------+    |    
|  Exchange key between |       |      AES-256      |    |    
| source and destination|   +---|    [ISO18033-3]   |    |    
|        hosts          |   |   | in the CMAC mode  |    | 
+-----------------------+   |   |     [RFC4493]     |    |
                            |   +-------------------+    |
    +-----------------------+             ^              |
    |                                     |              |
    |   +---------------------------------+              |
    |   |                                                |    
    |   |   +---+-----------------------------------+    |    
    |   |   |   |           IPlir header            |    |    
    |   |   |   |                ...                |    |    
    |   |   |   |   +---------------------------+   |    |    
    |   |   |   |   |     SourceIdentifier      |   |    |     
    |   |   |   |   +---------------------------+   |    |    
    |   |   |   |                ...                |    |    
    |   +---|   |   +---------------------------+   |    |    
    |       |   |   |      SequenceNumber       |   |    |    
    |       |   |   +---------------------------+   |    |    
    |       |   |   |        InitValue          |   |    |    
    |       |   |   +---------------------------+   |    |    
    |       |   +-----------------------------------+    |    
    |       |   |       Encrypted IPlir body        |<---+      
    |       +---+-----------------------------------+        
    |           |           IPlir trailer           |        
    |           |   +---------------------------+   |        
    +-------------->|    IntegrityCheckValue    |   |         
                |   +---------------------------+   |
                |                ...                |  
                +-----------------------------------+     		
					]]></artwork>
            </figure>
            <t>
						Calculation of the transit MAC TICV in the TransitIntegrityCheckValue field of the 
						IPlir message is implemented as per the AES-256 [ISO18033-3] in the CMAC mode [RFC4493], wherein
            </t>
            <ul spacing="normal">
              <li>
                <t>the packet transit MAC key K_TMAC is used as the key,</t>
              </li>
              <li>
                <t>data in the IPlir header fields, the encrypted IPlir body and IntegrityCheckValue, TransitIdentifier, 
							TransitInitValue fields data in the order of their appearance in the IPlir message are used as the data protected by MAC,</t>
              </li>
              <li>
                <t>the MAC length is 64 bits.</t>
              </li>
            </ul>
            <t>
						The diagram of transit MAC is shown in Figure 17. 
            </t>
            <figure>
              <name>Diagram of Transit MAC Using the AES-256-CFB-CMAC Cryptographic Suite</name>
              <artwork align="left" name="" type="" alt=""><![CDATA[
                +-----------------------------------+--+   
                |           IPlir header            |  |
                |                ...                |  |
                |   +---------------------------+   |  | 
           +--------|      SequenceNumber       |   |  |
           |    |   +---------------------------+   |  |
           |    |                ...                |  |
           |    +-----------------------------------+  |
           |    |        Encrypted IPlir body       |  |---+
           |    +-----------------------------------+  |   |
           |    |           IPlir trailer           |  |   |
           |    |                ...                |  |   |
           |    |   +---------------------------+   |  |   |
           +--------|     TransitIdentifier     |   |  |   |
           |    |   +---------------------------+   |  |   |
           +--------|                           |   |  |   |
           |    |   |     TransitInitValue      |   |  |   |
           |    |   |                           |   |  |   |
           |    |   +---------------------------+---|--+   |
           |    |                ...                |      |
           |    +-----------------------------------+      |   
           |                                               |
           v                                               v
+---------------------------------+            +-------------------+
|     KDF in Counter Mode         |  +------+  |      AES-256      |
|   [NIST.SP.800-108] based on    |->|K_TMAC|->|    [ISO18033-3]   |
|   AES-256 [ISO18033-3] in the   |  +------+  | in the CMAC mode  |
|       CMAC mode [RFC4493]       |            |     [RFC4493]     |
+---------------------------------+            +-------------------+
                 ^                                       |
                 |                                       |
     +----------------------+                            |
     | Exchange key between |                            |
     |     transit hosts    |                            |
     +----------------------+                            |
                                                         |
                +------------------------------------+   |
                |            IPlir header            |   |
                |                ...                 |   |
                |   +----------------------------+   |   |
                |   |       SequenceNumber       |   |   |
                |   +----------------------------+   |   |
                |                ...                 |   |
                +------------------------------------+   |
                |        Encrypted IPlir body        |   |
                +------------------------------------+   |
                |           IPlir trailer            |   |
                |                ...                 |   |
                |   +----------------------------+   |   |
                |   |     TransitIdentifier      |   |   |
                |   +----------------------------+   |   |
                |   |                            |   |   |
                |   |      TransitInitValue      |   |   |
                |   |                            |   |   |
                |   +----------------------------+   |   |
                |   | TransitIntegrityCheckValue |<------+
                |   +----------------------------+   |                 
                +------------------------------------+         		
					]]></artwork>
            </figure>
          </section>
        </section>
      </section>
    </section>
    <section anchor="Processing" numbered="true" toc="default">
      <name>IPlir packet processing</name>
      <t>
			The algorithms used for cryptographic processing of network packets are determined by the cryptographic suite. 
      </t>
      <t>
			The cryptographic suite for protection of the original IP packet is chosen depending on the corresponding 
			security policy of the source host and the destination host context on the source host. The logic and 
			procedure of processing IPlir packets protected using a certain cryptographic suite depend on the IPlir 
			packet reception policy and the source host context on the destination host. The necessity and procedure of 
			using transit MAC are determined based on the source host security policy and IPlir packet reception 
			policies of transit hosts and the destination host.
      </t>
      <t>
			Depending on security policies and other requirements, protection of the destination host or transit host 
			against replay of previously transmitted IPlir packets may be required. The IPlir protocol 
			makes it possible to arrange such protection by using counter values and/or timestamps, as well as by 
			tracking the history of their change on transit hosts and the destination host. As an example, SequenceNumber, 
			InitValue, TransitInitValue field values can be used as counter values, Timestamp field values can be used as 
			timestamps. Description of specific mechanisms designed for protection against replay of previously transmitted 
			IPlir packets is beyond the scope of this document.
      </t>
      <section anchor="Fragmentation" numbered="true" toc="default">
        <name>IP and IPlir packet fragmentation</name>
        <t>
				When packing data in IP packets, the IP protocol can fragment (break down into fragments) messages of 
				the higher transport layer protocols UDP, TCP, etc. This results in several (linked) IP packets,
				each called an IP fragment.
        </t>
        <t>
				The IPlir protocol in transport and light tunnel modes should only be applied to whole (non-fragmented) 
				IP packets, but not IP fragments. In the tunnel mode, the IPlir protocol can be applied to both whole IP 
				packets and IP fragments.
        </t>
        <t>
				In case of encapsulation in IPv4, the IPlir packet, just like any other IPv4 packet, can be fragmented 
				by routers during transmission. Before the IPlir packet is processed on the end of the destination or 
				transit host, the IPlir packet must be defragmented.
        </t>
      </section>
      <section anchor="SenderHost" numbered="true" toc="default">
        <name>Original IP packet protection by the source host</name>
        <t>
				If the source host decides to protect a specific IP packet, an IPlir packet is created as follows:
        </t>
        <ol spacing="normal" type="1"><li>
            <t>The destination and transit hosts contexts along with the applied security policy determine:
            </t>
            <ul spacing="normal">
              <li>
                <t>IPlir operation mode;</t>
              </li>
              <li>
                <t>cryptographic suite;</t>
              </li>
              <li>
                <t>transit MAC necessity;</t>
              </li>
            </ul>
          </li>
          <li>
            <t>Based on the destination and transit hosts contexts along with the cryptographic suite:
            </t>
            <ul spacing="normal">
              <li>
                <t>an end-to-end initialization value and, if transit MAC is needed, a transit initialization value are generated;</t>
              </li>
              <li>
                <t>the packet number and timestamp are generated;</t>
              </li>
              <li>
                <t>the packet encryption key, end-to-end MAC key and, if necessary, transit MAC key are derived;</t>
              </li>
            </ul>
          </li>
          <li>
            <t>The IPlir packet fields are filled in considering the data from the original IP packet and the data generated previously.</t>
          </li>
          <li>
            <t>The IPlir body is encrypted and the end-to-end MAC value is calculated as prescribed by the cryptographic suite. 
					The end-to-end MAC value is placed in the IntegrityCheckValue field of the IPlir trailer.</t>
          </li>
          <li>
            <t>If transit integrity control is required, the corresponding fields and flags of the IPlir header and IPlir trailer 
					are filled in, the transit MAC value is calculated. The transit MAC value is placed in the TransitIntegrityCheckValue field of the 
					IPlir trailer.</t>
          </li>
          <li>
            <t>An IPlir packet is generated, wherein parts of the original IP packet are located according to the rules specified in Section 4.4.</t>
          </li>
        </ol>
      </section>
      <section anchor="TransitdHost" numbered="true" toc="default">
        <name>IPlir packet processing on the transit host</name>
        <t>
				After receiving an IPlir packet, the transit host processes the IPlir packet as follows:
        </t>
        <ol spacing="normal" type="1"><li>
            <t>It checks whether the received IPlir packet corresponds to the IPlir packet reception policy. If the packet does not comply 
					with the policy, it is blocked.</t>
          </li>
          <li>
            <t>If the IPlir version in the IPlir header is not supported by the transit host, the packet is blocked.</t>
          </li>
          <li>
            <t>The IPlir packet is matched to the context of the source host or the previous transit host. 
					If the context is not found or contains cryptographic suites not matching the set from the IPlir header, the packet is blocked.</t>
          </li>
          <li>
            <t>If the suite from the IPlir header does not imply transit MAC, the packet is blocked.</t>
          </li>
          <li>
            <t>Based on the context of the previous transit host (or source host) and the IPlir header, the packet transit MAC key is derived. 
					The IPlir packet integrity is verified by checking the transit MAC. If the transit MAC is not correct, the packet is blocked.</t>
          </li>
          <li>
            <t>The next transit host is determined based on the destination host context on the transit host 
					(or it is determined that the IPlir packet can be delivered to the destination host directly). 
					If the context of the next transit host (or destination host) is not found, the packet is blocked.</t>
          </li>
          <li>
            <t>If the found context contains cryptographic suites not matching the set from the IPlir header, the packet is blocked.</t>
          </li>
          <li>
            <t>The transit initialization value is generated and the packet transit MAC key is derived based on 
					the context of the next transit host, IPlir header and IPlir trailer. The number of the packet 
					transit MAC key and the transit host identifier are established in the IPlir message. 
					The transit initialization value is located in the TransitInitValue field.</t>
          </li>
          <li>
            <t>The transit MAC value is calculated and placed in the TransitIntegrityCheckValue field of the IPlir trailer.</t>
          </li>
          <li>
            <t>An IPlir packet is generated, wherein parts of the original IP packet are located according to the rules specified in Section 4.4.</t>
          </li>
        </ol>
        <t>
				There may be cases when the security policies require a transit MAC to be added to the routed packet without checking 
				the previous value or, vice versa, the received IPlir packet integrity to be checked without calculating a new transit 
				MAC value, as well as cases when no transit protection is required. In this case:
        </t>
        <ul spacing="normal">
          <li>
            <t>If no integrity verification of the received transit IPlir packet is required, steps 3, 4, 5 of the above algorithm are skipped,</t>
          </li>
          <li>
            <t>If no transit MAC calculation is required, steps 7, 8, 9 of the above algorithm are skipped,</t>
          </li>
          <li>
            <t>If transit protection is not required, steps 3, 4, 5, 7, 8, 9 of the above algorithm are skipped.</t>
          </li>
        </ul>
      </section>
      <section anchor="destinationHost" numbered="true" toc="default">
        <name>Original IP packet recovery by the destination host</name>
        <t>
				After receiving the IPlir packet, the destination host recovers the original IP packet as follows:
        </t>
        <ol spacing="normal" type="1"><li>
            <t>It checks whether the received IPlir packet corresponds to the IPlir packet reception policy. If the packet does not 
					comply with the policy, it is blocked.</t>
          </li>
          <li>
            <t>If the IPlir version in the IPlir header is not supported by the destination host, the packet is blocked.</t>
          </li>
          <li>
            <t>The IPlir packet is matched to the context of the previous transit host (or source host). If the context is not 
					found or contains cryptographic suites not matching the set from the IPlir header, the packet is blocked.</t>
          </li>
          <li>
            <t>Based on the context of the previous transit host (or source host) and the IPlir header, the packet transit MAC key is derived. 
					The IPlir packet integrity is verified by checking the transit MAC. If the transit MAC is not correct, the packet is blocked. </t>
          </li>
          <li>
            <t>The IPlir packet is matched to the context of the source host. If the context is not found or contains cryptographic 
					suites not matching the suite from the IPlir header, the packet is blocked.</t>
          </li>
          <li>
            <t>Based on the context of the source host and the IPlir header, the packet end-to-end MAC key and, if necessary optional packet 
					encryption key are derived.</t>
          </li>
          <li>
            <t>The end-to-end MAC is checked and, if the IPlir body was encrypted, the packet IPlir body is decrypted as 
					defined by the cryptographic suite. If the end-to-end MAC is not correct, the packet is blocked. </t>
          </li>
          <li>
            <t>The IP packet is restored according to the rules of Section 4.4. </t>
          </li>
        </ol>
        <t>
				There may be cases when the security policies do not require transit MAC checking by the destination host. 
				Then steps 3, 4 of the algorithm are skipped.
        </t>
      </section>
    </section>
    <section anchor="IANACON" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
                This document has no IANA actions.
      </t>
    </section>
  </middle>
  <back>
    <references>
      <name>Normative References</name>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
        <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>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="RFC4493" target="https://www.rfc-editor.org/info/rfc4493" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4493.xml">
        <front>
          <title>The AES-CMAC Algorithm</title>
          <author fullname="JH. Song" initials="JH." surname="Song"/>
          <author fullname="R. Poovendran" initials="R." surname="Poovendran"/>
          <author fullname="J. Lee" initials="J." surname="Lee"/>
          <author fullname="T. Iwata" initials="T." surname="Iwata"/>
          <date month="June" year="2006"/>
          <abstract>
            <t>The National Institute of Standards and Technology (NIST) has recently specified the Cipher-based Message Authentication Code (CMAC), which is equivalent to the One-Key CBC MAC1 (OMAC1) submitted by Iwata and Kurosawa. This memo specifies an authentication algorithm based on CMAC with the 128-bit Advanced Encryption Standard (AES). This new authentication algorithm is named AES-CMAC. The purpose of this document is to make the AES-CMAC algorithm conveniently available to the Internet Community. This memo provides information for the Internet community.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="4493"/>
        <seriesInfo name="DOI" value="10.17487/RFC4493"/>
      </reference>
      <reference anchor="RFC7801" target="https://www.rfc-editor.org/info/rfc7801" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7801.xml">
        <front>
          <title>GOST R 34.12-2015: Block Cipher "Kuznyechik"</title>
          <author fullname="V. Dolmatov" initials="V." role="editor" surname="Dolmatov"/>
          <date month="March" year="2016"/>
          <abstract>
            <t>This document is intended to be a source of information about the Russian Federal standard GOST R 34.12-2015 describing the block cipher with a block length of n=128 bits and a key length of k=256 bits, which is also referred to as "Kuznyechik". This algorithm is one of the set of Russian cryptographic standard algorithms (called GOST algorithms).</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="7801"/>
        <seriesInfo name="DOI" value="10.17487/RFC7801"/>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
        <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>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>
      <reference anchor="RFC8891" target="https://www.rfc-editor.org/info/rfc8891" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8891.xml">
        <front>
          <title>GOST R 34.12-2015: Block Cipher "Magma"</title>
          <author fullname="V. Dolmatov" initials="V." role="editor" surname="Dolmatov"/>
          <author fullname="D. Baryshkov" initials="D." surname="Baryshkov"/>
          <date month="September" year="2020"/>
          <abstract>
            <t>In addition to a new cipher with a block length of n=128 bits (referred to as "Kuznyechik" and described in RFC 7801), Russian Federal standard GOST R 34.12-2015 includes an updated version of the block cipher with a block length of n=64 bits and key length of k=256 bits, which is also referred to as "Magma". The algorithm is an updated version of an older block cipher with a block length of n=64 bits described in GOST 28147-89 (RFC 5830). This document is intended to be a source of information about the updated version of the 64-bit cipher. It may facilitate the use of the block cipher in Internet applications by providing information for developers and users of the GOST 64-bit cipher with the revised version of the cipher for encryption and decryption.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8891"/>
        <seriesInfo name="DOI" value="10.17487/RFC8891"/>
      </reference>
      <reference anchor="RFC9058" target="https://www.rfc-editor.org/info/rfc9058" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9058.xml">
        <front>
          <title>Multilinear Galois Mode (MGM)</title>
          <author fullname="S. Smyshlyaev" initials="S." role="editor" surname="Smyshlyaev"/>
          <author fullname="V. Nozdrunov" initials="V." surname="Nozdrunov"/>
          <author fullname="V. Shishkin" initials="V." surname="Shishkin"/>
          <author fullname="E. Griboedova" initials="E." surname="Griboedova"/>
          <date month="June" year="2021"/>
          <abstract>
            <t>Multilinear Galois Mode (MGM) is an Authenticated Encryption with Associated Data (AEAD) block cipher mode based on the Encrypt-then-MAC (EtM) principle. MGM is defined for use with 64-bit and 128-bit block ciphers.</t>
            <t>MGM has been standardized in Russia. It is used as an AEAD mode for the GOST block cipher algorithms in many protocols, e.g., TLS 1.3 and IPsec. This document provides a reference for MGM to enable review of the mechanisms in use and to make MGM available for use with any block cipher.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="9058"/>
        <seriesInfo name="DOI" value="10.17487/RFC9058"/>
      </reference>
      <reference anchor="NIST_SP_800_108" target="https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-108.pdf" xml:base="https://bib.ietf.org/public/rfc/bibxml-nist/reference.NIST.SP.800-108.xml">
        <front>
          <title>Recommendation for key derivation using pseudorandom functions (revised)</title>
          <author fullname="L LChen" initials="L" surname="Chen">
            <organization>Computer Security Division.</organization>
          </author>
          <author>
            <organization abbrev="NIST">National Institute of Standards and Technology</organization>
            <address>
              <postal>
                <country>US</country>
                <city>Gaithersburg</city>
              </postal>
            </address>
          </author>
          <date year="2009"/>
        </front>
        <seriesInfo name="NIST Special Publications (General)" value="800-108"/>
        <seriesInfo name="DOI" value="10.6028/NIST.SP.800-108"/>
      </reference>
      <reference anchor="ISO9797-1">
        <front>
          <title>Information technology - Security techniques - Message Authentication Codes (MACs) - Part 1: Mechanisms using a block cipher</title>
          <author initials="" surname="International Organization for Standartization">
				</author>
          <date year="2011"/>
        </front>
        <seriesInfo name="" value="ISO/IEC 9797-1:2011"/>
      </reference>
      <reference anchor="ISO10116">
        <front>
          <title>Information technology - Security techniques - Modes of operation for an n-bit block cipher</title>
          <author initials="" surname="International Organization for Standartization">
				</author>
          <date year="2017"/>
        </front>
        <seriesInfo name="" value="ISO/IEC 10116:2017"/>
      </reference>
      <reference anchor="ISO18033-3">
        <front>
          <title>Information technology - Security techniques - Encryption algorithms - Part 3: Block ciphers</title>
          <author initials="" surname="International Organization for Standartization">
				</author>
          <date year="2020"/>
        </front>
        <seriesInfo name="" value="ISO/IEC 18033-3:2020"/>
      </reference>
      <reference anchor="ISO19772">
        <front>
          <title>Information technology - Authenticated encryption</title>
          <author initials="" surname="International Organization for Standartization">
				</author>
          <date year="2020"/>
        </front>
        <seriesInfo name="" value="ISO/IEC 19772:2020"/>
      </reference>
    </references>
  </back>
</rfc>
