<?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" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.29 (Ruby 3.2.3) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-teas-rsvp-hmac-sha2-00" category="std" consensus="true" submissionType="IETF" obsoletes="2747 3097" version="3">
  <!-- xml2rfc v2v3 conversion 3.31.0 -->
  <front>
    <title abbrev="RSVP HMAC-SHA2">RSVP Cryptographic Authentication with HMAC-SHA2</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-teas-rsvp-hmac-sha2-00"/>
    <author initials="R." surname="Atkinson" fullname="Ran Atkinson">
      <organization>Consultant</organization>
      <address>
        <email>rja.lists@gmail.com</email>
      </address>
    </author>
    <author initials="J." surname="Halpern" fullname="Joel Halpern">
      <organization>Ericsson</organization>
      <address>
        <email>jmh@joelhalpern.org</email>
      </address>
    </author>
    <date year="2025" month="October" day="19"/>
    <workgroup>TEAS Working Group</workgroup>
    <abstract>
      <?line 77?>

<t>This document specifies the use of the US NIST Secure Hash Standard in
the Hashed Message Authentication Code (HMAC) mode with RSVP
Cryptographic Authentication version 2.  Along with
draft-ietf-teas-rsvp-auth-v2, this document obsoletes RFC2747 and
RFC3097.</t>
    </abstract>
  </front>
  <middle>
    <?line 85?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>This document specifies the use of the US NIST Secure Hash Standard in
the Hashed Message Authentication Code (HMAC) mode with RSVP
Cryptographic Authentication version 2.</t>
      <t>Those secure hash algorithms are defined in the US NIST Secure Hash
Standard (SHS).<xref target="NIST-SHS"/> <xref target="NIST-HMAC"/> specifies multiple
cryptographic hash functions, including SHA-256, SHA-384, and SHA-512.
The Hashed Message Authentication Code (HMAC) authentication mode is
defined in <xref target="NIST-HMAC"/> and <xref target="RFC2104"/>.</t>
      <t>While it is believed that <xref target="RFC2104"/> is mathematically identical to
<xref target="NIST-HMAC"/> and it is also believed that algorithms in <xref target="RFC4634"/>
are mathematically identical to <xref target="NIST-SHS"/>, in the event of any
confusion or discrepancies the NIST specifications are correct and are
canonical.</t>
      <t>This addition to RSVP Cryptographic Authentication was driven by
operator requests that they be able to use algorithms from the NIST
Secure Hash Standard in the NIST HMAC mode for RSVP Cryptographic
Authentication, instead of being forced to use the much older
Keyed-MD5 algorithm and mode as originally defined for RSVP
Cryptographic Authentication.<xref target="RFC2747"/><xref target="RFC3097"/> As of the date
of publication, the Keyed MD5 construction is widely believed not to
have sufficient cryptographic strength.<xref target="RFC6151"/></t>
      <section anchor="REQ-lang">
        <name>Requirements Language</name>
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
"MAY", and "OPTIONAL" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.
These words may also appear in this document in
lower case as plain English words, absent their normative meanings.
<?line -8?>
        </t>
      </section>
    </section>
    <section anchor="background">
      <name>Background</name>
      <t>All RSVP protocol exchanges can be authenticated using the revised
mechanism defined in draft-ietf-teas-rsvp-auth-v2-00.  That
specification is carefully written to be independent both of the
cryptographic algorithm and the cryptographic mode.  This approach
means that additional cryptographic modes and cryptographic algorithms
can be defined in the future without needing to change the RSVP
Authentication specification of draft-ietf-teas-rsvp-auth-v2-00.</t>
      <t>This document specifies the use of NIST SHS algorithms with the HMAC
mode for use with draft-ietf-teas-rsvp-auth-v2-00.  In the future,
other documents might be specified for other cryptographic algorithms
with this or another cryptographic mode.</t>
      <t>The combination of a cryptographic mode (e.g., HMAC) with a specific
