draft-ietf-tcpm-tcp-ao-crypto-03.txt   rfc5926.txt 
TCPM G. Lebovitz Internet Engineering Task Force (IETF) G. Lebovitz
Internet-Draft Juniper Request for Comments: 5926 Juniper
Intended status: Standards Track E. Rescorla Category: Standards Track E. Rescorla
Expires: September 25, 2010 RTFM ISSN: 2070-1721 RTFM
March 24, 2010 June 2010
Cryptographic Algorithms for TCP's Authentication Option, TCP-AO Cryptographic Algorithms for the TCP Authentication Option (TCP-AO)
draft-ietf-tcpm-tcp-ao-crypto-03
Abstract Abstract
The TCP Authentication Option, TCP-AO, relies on security algorithms The TCP Authentication Option (TCP-AO) relies on security algorithms
to provide authentication between two end-points. There are many to provide authentication between two end-points. There are many
such algorithms available, and two TCP-AO systems cannot interoperate such algorithms available, and two TCP-AO systems cannot interoperate
unless they are using the same algorithms. This document specifies unless they are using the same algorithms. This document specifies
the algorithms and attributes that can be used in TCP-AO's current the algorithms and attributes that can be used in TCP-AO's current
manual keying mechanism, and provides the interface for future MACs. manual keying mechanism and provides the interface for future message
authentication codes (MACs).
Status of this Memo
This Internet-Draft is submitted to IETF in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet-
Drafts.
Internet-Drafts are draft documents valid for a maximum of six months Status of This Memo
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at This is an Internet Standards Track document.
http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at This document is a product of the Internet Engineering Task Force
http://www.ietf.org/shadow.html. (IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 5741.
This Internet-Draft will expire on September 25, 2010. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc5926.
Copyright Notice Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the Copyright (c) 2010 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
(http://trustee.ietf.org/license-info) in effect on the date of (http://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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
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 BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . ancho 1. Introduction ....................................................2
2. Requirements . . . . . . . . . . . . . . . . . . . . . . . Requi 2. Requirements ....................................................3
2.1. Requirements Language . . . . . . . . . . . . . . . . . ReqLa 2.1. Requirements Language ......................................3
2.2. Algorithm Requirements . . . . . . . . . . . . . . . . ancho 2.2. Algorithm Requirements .....................................3
2.3. Requirements for Future MAC Algorithms . . . . . . . . ReqFu 2.3. Requirements for Future MAC Algorithms .....................3
3. Algorithms Specified . . . . . . . . . . . . . . . . . . . Algos 3. Algorithms Specified ............................................4
3.1. Key Derivation Functions (KDFs) . . . . . . . . . . . . KDFs 3.1. Key Derivation Functions (KDFs) ............................4
3.1.1. Concrete KDFs . . . . . . . . . . . . . . . . . . . ancho 3.1.1. Concrete KDFs .......................................5
3.2. MAC Algorithms . . . . . . . . . . . . . . . . . . . . MACs 3.1.1.1. KDF_HMAC_SHA1 ..............................6
3.2.1. The Use of HMAC-SHA-1-96 . . . . . . . . . . . . . HMAC- 3.1.1.2. KDF_AES_128_CMAC ...........................7
3.2.2. The Use of AES-128-CMAC-96 . . . . . . . . . . . . AES-1 3.1.1.3. Tips for User Interfaces Regarding KDFs ....9
4. Security Considerations . . . . . . . . . . . . . . . . . . Secur 3.2. MAC Algorithms .............................................9
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . ancho 3.2.1. The Use of HMAC-SHA-1-96 ...........................10
6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . ancho 3.2.2. The Use of AES-128-CMAC-96 .........................11
7. References . . . . . . . . . . . . . . . . . . . . . . . . ancho 4. Security Considerations ........................................11
7.1. Normative References . . . . . . . . . . . . . . . . . ancho 5. IANA Considerations ............................................13
7.2. Informative References . . . . . . . . . . . . . . . . ancho 6. Acknowledgements ...............................................13
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 0 7. References .....................................................14
7.1. Normative References ......................................14
7.2. Informative References ....................................14
1. Introduction 1. Introduction
This document is a companion to [I-D.ietf-tcpm-tcp-auth-opt]. Like This document is a companion to [RFC5925]. Like most modern security
most modern security protocols, TCP-AO allows users to chose which protocols, TCP-AO allows users to choose which cryptographic
cryptographic algorithm(s) they want to use to meet their security algorithm(s) they want to use to meet their security needs.
needs.
TCP-AO provides cryptographic authentication and message integrity TCP-AO provides cryptographic authentication and message integrity
verification between two end-points. In order to accomplish this verification between two end-points. In order to accomplish this
function, message authentication codes (MACs) are used, which then function, message authentication codes (MACs) are used, which then
rely on shared keys. There are various ways to create MACs. The use rely on shared keys. There are various ways to create MACs. The use
of hashed-based MACs (HMAC) is defined in [RFC2104]. The use of of hash-based MACs (HMACs) is defined in [RFC2104]. The use of
cipher-based MACs (CMAC) is defined in [NIST-SP800-38B]. cipher-based MACs (CMACs) is defined in [NIST-SP800-38B].
This RFC defines the general requirements for MACs used in TCP-AO, This RFC defines the general requirements for MACs used in TCP-AO,
both for currently specified MACs and for any future specified MACs. both for currently specified MACs and for any future specified MACs.
It specifies two MAC algorithms required in all TCP-AO It specifies two MAC algorithms required in all TCP-AO
implementations. It also specifies two key derivation functions implementations. It also specifies two key derivation functions
(KDFs) used to create the traffic keys used by the MACs. These KDFs (KDFs) used to create the traffic keys used by the MACs. These KDFs
are also required by all TCP-AO implementations. are also required by all TCP-AO implementations.
2. Requirements 2. Requirements
2.1. Requirements Language 2.1. 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 [RFC2119]. document are to be interpreted as described in [RFC2119].
When used in lower case, these words convey their typical use in When used in lowercase, these words convey their typical use in
common language, and are not to be interpreted as described in common language, and they are not to be interpreted as described in
[RFC2119]. [RFC2119].
2.2. Algorithm Requirements 2.2. Algorithm Requirements
This is the initial specification of required cryptography for This is the initial specification of required cryptography for
TCP-AO, and indicates two MAC algorithms and two KDFs. All four TCP-AO, and indicates two MAC algorithms and two KDFs. All four
components MUST be implemented in order for the implementation to be components MUST be implemented in order for the implementation to be
fully compliant with this RFC. fully compliant with this RFC.
The following table indicates the required MAC algorithms and KDFs The following table indicates the required MAC algorithms and KDFs
skipping to change at page 4, line 6 skipping to change at page 3, line 28
This is the initial specification of required cryptography for This is the initial specification of required cryptography for
TCP-AO, and indicates two MAC algorithms and two KDFs. All four TCP-AO, and indicates two MAC algorithms and two KDFs. All four
components MUST be implemented in order for the implementation to be components MUST be implemented in order for the implementation to be
fully compliant with this RFC. fully compliant with this RFC.
The following table indicates the required MAC algorithms and KDFs The following table indicates the required MAC algorithms and KDFs
for TCP-AO: for TCP-AO:
Requirement Authentication Algorithm Requirement Authentication Algorithm
------------ ------------------------ ------------ ------------------------
MUST HMAC-SHA-1-96 [RFC2104][FIPS-180-3] MUST HMAC-SHA-1-96 [RFC2104][FIPS-180-3]
MUST AES-128-CMAC-96 [NIST-SP800-38B][FIPS197] MUST AES-128-CMAC-96 [NIST-SP800-38B][FIPS197]
Requirement Key Derivation Function (KDF) Requirement Key Derivation Function (KDF)
------------- ------------------------ ------------- ------------------------
MUST KDF_HMAC_SHA1 MUST KDF_HMAC_SHA1
MUST KDF_AES_128_CMAC MUST KDF_AES_128_CMAC
For an explanation fo why two MAC algorthims were mandated, see the For an explanation of why two MAC algorithms were mandated, see the
Section 4 section. Section 4.
2.3. Requirements for Future MAC Algorithms 2.3. Requirements for Future MAC Algorithms
TCP-AO is intended to support cryptographic agility. As a result, TCP-AO is intended to support cryptographic agility. As a result,
this document includes recommendations in various places for future this document includes recommendations in various places for future
MAC and KDF algorithms when used for TCP-AO. For future MAC MAC and KDF algorithms when used for TCP-AO. For future MAC
algorithms specifically, they SHOULD protect at least 2**48 messages algorithms specifically, they SHOULD protect at least 2**48 messages
with a collision probability of less than one in 10**9. with a collision probability of less than one in 10**9.
3. Algorithms Specified 3. Algorithms Specified
TCP-AO requires two classes of cryptographic algorithms used on a TCP-AO requires two classes of cryptographic algorithms used on a
particular connection, and refers to this document to define them particular connection, and refers to this document to define them
both: both:
(1) Key Derivation Functions (KDFs) which name a pseudorandom (1) Key Derivation Functions (KDFs), which name a pseudorandom
function (PRF) and use a Master_Key and some connection- function (PRF) and use a Master_Key and some connection-
specific input with that PRF to produce Traffic_Keys, the specific input with that PRF to produce Traffic_Keys, the
keys suitable for authenticating and integrity checking keys suitable for authenticating and integrity checking
individual TCP segments, as described in TCP-AO. individual TCP segments, as described in TCP-AO.
(2) Message Authentication Code (MAC) algorithms which take a
key and a message and produce an authentication tag which (2) Message Authentication Code (MAC) algorithms, which take a
can be used to verify the integrity and authenticity of key and a message and produce an authentication tag that can
those messages. be used to verify the integrity and authenticity of those
messages.
In TCP-AO, these algorithms are always used in pairs. Each MAC In TCP-AO, these algorithms are always used in pairs. Each MAC
algorithm MUST specify the KDF to be used with that MAC algorithm. algorithm MUST specify the KDF to be used with that MAC algorithm.
However, a KDF MAY be used with more than one MAC algorithm. However, a KDF MAY be used with more than one MAC algorithm.
3.1. Key Derivation Functions (KDFs) 3.1. Key Derivation Functions (KDFs)
TCP-AO's Traffic_Keys are derived using KDFs. The KDFs used in TCP- TCP-AO's Traffic_Keys are derived using KDFs. The KDFs used in TCP-
AO's current manual keying have the following interface: AO's current manual keying have the following interface:
skipping to change at page 5, line 17 skipping to change at page 4, line 43
where: where:
- KDF_alg: the specific pseudorandom function (PRF) that is - KDF_alg: the specific pseudorandom function (PRF) that is
the basic building block used in constructing the the basic building block used in constructing the
given Traffic_Key. given Traffic_Key.
- Master_Key: In TCP-AO's manual key mode, this is a key shared - Master_Key: In TCP-AO's manual key mode, this is a key shared
by both peers, entered via some interface to their by both peers, entered via some interface to their
respective configurations. The Master_Key is used respective configurations. The Master_Key is used
as the seed for the KDF. We assume that this is a as the seed for the KDF. We assume that this is a
human-readable pre-shared key (PSK), thus we assume human-readable pre-shared key (PSK); thus, we
it is of variable length. Master_Keys SHOULD be assume it is of variable length. Master_Keys
random, but might not be (e.g., badly chosen by the SHOULD be random, but might not be (e.g., badly
user). For interoperability, the management chosen by the user). For interoperability, the
interface by which the PSK is configured MUST management interface by which the PSK is configured
accept ASCII strings, and SHOULD also allow for the MUST accept ASCII strings, and SHOULD also allow
configuration of any arbitrary binary string in for the configuration of any arbitrary binary
hexadecimal form. Other configuration methods MAY string in hexadecimal form. Other configuration
be supported. methods MAY be supported.
- Context: A binary string containing information related to - Context: A binary string containing information related to
the specific connection for this derived keying the specific connection for this derived keying
material, as defined in material, as defined in [RFC5925], Section 5.2.
[I-D.ietf-tcpm-tcp-auth-opt], Section 7.2.
- Output_Length: The length in bits of the key that the KDF will - Output_Length: The length, in bits, of the key that the KDF
produce. This length must be the size required for will produce. This length must be the size
the MAC algorithm that will use the PRF result as a required for the MAC algorithm that will use the
seed. PRF result as a seed.
When invoked, a KDF generates a string of length Output_Length bits When invoked, a KDF generates a string of length Output_Length bits
based on Master_Key and context value. This result may then be used based on the Master_Key and context value. This result may then be
as a cryptographic key for any algorithm which takes an Output_Length used as a cryptographic key for any algorithm that takes an
length key. A KDF MAY specify a maximum Output_Length parameter. Output_Length length key. A KDF MAY specify a maximum Output_Length
parameter.
3.1.1. Concrete KDFs 3.1.1. Concrete KDFs
This document defines two KDF algorithms, each paired with a This document defines two KDF algorithms, each paired with a
corresponding PRF algorithm as explained below: corresponding PRF algorithm as explained below:
* KDF_HMAC_SHA1 based on PRF-HMAC-SHA1 [RFC2104][FIPS-180-3] * KDF_HMAC_SHA1 based on PRF-HMAC-SHA1 [RFC2104][FIPS-180-3]
* KDF_AES_128_CMAC based on AES-CMAC-PRF-128 * KDF_AES_128_CMAC based on AES-CMAC-PRF-128
[NIST-SP800-38B][FIPS197] [NIST-SP800-38B][FIPS197]
Both of these KDFs are based on the iteration mode KDFs specified in Both of these KDFs are based on the iteration-mode KDFs specified in
[NIST-SP800-108]. This means that they use an underlying [NIST-SP800-108]. This means that they use an underlying
pseudorandom function (PRF) with a fixed-length output, 128 bits in pseudorandom function (PRF) with a fixed-length output, 128 bits in
the case of the AES-CMAC, and 160 bits in the case of HMAC-SHA1. The the case of the AES-CMAC, and 160 bits in the case of HMAC-SHA1. The
KDF generates an arbitrary number of output bits by operating the PRF KDF generates an arbitrary number of output bits by operating the PRF
in a "counter mode", where each invocation of the PRF uses a in a "counter mode", where each invocation of the PRF uses a
different input block differentiated by a block counter. different input block differentiated by a block counter.
Each input block is constructed as follows: Each input block is constructed as follows:
( i || Label || Context || Output_Length ) ( i || Label || Context || Output_Length )
Where Where
- "||": For any X || Y, "||" represents a concatonation - "||": For any X || Y, "||" represents a concatenation
operation of the binary strings X and Y. operation of the binary strings X and Y.
- i: A counter, a binary string that is an input to each - i: A counter, a binary string that is an input to each
iteration of the PRF in counter mode. The counter iteration of the PRF in counter mode. The counter
"i" is represented in a single octet. The number of "i" is represented in a single octet. The number of
iterations will depend on the specific size of the iterations will depend on the specific size of the
Output_Length desired for a given MAC. "i" always Output_Length desired for a given MAC. "i" always
starts = 1. starts = 1.
- Label: A binary string that clearly identifies the purpose - Label: A binary string that clearly identifies the purpose
of this KDF's derived keying material. For TCP-AO we of this KDF's derived keying material. For TCP-AO,
use the ASCII string "TCP-AO", where the last we use the ASCII string "TCP-AO", where the last
character is the capital letter "O", not to be character is the capital letter "O", not to be
confused with a zero. While this may seem like confused with a zero. While this may seem like
overkill in this specification since TCP-AO only overkill in this specification since TCP-AO only
describes one call to the KDF, it is included in describes one call to the KDF, it is included in
order to comply with FIPS 140 certifications. order to comply with FIPS 140 certifications.
- Context: The context argument provided to the KDF interface, - Context: The context argument provided to the KDF interface,
as described above in Section 3.1 . as described above in Section 3.1 .
- Output_Length: The length in bits of the key that the KDF will - Output_Length: The length, in bits, of the key that the KDF
produce. The Output_length is represented within two will produce. The Output_length is represented
octets. This length must be the size required for within two octets. This length must be the size
the MAC algorithm that will use the PRF result as a required for the MAC algorithm that will use the
seed. PRF result as a seed.
The ouput of multiple PRF invocations is simply concatenated. For The output of multiple PRF invocations is simply concatenated. For
the Traffic_Key, values of multiple PRF invocations are concatenated the Traffic_Key, values of multiple PRF invocations are concatenated
and truncated as needed to create a Traffic_Key of the desired and truncated as needed to create a Traffic_Key of the desired
length. For instance, if one were using KDF_HMAC_SHA1, which uses a length. For instance, if one were using KDF_HMAC_SHA1, which uses a
160-bit internal PRF to generate 320 bits of data, one would execute 160-bit internal PRF to generate 320 bits of data, one would execute
the PRF twice, once with i=1 and once with i=2. The result would be the PRF twice, once with i=1 and once with i=2. The result would be
the entire output of the first invocation concatenated with the the entire output of the first invocation concatenated with the
second invocation. E.g., second invocation. For example,
Traffic_Key = Traffic_Key =
KDF_alg(Master_Key, 1 || Label || Context || Output_length) || KDF_alg(Master_Key, 1 || Label || Context || Output_length) ||
KDF_alg(Master_Key, 2 || Label || Context || Output_length) KDF_alg(Master_Key, 2 || Label || Context || Output_length)
If the number of bits required is not an exact multiple of the output If the number of bits required is not an exact multiple of the output
size of the PRF, then the output of the final invocation of the PRF size of the PRF, then the output of the final invocation of the PRF
is truncated as necessary. is truncated as necessary.
3.1.1.1. KDF_HMAC_SHA1 3.1.1.1. KDF_HMAC_SHA1
skipping to change at page 8, line 15 skipping to change at page 7, line 30
- Result: Traffic_Key, used in the MAC function by TCP-AO - Result: Traffic_Key, used in the MAC function by TCP-AO
The Master_Key in TCP-AO's current manual keying mechanism is a The Master_Key in TCP-AO's current manual keying mechanism is a
shared secret, entered by an administrator. It is passed via an out- shared secret, entered by an administrator. It is passed via an out-
of-band mechanism between two devices, and often between two of-band mechanism between two devices, and often between two
organizations. The shared secret does not have to be 16 octets, and organizations. The shared secret does not have to be 16 octets, and
the length may vary. However, AES_128_CMAC requires a key of exactly the length may vary. However, AES_128_CMAC requires a key of exactly
16 octets (128 bits) in length. We could mandate that 16 octets (128 bits) in length. We could mandate that
implementations force administrators to input Master_Keys of exactly implementations force administrators to input Master_Keys of exactly
128 bit length when using AES_128_CMAC, and with sufficient 128-bit length when using AES_128_CMAC, and with sufficient
randomness, but this places undue burden on the implementors and randomness, but this places undue burden on the implementors and
deployers. This specification RECOMMENDS that deployers use a deployers. This specification RECOMMENDS that deployers use a
randomly generated 128-bit string as the Master_Key, but acknowledges randomly generated 128-bit string as the Master_Key, but acknowledges
that deployers may not. that deployers may not.
To handle variable length Master_Keys we use the same mechanism as To handle variable length Master_Keys, we use the same mechanism as
described in [RFC4615], Sect 3. First we use AES_128_CMAC with a described in [RFC4615], Section 3. First, we use AES_128_CMAC with a
fixed key of all zeros as a "randomness extractor", while using the fixed key of all zeros as a "randomness extractor", while using the
shared secret Master_Key, MK, as the message input, to produce a 128 shared secret Master_Key, MK, as the message input, to produce a 128-
bit key Derived_Master_Key (K). Second, we use the result as a key, bit key Derived_Master_Key (K). Second, we use the result as a key,
and run AES-128_CMAC again, this time using the result K as the Key, and run AES-128_CMAC again, this time using the result K as the Key,
and the true input block as the Input to yield the Traffic_Key (TK) and the true input block as the Input to yield the Traffic_Key (TK)
used in the MAC over the message. The description follows: used in the MAC over the message. The description follows:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ KDF-AES-128-CMAC + + KDF-AES-128-CMAC +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ + + +
+ Input : MK (Master_Key, the variable-length shared secret) + + Input : MK (Master_Key, the variable-length shared secret) +
skipping to change at page 9, line 33 skipping to change at page 8, line 33
+ Step 2. TK := AES-CMAC(K, I, len); + + Step 2. TK := AES-CMAC(K, I, len); +
+ return TK; + + return TK; +
+ + + +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Figure 1 Figure 1
In step 1, the 128-bit key, K, for AES-CMAC is derived as follows: In step 1, the 128-bit key, K, for AES-CMAC is derived as follows:
o If the Master_Key, MK, provided by the administrator is exactly 128 o If the Master_Key, MK, provided by the administrator is exactly 128
bits, then we use it as-is. bits, then we use it as is.
o If it is longer or shorter than 128 bits, then we derive the key K o If it is longer or shorter than 128 bits, then we derive the key K
by applying the AES-CMAC algorithm using the 128-bit all-zero string by applying the AES-CMAC algorithm using the 128-bit all-zero string
as the key and MK as the input message. This step is described in as the key and MK as the input message. This step is described in
step 1b. 1b.
In step 2, we apply the AES-CMAC algorithm again, this time using K In step 2, we apply the AES-CMAC algorithm again, this time using K
as the key and I as the input message. as the key and I as the input message.
The output of this algorithm returns TK, the Traffic_Key, which is The output of this algorithm returns TK, the Traffic_Key, which is
128 bits suitable for use in the MAC function on each TCP segment of 128 bits and is suitable for use in the MAC function on each TCP
the connection. segment of the connection.
3.1.1.3. Tips for User Interfaces regarding KDFs 3.1.1.3. Tips for User Interfaces Regarding KDFs
This section provides suggested representations for the KDFs in This section provides suggested representations for the KDFs in
implementation user interfaces. Following these guidelines across implementation user interfaces (UIs). Following these guidelines
common implementations will make interoperability easier and simpler across common implementations will make interoperability easier and
for deployers. simpler for deployers.
UIs SHOULD refer to the choice of KDF_HMAC_SHA1 as simply "SHA1". UIs SHOULD refer to the choice of KDF_HMAC_SHA1 as simply "SHA1".
UIs SHOULD refer to the choice of KDF_AES_128_CMAC as simply UIs SHOULD refer to the choice of KDF_AES_128_CMAC as simply
"AES128". "AES128".
The initial IANA registry values will reflect these two entries. The initial IANA registry values reflect these two entries.
UIs SHOULD use KDF_HMAC_SHA1 as the default selection in TCP-AO UIs SHOULD use KDF_HMAC_SHA1 as the default selection in TCP-AO
settings. KDF_HMAC_SHA1 is preferred at this time because it has settings. KDF_HMAC_SHA1 is preferred at this time because it has
wide support, being present in most implementations in the wide support, being present in most implementations in the
marketplace. marketplace.
3.2. MAC Algorithms 3.2. MAC Algorithms
Each MAC_alg defined for TCP-AO has three fixed elements as part of Each MAC_alg defined for TCP-AO has three fixed elements as part of
its definition: its definition:
- KDF_Alg: Name of the TCP-AO KDF algorithm used to generate the - KDF_Alg: Name of the TCP-AO KDF algorithm used to generate the
Traffic_Key Traffic_Key.
- Key_Length: Length in bits required for the Traffic_Key used in
this MAC - Key_Length: Length, in bits, required for the Traffic_Key used in
this MAC.
- MAC_Length: The final length of the bits used in the TCP-AO MAC - MAC_Length: The final length of the bits used in the TCP-AO MAC
field. This value may be a truncation of the MAC field. This value may be a truncation of the MAC
function's original output length. function's original output length.
MACs computed for TCP-AO have the following interface: MACs computed for TCP-AO have the following interface:
MAC = MAC_alg(Traffic_Key, Message) MAC = MAC_alg(Traffic_Key, Message)
where: where:
- MAC_alg: MAC Algorithm used - MAC_alg: MAC Algorithm used.
- Traffic_Key: Variable; the result of KDF. - Traffic_Key: Variable; the result of KDF.
- Message The message to be authenticated, as specified in - Message The message to be authenticated, as specified in
[I-D.ietf-tcpm-tcp-auth-opt] Section 7.1. [RFC5925], Section 5.1.
This document specifies two MAC algorithm options for generating the This document specifies two MAC algorithm options for generating the
MAC as used by TCP-AO: MAC as used by TCP-AO:
* HMAC-SHA-1-96 based on [RFC2104] and [FIPS-180-3]. * HMAC-SHA-1-96 based on [RFC2104] and [FIPS-180-3].
* AES-128-CMAC-96 based on [NIST-SP800-38B][FIPS197] * AES-128-CMAC-96 based on [NIST-SP800-38B][FIPS197]
Both provide a high level of security and efficiency. The AES-128- Both provide a high level of security and efficiency. The AES-128-
CMAC-96 is potentially more efficient, particularly in hardware, but CMAC-96 is potentially more efficient, particularly in hardware, but
HMAC-SHA-1-96 is more widely used in Internet protocols and in most HMAC-SHA-1-96 is more widely used in Internet protocols and in most
cases could be supported with little or no additional code in today's cases could be supported with little or no additional code in today's
deployed software and devices. deployed software and devices.
An important aspect to note about these algorithms' definitions for An important aspect to note about these algorithms' definitions for
use in TCP-AO is the fact that the MAC outputs are truncated to 96 use in TCP-AO is the fact that the MAC outputs are truncated to 96
bits. AES-128-CMAC-96 produces a 128 bit MAC, and HMAC SHA-1 bits. AES-128-CMAC-96 produces a 128-bit MAC, and HMAC SHA-1
produces a 160 bit result. The MAC output are then truncated to 96 produces a 160-bit result. The MAC output is then truncated to 96
bits to provide a reasonable tradeoff between security and message bits to provide a reasonable trade-off between security and message
size, for fitting into the TCP-AO option field. size, for fitting into the TCP-AO option field.
3.2.1. The Use of HMAC-SHA-1-96 3.2.1. The Use of HMAC-SHA-1-96
By definition, HMAC [RFC2104] requires a cryptographic hash function. By definition, HMAC [RFC2104] requires a cryptographic hash function.
SHA1 will be that hash function used for authenticating and providing SHA1 will be that hash function used for authenticating and providing
integrity validation on TCP segments with HMAC. integrity validation on TCP segments with HMAC.
The three fixed elements for HMAC-SHA-1-96 are: The three fixed elements for HMAC-SHA-1-96 are:
skipping to change at page 11, line 29 skipping to change at page 10, line 34
3.2.1. The Use of HMAC-SHA-1-96 3.2.1. The Use of HMAC-SHA-1-96
By definition, HMAC [RFC2104] requires a cryptographic hash function. By definition, HMAC [RFC2104] requires a cryptographic hash function.
SHA1 will be that hash function used for authenticating and providing SHA1 will be that hash function used for authenticating and providing
integrity validation on TCP segments with HMAC. integrity validation on TCP segments with HMAC.
The three fixed elements for HMAC-SHA-1-96 are: The three fixed elements for HMAC-SHA-1-96 are:
- KDF_Alg: KDF_HMAC_SHA1. - KDF_Alg: KDF_HMAC_SHA1.
- Key_Length: 160 bits. - Key_Length: 160 bits.
- MAC_Length: 96 bits. - MAC_Length: 96 bits.
For: For:
MAC = MAC_alg (Traffic_Key, Message) MAC = MAC_alg (Traffic_Key, Message)
HMAC-SHA-1-96 for TCP-AO has the following values: HMAC-SHA-1-96 for TCP-AO has the following values:
- MAC_alg: HMAC-SHA1 - MAC_alg: HMAC-SHA1.
- Traffic_Key: Variable; the result of the KDF. - Traffic_Key: Variable; the result of the KDF.
- Message: The message to be authenticated, as specified in - Message: The message to be authenticated, as specified in
[I-D.ietf-tcpm-tcp-auth-opt] Section 7.1. [RFC5925], Section 5.1.
3.2.2. The Use of AES-128-CMAC-96 3.2.2. The Use of AES-128-CMAC-96
In the context of TCP-AO, when we say "AES-128-CMAC-96" we actually In the context of TCP-AO, when we say "AES-128-CMAC-96", we actually
define a usage of AES-128 as a cipher-based MAC according to define a usage of AES-128 as a cipher-based MAC according to
[NIST-SP800-38B]. [NIST-SP800-38B].
The three fixed elements for AES-128-CMAC-96 are: The three fixed elements for AES-128-CMAC-96 are:
- KDF_Alg: KDF_AES_128_CMAC. - KDF_Alg: KDF_AES_128_CMAC.
- Key_Length: 128 bits. - Key_Length: 128 bits.
- MAC_Length: 96 bits. - MAC_Length: 96 bits.
For: For:
MAC = MAC_alg (Traffic_Key, Message) MAC = MAC_alg (Traffic_Key, Message)
AES-128-CMAC-96 for TCP-AO has the following values: AES-128-CMAC-96 for TCP-AO has the following values:
- MAC_alg: AES-128-CMAC-96 [NIST-SP800-38B] - MAC_alg: AES-128-CMAC-96. [NIST-SP800-38B]
- Traffic_Key: Variable; the result of the KDF. - Traffic_Key: Variable; the result of the KDF.
- Message: The message to be authenticated, as specified in - Message: The message to be authenticated, as specified in
[I-D.ietf-tcpm-tcp-auth-opt] Section 7.1. [RFC5925], Section 5.1.
4. Security Considerations 4. Security Considerations
This document inherits all of the security considerations of the This document inherits all of the security considerations of the
TCP-AO, the AES-CMAC, and the HMAC-SHA-1 documents. TCP-AO [RFC5925], the AES-CMAC [RFC4493], and the HMAC-SHA-1
[RFC2104] documents.
The security of cryptography-based systems depends on both the The security of cryptography-based systems depends on both the
strength of the cryptographic algorithms chosen and the strength of strength of the cryptographic algorithms chosen and the strength of
the keys used with those algorithms. The security also depends on the keys used with those algorithms. The security also depends on
the engineering of the protocol used by the system to ensure that the engineering of the protocol used by the system to ensure that
there are no non-cryptographic ways to bypass the security of the there are no non-cryptographic ways to bypass the security of the
overall system. overall system.
Care should also be taken to ensure that the selected key is Care should also be taken to ensure that the selected key is
unpredictable, avoiding any keys known to be weak for the algorithm unpredictable, avoiding any keys known to be weak for the algorithm
in use. [RFC4086] contains helpful information on both key in use. [RFC4086] contains helpful information on both key
generation techniques and cryptographic randomness. generation techniques and cryptographic randomness.
Note that in the composition of KDF_AES_128_CMAC, the PRF needs a 128 Note that in the composition of KDF_AES_128_CMAC, the PRF needs a
bit / 16 byte key as the seed. However, for convenience to the 128-bit / 16-byte key as the seed. However, for convenience to the
administrators/deployers, we did not want to force them to enter a 16 administrators/deployers, we did not want to force them to enter a
byte Master_Key. So we specified the sub-key routine that could 16-byte Master_Key. So we specified the sub-key routine that could
handle a variable length Master_Key, one that might be less than 16 handle a variable length Master_Key, one that might be less than 16
bytes. This does NOT mean that administrators are safe to use weak bytes. This does NOT mean that it is safe for administrators to use
keys. Administrators are encouraged to follow [RFC4086] as listed weak keys. Administrators are encouraged to follow [RFC4086] as
above. We simply attempted to "put a fence around foolishness", in listed above. We simply attempted to "put a fence around
as much as possible. foolishness", as much as possible.
This document concerns itself with the selection of cryptographic This document concerns itself with the selection of cryptographic
algorithms for the use of TCP-AO. The algorithms identified in this algorithms for the use of TCP-AO. The algorithms identified in this
document as "MUST implement" are not known to be broken at the document as "MUST implement" are not known to be broken at the
current time, and cryptographic research so far leads us to believe current time, and cryptographic research so far leads us to believe
that they will likely remain secure into the foreseeable future. that they will likely remain secure into the foreseeable future.
Some of the algorithms may be found in the future to have properties Some of the algorithms may be found in the future to have properties
significantly weaker than those that were believed at the time this significantly weaker than those that were believed at the time this
document was produced. Expect that new revisions of this document document was produced. Expect that new revisions of this document
will be issued from time to time. Be sure to search for more recent will be issued from time to time. Be sure to search for more recent
skipping to change at page 13, line 27 skipping to change at page 12, line 33
Two MAC algorithms and two corresponding KDFs are mandated as a Two MAC algorithms and two corresponding KDFs are mandated as a
result of discussion in the TCPM WG, and in consultation with the result of discussion in the TCPM WG, and in consultation with the
Security Area Directors. SHA-1 was selected because it is widely Security Area Directors. SHA-1 was selected because it is widely
deployed and currently has sufficient strength and reasonable deployed and currently has sufficient strength and reasonable
computational cost, so it is a "MUST" for TCP-AO today. The security computational cost, so it is a "MUST" for TCP-AO today. The security
strength of SHA-1 HMACs should be sufficient for the foreseeable strength of SHA-1 HMACs should be sufficient for the foreseeable
future, especially given that the tags are truncated to 96 bits. future, especially given that the tags are truncated to 96 bits.
Recently exposed vulnerabilities in other MACs (e.g., MD5 or HMAC Recently exposed vulnerabilities in other MACs (e.g., MD5 or HMAC
MD5) aren't practical on SHA-1, but these types of analyses are MD5) aren't practical on HMAC-SHA-1, but these types of analyses are
mounting and could potentially pose a concern for HMAC forgery if mounting and could potentially pose a concern for HMAC forgery if
they were significantly improved, over time. The security issues they were significantly improved, over time. The security issues
driving the migration from SHA-1 to SHA-256 for digital signatures driving the migration from SHA-1 to SHA-256 for digital signatures
[HMAC-ATTACK] do not immediately render SHA-1 weak for this [HMAC-ATTACK] do not immediately render SHA-1 weak for this
application of SHA-1 in HMAC mode. application of SHA-1 in HMAC mode.
AES-128 CMAC is considered to be a stronger algorithm than SHA-1, but AES-128 CMAC is considered to be a stronger algorithm than SHA-1, but
may not yet have very wide implementation. AES-128 CMAC is also a may not yet have very wide implementation. AES-128 CMAC is also a
"MUST" to implement, in order to drive vendors toward its use, and to "MUST" to implement, in order to drive vendors toward its use, and to
allow for another MAC option, if SHA-1 were to be compromised. allow for another MAC option, if SHA-1 were to be compromised.
5. IANA Considerations 5. IANA Considerations
Upon approval of this document, IANA will create the following IANA has created the following registry (http://www.iana.org).
registry at http://www.iana.org/assignments/TBD
Registry Name: Cryptographic Algorithms for TCP-AO Registration Registry Name: Cryptographic Algorithms for TCP-AO Registration
Procedure: RFC Publication after Expert Review Procedure: RFC Publication after Expert Review
Initial contents of this registry will be: Initial contents of this registry are:
Algorithm | Reference
----------------|-----------
SHA1 | [RFC-tcpm-tcp-ao-crypto]
AES128 | [RFC-tcpm-tcp-ao-crypto] Algorithm | Reference
----------------|-----------
SHA1 | [RFC5926]
AES128 | [RFC5926]
6. Acknowledgements 6. Acknowledgements
Eric "EKR" Rescorla, who provided a ton of input and feedback, Eric "EKR" Rescorla, who provided a ton of input and feedback,
including a somewhat heavy re-write of section 3.1.x, earning him an including a somewhat heavy re-write of Section 3.1.x, earning him an
author slot on the document. author slot on the document.
Paul Hoffman, from whose [RFC4308] I sometimes copied, to quickly Paul Hoffman, from whose [RFC4308] I sometimes copied, to quickly
create a first draft here. create a first version here.
Tim Polk, whose email summarizing SAAG's guidance to TCPM on the two Tim Polk, whose email summarizing SAAG's guidance to TCPM on the two
hash algorithms for TCP-AO is largely cut and pasted into various hash algorithms for TCP-AO is largely cut-and-pasted into various
sections of this document. sections of this document.
Jeff Schiller, Donald Eastlake and the IPsec WG, whose [RFC4307] & Jeff Schiller, Donald Eastlake, and the IPsec WG, whose [RFC4307] &
[RFC4835] text was consulted and sometimes used in the Requirements [RFC4835] text was consulted and sometimes used in the Requirements
Section 2 section of this document. Section 2 of this document.
(In other words, I was truly only an editor of others' text in (In other words, I was truly only an editor of others' text in
creating this document.) creating this document.)
Eric "EKR" Rescorla and Brian Weis, who brought to clarity the issues Eric "EKR" Rescorla and Brian Weis, who brought to clarity the issues
with the inputs to PRFs for the KDFs. EKR was also of great with the inputs to PRFs for the KDFs. EKR was also of great
assistance in how to structure the text, as well as helping to guide assistance in how to structure the text, as well as helping to guide
good cryptographic decisions. good cryptographic decisions.
The TCPM working group, who put up with all us crypto and routing The TCPM working group, who put up with all us crypto and routing
folks DoS'ing their WG for 2 years, and who provided reviews of this folks DoS'ing their WG for 2 years, and who provided reviews of this
document. document.
7. References 7. References
7.1. Normative References 7.1. Normative References
[FIPS-180-3] [FIPS-180-3] FIPS Publication 180-3, "Secured Hash Standard",
FIPS Publication 180-3, "Secured Hash Standard", FIPS 180-3, October 2008.
FIPS 180-3, October 2008.
[FIPS197] FIPS Publications 197, "Advanced Encryption Standard
(AES)", FIPS 197, November 2001.
[I-D.ietf-tcpm-tcp-auth-opt] [FIPS197] FIPS Publications 197, "Advanced Encryption Standard
Touch, J., Mankin, A., and R. Bonica, "The TCP (AES)", FIPS 197, November 2001.
Authentication Option", draft-ietf-tcpm-tcp-auth-opt-11
(work in progress), March 2010.
[NIST-SP800-108] [NIST-SP800-108]
National Institute of Standards and Technology, National Institute of Standards and Technology,
"Recommendation for Key Derivation Using Pseudorandom "Recommendation for Key Derivation Using Pseudorandom
Functions, NIST SP800-108", SP 800-108, October 2009. Functions, NIST SP800-108", SP 800- 108, October 2009.
[NIST-SP800-38B] [NIST-SP800-38B]
National Institute of Standards and Technology, National Institute of Standards and Technology,
"Recommendation for Block Cipher Modes of Operation: The "Recommendation for Block Cipher Modes of Operation:
CMAC Mode for Authentication", SP 800-38B, May 2005. The CMAC Mode for Authentication", SP 800-38B,
May 2005.
[RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC:
Hashing for Message Authentication", RFC 2104, Keyed-Hashing for Message Authentication", RFC 2104,
February 1997. February 1997.
[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, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC4493] Song, JH., Poovendran, R., Lee, J., and T. Iwata, "The
AES-CMAC Algorithm", RFC 4493, June 2006.
[RFC5925] Touch, J., Mankin, A., and R. Bonica, "The TCP
Authentication Option", RFC 5925, June 2010.
7.2. Informative References 7.2. Informative References
[HMAC-ATTACK] [HMAC-ATTACK] "On the Security of HMAC and NMAC Based on HAVAL, MD4,
"On the Security of HMAC and NMAC Based on HAVAL, MD4, MD5, SHA-0 and SHA-1", <http://
MD5, SHA-0 and SHA-1"", 2006, www.springerlink.com/content/00w4v62651001303> , 2006,
<http://eprint.iacr.org/2006/187 <http://eprint.iacr.org/2006/187>.
http://www.springerlink.com/content/00w4v62651001303>.
[RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness [RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness
Requirements for Security", BCP 106, RFC 4086, June 2005. Requirements for Security", BCP 106, RFC 4086,
June 2005.
[RFC4307] Schiller, J., "Cryptographic Algorithms for Use in the [RFC4307] Schiller, J., "Cryptographic Algorithms for Use in the
Internet Key Exchange Version 2 (IKEv2)", RFC 4307, Internet Key Exchange Version 2 (IKEv2)", RFC 4307,
December 2005. December 2005.
[RFC4308] Hoffman, P., "Cryptographic Suites for IPsec", RFC 4308, [RFC4308] Hoffman, P., "Cryptographic Suites for IPsec",
December 2005. RFC 4308, December 2005.
[RFC4615] Song, J., Poovendran, R., Lee, J., and T. Iwata, "The [RFC4615] Song, J., Poovendran, R., Lee, J., and T. Iwata, "The
Advanced Encryption Standard-Cipher-based Message Advanced Encryption Standard-Cipher-based Message
Authentication Code-Pseudo-Random Function-128 (AES-CMAC- Authentication Code-Pseudo-Random Function-128
PRF-128) Algorithm for the Internet Key Exchange Protocol (AES-CMAC-PRF-128) Algorithm for the Internet Key
(IKE)", RFC 4615, August 2006. Exchange Protocol (IKE)", RFC 4615, August 2006.
[RFC4835] Manral, V., "Cryptographic Algorithm Implementation [RFC4835] Manral, V., "Cryptographic Algorithm Implementation
Requirements for Encapsulating Security Payload (ESP) and Requirements for Encapsulating Security Payload (ESP)
Authentication Header (AH)", RFC 4835, April 2007. and Authentication Header (AH)", RFC 4835, April 2007.
Authors' Addresses Authors' Addresses
Gregory Lebovitz Gregory Lebovitz
Juniper Networks, Inc. Juniper Networks, Inc.
1194 North Mathilda Ave. 1194 North Mathilda Ave.
Sunnyvale, CA 94089-1206 Sunnyvale, CA 94089-1206
US US
Phone: Phone:
Email: gregory.ietf@gmail.com EMail: gregory.ietf@gmail.com
Eric Rescorla Eric Rescorla
RTFM, Inc. RTFM, Inc.
2064 Edgewood Drive 2064 Edgewood Drive
Palo Alto, CA 94303 Palo Alto, CA 94303
US US
Phone: 650-678-2350 Phone: 650-678-2350
Email: ekr@rtfm.com EMail: ekr@rtfm.com
 End of changes. 85 change blocks. 
184 lines changed or deleted 195 lines changed or added

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