draft-ietf-bfd-secure-sequence-numbers-06.txt   draft-ietf-bfd-secure-sequence-numbers-07.txt 
Network Working Group M. Jethanandani Network Working Group M. Jethanandani
Internet-Draft Kloud Services Internet-Draft Kloud Services
Updates: 5880 (if approved) S. Agarwal Updates: 5880 (if approved) S. Agarwal
Intended status: Standards Track Cisco Systems, Inc Intended status: Standards Track Cisco Systems, Inc
Expires: February 6, 2021 A. Mishra Expires: June 19, 2021 A. Mishra
O3b Networks O3b Networks
A. Saxena A. Saxena
Ciena Corporation Ciena Corporation
A. Dekok A. Dekok
Network RADIUS SARL Network RADIUS SARL
August 5, 2020 December 16, 2020
Secure BFD Sequence Numbers Secure BFD Sequence Numbers
draft-ietf-bfd-secure-sequence-numbers-06 draft-ietf-bfd-secure-sequence-numbers-07
Abstract Abstract
This document describes a security enhancement for the sequence This document describes a security enhancement for the sequence
number used in BFD control packets. This document updates RFC 5880. number used in BFD control packets. This document updates RFC 5880.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
skipping to change at page 1, line 38 skipping to change at page 1, line 38
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on February 6, 2021. This Internet-Draft will expire on June 19, 2021.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 15 skipping to change at page 2, line 15
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Requirements Language . . . . . . . . . . . . . . . . . . . . 2 2. Requirements Language . . . . . . . . . . . . . . . . . . . . 2
3. Theory of operation . . . . . . . . . . . . . . . . . . . . . 2 3. Theory of operation . . . . . . . . . . . . . . . . . . . . . 2
4. Impact of using a hash . . . . . . . . . . . . . . . . . . . 4 4. Impact of using a hash . . . . . . . . . . . . . . . . . . . 4
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4
6. Security Considerations . . . . . . . . . . . . . . . . . . . 5 6. Security Considerations . . . . . . . . . . . . . . . . . . . 5
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 5 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 5
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 5
8.1. Normative References . . . . . . . . . . . . . . . . . . 5 8.1. Normative References . . . . . . . . . . . . . . . . . . 5
8.2. Informative References . . . . . . . . . . . . . . . . . 6 8.2. Informative References . . . . . . . . . . . . . . . . . 5
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 6 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 6
1. Introduction 1. Introduction
BFD [RFC5880] section 6.7 describes the use of monotonically BFD [RFC5880] section 6.7 describes the use of monotonically
incrementing 32-bit sequence numbers for use in authentication of BFD incrementing 32-bit sequence numbers for use in authentication of BFD
packets. While this method protects against simple replay attacks, packets. While this method protects against simple replay attacks,
the monotonically incrementing sequence numbers are predictable and the monotonically incrementing sequence numbers are predictable and
vulnerable to more complex attack vectors. This document proposes vulnerable to more complex attack vectors. This document proposes
the use of non-monotonically-incrementing sequence numbers in the BFD the use of non-monotonically-incrementing sequence numbers in the BFD
skipping to change at page 2, line 47 skipping to change at page 2, line 47
2. Requirements Language 2. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
3. Theory of operation 3. Theory of operation
Instead of inserting a monotonically, sometimes occasionally, Instead of inserting a monotonically, sometimes occasionally,
increasing sequence number in BFD control packets, a hash is increasing sequence number in BFD control packets, the ciphertext
inserted. The hash is computed, using a shared key, on the sequence result from a symmetric key algorithm operation (Symmetric-key
number. That computed hash is then inserted into the sequence number algorithms require both the sender and the recipient of a message to
field of the packet. In case of BFD Authentication have the same shared secret key) is inserted. The result is
computed, using a shared key, on the sequence number. That
ciphertext result is then inserted into the sequence number field of
the packet. In case of BFD Authentication
[I-D.ietf-bfd-optimizing-authentication], the sequence number used in [I-D.ietf-bfd-optimizing-authentication], the sequence number used in
computing an authenticated packet would be this new computed hash. computing an authenticated packet would be this new computed
Even though the BFD Authentication ciphertext. Even though the BFD Authentication
[I-D.ietf-bfd-optimizing-authentication] sequence number is [I-D.ietf-bfd-optimizing-authentication] sequence number is
independent of this enhancement, it would benefit by using the independent of this enhancement, it would benefit by using the
computed hash. computed ciphertext.
As currently defined in BFD [RFC5880], a BFD packet with As currently defined in BFD [RFC5880], a BFD packet with
authentication will undergo the following steps, where: authentication will undergo the following steps, where:
[O]: original RFC 5880 packet with monotonically increasing sequence [O]: original RFC 5880 packet with monotonically increasing sequence
number number
[S]: pseudo random sequence number [S]: pseudo random sequence number
[A]: Authentication [A]: Authentication
Sender Receiver Sender Receiver
[O] [S] [A] ------------- [A] [S] [O] [O] [S] [A] ------------- [A] [S] [O]
This document proposes that for enhanced security in sequence number This document proposes that for enhanced security in sequence number
encoding, the sender would identify a hash algorithm (symmetric) that encoding, the sender would identify a symmetric key algorithm that
would create a 32 bit hash. The hashing key is provisioned securely would create a 32 bit ciphertext. The symmetric key is provisioned
on the sender and receiver of the BFD session. The mechanism of securely on the sender and receiver of the BFD session. The
provisioning such a key is outside the scope of this document. mechanism of provisioning such a key is outside the scope of this
Instead of using the sequence number, the sender encodes the sequence document. This key SHOULD be different from the symmetric key used
number with the hashing key to produce a hash. to to authenticate the packet. Instead of sending the sequence
number, the sender encrypts the sequence number using it as input to
the symmetric algorithm to produce the ciphertext, which is then
inserted in place of the sequence number.
Upon receiving the BFD Control packet, the receiver compares the Upon receiving the BFD Control packet, the receiver decrypts the
received sequence number against the expected sequence number. The ciphertext using the same provisioned shared key to produce the
mechanism used for comparing is an implementation detail received sequence number. It compares the received sequence number
(implementations may pre-calculate the expected hashed sequence against the expected sequence number. The mechanism used for
number, or decrypt the received sequence number before comparing comparing is an implementation detail (implementations may pre-
against expected value). To tolerate dropped frames, the receiver calculate the expected sequence number, or decrypt the received
MUST compare the received sequence number against the current sequence number before comparing against expected value). To
expected sequence number (previous received sequence number + 1) and tolerate dropped frames, the receiver MUST compare the received
N subsequent expected sequence numbers (where N is greater than or sequence number against the current expected sequence number
equal to the detect multiplier). Note: The first sequence number can (previous received sequence number + 1) and N subsequent expected
be obtained using the same logic as used in determining Local sequence numbers (where N is greater than or equal to the detect
Discriminator value for the session or by using a random number. multiplier). Note: The first sequence number can be obtained using
the same logic as used in determining Local Discriminator value for
the session or by using a random number.
k: hashing key K: symmetric key
s: sequence number S: sequence number
S': encrypted sequence number OR ciphertext result
O: original RFC 5880 packet with monotonically increasing sequence O: original RFC 5880 packet with monotonically increasing sequence
number number
R: remainder of packet
H1: hash of s
H2: hash of entire packet
A: H2 + insertion in packet
hash(s, k) = H1
hash((H1 + R), k) = H2
hash'((Packet - H2), k) == H2 ? Good packet : bad packet f(S, K) = S', where f is a symmetric encryption algorithm
hash'(H1, k) > previously received s ? Good sequence number : bad f(S', K) = S, where f is a symmetric decryption algorithm
sequence number
Sender Receiver Sender Receiver
[O] [H1] [A] -------- [A] [H1] [O] [O] [S'] [A] -------- [A] [S] [O]
The above diagram describes how the sender encodes and receiver The above diagram describes how the sender encrypts and receiver
decodes the sequence number. The sender starts by taking the decrypts the sequence number. The sender starts by taking the
monotonically increasing sequence number and hashing it. It replaces monotonically increasing (but non linear) sequence number and
the sequence number with the hash. It then calculates the hash for encrypting it using a symmetric encryption algorithm. The resulting
the entire packet and appends the hash value to the end of the ciphertext replaces the sequence number. As per BFD [RFC5880], it
packet, before transmitting it. then calculates the hash for the entire packet and appends the hash
value to the end of the packet, before transmitting it.
The receiver hashes the entire packet without H2, and compares the The receiver hashes the entire packet as part of receiver
hash value with the received hash (H2). If the hash values are authentication. On successful authentication, it decrypts the
equal, it is a good packet, else it is a bad packet. It then ciphertext with the same key used to encrypt it, in order to obtain
calculates the hash on the received sequence number to retreive s. the original sequence number. If it is greater than the previously
If it is greater than the previously received monotically increasing received monotonically increasing sequence number, then the receiver
sequence number, then the receiver knows it's a valid sequence knows it's a valid sequence number.
number.
4. Impact of using a hash 4. Impact of using a hash
Under this proposal, every packet's sequence number is encoded within Under this proposal, every packet's sequence number is encoded in
a hash. Therefore there is some impact on the system and its ciphertext. Therefore, there is some impact on the system and its
performance while encoding/decoding the hash. As security measures performance while encryption/decryption. As security measures go,
go, this enhancement greatly increases the security of the packet this enhancement greatly increases the security of the packet with or
with or without authentication of the entire packet. without authentication of the entire packet.
5. IANA Considerations 5. IANA Considerations
This document makes no request of IANA. This document makes no request of IANA.
Note to RFC Editor: this section may be removed on publication as an Note to RFC Editor: this section may be removed on publication as an
RFC. RFC.
6. Security Considerations 6. Security Considerations
While the proposed mechanism improves overall security of BFD In a symmetric key algorithm, the key is shared between the two
mechanism, the security consderations are listed below: systems. Distribution of this key to all the systems at the same
time can be quite a cumbersome task. BFD sessions running a fast
Because of the fast rate of BFD sesions and it is difficult to change rate will require these keys to be refreshed often, which poses a
the keys (used for hashing the sequence number) during the operation further challenge. Therefore, it is difficult to change the keys
of a BFD session without affecting the stability of the BFD session. during the operation of a BFD session without affecting the stability
It is, therefore, recommended to administratively disable the BFD of the BFD session. Therefore, it is recommended to administratively
session before changing the keys. If the keys are not changed, an disable the BFD session before changing the keys. If the keys are
attacker can use a replay attack. not changed frequently, an attacker can try to guess the key to
launch a replay attack.
Using this method allows the BFD end-points to detect a malicious This method allows the BFD end-points to detect a malicious packet
packet (the decrypted sequence number will not be in sequence) the (the decrypted sequence number will not be in sequence). The
behavior of the session when such a packet is detected is based on behavior of the session, when such a packet is detected, is based on
the implementation. A flood of such malicious packets may cause a the implementation. A flood of such malicious packets may cause a
session to report BFD session to be operationally down. BFD session to be operationally down.
The hashing algorithm and key size will determine the difficulty for The symmetric algorithm and key size will determine the difficulty
an attacker to decipher the key from the transmitted BFD frames. The for an attacker to decipher the key from the transmitted BFD frames.
sequential nature of the payload (sequence numbers) simplifies the The sequential nature of the payload (sequence numbers) simplifies
decoding of the key. It is, therefore, recommended to use longer the decoding of the key. It is, therefore, recommended to use longer
keys or more secure hashing algorithms. keys or more secure symmetric algorithms.
7. Acknowledgements 7. Acknowledgements
The authors would like to thank Jeff Hass and Reshad Rahman for their
reviews of and suggestions for the document.
8. References 8. References
8.1. Normative References 8.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection [RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection
 End of changes. 26 change blocks. 
85 lines changed or deleted 87 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/