cryptographic algorithm (e.g., SHA256) is known as a "Cryptographic
Transform" (e.g., HMAC-SHA256).</t>
    </section>
    <section anchor="cryptographic-authentication-with-nist-shs-in-hmac-mode">
      <name>Cryptographic Authentication with NIST SHS in HMAC Mode</name>
      <t>When using this authentication method, a shared secret Cryptographic
Key, the cryptographic mode and algorithm (e.g., HMAC-SHA256), and its
associated Key Identifier are configured in the router.  For each RSVP
protocol packet, that secret key is used to generate/verify a "message
digest" that is placed in the Authentication Data field of the RSVP
INTEGRITY object.  The message digest is a one-way function of the
RSVP protocol packet and the secret key.  Since the secret key is
never sent over the network in the clear, protection is provided
against passive attacks <xref target="RFC1704"/>.</t>
      <t>This specification discusses the computation of the Authentication
Data field of the RSVP INTEGRITY object when one of the NIST SHS
family of algorithms is used in the Hashed Message Authentication Code
(HMAC) mode.</t>
      <t>With the additions in this document, the currently valid Cryptographic
Transforms for use with RSVP Cryptographic Authentication include:</t>
      <artwork><![CDATA[
       TRANSFORM NAME          SPECIFICATION(S)

       Keyed-MD5               {{RFC2747}} and {{RFC3097}}
       HMAC-SHA-256            (defined here)
       HMAC-SHA-384            (defined here)
       HMAC-SHA-512            (defined here)
]]></artwork>
      <t>Of the above, all implementations of this specification MUST support
at least both:</t>
      <artwork><![CDATA[
       HMAC-SHA-256
       HMAC-SHA-512
]]></artwork>
      <t>and SHOULD (for backwards compatibility with existing implementations
and deployments of RSVP Cryptographic Authentication) include support
for:</t>
      <artwork><![CDATA[
       Keyed-MD5
]]></artwork>
      <t>and MAY include support for:</t>
      <artwork><![CDATA[
       HMAC-SHA-384

  NOTE WELL: This document deliberately does not specify a
  Cryptographic Transform using either SHA-1 or SHA-224 because
  those algorithms are considered to be too weak as of this
  document's publication date.
]]></artwork>
      <t>An implementation of this specification MUST allow network operators
to configure ANY RSVP Cryptographic Transform supported by that
implementation for use with ANY given RSVP Security Association (and
with its corresponding Key Identifier value) that is configured into
that router.</t>
      <section anchor="generating-cryptographic-authentication">
        <name>Generating Cryptographic Authentication</name>
        <t>First, following the procedure defined in
draft-ietf-teas-rsvp-auth-v2-00, select the appropriate RSVP Security
Association for use with this packet and set the Key Identifier field
to the Key Identifier value of that RSVP Security Association.</t>
        <t>Second, add an RSVP INTEGRITY object to the outgoing RSVP packet if
one does not yet exist, taking care to size the Authentication Data
field appropriately for the Cryptographic Algorithm specified in that
RSVP Security Association.  Using the appropriate RSVP Security
Association, set the Flags field, set the AAL field to the appropriate
value for the Cryptographic Algorithm that will be used, set the Key
Identifier, and set the Sequence Number.  The Authentication Data
field is filled with the fixed value of "Apad", which is defined in
the next section.</t>
        <t>When any NIST SHS algorithm is used in HMAC mode with RSVP
Cryptographic Authentication, the Authentication Data Length is equal
to the normal hash output length (measured in bytes) for the specific
NIST SHS algorithm in use.</t>
        <table>
          <thead>
            <tr>
              <th align="left">Cryptographic Transform</th>
              <th align="left">AAL Field value</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">HMAC-SHA256</td>
              <td align="left">4</td>
            </tr>
            <tr>
              <td align="left">HMAC-SHA384</td>
              <td align="left">8</td>
            </tr>
            <tr>
              <td align="left">HMAC-SHA512</td>
              <td align="left">12</td>
            </tr>
          </tbody>
        </table>
        <t>Third, the Sequence Number of the RSVP INTEGRITY object is set
