draft-ietf-lwig-minimal-esp-09.txt | draft-ietf-lwig-minimal-esp-10.txt | |||
---|---|---|---|---|
Light-Weight Implementation Guidance (lwig) D.M. Migault | Light-Weight Implementation Guidance (lwig) D. Migault | |||
Internet-Draft Ericsson | Internet-Draft Ericsson | |||
Intended status: Informational T.G. Guggemos | Intended status: Informational T. Guggemos | |||
Expires: 8 October 2022 LMU Munich | Expires: 10 October 2022 LMU Munich | |||
6 April 2022 | 8 April 2022 | |||
Minimal IP Encapsulating Security Payload (ESP) | Minimal IP Encapsulating Security Payload (ESP) | |||
draft-ietf-lwig-minimal-esp-09 | draft-ietf-lwig-minimal-esp-10 | |||
Abstract | Abstract | |||
This document describes the minimal properties IP Encapsulating | This document describes the minimal properties IP Encapsulating | |||
Security Payload (ESP) implementation needs to meet to remain | Security Payload (ESP) implementation needs to meet to remain | |||
interoperable with the standard RFC4303 ESP. Such a minimal version | interoperable with the standard RFC4303 ESP. Such a minimal version | |||
of ESP is not intended to become a replacement of the RFC 4303 ESP. | of ESP is not intended to become a replacement of the RFC 4303 ESP. | |||
Instead, a minimal implementation is expected to be optimized for | Instead, a minimal implementation is expected to be optimized for | |||
constrained environment while remaining interoperable with | constrained environment while remaining interoperable with | |||
implementations of RFC 4303 ESP. In addition, this document also | implementations of RFC 4303 ESP. In addition, this document also | |||
skipping to change at page 1, line 45 ¶ | skipping to change at page 1, line 45 ¶ | |||
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 8 October 2022. | This Internet-Draft will expire on 10 October 2022. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2022 IETF Trust and the persons identified as the | Copyright (c) 2022 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 (https://trustee.ietf.org/ | Provisions Relating to IETF Documents (https://trustee.ietf.org/ | |||
license-info) in effect on the date of publication of this document. | license-info) in effect on the date of publication of this document. | |||
Please review these documents carefully, as they describe your rights | Please review these documents carefully, as they describe your rights | |||
and restrictions with respect to this document. Code Components | and restrictions with respect to this document. Code Components | |||
extracted from this document must include Revised BSD License text as | extracted from this document must include Revised BSD License text as | |||
described in Section 4.e of the Trust Legal Provisions and are | described in Section 4.e of the Trust Legal Provisions and are | |||
provided without warranty as described in the Revised BSD License. | provided without warranty as described in the Revised BSD License. | |||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | 1. Requirements notation . . . . . . . . . . . . . . . . . . . . 2 | |||
2. Security Parameter Index (SPI) (32 bit) . . . . . . . . . . . 3 | 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | |||
2.1. Considerations over SPI generation . . . . . . . . . . . 4 | 3. Security Parameter Index (SPI) (32 bit) . . . . . . . . . . . 4 | |||
3. Sequence Number(SN) (32 bit) . . . . . . . . . . . . . . . . 5 | 3.1. Considerations over SPI generation . . . . . . . . . . . 5 | |||
4. Padding . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 | 4. Sequence Number(SN) (32 bit) . . . . . . . . . . . . . . . . 6 | |||
5. Next Header (8 bit) . . . . . . . . . . . . . . . . . . . . . 9 | 5. Padding . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 | |||
6. ICV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 | 6. Next Header (8 bit) . . . . . . . . . . . . . . . . . . . . . 9 | |||
7. Cryptographic Suites . . . . . . . . . . . . . . . . . . . . 10 | 7. ICV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 | 8. Cryptographic Suites . . . . . . . . . . . . . . . . . . . . 10 | |||
9. Security Considerations . . . . . . . . . . . . . . . . . . . 11 | 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 | |||
10. Acknowledgment . . . . . . . . . . . . . . . . . . . . . . . 12 | 10. Security Considerations . . . . . . . . . . . . . . . . . . . 12 | |||
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 | 11. Privacy Considerations . . . . . . . . . . . . . . . . . . . 13 | |||
11.1. Normative References . . . . . . . . . . . . . . . . . . 12 | 12. Acknowledgment . . . . . . . . . . . . . . . . . . . . . . . 13 | |||
11.2. Informative References . . . . . . . . . . . . . . . . . 13 | 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 13 | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14 | 13.1. Normative References . . . . . . . . . . . . . . . . . . 13 | |||
13.2. Informative References . . . . . . . . . . . . . . . . . 14 | ||||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 15 | ||||
1. Introduction | 1. Requirements notation | |||
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 [RFC2119]. | ||||
2. Introduction | ||||
ESP [RFC4303] is part of the IPsec protocol suite [RFC4301]. IPsec | ESP [RFC4303] is part of the IPsec protocol suite [RFC4301]. IPsec | |||
is used to provide confidentiality, data origin authentication, | is used to provide confidentiality, data origin authentication, | |||
connectionless integrity, an anti-replay service (a form of partial | connectionless integrity, an anti-replay service (a form of partial | |||
sequence integrity) and limited traffic flow confidentiality (TFC) | sequence integrity) and limited traffic flow confidentiality (TFC) | |||
padding. | padding. | |||
Figure 1 describes an ESP Packet. Currently, ESP is implemented in | Figure 1 describes an ESP Packet. Currently, ESP is implemented in | |||
the kernel of major multipurpose Operating Systems (OS). The ESP and | the kernel of major multipurpose Operating Systems (OS). The ESP and | |||
IPsec suite is usually implemented in a complete way to fit multiple | IPsec suite is usually implemented in a complete way to fit multiple | |||
skipping to change at page 3, line 48 ¶ | skipping to change at page 4, line 27 ¶ | |||
+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | |||
| | Pad Length | Next Header | v v | | | Pad Length | Next Header | v v | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ------ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ------ | |||
| Integrity Check Value-ICV (variable) | | | Integrity Check Value-ICV (variable) | | |||
~ ~ | ~ ~ | |||
| | | | | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
Figure 1: ESP Packet Description | Figure 1: ESP Packet Description | |||
2. Security Parameter Index (SPI) (32 bit) | 3. Security Parameter Index (SPI) (32 bit) | |||
According to the [RFC4303], the SPI is a mandatory 32 bits field and | According to the [RFC4303], the SPI is a mandatory 32 bits field and | |||
is not allowed to be removed. | is not allowed to be removed. | |||
The SPI has a local significance to index the Security Association | The SPI has a local significance to index the Security Association | |||
(SA). From [RFC4301] section 4.1, nodes supporting only unicast | (SA). From [RFC4301] section 4.1, nodes supporting only unicast | |||
communications can index their SA only using the SPI. On the other | communications can index their SA only using the SPI. On the other | |||
hand, nodes supporting multicast communications must also use the IP | hand, nodes supporting multicast communications must also use the IP | |||
addresses and thus SA lookup needs to be performed using the longest | addresses and thus SA lookup needs to be performed using the longest | |||
match. | match. | |||
skipping to change at page 4, line 43 ¶ | skipping to change at page 5, line 21 ¶ | |||
nodes might include sensors looking to reduce their code complexity, | nodes might include sensors looking to reduce their code complexity, | |||
in which case the use of a predictive function to generate the SPI | in which case the use of a predictive function to generate the SPI | |||
might be preferred over the generation and handling of random values. | might be preferred over the generation and handling of random values. | |||
An example of such predictable function may consider the combination | An example of such predictable function may consider the combination | |||
of a fixed value and the memory address of the SAD structure. For | of a fixed value and the memory address of the SAD structure. For | |||
every incoming packet, the node will be able to point the SAD | every incoming packet, the node will be able to point the SAD | |||
structure directly from the SPI value. This avoids having a separate | structure directly from the SPI value. This avoids having a separate | |||
and additional binding between SPI and SAD entries that is involved | and additional binding between SPI and SAD entries that is involved | |||
for every incoming packet. | for every incoming packet. | |||
2.1. Considerations over SPI generation | 3.1. Considerations over SPI generation | |||
SPI that are not randomly generated over 32 bits may lead to privacy | SPI that are not randomly generated over 32 bits may lead to privacy | |||
and security concerns. As a result, the use of alternative designs | and security concerns. As a result, the use of alternative designs | |||
requires careful security and privacy reviews. This section provides | requires careful security and privacy reviews. This section provides | |||
some considerations upon the adoption of alternative designs. | some considerations upon the adoption of alternative designs. | |||
Note that SPI value is used only for inbound traffic, as such the SPI | Note that SPI value is used only for inbound traffic, as such the SPI | |||
negotiated with IKEv2 [RFC7296] or [RFC7815] by a peer, is the value | negotiated with IKEv2 [RFC7296] or [RFC7815] by a peer, is the value | |||
used by the remote peer when it sends traffic. As SPI is only used | used by the remote peer when it sends traffic. As SPI is only used | |||
for inbound traffic by the peer, this allows each peer to manage the | for inbound traffic by the peer, this allows each peer to manage the | |||
skipping to change at page 5, line 40 ¶ | skipping to change at page 6, line 19 ¶ | |||
While the use of randomly generated SPIs may reduce the leakage or | While the use of randomly generated SPIs may reduce the leakage or | |||
privacy of security related information by ESP itself, these pieces | privacy of security related information by ESP itself, these pieces | |||
of information may also be leaked otherwise. As a result, a privacy | of information may also be leaked otherwise. As a result, a privacy | |||
analysis should consider at least the type of information as well the | analysis should consider at least the type of information as well the | |||
traffic pattern before determining a non random SPI can be used. | traffic pattern before determining a non random SPI can be used. | |||
Typically, temperature sensors, wind sensors, used outdoors may not | Typically, temperature sensors, wind sensors, used outdoors may not | |||
leak privacy sensitive information and most of its traffic is | leak privacy sensitive information and most of its traffic is | |||
expected to be outbound traffic. When used indoors, a sensor that | expected to be outbound traffic. When used indoors, a sensor that | |||
reports every minute an encrypted status of the door (closed or | reports every minute an encrypted status of the door (closed or | |||
opened) may leak truly little privacy sensitive information outside | opened) may leak truly little privacy sensitive information outside | |||
the local network. In both cases, if the state of the sensor doesn't | the local network. In these examples, the privacy aspect of the | |||
leak privacy info, a randomized SPI is not necessary. | information itself might be limited. Being able to determine the | |||
version of the sensor to potentially take control of it may also have | ||||
some limited security consequences. Of course this depends on the | ||||
context these sensors are being used. If the risks associated to | ||||
privacy and security are acceptable, a randomized SPI is not | ||||
necessary. In any case, for such constrained sensors, it remains | ||||
better to have secure communications with non random SPI as opposed | ||||
to no security. | ||||
3. Sequence Number(SN) (32 bit) | 4. Sequence Number(SN) (32 bit) | |||
According to [RFC4303], the Sequence Number (SN) is a mandatory 32 | According to [RFC4303], the Sequence Number (SN) is a mandatory 32 | |||
bits field in the packet. | bits field in the packet. | |||
The SN is set by the sender so the receiver can implement anti-replay | The SN is set by the sender so the receiver can implement anti-replay | |||
protection. The SN is derived from any strictly increasing function | protection. The SN is derived from any strictly increasing function | |||
that guarantees: if packet B is sent after packet A, then SN of | that guarantees: if packet B is sent after packet A, then SN of | |||
packet B is strictly greater than the SN of packet A. | packet B is strictly greater than the SN of packet A. | |||
Some constrained devices may establish communication with specific | Some constrained devices may establish communication with specific | |||
devices, like a specific gateway, or nodes similar to them. As a | devices, like a specific gateway, or nodes similar to them. As a | |||
result, the sender may know whereas the receiver implements anti- | result, the sender may know whether the receiver implements anti- | |||
replay protection or not. Even though the sender may know the | replay protection or not. Even though the sender may know the | |||
receiver does not implement anti-replay protection, the sender must | receiver does not implement anti-replay protection, the sender must | |||
implement an always increasing function to generate the SN. | implement an always increasing function to generate the SN. | |||
Usually, SN is generated by incrementing a counter for each packet | Usually, SN is generated by incrementing a counter for each packet | |||
sent. A constrained device may avoid maintaining this context and | sent. A constrained device may avoid maintaining this context and | |||
use another source that is known to always increase. Typically, | use another source that is known to always increase. Typically, | |||
constrained nodes using 802.15.4 Time Slotted Channel Hopping (TSCH), | constrained nodes using 802.15.4 Time Slotted Channel Hopping (TSCH), | |||
whose communication is heavily dependent on time, can take advantage | whose communication is heavily dependent on time, can take advantage | |||
of their clock to generate the SN. A lot of IoT devices are in a | of their clock to generate the SN. A lot of IoT devices are in a | |||
skipping to change at page 6, line 43 ¶ | skipping to change at page 7, line 29 ¶ | |||
would guarantee a strictly increasing function and avoid storing any | would guarantee a strictly increasing function and avoid storing any | |||
additional values or context related to the SN. Of course, one | additional values or context related to the SN. Of course, one | |||
should only consider use of a clock to generate SNs if the | should only consider use of a clock to generate SNs if the | |||
application will inherently ensure that no two packets with a given | application will inherently ensure that no two packets with a given | |||
SA are sent with the same time value. Note however that standard | SA are sent with the same time value. Note however that standard | |||
receivers are generally configured with incrementing counters and, if | receivers are generally configured with incrementing counters and, if | |||
not appropriately configured, the use of a significantly larger SN | not appropriately configured, the use of a significantly larger SN | |||
difference may result in the packet out of the receiver's windows and | difference may result in the packet out of the receiver's windows and | |||
that packet being discarded. | that packet being discarded. | |||
For inbound traffic, this document recommends that any receiver | For inbound traffic, this document recommends that receivers | |||
provides anti-replay protection, and the size of the window depends | implements anti-replay protection, and the size of the window depends | |||
on the ability of the network to deliver packets out of order. As a | on the ability of the network to deliver packets out of order. As a | |||
result, in an environment where out of order packets is not possible | result, in an environment where out of order packets is not possible | |||
the window size can be set to one. However, while recommended, there | the window size can be set to one. However, while recommended, there | |||
are no requirements to implement an anti-replay protection mechanism | are no requirements to implement an anti-replay protection mechanism | |||
implemented by IPsec. Similarly to the SN the implementation of anti | implemented by IPsec. Similarly to the SN the implementation of anti | |||
replay protection may require the device to write the received SN for | replay protection may require the device to write the received SN for | |||
every packet, which may in some cases come with the same drawbacks as | every packet, which may in some cases come with the same drawbacks as | |||
those exposed for SN. As a result, some implementations may drop a | those exposed for SN. As a result, some implementations may drop a | |||
non required anti replay protection especially when the necessary | non required anti replay protection especially when the necessary | |||
resource involved overcomes the benefit of the mechanism. These | resource involved overcomes the benefit of the mechanism. These | |||
resources need also to balance that absence of anti-replay mechanism, | resources need also to balance that absence of anti-replay mechanism, | |||
may lead to unnecessary integrity check operations that might be | may lead to unnecessary integrity check operations that might be | |||
significantly more expensive as well. A typical example might | significantly more expensive as well. A typical example might | |||
consider an IoT device such as a temperature sensor that is sending a | consider an IoT device such as a temperature sensor that is sending a | |||
temperature every 60 seconds, and that receives an acknowledgment | temperature measurement every 60 seconds, and that receives an | |||
from the receiver. In such cases, the ability to spoof and replay an | acknowledgment from the receiver. In such cases, the ability to | |||
acknowledgement is of limited interest and might not justify the | spoof and replay an acknowledgement is of limited interest and might | |||
implementation of an anti replay mechanism. Receiving peers may also | not justify the implementation of an anti replay mechanism. | |||
use ESP anti-replay mechanism adapted to a specific application. | Receiving peers may also use ESP anti-replay mechanism adapted to a | |||
Typically, when the sending peer is using SN based on time, anti- | specific application. Typically, when the sending peer is using SN | |||
replay may be implemented by discarding any packets that present a SN | based on time, anti-replay may be implemented by discarding any | |||
whose value is too much in the past. Note that such mechanisms may | packets that present a SN whose value is too much in the past. Note | |||
consider clock drifting in various ways in addition to acceptable | that such mechanisms may consider clock drifting in various ways in | |||
delay induced by the network to avoid the anti replay windows | addition to acceptable delay induced by the network to avoid the anti | |||
rejecting legitimate packets. When a packet is received at a regular | replay windows rejecting legitimate packets. When a packet is | |||
time interval, some variant of time based mechanisms may not even use | received at a regular time interval, some variant of time based | |||
the value of the SN, but instead only consider the receiving time of | mechanisms may not even use the value of the SN, but instead only | |||
the packet. | consider the receiving time of the packet. | |||
SN can be encoded over 32 bits or 64 bits - known as Extended | SN can be encoded over 32 bits or 64 bits - known as Extended | |||
Sequence Number (ESN). As per [RFC4303], the support of ESN is not | Sequence Number (ESN). As per [RFC4303], the support of ESN is not | |||
mandatory. The determination of the use of ESN is based on the | mandatory. The determination of the use of ESN is based on the | |||
largest possible value a SN can take over a session. When SN is | largest possible value a SN can take over a session. When SN is | |||
incremented for each packet, the number of packets sent over the | incremented for each packet, the number of packets sent over the | |||
lifetime of a session may be considered. However, when the SN is | lifetime of a session may be considered. However, when the SN is | |||
incremented differently - such as when time is used - the maximum | incremented differently - such as when time is used - the maximum | |||
value SN needs to be considered instead. Note that the limit of | value SN needs to be considered instead. Note that the limit of | |||
messages being sent is primarily determined by the security | messages being sent is primarily determined by the security | |||
associated with the key rather than the SN. The security of all data | associated with the key rather than the SN. The security of all data | |||
protected under a given key decreases slightly with each message and | protected under a given key decreases slightly with each message and | |||
a node must ensure the limit is not reached - even though the SN | a node must ensure the limit is not reached - even though the SN | |||
would permit it. Estimation of the maximum number of packets to be | would permit it. Estimation of the maximum number of packets to be | |||
sent by a node is always challenging and as such should be considered | sent by a node is always challenging and as such should be considered | |||
cautiously as nodes could be online for much more time than expected. | cautiously as nodes could be online for much more time than expected. | |||
Even for constrained devices, this document recommends implementing | Even for constrained devices, this document recommends implementing | |||
some rekey mechanisms (see Section 9). | some rekey mechanisms (see Section 10). | |||
4. Padding | 5. Padding | |||
The purpose of padding is to respect the 32 bit alignment of ESP or | The purpose of padding is to respect the 32 bit alignment of ESP or | |||
block size expected by an encryption transform - such as AES-CBC for | block size expected by an encryption transform - such as AES-CBC for | |||
example. ESP must have at least one padding byte Pad Length that | example. ESP must have at least one padding byte Pad Length that | |||
indicates the padding length. ESP padding bytes are generated by a | indicates the padding length. ESP padding bytes are generated by a | |||
succession of unsigned bytes starting with 1, 2, 3 with the last byte | succession of unsigned bytes starting with 1, 2, 3 with the last byte | |||
set to Pad Length, where Pad Length designates the length of the | set to Pad Length, where Pad Length designates the length of the | |||
padding bytes. | padding bytes. | |||
Checking the padding structure is not mandatory, so the constrained | Checking the padding structure is not mandatory, so the constrained | |||
device may omit such checks, however, in order to interoperate with | device may omit such checks, however, in order to interoperate with | |||
existing ESP implementations, it must build the padding bytes as | existing ESP implementations, it must build the padding bytes as | |||
recommended by ESP. | recommended by ESP. | |||
In some situation the padding bytes may take a fixed value. This | In some situation the padding bytes may take a fixed value. This | |||
would typically be the case when the Data Payload is of fixed size. | would typically be the case when the Data Payload is of fixed size. | |||
ESP [RFC4303] also provides Traffic Flow Confidentiality (TFC) as a | ESP [RFC4303] also provides Traffic Flow Confidentiality (TFC) as a | |||
way to perform padding to hide traffic characteristics, which differs | way to perform padding to hide traffic characteristics, which differs | |||
from respecting a 32 bit alignment. TFC is not mandatory and must be | from respecting a 32 bit alignment. TFC is not mandatory and must be | |||
negotiated with the SA management protocol. TFC has not yet being | negotiated with the SA management protocol. TFC has not been widely | |||
widely adopted for standard ESP traffic. One possible reason is that | adopted for standard ESP traffic. One possible reason is that it | |||
it requires to shape the traffic according to one traffic pattern | requires to shape the traffic according to one traffic pattern that | |||
that needs to be maintained. This is likely to require extra | needs to be maintained. This is likely to require extra processing | |||
processing as well as providing a "well recognized" traffic shape | as well as providing a "well recognized" traffic shape which could | |||
which could end up being counterproductive. As such, this document | end up being counterproductive. As such, this document does not | |||
does not recommend that minimal ESP implementation supports TFC. | recommend that minimal ESP implementation supports TFC. | |||
As a result, TFC cannot be enabled with minimal ESP, and | As a result, communication protection that was relying on TFC will be | |||
communication protection that were relying on TFC will be more | more sensitive to traffic shaping. This could expose the application | |||
sensitive to traffic shaping. This could expose the application as | as well as the devices used to a passive monitoring attacker. Such | |||
well as the devices used to a passive monitoring attacker. Such | ||||
information could be used by the attacker in case a vulnerability is | information could be used by the attacker in case a vulnerability is | |||
disclosed on the specific device. In addition, some application use | disclosed on the specific device. In addition, some application use | |||
- such as health applications - may also reveal important privacy | - such as health applications - may also reveal important privacy | |||
oriented information. | oriented information. | |||
Some constrained nodes that have limited battery lifetime may also | Some constrained nodes that have limited battery lifetime may also | |||
prefer avoiding sending extra padding bytes. However, the same nodes | prefer avoiding sending extra padding bytes. However, the same nodes | |||
may also be very specific to an application and device. As a result, | may also be very specific to an application and device. As a result, | |||
they are also likely to be the main target for traffic shaping. In | they are also likely to be the main target for traffic shaping. In | |||
most cases, the payload carried by these nodes is quite small, and | most cases, the payload carried by these nodes is quite small, and | |||
skipping to change at page 9, line 5 ¶ | skipping to change at page 9, line 36 ¶ | |||
additional payload and the exposure to traffic shaping attacks. In | additional payload and the exposure to traffic shaping attacks. In | |||
addition, the information leaked by the traffic shaping may also be | addition, the information leaked by the traffic shaping may also be | |||
addressed by the application level. For example, it is preferred to | addressed by the application level. For example, it is preferred to | |||
have a sensor sending some information at regular time interval, | have a sensor sending some information at regular time interval, | |||
rather than when a specific event is happening. Typically, a sensor | rather than when a specific event is happening. Typically, a sensor | |||
monitoring the temperature, or a door is expected to send regularly | monitoring the temperature, or a door is expected to send regularly | |||
the information - i.e. the temperature of the room or whether the | the information - i.e. the temperature of the room or whether the | |||
door is closed or open) instead of only sending the information when | door is closed or open) instead of only sending the information when | |||
the temperature has raised or when the door is being opened. | the temperature has raised or when the door is being opened. | |||
5. Next Header (8 bit) | 6. Next Header (8 bit) | |||
According to [RFC4303], the Next Header is a mandatory 8 bits field | According to [RFC4303], the Next Header is a mandatory 8 bits field | |||
in the packet. Next header specifies the data contained in the | in the packet. Next header specifies the data contained in the | |||
payload as well as dummy packet, i.e. packets with the Next Header | payload as well as dummy packet, i.e. packets with the Next Header | |||
with a value 59 meaning "no next header". In addition, the Next | with a value 59 meaning "no next header". In addition, the Next | |||
Header may also carry an indication on how to process the packet | Header may also carry an indication on how to process the packet | |||
[I-D.nikander-esp-beet-mode]. | [I-D.nikander-esp-beet-mode]. | |||
The ability to generate and receive dummy packets is required by | The ability to generate and receive dummy packets is required by | |||
[RFC4303]. For interoperability, a minimal ESP implementation must | [RFC4303]. For interoperability, a minimal ESP implementation must | |||
discard dummy packets without indicating an error. Note that such | discard dummy packets without indicating an error. Note that such | |||
recommendation only applies for nodes receiving packets, and that | recommendation only applies for nodes receiving packets, and that | |||
nodes designed to only send data might not implement this capability. | nodes designed to only send data might not implement this capability. | |||
As the generation of dummy packets is subject to local management and | As the generation of dummy packets is subject to local management and | |||
based on a per-SA basis, a minimal ESP implementation may not | based on a per-SA basis, a minimal ESP implementation may not | |||
generate such dummy packet. More especially, in constrained | generate such dummy packet. Specifically, in constrained environment | |||
environment sending dummy packets may have too much impact on the | sending dummy packets may have too much impact on the device | |||
device lifetime, and so may be avoided. On the other hand, | lifetime, and should be avoided. On the other hand, constrained | |||
constrained nodes may be dedicated to specific applications, in which | nodes may be dedicated to specific applications, in which case, | |||
case, traffic pattern may expose the application or the type of node. | traffic pattern may expose the application or the type of node. For | |||
For these nodes, not sending dummy packet may have some privacy | these nodes, not sending dummy packet may have some privacy | |||
implication that needs to be measured. However, for the same reasons | implication that needs to be measured. However, for the same reasons | |||
exposed in Section 4 traffic shaping at the IPsec layer may also | exposed in Section 5 traffic shaping at the IPsec layer may also | |||
introduce some traffic pattern, and on constrained devices the | introduce some traffic pattern, and on constrained devices the | |||
application is probably the most appropriated layer to limit the risk | application is probably the most appropriated layer to limit the risk | |||
of leaking information by traffic shaping. | of leaking information by traffic shaping. | |||
In some cases, devices are dedicated to a single application or a | In some cases, devices are dedicated to a single application or a | |||
single transport protocol, in which case, the Next Header has a fixed | single transport protocol, in which case, the Next Header has a fixed | |||
value. | value. | |||
Specific processing indications have not been standardized yet | Specific processing indications have not been standardized yet | |||
[I-D.nikander-esp-beet-mode] and is expected to result from an | [I-D.nikander-esp-beet-mode] and is expected to result from an | |||
agreement between the peers. As a result, it should not be part of a | agreement between the peers. As a result, it should not be part of a | |||
minimal implementation of ESP. | minimal implementation of ESP. | |||
6. ICV | 7. ICV | |||
The ICV depends on the cryptographic suite used. Currently, | The ICV depends on the cryptographic suite used. Currently, | |||
[RFC8221] only recommends cryptographic suites with an ICV which | [RFC8221] only recommends cryptographic suites with an ICV which | |||
makes the ICV a mandatory field. | makes the ICV a mandatory field. | |||
As detailed in [RFC8221] authentication or authenticated encryption | As detailed in [RFC8221] authentication or authenticated encryption | |||
are recommended and as such the ICV field must be present with a size | are recommended and as such the ICV field must be present with a size | |||
different from zero. Its length is defined by the security | different from zero. Its length is defined by the security | |||
recommendations only. | recommendations only. | |||
7. Cryptographic Suites | 8. Cryptographic Suites | |||
The cryptographic suites implemented are an important component of | The cryptographic suites implemented are an important component of | |||
ESP. The recommended algorithms to use are expected to evolve over | ESP. The recommended algorithms to use are expected to evolve over | |||
time and implementers should follow the recommendations provided by | time and implementers should follow the recommendations provided by | |||
[RFC8221] and updates. | [RFC8221] and updates. | |||
This section lists some of the criteria that may be considered. The | This section lists some of the criteria that may be considered to | |||
list is not expected to be exhaustive and may also evolve overtime. | select the appropriate cryptographic suite. The list is not expected | |||
As a result, the list is provided as informational: | to be exhaustive and may also evolve over time: | |||
1. Security: Security is the criteria that should be considered | 1. Security: Security is the criteria that should be considered | |||
first for the selection of encryption algorithm transform. The | first for the selection of encryption algorithm transform. The | |||
security of encryption algorithm transforms is expected to evolve | security of encryption algorithm transforms is expected to evolve | |||
over time, and it is of primary importance to follow up-to-date | over time, and it is of primary importance to follow up-to-date | |||
security guidance and recommendations. The chosen encryption | security guidance and recommendations. The chosen encryption | |||
algorithm must not be known vulnerable or weak (see [RFC8221] for | algorithm must not be vulnerable or weak (see [RFC8221] for | |||
outdated ciphers). ESP can be used to authenticate only or to | outdated ciphers). ESP can be used to authenticate only or to | |||
encrypt the communication. In the latter case, authenticated | encrypt the communication. In the latter case, authenticated | |||
encryption must always be considered [RFC8221]. | encryption is RECOMMENDED [RFC8221]. | |||
2. Resilience to nonce re-use: Some transforms -including AES-GCM - | 2. Resilience to nonce re-use: Some transforms -including AES-GCM - | |||
are very sensitive to nonce collision with a given key. While | are very sensitive to nonce collision with a given key. While | |||
the generation of the nonce may prevent such collision during a | the generation of the nonce may prevent such collision during a | |||
session, the mechanisms are unlikely to provide such protection | session, the mechanisms are unlikely to provide such protection | |||
across reboot. This causes an issue for devices that are | across reboot. This causes an issue for devices that are | |||
configured with a key. When the key is likely to be re-used | configured with a key. When the key is likely to be re-used | |||
across reboots, this document recommends considering algorithms | across reboots, algorithms that are nonce misuse resistant such | |||
that are nonce misuse resistant such as, for example, AES-SIV | as, for example, AES-SIV [RFC5297], AES-GCM-SIV [RFC8452] or | |||
[RFC5297], AES-GCM-SIV [RFC8452] or Deoxys-II [DeoxysII]. Note | Deoxys-II [DeoxysII] are RECOMMENDED. Note however that | |||
however that currently none of them has yet been defined for ESP. | currently none of them has yet been defined for ESP. | |||
3. Interoperability: Interoperability considers the encryption | 3. Interoperability: Interoperability considers the encryption | |||
algorithm transforms shared with the other nodes. Note that it | algorithm transforms shared with the other nodes. Note that it | |||
is not because an encryption algorithm transform is widely | is not because an encryption algorithm transform is widely | |||
deployed that it is secured. As a result, security should not be | deployed that it is secured. As a result, security should not be | |||
weakened for interoperability. [RFC8221] and successors consider | weakened for interoperability. [RFC8221] and successors consider | |||
the life cycle of encryption algorithm transforms sufficiently | the life cycle of encryption algorithm transforms sufficiently | |||
long to provide interoperability. Constrained devices may have | long to provide interoperability. Constrained devices may have | |||
limited interoperability requirements which makes possible to | limited interoperability requirements which makes possible to | |||
reduces the number of encryption algorithm transforms to | reduces the number of encryption algorithm transforms to | |||
skipping to change at page 11, line 30 ¶ | skipping to change at page 12, line 16 ¶ | |||
AES-CTR, or ChaCha20-Poly1305). | AES-CTR, or ChaCha20-Poly1305). | |||
2. Use of ciphers with capability of using implicit IVs | 2. Use of ciphers with capability of using implicit IVs | |||
[RFC8750]. | [RFC8750]. | |||
3. Use of ciphers recommended for IoT [RFC8221]. | 3. Use of ciphers recommended for IoT [RFC8221]. | |||
4. Avoid Padding by sending payload data which are aligned to | 4. Avoid Padding by sending payload data which are aligned to | |||
the cipher block length - 2 for the ESP trailer. | the cipher block length - 2 for the ESP trailer. | |||
8. IANA Considerations | 9. IANA Considerations | |||
There are no IANA consideration for this document. | There are no IANA consideration for this document. | |||
9. Security Considerations | 10. Security Considerations | |||
Security considerations are those of [RFC4303]. In addition, this | Security considerations are those of [RFC4303]. In addition, this | |||
document provided security recommendations and guidance over the | document provided security recommendations and guidance over the | |||
implementation choices for each field. | implementation choices for each ESP field. | |||
The security of a communication provided by ESP is closely related to | The security of a communication provided by ESP is closely related to | |||
the security associated with the management of that key. This | the security associated with the management of that key. This | |||
usually includes mechanisms to prevent a nonce from repeating, for | usually includes mechanisms to prevent a nonce from repeating, for | |||
example. When a node is provisioned with a session key that is used | example. When a node is provisioned with a session key that is used | |||
across reboot, the implementer must ensure that the mechanisms put in | across reboot, the implementer must ensure that the mechanisms put in | |||
place remain valid across reboot as well. | place remain valid across reboot as well. | |||
This document recommends to use ESP in conjunction with key | This document recommends to use ESP in conjunction with key | |||
management protocols such as for example IKEv2 [RFC7296] or minimal | management protocols such as for example IKEv2 [RFC7296] or minimal | |||
skipping to change at page 12, line 14 ¶ | skipping to change at page 13, line 5 ¶ | |||
session key is, for example, provisioned, the nodes must ensure that | session key is, for example, provisioned, the nodes must ensure that | |||
keys are not used beyond their lifetime and that the appropriate use | keys are not used beyond their lifetime and that the appropriate use | |||
of the key remains across reboots - e.g. conditions on counters and | of the key remains across reboots - e.g. conditions on counters and | |||
nonces remains valid. | nonces remains valid. | |||
When a node generates its key or when random value such as nonces are | When a node generates its key or when random value such as nonces are | |||
generated, the random generation must follow [RFC4086]. In addition, | generated, the random generation must follow [RFC4086]. In addition, | |||
[SP-800-90A-Rev-1] provides appropriated guidance to build random | [SP-800-90A-Rev-1] provides appropriated guidance to build random | |||
generators based on deterministic random functions. | generators based on deterministic random functions. | |||
10. Acknowledgment | 11. Privacy Considerations | |||
Preventing the leakage of privacy sensitive information is a hard | ||||
problem to solve and usually result in balancing the information | ||||
potentially being leaked to the cost associated with the counter | ||||
measures. This problem is not inherent to the minimal ESP described | ||||
in this document and also concerns the use of ESP in general. | ||||
This document targets minimal implementations of ESP and as such | ||||
describes some minimalistic way to implement ESP. In some cases, | ||||
this may result in potentially exposing privacy sensitive pieces of | ||||
information. This document describes these privacy implications so | ||||
the designer can take the appropriate decisions given the | ||||
specificities of a given environment and deployment. | ||||
The main risks associated with privacy is the ability to identify an | ||||
application or a device by analyzing the traffic which is designated | ||||
as traffic shaping. As discussed in Section 3, the use in some very | ||||
specific context of non randomly generated SPI might in some cases | ||||
ease the determination of the device of the application. Similarly, | ||||
padding provides limited capabilities to obfuscate the traffic | ||||
compared to those provided by TFC. Such consequence on privacy as | ||||
detailed in Section 5. | ||||
12. Acknowledgment | ||||
The authors would like to thank Daniel Palomares, Scott Fluhrer, Tero | The authors would like to thank Daniel Palomares, Scott Fluhrer, Tero | |||
Kivinen, Valery Smyslov, Yoav Nir, Michael Richardson, Thomas Peyrin, | Kivinen, Valery Smyslov, Yoav Nir, Michael Richardson, Thomas Peyrin, | |||
Eric Thormarker, Nancy Cam-Winget and Bob Briscoe for their valuable | Eric Thormarker, Nancy Cam-Winget and Bob Briscoe for their valuable | |||
comments. In particular Scott Fluhrer suggested including the rekey | comments. In particular Scott Fluhrer suggested including the rekey | |||
index in the SPI. Tero Kivinen provided also multiple clarifications | index in the SPI. Tero Kivinen provided also multiple clarifications | |||
and examples of deployment ESP within constrained devices with their | and examples of deployment ESP within constrained devices with their | |||
associated optimizations. Thomas Peyrin Eric Thormarker and Scott | associated optimizations. Thomas Peyrin Eric Thormarker and Scott | |||
Fluhrer suggested and clarified the use of transform resilient to | Fluhrer suggested and clarified the use of transform resilient to | |||
nonce misuse. | nonce misuse. | |||
11. References | 13. References | |||
11.1. Normative References | 13.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>. | |||
[RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, | [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, | |||
"Randomness Requirements for Security", BCP 106, RFC 4086, | "Randomness Requirements for Security", BCP 106, RFC 4086, | |||
DOI 10.17487/RFC4086, June 2005, | DOI 10.17487/RFC4086, June 2005, | |||
<https://www.rfc-editor.org/info/rfc4086>. | <https://www.rfc-editor.org/info/rfc4086>. | |||
skipping to change at page 13, line 10 ¶ | skipping to change at page 14, line 28 ¶ | |||
[RFC7296] Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., and T. | [RFC7296] Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., and T. | |||
Kivinen, "Internet Key Exchange Protocol Version 2 | Kivinen, "Internet Key Exchange Protocol Version 2 | |||
(IKEv2)", STD 79, RFC 7296, DOI 10.17487/RFC7296, October | (IKEv2)", STD 79, RFC 7296, DOI 10.17487/RFC7296, October | |||
2014, <https://www.rfc-editor.org/info/rfc7296>. | 2014, <https://www.rfc-editor.org/info/rfc7296>. | |||
[RFC7815] Kivinen, T., "Minimal Internet Key Exchange Version 2 | [RFC7815] Kivinen, T., "Minimal Internet Key Exchange Version 2 | |||
(IKEv2) Initiator Implementation", RFC 7815, | (IKEv2) Initiator Implementation", RFC 7815, | |||
DOI 10.17487/RFC7815, March 2016, | DOI 10.17487/RFC7815, March 2016, | |||
<https://www.rfc-editor.org/info/rfc7815>. | <https://www.rfc-editor.org/info/rfc7815>. | |||
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC | ||||
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, | ||||
May 2017, <https://www.rfc-editor.org/info/rfc8174>. | ||||
[RFC8221] Wouters, P., Migault, D., Mattsson, J., Nir, Y., and T. | [RFC8221] Wouters, P., Migault, D., Mattsson, J., Nir, Y., and T. | |||
Kivinen, "Cryptographic Algorithm Implementation | Kivinen, "Cryptographic Algorithm Implementation | |||
Requirements and Usage Guidance for Encapsulating Security | Requirements and Usage Guidance for Encapsulating Security | |||
Payload (ESP) and Authentication Header (AH)", RFC 8221, | Payload (ESP) and Authentication Header (AH)", RFC 8221, | |||
DOI 10.17487/RFC8221, October 2017, | DOI 10.17487/RFC8221, October 2017, | |||
<https://www.rfc-editor.org/info/rfc8221>. | <https://www.rfc-editor.org/info/rfc8221>. | |||
[RFC8750] Migault, D., Guggemos, T., and Y. Nir, "Implicit | [RFC8750] Migault, D., Guggemos, T., and Y. Nir, "Implicit | |||
Initialization Vector (IV) for Counter-Based Ciphers in | Initialization Vector (IV) for Counter-Based Ciphers in | |||
Encapsulating Security Payload (ESP)", RFC 8750, | Encapsulating Security Payload (ESP)", RFC 8750, | |||
DOI 10.17487/RFC8750, March 2020, | DOI 10.17487/RFC8750, March 2020, | |||
<https://www.rfc-editor.org/info/rfc8750>. | <https://www.rfc-editor.org/info/rfc8750>. | |||
11.2. Informative References | 13.2. Informative References | |||
[DeoxysII] Jeremy, J. J., Ivica, I. N., Thomas, T. P., and Y. S. | [DeoxysII] Jeremy, J. J., Ivica, I. N., Thomas, T. P., and Y. S. | |||
Yannick, "Deoxys v1.41", October 2016, | Yannick, "Deoxys v1.41", October 2016, | |||
<https://competitions.cr.yp.to/round3/deoxysv141.pdf>. | <https://competitions.cr.yp.to/round3/deoxysv141.pdf>. | |||
[I-D.mglt-ipsecme-diet-esp] | [I-D.mglt-ipsecme-diet-esp] | |||
Migault, D., Guggemos, T., Bormann, C., and D. Schinazi, | Migault, D., Guggemos, T., Bormann, C., and D. Schinazi, | |||
"ESP Header Compression and Diet-ESP", Work in Progress, | "ESP Header Compression and Diet-ESP", Work in Progress, | |||
Internet-Draft, draft-mglt-ipsecme-diet-esp-07, 11 March | Internet-Draft, draft-mglt-ipsecme-diet-esp-07, 11 March | |||
2019, <https://www.ietf.org/archive/id/draft-mglt-ipsecme- | 2019, <https://www.ietf.org/archive/id/draft-mglt-ipsecme- | |||
End of changes. 34 change blocks. | ||||
87 lines changed or deleted | 121 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/ |