<?xml version="1.0" encoding="US-ASCII"?>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc
    category="exp"
    docName="draft-ietf-bfd-optimizing-authentication-27"
    ipr="trust200902"
    submissionType="IETF"
    consensus="true">
  <front>
    <title abbrev="BFD Authentication Optimization">Optimizing BFD
    Authentication</title>

    <author fullname="Mahesh Jethanandani" initials="M."
            surname="Jethanandani">
      <organization>Arrcus</organization>
      <address>
        <postal>
          <street/>
          <city/>
          <region/>
          <code/>
          <country>USA</country>
        </postal>
        <phone/>
        <facsimile/>
        <email>mjethanandani@gmail.com</email>
        <uri/>
      </address>
    </author>

    <author fullname="Ashesh Mishra" initials="A" surname="Mishra">
      <organization>Aalyria Technologies</organization>
      <address>
        <postal>
          <street/>
          <city/>
          <region/>
          <code/>
          <country/>
        </postal>
        <phone/>
        <email>ashesh@aalyria.com</email>
      </address>
    </author>

    <author fullname="Ankur Saxena" initials="A" surname="Saxena">
      <organization>Ciena Corporation</organization>
      <address>
        <postal>
          <street>3939 N 1st Street</street>
          <city>San Jose</city>
          <region>CA</region>
          <code>95134</code>
          <country>USA</country>
        </postal>
        <phone/>
        <facsimile/>
        <email>ankurpsaxena@gmail.com</email>
        <uri/>
      </address>
    </author>

    <author fullname="Manav Bhatia " initials="M." surname="Bhatia ">
      <organization>Google</organization>
      <address>
        <postal>
          <street>Doddanekkundi</street>
          <city>Bangalore</city>
          <code>560048</code>
          <country>India</country>
	</postal>
        <email>mnvbhatia@google.com</email>
      </address>
    </author>
    <author fullname="Jeffrey Haas" initials="J." surname="Haas">
      <organization>Juniper Networks</organization>
      <address>
        <email>jhaas@pfrc.org</email>
      </address>
    </author>

    <date/>
    <keyword>BFD</keyword>
    <keyword>authentication</keyword>

    <abstract>
      <t>
	This document describes an experimental optimization to BFD Authentication.
        It provides procedure where BFD state transitions require strong
	authentication and permits the majority of BFD Control Packets to use
	a less computationally intensive authentication mechanism.  This
	enables BFD to scale better when there is a desire to use strong
	authentication.
      </t>
    </abstract>
  </front>

  <middle>
    <section anchor="introduction" title="Introduction">
      <t>Authenticating every <xref target="RFC5880">BFD</xref> control packet
      with <xref target="RFC1321">MD5
      Message-Digest Algorithm </xref>, or Secure Hash Algorithm (SHA-1)
      is a computationally intensive process. This makes it
      difficult, if not impossible, to authenticate every BFD packet at high
      session scale and at faster rates.</t>

      <t>This document describes an experimental procedure whereby only
      significant BFD state transitions require strong authentication.  The
      majority of BFD Control Packets use a less computationally intensive
      authentication mechanism.  The details of the motivation for experimental
      status are given in <xref target="experiment"/>.</t>

      <section title="Requirements Language">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
        "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
        document are to be interpreted as described in <xref
        target="RFC2119">BCP 14</xref> <xref target="RFC8174"/> when, and only
        when, they appear in all capitals, as shown here.</t>
      </section>

      <section anchor="note-to-rfc-editor" title="Note to RFC Editor">
        <t>
	  This document uses several placeholder values throughout the
	  document. Please replace them as follows and remove this
	  note before publication.
	</t>

        <t>
	  RFC XXXX, where XXXX is the number assigned to this document
	  at the time of publication.
	</t>

        <t>
	  2025-08-05 with the actual date of the publication of this
	  document.
	</t>
      </section>
    </section>

    <section title="Terminology">
      <t>The following terms used in this document have been defined in
      <xref target="RFC5880">BFD</xref>.</t>

      <t><list style="symbols">
	  <t>Auth Type</t>
	  <t>Detect Multiplier</t>
	  <t>Detection Time</t>
	</list></t>

      <t>The following terms are introduced in this document.</t>

      <texttable style="full">
	<ttcol>Term</ttcol>
	<ttcol>Meaning</ttcol>
	<c>significant change</c>
	<c>
	  State change, a demand mode change (to D bit) or a poll
	  sequence change (P or F bit). Changes to BFD control packets that
	  do not require a poll sequence, such as bfd.DetectMult are also
	  considered as a significant change.
	</c>
	<c>configured strong reauthentication interval</c>
	<c>
	  Interval at which BFD control packets are retried with
	  strong authentication.
	</c>
      </texttable>
    </section>


    <section anchor="strong authentication" title="BFD Control Packets That Require Strong Authentication">
      <t>
	For purposes of this document, "strong authentication" refers to BFD
	authentication mechanisms such as those already defined for use with BFD.
	For example, MD5 and SHA1
	(<xref target="RFC5880" section="6.7"/>).
        The use of stronger cryptographic mechanisms such as SHA2 while using
	optimized BFD authentication is left for future study.
      </t>
      <t>
	The intention of these optimized procedures is to permit strong
	authentication for BFD state changes and utilize the less
	computationally intensive authentication mechanisms to provide
	protection for the session in the Up state while performing less
	overall work.  Such procedures will aid BFD session scaling without
	compromising BFD session security.
      </t>

      <t>All BFD Control Packets with the states AdminDown, Down, and Init
      require strong authentication.</t>

      <t>Once the BFD state machine has reached the Up state, it will continue
      to send BFD Control Packets in the Up state for a period as discussed in
      <xref target="operations"/>.  If optimized authentication mechanisms are
      in use, the session MAY switch to the less computationally intensive
      mode.</t>

      <t>The contents of an Up packet MUST NOT change aside from the
      Authentication Section without strong authentication.</t>

      <t>In addition to these requirements, BFD "significant changes" require
      strong authentication.</t>

      <section anchor="significant changes" title="Protecting BFD Significant Changes with Strong Authentication">
	<t>
	  This document proposes that BFD control packets that signal a
	  state change, a change in demand mode (D bit), or a poll sequence
	  (P or F bit change) be categorized as a "significant
	  change". Control packets that do not require a poll sequence,
	  such as a bfd.DetectMult are also considered as a
	  significant change.
	</t>
	<t>
	  Such significant changes are intended to be protected by strong
	  authentication.
	</t>
      </section>
    </section>

    <section anchor="optimized type" title="Using Less Computationally Intensive Auth Types">
      <t>
	The majority of packets exchanged on a BFD session in the Up state are
	not significant changes.  This document proposes a new optimized
	authentication mode where packets that are not significant changes may
	use a less computationally intensive authentication mechanism.
      </t>
      <t>
	Once the session has reached the Up state, the session can
	use a less computationally intensive Auth Type.  Currently, this
	includes:

	<ul>
	  <li>
	    Meticulous Keyed ISAAC authentication as described in
	    <xref target="I-D.ietf-bfd-secure-sequence-numbers"/>.
            This authentication type protects the BFD session when BFD Up
            packets do not change, because only the paired devices know the
            shared secret, key, and sequence number to select the ISAAC
            result.
	  </li>
	</ul>
      </t>
    </section>

    <section title="Periodic Strong Reauthentication">
      <t>
        When using the less computationally intensive authentication
        mechanism, BFD should periodically test the session using the strong
        authentication mechanism.  Strong authentication is tested using a
        Poll sequence. To test strong authentication, a Poll sequence SHOULD
        be initiated by the sender using the strong authentication mode rather
        than the less computationally intensive mechanism. If a control packet
        with the Final (F) bit is not received within the Detect Interval, the
        session has been compromised, and MUST be brought down.
      </t>
      <t>
        This "strong reauthentication interval" for performing such periodic
        tests using the strong authentication mechanism can be configured
        depending on the capability of the system.
      </t>

      <t>
	Most packets transmitted on a BFD session are BFD Up packets.
	Strongly authenticating a small subset of these packets with a Poll
	sequence as described above, for example every one minute,
	significantly reduces the computational demand for the system
	while maintaining security of the session across the
	configured strong reauthentication interval.
      </t>
    </section>

    <section anchor="optimized modes" title="Optimized Authentication Modes">
      <t>The cryptographic authentication mechanisms specified in <xref
      target="RFC5880" section="6.7">BFD</xref> describes enabling and disabling of
      authentication as a one time operation. As a security precaution, it
      mentions that authentication state be allowed to change at most once.
      Once enabled, every packet must have Authentication Bit set and the
      associated Authentication Type appended. In addition, it states that an
      implementation SHOULD NOT allow the authentication state to be changed
      based on the receipt of a BFD control packet.</t>

      <t>
        This document proposes that an "optimized" authentication mode that
        permits both a strong authentication mode and a less computationally
        intensive mode to be used within the same BFD session.  This pairing
        of a strong and an less computationally intensive  mode of
        authentication is carried in new BFD authentication types representing
        a given optimized authentication type pairing.
      </t>

      <t>
	This document defines in <xref target="significant changes"/>
	which BFD control packets are required
	to be strongly authenticated. A BFD control packet that fails
	authentication is discarded, or a BFD control packet that was
	supposed to be strongly authenticated, but was not; e.g. a significant
	change packet, is discarded. However, there is no change to
	the state machine for BFD, as the decision of a significant
	change is still decided by how many valid consecutive packets
	were received.
      </t>

      <t>
	In this specification, the contents of an Up packet MUST NOT change
	aside from the Authentication Section without strong
	authentication.  The full procedure is documented in the following
	sections.
      </t>
    </section>

    <section title="Signaling Optimized Authentication">
      <t>
        When the Authentication Present (A) bit is set and the Auth Type is a
	type supporting Optimized BFD Authentication, the Auth Type signals a
	pairing of a strong authentication type and a less computationally
        intensive authentication
	type.  This pairing is advertised in a single Auth Type value in order
	to permit implementations to be aware that:

	<ul>
	  <li>Optimized BFD procedures will be in use.</li>
          <li>The pairing of the strong and less computationally intensive
              authentication mechanisms will be used for that session.</li>
          <li>The requirement to carry a Sequence Number.</li>
          <li>The current strong or less computationally intensive mode will
              be carried as described below:</li>
	</ul>
      </t>

      <t>
	<figure
	    align="center" title="Common BFD Authentication Section">
	  <artwork><![CDATA[
       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Auth Type   |   Auth Len    |  Auth Key ID  |   Opt. Mode   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        Sequence Number                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                   Authentication Specific Data                ~
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
	]]></artwork>
	</figure>
      </t>

      <t>
        The Meticulous Keyed MD5 (<xref target="RFC5880" section="6.7.3"/>), Meticulous Keyed SHA-1 (<xref target="RFC5880" section="6.7.4"/>), and Meticulous Keyed
	ISAAC Authentication (<xref target="I-D.ietf-bfd-secure-sequence-numbers" section="5"/>) Sections define the fourth octet as "Reserved".
	This document repurposes the "Reserved" field as the "Optimized
        Authentication Mode" field when used for authentication types for
        optimized BFD procedures.
      </t>

      <t>
        The values of the Optimized Authentication Mode field are:
	<ol>
	  <li>
	    When using the strong authentication type for optimized
	    BFD Auth Types.
	  </li>
	  <li>
            When using the less computationally intensive authentication type
            for optimized BFD Auth Types.
	  </li>
        </ol>
      </t>

      <t>
        Authentication Specific Data: When using the strong authentication type,
	the remainder of the Authentication Section carries that type's data.
      </t>

      <t>
        For example, for Auth Type "Optimized MD5 Meticulous Keyed ISAAC
	Authentication" (type TBD):
      </t>
      <t>
        When Optimized Authentication Mode is 1, the format of the authentication
        section is the same as <xref target="RFC5880" section="4.3"/>,
        excepting that Auth Type is still TBD and that Reserved is set to 1.
      </t>
      <t>
        When Optimized Authentication Mode is 2, the format of the authentication
        section is the same as 
        <xref target="I-D.ietf-bfd-secure-sequence-numbers" section="5"/>,
        excepting that Auth Type is still TBD and that Reserved is set to 2.
      </t>

      <section title="Transmitting and Receiving Using Optimized Authentication">
        <t>
	  The procedures for authenticating BFD Control packets using Optimized
	  Authentication is similar to the existing procedures covered in 
	  <xref target="RFC5880" section="6.7"/>. 
          Optimized Authentication modes have common procedural requirements for 
	  authentication regardless of which strong and less computationally
	  intensive authentication modes are used.
        </t>
        <t>
	  The required value of the Auth Len field for a given Optimized
	  Authentication mode is defined in the respective specifications for
	  the strong mode and less computationally intensive mode.
        </t>
        <t>
          The following common procedures apply to authenticating BFD Control
          packets utilizing Optimized Authentication:
        </t>
        <t>
          If the received BFD Control packet does not contain an 
	  Authentication Section (<xref target="RFC5880" sectionFormat="comma" section="4.1"/>), or
	  the Auth Type is not a supported Optimized Authentication Auth Type,
	  then the received packet MUST be discarded.
        </t>
        <t>
	  If the received BFD Control packet contains an optimized
	  authentication type using these procedures and the Optimized
          Authentication Mode field is not 1 or 2, then the received packet
          MUST be discarded.
        </t>
	<t>
	  If bfd.SessionState is AdminDown, Down, or Init and the Optimized
	  Authentication Mode field is not 1, then the received packet MUST be
	  discarded.
	</t>
        <t>
	  If bfd.SessionState is Up and there is a significant change as defined
	  <xref target="significant changes"/>, and the Optimized Authentication
	  Mode field is not 1, then the received packet MUST be discarded.
	</t>
        <t>
          If the Auth Len field is not equal to a value appropriate for the
          Optimized Authentication Mode field, the packet MUST be discarded.
        </t>
        <t>
          If bfd.AuthSeqKnown is 1, examine the Sequence Number field.  If the
          sequence number lies outside of the range of bfd.RcvAuthSeq+1 to
          bfd.RcvAuthSeq+(3*Detect Mult) inclusive (when treated as an unsigned
          32-bit circular number space) the received packet MUST be discarded.
        </t>
        <t>
          Otherwise (bfd.AuthSeqKnown is 0), bfd.AuthSeqKnown MUST be set to 1,
          bfd.RcvAuthSeq MUST be set to the value of the received Sequence
          Number field, and the received packet MUST be accepted.
        </t>
        <t>
          For the specified Auth Type and Optimized Authentication Mode, perform
          the appropriate authentication procedures.  If authentication
          succeeds, the received packet MUST be accepted.  Otherwise, the
          received packet MUST be discarded.
	</t>
      </section>
      <section anchor="operations" title="Optimized Authentication Operations">
	<t>
	  As noted in <xref target="significant changes"/>,
	  when using optimized BFD procedures, strong
	  authentication is used in the BFD state machine to bring a BFD session
	  to the Up state or to make any change of the BFD parameters as carried
	  in the BFD Control packet when in the Up state.
	</t>

	<t>
	  Once the BFD session has reached the Up state, the BFD Up state MUST
	  be signaled to the remote BFD system using the strong authentication mode for
	  an interval that is at least the Detection Time before switching to
	  the less computationally intensive 
	  authentication mode.  This is to permit mechanisms such as 
	  <xref target="I-D.ietf-bfd-secure-sequence-numbers">
	  Meticulous Keyed ISAAC for BFD Authentication</xref> to be
	  bootstrapped before switching to the less computationally intensive
	  mode.
	</t>

	<t>
	  It is RECOMMENDED that when using optimized authentication that
	  implementations switch from strong authentication to the less
	  computationally intensive authentication mode after an interval that
	  is at least the Detection Time. In the circumstances where a BFD
	  session successfully reaches the Up state with strong authentication,
	  but there are problems with the optimized authentication, this will
	  permit the remote system to tear down the session as quickly as
	  possible.
	</t>

	<t>
	  BFD sessions using optimized authentication that succeed in reaching the
	  Up state using strong authentication and fail using the optimized
	  authentication SHOULD bring the issue to the attention of the operator.
	  Further, implementations MAY wish to throttle session restarts.
	</t>

	<t>
	  It is further RECOMMENDED that BFD implementations using optimized
	  authentication defer notifying their client that the session has reached
	  the Up state until it has transitioned to using the optimized
	  authentication mode.  In the event where optimized authentication is
	  failing in the protocol, this avoids propagating the failed transitions
	  to the optimized mode to their clients.
	</t>
      </section>
    </section>

    <section anchor="opt-auth-yang-model" title="Optimizing Authentication YANG Model">
      <section anchor="data-model-overview" title="Data Model Overview">
	<t>
	  The <xref target="RFC7950">YANG 1.1</xref> model defined in
	  this document augments the "ietf-bfd" module to add
	  configuration relevant to the management of the feature
	  defined in this document. In particular, it adds crypto
	  algorithms that are described in this model, and in 
	  <xref target="I-D.ietf-bfd-secure-sequence-numbers">
	  Meticulous Keyed ISAAC for BFD Authentication</xref>.  It
	  adds a feature statement to enable optimized
	  authentication. Finally, it adds an interval value that
	  specifies how often the BFD session should be
	  re-authenticated once it is in the Up state.
	</t>
      </section>
      <section anchor="tree-diagram" title="Tree Diagram">
	<t>
	  The tree diagram for the YANG modules defined in this
	  document use annotations defined in <xref
	  target="RFC8340">YANG Tree Diagrams.</xref>.
	</t>
	<t>
	  <figure>
            <artwork><![CDATA[
module: ietf-bfd-opt-auth

  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh
            /bfd-ip-sh:sessions/bfd-ip-sh:session
            /bfd-ip-sh:authentication:
    +--rw reauth-interval?   uint32
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bfd:bfd/bfd-ip-mh:ip-mh
            /bfd-ip-mh:session-groups/bfd-ip-mh:session-group
            /bfd-ip-mh:authentication:
    +--rw reauth-interval?   uint32
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bfd:bfd/bfd-lag:lag
            /bfd-lag:sessions/bfd-lag:session/bfd-lag:authentication:
    +--rw reauth-interval?   uint32
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bfd:bfd/bfd-mpls:mpls
            /bfd-mpls:session-groups/bfd-mpls:session-group
            /bfd-mpls:authentication:
    +--rw reauth-interval?   uint32
	    ]]></artwork>
          </figure>
	</t>
      </section>
      <section anchor="the-yang-model" title="The YANG Model">
	<t>
	  This YANG module imports <xref target="RFC8177">YANG Key
	  Chain </xref>, <xref target="RFC8349">A YANG Data Model for
	  Routing Management (NMDA version)</xref>, and <xref
	  target="RFC9314">YANG Data Model for Bidirectional Forwarding
	  Detection (BFD)</xref>.
	</t>
	<t>
	  Implementations supporting the optimization procedures defined in
	  this document enable optimization by using one of the newly 
	  defined key-chain crypto-algorithms defined in this YANG module.
	</t>
	<t>
	  <figure>
            <artwork><![CDATA[
	    <CODE BEGINS> file "ietf-bfd-opt-auth@2025-08-05.yang"
module ietf-bfd-opt-auth {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-opt-auth";
  prefix "bfdoa";

  import ietf-routing {
    prefix "rt";
    reference
      "RFC 8349: A YANG Data Model for Routing Management
       (NMDA version)";
  }

  import ietf-bfd {
    prefix bfd;
    reference
      "RFC 9314: YANG Data Model for Bidirectional
      Forwarding Detection (BFD).";
  }

  import ietf-bfd-ip-sh {
    prefix bfd-ip-sh;
    reference
      "RFC 9314: YANG Data Model for Bidirectional
      Forwarding Detection (BFD).";
  }

  import ietf-bfd-ip-mh {
    prefix bfd-ip-mh;
    reference
      "RFC 9314: YANG Data Model for Bidirectional
      Forwarding Detection (BFD).";
  }

  import ietf-bfd-lag {
    prefix bfd-lag;
    reference
      "RFC 9314: YANG Data Model for Bidirectional
      Forwarding Detection (BFD).";
  }

  import ietf-bfd-mpls {
    prefix bfd-mpls;
    reference
      "RFC 9314: YANG Data Model for Bidirectional
      Forwarding Detection (BFD).";
  }

  import ietf-key-chain {
    prefix key-chain;
    reference
      "RFC 8177: YANG Data Model for Key Chains.";
  }

  organization
    "IETF BFD Working Group";

  contact
    "WG Web:   <http://tools.ietf.org/wg/bfd>
     WG List:  <rtg-bfd@ietf.org>

     Authors: Mahesh Jethanandani (mjethanandani@gmail.com)
              Ashesh Mishra (ashesh@aalyria.com)
              Ankur Saxena (ankurpsaxena@gmail.com)
              Manav Bhatia (mnvbhatia@google.com)
              Jeffrey Haas (jhaas@juniper.net).";
              

  description
    "This YANG module augments the base BFD YANG model to add
     attributes related to BFD Optimized Authentication.

     Copyright (c) 2025 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject to
     the license terms contained in, the Revised BSD License set
     forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX
     (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
     for full legal notices.

     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 (RFC 2119) (RFC 8174) when, and only when,
     they appear in all capitals, as shown here.";

  revision "2025-08-05" {
    description
      "Initial Version.";
    reference
      "RFC XXXX: Optimizing BFD Authentication.";
  }

  feature optimized-auth {
    description
      "When enabled, this implementation supports optimized
       authentication as described in this document.";
  }

  identity optimized-md5-meticulous-keyed-isaac {
    base key-chain:crypto-algorithm;
    description
      "BFD Optimized Authentication using Meticulous Keyed MD5 as the
       strong authentication and Meticulous Keyed ISAAC Keyed as the
       less computationally intensive authentication.";
    reference
      "RFC XXXX: Meticulous Keyed ISAAC for BFD Authentication.";
  }

  identity optimized-sha1-meticulous-keyed-isaac {
    base key-chain:crypto-algorithm;
    description
      "BFD Optimized Authentication using Meticulous Keyed SHA-1 as
      the strong authentication and Meticulous Keyed ISAAC Keyed as
      the less computationally intensive authentication.";
    reference
      "RFC XXXX: Meticulous Keyed ISAAC for BFD Authentication.";
  }

  grouping bfd-opt-auth-config {
    description
      "Grouping for BFD Optimized Authentication Parameters.";
    leaf reauth-interval {
      type uint32;
      units "seconds";
      default "60";
      description
        "Interval of time after which strong authentication
         should be utilized to prevent an on-path-attacker attack.
         Default is 1 minute.

         A value of zero means that we do not do periodic
         reauthentication using the strong authentication method.

         This value SHOULD have jitter applied to it to avoid
         self-synchronization during expensive authentication
         operations.";
    }
  }

  augment "/rt:routing/rt:control-plane-protocols" +
          "/rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh" +
          "/bfd-ip-sh:sessions/bfd-ip-sh:session" +
          "/bfd-ip-sh:authentication" {
    uses bfd-opt-auth-config;

    description
      "Augment the 'authentication' container for single hop BFD
       module to add attributes related to BFD optimized
       authentication.";
  }

  augment "/rt:routing/rt:control-plane-protocols/" +
          "rt:control-plane-protocol/bfd:bfd/bfd-ip-mh:ip-mh/" +
          "bfd-ip-mh:session-groups/bfd-ip-mh:session-group/" +
          "bfd-ip-mh:authentication" {
    uses bfd-opt-auth-config;

    description
      "Augment the 'authentication' container for multi-hop BFD
       module to add attributes related to BFD optimized
       authentication.";
  }

  augment "/rt:routing/rt:control-plane-protocols/" +
          "rt:control-plane-protocol/bfd:bfd/bfd-lag:lag/" +
          "bfd-lag:sessions/bfd-lag:session/" +
          "bfd-lag:authentication" {
    uses bfd-opt-auth-config;

    description
      "Augment the 'authentication' container for BFD over LAG
       module to add attributes related to BFD optimized
       authentication.";
  }

  augment "/rt:routing/rt:control-plane-protocols/" +
          "rt:control-plane-protocol/bfd:bfd/bfd-mpls:mpls/" +
          "bfd-mpls:session-groups/bfd-mpls:session-group/" +
          "bfd-mpls:authentication" {
    uses bfd-opt-auth-config;

    description
      "Augment the 'authentication' container for BFD over MPLS
       module to add attributes related to BFD optimized
       authentication.";
  }
}
	    <CODE ENDS>
	    ]]></artwork>
          </figure>
	</t>
      </section>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>
	This documents requests the assignment of one URI and one YANG model.
      </t>
      <section anchor="ietf-xml-registry" title="IETF XML Registry">
	<t>
	  This document registers one URIs in the "ns"
	  subregistry of the "IETF XML" registry <xref
	  target="RFC3688"/>. Following the format in <xref
	  target="RFC3688"/>, the following registration is requested:
	</t>
        <t>
	  <figure>
            <artwork>
	      <![CDATA[
URI: urn:ietf:params:xml:ns:yang:ietf-bfd-opt-auth
Registrant Contact: The IESG
XML: N/A, the requested URI is an XML namespace.
	      ]]>
	    </artwork>
          </figure>
	</t>
      </section>
      <section anchor="yang-module-names" title="The YANG Module Names Registry">
        <t>
	  This document registers one YANG modules in the "YANG Module
	  Names" registry <xref target="RFC6020"/>. Following the
	  format in <xref target="RFC6020"/>, the following
	  registrations are requested:
	</t>
        <t>
	  <figure>
	    <artwork>
	      <![CDATA[
name:         ietf-bfd-opt-auth
namespace:    urn:ietf:params:xml:ns:yang:ietf-bfd-opt-auth
prefix:       bfdoa
reference:    RFC XXXX
	      ]]>
	    </artwork>
          </figure>
	</t>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <section anchor="Protocol Security" title="Protocol Security Considerations">
	<t>
	  The approach described in this document enhances the ability
	  to authenticate a BFD session by taking away the onerous
	  requirement that every BFD control packet be strongly authenticated. By
	  strongly authenticating packets that affect the state of the session,
	  the security of the BFD session is maintained. In this mode,
	  packets that are a significant change but are not strongly
	  authenticated, are dropped by the system. Therefore, a
	  malicious user that tries to inject a non-authenticated
	  packet; e.g. with a Down state to take a session down will
	  fail. That combined with the proposal of using sequence number
	  defined in <xref
	  target="I-D.ietf-bfd-secure-sequence-numbers">Meticulous Keyed
	  ISAAC for BFD Authentication</xref> further enhances the
	  security of BFD sessions.
	</t>

	<t>The recent escalating series of attacks on MD5
	and SHA-1 described in <xref target="SHA-1-attack1">Finding Collisions
	in the Full SHA-1 </xref> and <xref target="SHA-1-attack2">New Collision
	Search for SHA-1 </xref> raise concerns about their remaining useful
	lifetime as outlined in <xref target="RFC6151">Updated Security
	Considerations for the MD5 Message-Digest and the HMAC-MD5 Algorithm
	</xref> and <xref target="RFC6194">Security Considerations for the SHA-0
	and SHA-1 Message-Digest Algorithm </xref>. If replaced by stronger
	algorithms the computational overhead will make the task of
	authenticating every packet even more difficult to achieve.</t>

	<t>The procedures described in this document provide a mechanism which
	could enable implementations to leverage stronger security to address
	the concerns above when strong authentication is required.  However,
	this requires operators to evaluate the tradeoffs of the less
	computationally intensive mechanisms adequately address their desired
	security stance.</t>
      </section>
      <section anchor="YANG Security" title="YANG Security Considerations">
	<t>
	  The YANG module specified in this document defines a schema
	  for data that is designed to be accessed via network
	  management protocols such as <xref
	  target="RFC6241">NETCONF</xref> or <xref
	  target="RFC8040">RESTCONF</xref>. The lowest NETCONF layer is
	  the secure transport layer, and the mandatory-to-implement
	  secure transport is <xref target="RFC6242">Secure Shell
	  (SSH)</xref>. The lowest RESTCONF layer is HTTPS, and the
	  mandatory-to-implement secure transport is <xref
	  target="RFC8446">TLS</xref>. The <xref
	  target="RFC8341">NETCONF Access Control Model (NACM) </xref>
	  provides the means to restrict access for particular NETCONF
	  or RESTCONF users to a preconfigured subset of all available
	  NETCONF or RESTCONF protocol operations and content.
	</t>

	<t>
	  There are a number of data nodes defined in this YANG module
	  that are writable/creatable/deletable (i.e., config true,
	  which is the default).  These data nodes may be considered
	  sensitive or vulnerable in some network environments. Write
	  operations (e.g., edit-config) to these data nodes without
	  proper protection can have a negative effect on network
	  operations. Some of the subtrees and data nodes and their
	  sensitivity/vulnerability are described here.
	</t>

	<ul>
	  <li>
	    'reauth-interval' specifies the interval in Up state, after
	    which a strong authentication SHOULD be performed to prevent
	    a Person-In-The-Middle (PITM) attack. If this interval is
	    set very low, the utility of these optimization procedures is
	    lessened. If this interval is set very high, attacks detected
	    by the strong authentication mechanisms may happen overly
	    late.
	  </li>
	</ul>

	<t>
	  Some of the readable data nodes in this YANG module may be
	  considered sensitive or vulnerable in some network
	  environments. It is thus important to control read access
	  (e.g., via get, get-config, or notification) to these data
	  nodes.
	</t>

	<t>
	  There are no read-only data nodes defined in this model.
	</t>

	<t>
	  Some of the RPC operations in this YANG module may be
	  considered sensitive or vulnerable in some network
	  environments. It is thus important to control access to these
	  operations.
	</t>

	<t>
	  There are no RPC operations defined in this model.
	</t>

      </section>
    </section>

    <section title="Contributors" anchor="contributors">
      <t>
	The authors of this document would like to acknowledge Reshad
	Rahman as a contributor to this document.
      </t>
    </section>
    <section title="Acknowledgments">
      <t>The authors would like to thank Qiufang Ma and Stephen Farrell for providing directorate review of this document.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119.xml"?>
      <?rfc include='reference.RFC.3688.xml'?>
      <?rfc include='reference.RFC.5880.xml'?>
      <?rfc include='reference.RFC.6020.xml'?>
      <?rfc include='reference.RFC.6241.xml'?>
      <?rfc include='reference.RFC.6242.xml'?>
      <?rfc include='reference.RFC.7950.xml'?>
      <?rfc include='reference.RFC.8040.xml'?>
      <?rfc include='reference.RFC.8174.xml'?>
      <?rfc include='reference.RFC.8177.xml'?>
      <?rfc include='reference.RFC.8341.xml'?>
      <?rfc include='reference.RFC.8349.xml'?>
      <?rfc include='reference.RFC.8446.xml'?>
      <?rfc include='reference.RFC.9314.xml'?>
      <?rfc include='reference.I-D.ietf-bfd-secure-sequence-numbers.xml'?>
    </references>

    <references title="Informative References">
      <reference anchor="SHA-1-attack1">
        <front>
          <title>Finding Collisions in the Full SHA-1</title>

          <author initials="X." surname="Wang">
            <organization/>
          </author>

          <author initials="Y." surname="Yin">
            <organization/>

            <address>
              <postal>
                <street/>

                <city/>

                <region/>

                <code/>

                <country/>
              </postal>

              <phone/>

              <facsimile/>

              <email/>

              <uri/>
            </address>
          </author>

          <author initials="H." surname="Yu">
            <organization/>

            <address>
              <postal>
                <street/>

                <city/>

                <region/>

                <code/>

                <country/>
              </postal>

              <phone/>

              <facsimile/>

              <email/>

              <uri/>
            </address>
          </author>

          <date year="2005"/>
        </front>
      </reference>

      <reference anchor="SHA-1-attack2">
        <front>
          <title>New Collision Search for SHA-1</title>

          <author initials="X." surname="Wang">
            <organization/>
          </author>

          <author initials="A." surname="Yao">
            <organization/>

            <address>
              <postal>
                <street/>

                <city/>

                <region/>

                <code/>

                <country/>
              </postal>

              <phone/>

              <facsimile/>

              <email/>

              <uri/>
            </address>
          </author>

          <author initials="F." surname="Yao">
            <organization/>

            <address>
              <postal>
                <street/>

                <city/>

                <region/>

                <code/>

                <country/>
              </postal>

              <phone/>

              <facsimile/>

              <email/>

              <uri/>
            </address>
          </author>

          <date year="2005"/>
        </front>
      </reference>

      <?rfc include='reference.RFC.1321.xml'?>
      <?rfc include='reference.RFC.2026.xml'?>

      <?rfc include='reference.RFC.6151.xml'?>

      <?rfc include='reference.RFC.6194.xml'?>
      <?rfc include='reference.RFC.8340.xml'?>
    </references>
    <section anchor="examples" title="Examples">
      <t>
	This section tries to show some examples in how the model can
	be configured.
      </t>
      <section anchor="example-a.1.1" title="Single Hop BFD Configuration">
	<t>
          This example demonstrates how a Single Hop BFD session can
          be configured for optimized authentication.
	</t>
	<t>
          <figure>
            <artwork><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ===============

<?xml version="1.0" encoding="UTF-8"?>
<key-chains
    xmlns="urn:ietf:params:xml:ns:yang:ietf-key-chain">
  <key-chain>
    <name>bfd-auth-config</name>
    <description>"An example for BFD Optimized Auth configuration."\
</description>
    <key>
      <key-id>55</key-id>
      <lifetime>
        <send-lifetime>
          <start-date-time>2017-01-01T00:00:00Z</start-date-time>
          <end-date-time>2017-02-01T00:00:00Z</end-date-time>
        </send-lifetime>
        <accept-lifetime>
          <start-date-time>2016-12-31T23:59:55Z</start-date-time>
          <end-date-time>2017-02-01T00:00:05Z</end-date-time>
        </accept-lifetime>
      </lifetime>
      <crypto-algorithm xmlns:opt-auth=
      "urn:ietf:params:xml:ns:yang:ietf-bfd-opt-auth">opt-auth:opti\
mized-sha1-meticulous-keyed-isaac</crypto-algorithm>
      <key-string>
        <keystring>testvector</keystring>
      </key-string>
    </key>
  </key-chain>
</key-chains>
<interfaces
    xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"
    xmlns:if-type="urn:ietf:params:xml:ns:yang:iana-if-type">
  <interface>
    <name>eth0</name>
    <type>if-type:ethernetCsmacd</type>
  </interface>
</interfaces>
<routing
    xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"
    xmlns:bfd-types="urn:ietf:params:xml:ns:yang:ietf-bfd-types"
    xmlns:iana-bfd-types="urn:ietf:params:xml:ns:yang:iana-bfd-type\
s"
    xmlns:opt-auth="urn:ietf:params:xml:ns:yang:ietf-bfd-opt-auth">
  <control-plane-protocols>
    <control-plane-protocol>
      <type>bfd-types:bfdv1</type>
      <name>name:BFD</name>
      <bfd xmlns="urn:ietf:params:xml:ns:yang:ietf-bfd">
        <ip-sh xmlns="urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh">
          <sessions>
            <session>
              <interface>eth0</interface>
              <dest-addr>2001:db8:0:113::101</dest-addr>
              <desired-min-tx-interval>10000</desired-min-tx-interv\
al>
              <required-min-rx-interval>
                10000
              </required-min-rx-interval>
              <authentication>
                <key-chain>bfd-auth-config</key-chain>
                <opt-auth:reauth-interval>30</opt-auth:reauth-inter\
val>
              </authentication>
            </session>
          </sessions>
        </ip-sh>
      </bfd>
    </control-plane-protocol>
  </control-plane-protocols>
</routing>
            ]]>
            </artwork>
          </figure>
	</t>
      </section>
    </section>      
    <section anchor="experiment" title="Experimental Status">
      <t>
	This document describes an experiment that presents a candidate
	solution to update BFD Authentication that is currently specified in
	<xref target="RFC5880"/>.  This experiment is intended to
	provide additional insights into what happens when the
	optimized authentication method defined in this document is
	used. Here are the reasons why this document is on the Experimental track:
      <t><list style="symbols">
	      <t>In the initial stages of the document, there were significant participation and reviews from the working group. 
	Since then, there has been considerable changes to the document, e.g. the use of ISAAC, allowing for ISAAC bootstrapping 
	when a BFD session comes up and use of a single Auth Type to indicate use of optimized authentication etc. 
	These changes did not get significant review from the working group and therefore does not meet the bar set in Section 4.1.1 of <xref target="RFC2026"/></t>
	<t>There are no known implementations (even proof-of-concept) or implementation plans. As a result, we do not currently know if there will be interop issues with 
	legacy implementations or what exactly are the performance benefits of the optimization method.</t>
	<t>The work in this document could become very valuable in the future, especially if the need for deploying BFD authentication at scale becomes a reality.</t>
      </list></t>
      </t>

      <t>
	This document is classified as Experimental and is not part of
	the IETF Standards Track. Implementations based on this
	document should not be considered as compliant with <xref
	target="RFC5880">BFD</xref>.
      </t>
    </section>
  </back>
</rfc>