following the procedures in draft-ietf-teas-rsvp-auth-v2-00.</t>
        <t>Fourth, the authentication data is calculated, as described below.</t>
      </section>
      <section anchor="cryptographic-aspects">
        <name>Cryptographic Aspects</name>
        <t>This describes the computation of the Authentication Data value
   when the HMAC cryptographic mode is combined with any NIST SHS
   algorithm is used with RSVP Cryptographic Authentication.</t>
        <t>The value of Apad selected is arbitrary.  The only goal was to pick
   a different value of Apad than is in use with other IETF routing or
   control protocols.</t>
        <t>In the algorithm description below, the following nomenclature, which
   is consistent with <xref target="NIST-HMAC"/>, is used:</t>
        <artwork><![CDATA[
  H    is the specific hashing algorithm (e.g., SHA-256).

  K    is the Authentication Key for the RSVP Security
       Association.

  Ko   is the cryptographic key used with the hash algorithm.

  B    is the block size of H, measured in octets
       rather than bits.  Note well that B is the
       internal block size, not the hash size.

          For SHA-256: B == 64
          For SHA-384 and SHA-512: B == 128

  L    is the length of the hash, measured in octets
       rather than bits.

  XOR  is the exclusive-or operation.

  Opad is the hexadecimal value 0x5c repeated B times.

  Ipad is the hexadecimal value 0x36 repeated B times.

  Apad is the hexadecimal value 0x7865FE3E repeated (L/4) times.

  Implementation Notes:
     This definition of Apad means that Apad is always the same
     length as the hash output.

     The Authentication Data field length for SHA256 is 32 bytes,
     for SHA384 is 48 bytes, and for SHA512 is 64 bytes.  As a
     side effect, RSVP packets containing the RSVP INTEGRITY
     object will be larger when hash functions with larger hash
     output sizes are used.
]]></artwork>
        <t>(1) PREPARATION OF KEY
       In this application, Ko is always L octets long.</t>
        <artwork><![CDATA[
   If the Authentication Key (K) is L octets long, then Ko is equal
   to K.  If the Authentication Key (K) is more than L octets long,
   then Ko is set to H(K).  If the Authentication Key (K) is less
   than L octets long, then Ko is set to the Authentication Key (K)
   with zeros appended to the end of the Authentication Key (K),
   such that Ko is L octets long.
]]></artwork>
        <t>(2) FIRST-HASH
       First, the RSVP INTEGRITY object's Authentication Data field
       is filled with the value Apad.</t>
        <artwork><![CDATA[
   Then, a First-Hash, also known as the inner hash, is computed as
   follows:

         First-Hash = H(Ko XOR Ipad || (RSVP Packet))

   The definition of Apad (above) ensures it is always the same
   length as the hash output.  
]]></artwork>
        <t>(3) SECOND-HASH
       Then a Second-Hash, also known as the outer hash, is computed as
       follows:</t>
        <artwork><![CDATA[
         Second-Hash = H(Ko XOR Opad || First-Hash)
]]></artwork>
        <t>(4) RESULT
       The resulting Second-Hash becomes the Authentication Data that is
       sent in the Authentication Data field of the RSVP Integrity Object.</t>
      </section>
      <section anchor="message-verification">
        <name>Message Verification</name>
        <t>Message verification follows the procedure defined in
draft-ietf-teas-rsvp-auth-v2-00 except that the cryptographic
calculation of the message digest follows the procedure in
Cryptographic Considerations above when any NIST SHS algorithm in the
HMAC mode is in use.  The KeyID of the received RSVP packet is used to
help locate the correct RSVP Security Association to use.</t>
        <t>Implementation Note:
      One must save the received digest value before calculating the
      expected digest value, so that after that calculation the received
      value can be compared with the expected value to determine whether
      to accept that RSVP packet.</t>
      </section>
      <section anchor="smooth-key-rollover">
        <name>Smooth Key Rollover</name>
        <t>The Key Identifier field of the RSVP INTEGRITY object enables smooth
key rollover in operational deployments.  Based on the lifetime of the
current RSVP Security Association, both sender and receiver will know
when to switch to a different RSVP Security Association and will do so
at the same time.</t>
        <t>Both draft-ietf-teas-rsvp-auth-v2-00 and this document require
that all implementations MUST support more than one RSVP Security
Association at any given time, because this also is needed to enable
smooth key rollover.  Implementations SHOULD support more than two
concurrent RSVP Security Associations as that can greatly simplify
operational security management.</t>
        <t>After changing the active RSVP Security Association, the RSVP sender
will use the (different) Key Identifier value associated with the
newly active RSVP Security Association.  The receiver will use this
new Key Identifier to select the appropriate (new) RSVP Security
Association to use with the received RSVP packet whose INTEGRITY
object contains the new Key Identifier value.</t>
        <t>Because the Key Identifier field is present, the receiver does not
need to (and implementations of this specification MUST NOT) try all
configured RSVP Security Associations with any received RSVP packet.
This requirement mitigates some of the risks of a Denial-of-Service
(DoS) attack on the RSVP instance, but does not entirely prevent all
conceivable DoS attacks.  For example, an on-link adversary still
could generate RSVP packets that are syntactically valid but that
contain invalid Authentication Data, thereby forcing the receiver(s)
to perform expensive cryptographic computations to discover that the
packets are invalid.</t>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>This document enhances the security of the RSVP signaling protocol by
specifying support for the algorithms defined in the NIST Secure Hash
Standard (SHS) using the Hashed Message Authentication Code (HMAC)
mode.</t>
      <t>The value Apad is used here primarily for consistency with IETF
specifications for HMAC-SHA authentication of RIPv2 SHA <xref target="RFC4822"/> and
IS-IS SHA <xref target="RFC5310"/>.  The value of Apad chosen is arbitrary, other
than being different from the value used with RIPv2, OSPFv2, or IS-IS
authentication.</t>
      <t>The quality of the security provided by the Cryptographic
Authentication option depends completely on the strength of the
cryptographic algorithm and cryptographic mode in use, the strength of
the key being used, and the correct implementation of the
authentication mechanism in all communicating RSVP implementations.
Accordingly, the use of high assurance development methods is
recommended.  Security of a deployment of RSVP Authentication also
requires that all parties maintain the secrecy of the shared secret
key.  <xref target="RFC4086"/> and <xref target="NIST-ENTROPY"/> provide guidance on methods for
generating cryptographically random bits.</t>
      <t>Because the RSVP protocol contains information that need not be kept
confidential, privacy is not a requirement.  This mechanism
significantly increases the work an adversary would need to undertake
to inject false information into the RSVP protocol deployment, while
remaining practical to deploy.</t>
      <t>This mechanism is vulnerable to a replay attack by any on-link node.
An on-link node could record a legitimate RSVP packet sent on the
link, then replay that packet at the next time the recorded RSVP
packet's sequence number is valid.  This is easily prevented simply by
rekeying the RSVP session prior to the sequence number repeating.
This also can be prevented by using link-encryption.</t>
      <t>Operators also should note that an upper-layer authentication
mechanism, such as this specification, cannot prevent an attack on the
lower layers.  Operators should consider deployment of link-layer
encryption, such as <xref target="IEEE-802.1AE-2018"/>, to protect not only the
link-layer but also upper-layers.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>IANA is requested to add the following entries to the RSVP
   Cryptographic Transforms registry created in
   draft-ietf-teas-rsvp-auth-v2-00:</t>
      <artwork><![CDATA[
  TRANSFORM     SPECIFICATION           IMPLEMENTATION STATUS

   HMAC-256     (this document)         MUST implement
   HMAC-384     (this document)         MAY  implement
   HMAC-512     (this document)         MUST implement
]]></artwork>
    </section>
    <section anchor="acknowledgements">
      <name>Acknowledgements</name>
      <t>The authors would like to thank TBD for review of this document.</t>
      <t>TBD (in alphabetical order by last name) provided feedback on
   earlier versions of this document.  That feedback has greatly
   improved both the technical content and the readability of the
   current document.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-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="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>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="RFC1704" target="https://www.rfc-editor.org/info/rfc1704" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1704.xml">
          <front>
            <title>On Internet Authentication</title>
            <author fullname="N. Haller" initials="N." surname="Haller"/>
            <author fullname="R. Atkinson" initials="R." surname="Atkinson"/>
            <date month="October" year="1994"/>
            <abstract>
              <t>This document describes a spectrum of authentication technologies and provides suggestions to protocol developers on what kinds of authentication might be suitable for some kinds of protocols and applications used in the Internet. This document provides information for the Internet community. This memo does not specify an Internet standard of any kind.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="1704"/>
          <seriesInfo name="DOI" value="10.17487/RFC1704"/>
        </reference>
        <reference anchor="RFC2104" target="https://www.rfc-editor.org/info/rfc2104" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2104.xml">
          <front>
            <title>HMAC: Keyed-Hashing for Message Authentication</title>
            <author fullname="H. Krawczyk" initials="H." surname="Krawczyk"/>
            <author fullname="M. Bellare" initials="M." surname="Bellare"/>
            <author fullname="R. Canetti" initials="R." surname="Canetti"/>
            <date month="February" year="1997"/>
            <abstract>
              <t>This document describes HMAC, a mechanism for message authentication using cryptographic hash functions. HMAC can be used with any iterative cryptographic hash function, e.g., MD5, SHA-1, in combination with a secret shared key. The cryptographic strength of HMAC depends on the properties of the underlying hash function. This memo provides information for the Internet community. This memo does not specify an Internet standard of any kind</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="2104"/>
          <seriesInfo name="DOI" value="10.17487/RFC2104"/>
        </reference>
        <reference anchor="RFC2747" target="https://www.rfc-editor.org/info/rfc2747" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2747.xml">
          <front>
            <title>RSVP Cryptographic Authentication</title>
            <author fullname="F. Baker" initials="F." surname="Baker"/>
            <author fullname="B. Lindell" initials="B." surname="Lindell"/>
            <author fullname="M. Talwar" initials="M." surname="Talwar"/>
            <date month="January" year="2000"/>
            <abstract>
              <t>This document describes the format and use of RSVP's INTEGRITY object to provide hop-by-hop integrity and authentication of RSVP messages. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="2747"/>
          <seriesInfo name="DOI" value="10.17487/RFC2747"/>
        </reference>
        <reference anchor="RFC3097" target="https://www.rfc-editor.org/info/rfc3097" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3097.xml">
          <front>
            <title>RSVP Cryptographic Authentication -- Updated Message Type Value</title>
            <author fullname="R. Braden" initials="R." surname="Braden"/>
            <author fullname="L. Zhang" initials="L." surname="Zhang"/>
            <date month="April" year="2001"/>
            <abstract>
              <t>This memo resolves a duplication in the assignment of RSVP Message Types, by changing the Message Types assigned by RFC 2747 to Challenge and Integrity Response messages. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="3097"/>
          <seriesInfo name="DOI" value="10.17487/RFC3097"/>
        </reference>
        <reference anchor="RFC4086" target="https://www.rfc-editor.org/info/rfc4086" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4086.xml">
          <front>
            <title>Randomness Requirements for Security</title>
            <author fullname="D. Eastlake 3rd" initials="D." surname="Eastlake 3rd"/>
            <author fullname="J. Schiller" initials="J." surname="Schiller"/>
            <author fullname="S. Crocker" initials="S." surname="Crocker"/>
            <date month="June" year="2005"/>
            <abstract>
              <t>Security systems are built on strong cryptographic algorithms that foil pattern analysis attempts. However, the security of these systems is dependent on generating secret quantities for passwords, cryptographic keys, and similar quantities. The use of pseudo-random processes to generate secret quantities can result in pseudo-security. A sophisticated attacker may find it easier to reproduce the environment that produced the secret quantities and to search the resulting small set of possibilities than to locate the quantities in the whole of the potential number space.</t>
              <t>Choosing random quantities to foil a resourceful and motivated adversary is surprisingly difficult. This document points out many pitfalls in using poor entropy sources or traditional pseudo-random number generation techniques for generating such quantities. It recommends the use of truly random hardware techniques and shows that the existing hardware on many systems can be used for this purpose. It provides suggestions to ameliorate the problem when a hardware solution is not available, and it gives examples of how large such quantities need to be for some applications. 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="106"/>
          <seriesInfo name="RFC" value="4086"/>
          <seriesInfo name="DOI" value="10.17487/RFC4086"/>
        </reference>
        <reference anchor="RFC4634" target="https://www.rfc-editor.org/info/rfc4634" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4634.xml">
          <front>
            <title>US Secure Hash Algorithms (SHA and HMAC-SHA)</title>
            <author fullname="D. Eastlake 3rd" initials="D." surname="Eastlake 3rd"/>
            <author fullname="T. Hansen" initials="T." surname="Hansen"/>
            <date month="July" year="2006"/>
            <abstract>
              <t>The United States of America has adopted a suite of Secure Hash Algorithms (SHAs), including four beyond SHA-1, as part of a Federal Information Processing Standard (FIPS), specifically SHA-224 (RFC 3874), SHA-256, SHA-384, and SHA-512. The purpose of this document is to make source code performing these hash functions conveniently available to the Internet community. The sample code supports input strings of arbitrary bit length. SHA-1's sample code from RFC 3174 has also been updated to handle input strings of arbitrary bit length. Most of the text herein was adapted by the authors from FIPS 180-2.</t>
              <t>Code to perform SHA-based HMACs, with arbitrary bit length text, is also included. This memo provides information for the Internet community.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4634"/>
          <seriesInfo name="DOI" value="10.17487/RFC4634"/>
        </reference>
        <reference anchor="RFC4822" target="https://www.rfc-editor.org/info/rfc4822" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4822.xml">
          <front>
            <title>RIPv2 Cryptographic Authentication</title>
            <author fullname="R. Atkinson" initials="R." surname="Atkinson"/>
            <author fullname="M. Fanto" initials="M." surname="Fanto"/>
            <date month="February" year="2007"/>
            <abstract>
              <t>This note describes a revision to the RIPv2 Cryptographic Authentication mechanism originally specified in RFC 2082. This document obsoletes RFC 2082 and updates RFC 2453. This document adds details of how the SHA family of hash algorithms can be used with RIPv2 Cryptographic Authentication, whereas the original document only specified the use of Keyed-MD5. Also, this document clarifies a potential issue with an active attack on this mechanism and adds significant text to the Security Considerations section. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4822"/>
          <seriesInfo name="DOI" value="10.17487/RFC4822"/>
        </reference>
        <reference anchor="RFC6151" target="https://www.rfc-editor.org/info/rfc6151" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6151.xml">
          <front>
            <title>Updated Security Considerations for the MD5 Message-Digest and the HMAC-MD5 Algorithms</title>
            <author fullname="S. Turner" initials="S." surname="Turner"/>
            <author fullname="L. Chen" initials="L." surname="Chen"/>
            <date month="March" year="2011"/>
            <abstract>
              <t>This document updates the security considerations for the MD5 message digest algorithm. It also updates the security considerations for HMAC-MD5. This document is not an Internet Standards Track specification; it is published for informational purposes.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6151"/>
          <seriesInfo name="DOI" value="10.17487/RFC6151"/>
        </reference>
        <reference anchor="IEEE-802.1AE-2018" target="https://standards.ieee.org/IEEE/802.1AE/7154/">
          <front>
            <title>IEEE Standard for Local and Metropolitan Area Networks - Media Access Control (MAC) Security</title>
            <author>
              <organization>Institute of Electrical and Electronics Engineers (IEEE)</organization>
            </author>
            <date year="2018" month="December"/>
          </front>
          <annotation>IEEE Standard 802.1AE</annotation>
        </reference>
        <reference anchor="NIST-SHS" target="https://csrc.nist.gov/pubs/fips/180-4/upd1/final">
          <front>
            <title>Secure Hash Standard (SHS)</title>
            <author>
              <organization>(US) National Institute of Standards and Technology (NIST)</organization>
            </author>
            <date year="2015" month="August"/>
          </front>
          <annotation>Federal Information Processing Standard 180-4</annotation>
        </reference>
        <reference anchor="NIST-HMAC" target="https://csrc.nist.gov/pubs/fips/198-1/final">
          <front>
            <title>The Keyed-Hash Message Authentication Code (HMAC)</title>
            <author>
              <organization>(US) National Institute of Standards and Technology (NIST)</organization>
            </author>
            <date year="2008" month="July"/>
          </front>
          <annotation>Federal Information Processing Standard 198-1</annotation>
        </reference>
        <reference anchor="NIST-ENTROPY" target="https://csrc.nist.gov/pubs/sp/800/90/b/final">
          <front>
            <title>Recommendation for the Entropy Sources Used for Random Bit Generation</title>
            <author initials="M." surname="Turan" fullname="M. Turan">
              <organization>(US) National Institute of Standards and Technology (NIST)</organization>
            </author>
            <date year="2018" month="January"/>
          </front>
          <annotation>Special Publication 800-90B</annotation>
        </reference>
        <reference anchor="RFC5310" target="https://www.rfc-editor.org/info/rfc5310" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5310.xml">
          <front>
            <title>IS-IS Generic Cryptographic Authentication</title>
            <author fullname="M. Bhatia" initials="M." surname="Bhatia"/>
            <author fullname="V. Manral" initials="V." surname="Manral"/>
            <author fullname="T. Li" initials="T." surname="Li"/>
            <author fullname="R. Atkinson" initials="R." surname="Atkinson"/>
            <author fullname="R. White" initials="R." surname="White"/>
            <author fullname="M. Fanto" initials="M." surname="Fanto"/>
            <date month="February" year="2009"/>
            <abstract>
              <t>This document proposes an extension to Intermediate System to Intermediate System (IS-IS) to allow the use of any cryptographic authentication algorithm in addition to the already-documented authentication schemes, described in the base specification and RFC 5304. IS-IS is specified in International Standards Organization (ISO) 10589, with extensions to support Internet Protocol version 4 (IPv4) described in RFC 1195.</t>
              <t>Although this document has been written specifically for using the Hashed Message Authentication Code (HMAC) construct along with the Secure Hash Algorithm (SHA) family of cryptographic hash functions, the method described in this document is generic and can be used to extend IS-IS to support any cryptographic hash function in the future. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5310"/>
          <seriesInfo name="DOI" value="10.17487/RFC5310"/>
        </reference>
      </references>
    </references>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA9Vb23LbSJJ9r6+oUT8MGUFSF8u2rNjeHtqi2mrrtqI8vf1Y
BIokWiCAQQGSObb7W/Zb9sv2ZFYVbiIl9URsxK4iHCaBumTl9WRWcjgciiAN
o2RxLMtiPjwSRVTE+ljeTP9+LT/k66xIF7nKllEgx2Wx1EkRBaqI0kQ+RMVS
frwYfxhOP44PhJrNcn3vJtaPwzRI1AoLhrmaF8NIY5NCKzPMzX02XK5UMDRL
dTDc2xMPoOF2Mp7KX9P8DhTJn/O0zAS204s0Xx9LU4TClLNVZAwIKNYZlj2b
3J6KKMuPZZGXpjjY23u3dyDSmUljXWhzLA/eHr6Vr/bevRVC4QBpfiykHOIf
/0UJhtyM5LjAjiZN/HNL841KHr1Jc5D5IU1MGRcqKfxjvVJRfCzz39Uojkxh
/ragB6MgXQnaT/pxdsdfRvKjijOdV8u6HX9JdfzoFW85yaPANOjwO/6+Wv7t
d8xa2kkjDBYiSfMVpHSv6bA3px8O9vffuY9H+28P6eNGeRCHhvckjWMhomTe
WWb/7d5htWL9ERx2H4nP7uPh3tEb//HNKz/28OjgwH18s/96/5iYczaZTIZH
ewej/fFkeLC3f3TMZ3SKuEOv5RS8DlUeSpA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