draft-ietf-kitten-aes-cts-hmac-sha2-10.txt   draft-ietf-kitten-aes-cts-hmac-sha2-11.txt 
Network Working Group M. Jenkins Network Working Group M. Jenkins
Internet Draft National Security Agency Internet Draft National Security Agency
Intended Status: Informational M. Peck Intended Status: Informational M. Peck
Expires: January 6, 2017 The MITRE Corporation Expires: February 27, 2017 The MITRE Corporation
K. Burgin K. Burgin
July 5, 2016 August 26, 2016
AES Encryption with HMAC-SHA2 for Kerberos 5 AES Encryption with HMAC-SHA2 for Kerberos 5
draft-ietf-kitten-aes-cts-hmac-sha2-10 draft-ietf-kitten-aes-cts-hmac-sha2-11
Abstract Abstract
This document specifies two encryption types and two corresponding This document specifies two encryption types and two corresponding
checksum types for Kerberos 5. The new types use AES in CTS mode checksum types for Kerberos 5. The new types use AES in CTS mode
(CBC mode with ciphertext stealing) for confidentiality and HMAC with (CBC mode with ciphertext stealing) for confidentiality and HMAC with
a SHA-2 hash for integrity. a SHA-2 hash for integrity.
Status of this Memo Status of this Memo
skipping to change at page 1, line 35 skipping to change at page 1, line 35
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 http://datatracker.ietf.org/drafts/current/. Drafts is at http://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 January 6, 2017. This Internet-Draft will expire on February 27, 2017.
Copyright and License Notice Copyright and License Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2016 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
skipping to change at page 2, line 10 skipping to change at page 2, line 10
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 Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Protocol Key Representation . . . . . . . . . . . . . . . . . 3 2. Protocol Key Representation . . . . . . . . . . . . . . . . . 3
3. Key Derivation Function . . . . . . . . . . . . . . . . . . . 3 3. Key Derivation Function . . . . . . . . . . . . . . . . . . . 3
4. Key Generation from Pass Phrases . . . . . . . . . . . . . . . 4 4. Key Generation from Pass Phrases . . . . . . . . . . . . . . . 5
5. Kerberos Algorithm Protocol Parameters . . . . . . . . . . . . 5 5. Kerberos Algorithm Protocol Parameters . . . . . . . . . . . . 5
6. Checksum Parameters . . . . . . . . . . . . . . . . . . . . . 7 6. Checksum Parameters . . . . . . . . . . . . . . . . . . . . . 8
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
8. Security Considerations . . . . . . . . . . . . . . . . . . . 8 8. Security Considerations . . . . . . . . . . . . . . . . . . . 8
8.1. Random Values in Salt Strings . . . . . . . . . . . . . . 9 8.1. Random Values in Salt Strings . . . . . . . . . . . . . . 9
8.2. Algorithm Rationale . . . . . . . . . . . . . . . . . . . 9 8.2. Algorithm Rationale . . . . . . . . . . . . . . . . . . . 9
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 9 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 10
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 10
10.1. Normative References . . . . . . . . . . . . . . . . . . 10 10.1. Normative References . . . . . . . . . . . . . . . . . . 10
10.2. Informative References . . . . . . . . . . . . . . . . . 10 10.2. Informative References . . . . . . . . . . . . . . . . . 10
Appendix A. Test Vectors . . . . . . . . . . . . . . . . . . . . 10 Appendix A. Test Vectors . . . . . . . . . . . . . . . . . . . . 11
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 17 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 18
1. Introduction 1. Introduction
This document defines two encryption types and two corresponding This document defines two encryption types and two corresponding
checksum types for Kerberos 5 using AES with 128-bit or 256-bit keys. checksum types for Kerberos 5 using AES with 128-bit or 256-bit keys.
To avoid ciphertext expansion, we use a variation of the CBC-CS3 mode To avoid ciphertext expansion, we use a variation of the CBC-CS3 mode
defined in [SP800-38A+], also referred to as ciphertext stealing or defined in [SP800-38A+], also referred to as ciphertext stealing or
CTS mode. The new types conform to the framework specified in CTS mode. The new types conform to the framework specified in
[RFC3961], but do not use the simplified profile. [RFC3961], but do not use the simplified profile, as the simplified
profile is not compliant with modern cryptographic best practices
such as calculating MACs over ciphertext rather than plaintext.
The encryption and checksum types defined in this document are The encryption and checksum types defined in this document are
intended to support environments that desire to use SHA-256 or SHA- intended to support environments that desire to use SHA-256 or SHA-
384 (defined in [FIPS180]) as the hash algorithm. Differences 384 (defined in [FIPS180]) as the hash algorithm. Differences
between the encryption and checksum types defined in this document between the encryption and checksum types defined in this document
and the pre-existing Kerberos AES encryption and checksum types and the pre-existing Kerberos AES encryption and checksum types
specified in [RFC3962] are: specified in [RFC3962] are:
* The pseudorandom function used by PBKDF2 is HMAC-SHA-256 or HMAC- * The pseudorandom function used by PBKDF2 is HMAC-SHA-256 or HMAC-
SHA-384 (HMAC is defined in [RFC2104]). SHA-384 (HMAC is defined in [RFC2104]).
skipping to change at page 4, line 12 skipping to change at page 4, line 14
where the value of K1 is computed as below. where the value of K1 is computed as below.
key: The source of entropy from which subsequent keys are derived key: The source of entropy from which subsequent keys are derived
(this is known as Ki in [SP800-108]). (this is known as Ki in [SP800-108]).
label: An octet string describing the intended usage of the derived label: An octet string describing the intended usage of the derived
key. key.
context: This parameter is optional. An octet string containing the context: This parameter is optional. An octet string containing the
information related to the derived keying material. It may include information related to the derived keying material. This
identities of parties who are deriving and/or using the derived key specification does not dictate a specific format for the context
material and, optionally, a nonce known by the parties who derive the field. The context field is only used by the pseudo-random function
keys. defined in section 5, where it is set to the pseudo-random function's
octet-string input parameter. The content of the octet-string input
parameter is defined by the application that uses it.
k: Length in bits of the key to be outputted, expressed in big-endian k: Length in bits of the key to be outputted, expressed in big-endian
binary representation in 4 bytes (this is called L in [SP800-108]). binary representation in 4 bytes (this is called L in [SP800-108]).
Specifically, k=128 is represented as 0x00000080, 192 as 0x000000C0, Specifically, k=128 is represented as 0x00000080, 192 as 0x000000C0,
256 as 0x00000100, and 384 as 0x00000180. 256 as 0x00000100, and 384 as 0x00000180.
When the encryption type is aes128-cts-hmac-sha256-128, k must be no When the encryption type is aes128-cts-hmac-sha256-128, k must be no
greater than 256. When the encryption type is aes256-cts-hmac-sha384- greater than 256 bits. When the encryption type is aes256-cts-hmac-
192, k must be no greater than 384. sha384-192, k must be no greater than 384 bits.
The k-truncate function is defined in [RFC3961], Section 5.1. It The k-truncate function is defined in [RFC3961], Section 5.1. It
returns the 'k' leftmost bits of the bitstring input. returns the 'k' leftmost bits of the bitstring input.
In all computations in this document, | indicates concatenation. In all computations in this document, | indicates concatenation.
When the encryption type is aes128-cts-hmac-sha256-128, then K1 is When the encryption type is aes128-cts-hmac-sha256-128, then K1 is
computed as follows: computed as follows:
If the context parameter is not present: If the context parameter is not present:
skipping to change at page 5, line 39 skipping to change at page 5, line 45
is "aes128-cts-hmac-sha256-128" and HMAC-SHA-384 when the enctype is is "aes128-cts-hmac-sha256-128" and HMAC-SHA-384 when the enctype is
"aes256-cts-hmac-sha384-192", the value for keylength is the AES key "aes256-cts-hmac-sha384-192", the value for keylength is the AES key
length (128 or 256 bits), and the algorithm KDF-HMAC-SHA2 is defined length (128 or 256 bits), and the algorithm KDF-HMAC-SHA2 is defined
in Section 3. in Section 3.
5. Kerberos Algorithm Protocol Parameters 5. Kerberos Algorithm Protocol Parameters
The RFC 3961 cipher state that maintains cryptographic state across The RFC 3961 cipher state that maintains cryptographic state across
different encryption operations using the same key is used as the different encryption operations using the same key is used as the
formal initialization vector (IV) input into CBC-CS3. The plaintext formal initialization vector (IV) input into CBC-CS3. The plaintext
is prepended with a 16-octet random nonce generated by the message is prepended with a 16-octet random value generated by the message
originator, known as a confounder. originator, known as a confounder.
The ciphertext is a concatenation of the output of AES in CBC-CS3 The ciphertext is a concatenation of the output of AES in CBC-CS3
mode and the HMAC of the cipher state concatenated with the AES mode and the HMAC of the cipher state concatenated with the AES
output. The HMAC is computed using either SHA-256 or SHA-384 output. The HMAC is computed using either SHA-256 or SHA-384
depending on the encryption type. The output of HMAC-SHA-256 is depending on the encryption type. The output of HMAC-SHA-256 is
truncated to 128 bits and the output of HMAC-SHA-384 is truncated to truncated to 128 bits and the output of HMAC-SHA-384 is truncated to
192 bits. Sample test vectors are given in Appendix A. 192 bits. Sample test vectors are given in Appendix A.
Decryption is performed by removing the HMAC, verifying the HMAC Decryption is performed by removing the HMAC, verifying the HMAC
skipping to change at page 6, line 30 skipping to change at page 6, line 35
Ki: the integrity key, inputted into HMAC to provide authenticated Ki: the integrity key, inputted into HMAC to provide authenticated
encryption as defined in "encryption function" and "decryption encryption as defined in "encryption function" and "decryption
function" below. function" below.
required checksum mechanism: as defined in Section 6. required checksum mechanism: as defined in Section 6.
key-generation seed length: key size (128 or 256 bits). key-generation seed length: key size (128 or 256 bits).
string-to-key function: as defined in Section 4. string-to-key function: as defined in Section 4.
default string-to-key parameters: decimal 32768. default string-to-key parameters: iteration count of decimal 32768.
random-to-key function: identity function. random-to-key function: identity function.
key-derivation function: KDF-HMAC-SHA2 as defined in Section 3. The key-derivation function: KDF-HMAC-SHA2 as defined in Section 3. The
key usage number is expressed as four octets in big-endian order. key usage number is expressed as four octets in big-endian order.
If the enctype is aes128-cts-hmac-sha256-128: If the enctype is aes128-cts-hmac-sha256-128:
Kc = KDF-HMAC-SHA2(base-key, usage | 0x99, 128) Kc = KDF-HMAC-SHA2(base-key, usage | 0x99, 128)
Ke = KDF-HMAC-SHA2(base-key, usage | 0xAA, 128) Ke = KDF-HMAC-SHA2(base-key, usage | 0xAA, 128)
Ki = KDF-HMAC-SHA2(base-key, usage | 0x55, 128) Ki = KDF-HMAC-SHA2(base-key, usage | 0x55, 128)
skipping to change at page 7, line 9 skipping to change at page 7, line 14
cipher state: a 128-bit CBC initialization vector derived from a cipher state: a 128-bit CBC initialization vector derived from a
previous (if any) ciphertext using the same encryption key, as previous (if any) ciphertext using the same encryption key, as
specified below. specified below.
initial cipher state: all bits zero. initial cipher state: all bits zero.
encryption function: as follows, where E() is AES encryption in encryption function: as follows, where E() is AES encryption in
CBC-CS3 mode, and h is the size of truncated HMAC (128 bits or CBC-CS3 mode, and h is the size of truncated HMAC (128 bits or
192 bits as described above). 192 bits as described above).
N = random nonce of length 128 bits (the AES block size) N = random value of length 128 bits (the AES block size)
IV = cipher state IV = cipher state
C = E(Ke, N | plaintext, IV) C = E(Ke, N | plaintext, IV)
H = HMAC(Ki, IV | C) H = HMAC(Ki, IV | C)
ciphertext = C | H[1..h] ciphertext = C | H[1..h]
Steps to compute the 128-bit cipher state: Steps to compute the 128-bit cipher state:
L = length of C in bits L = length of C in bits
portion C into 128-bit blocks, placing any remainder portion C into 128-bit blocks, placing any remainder
of less than 128 bits into a final block of less than 128 bits into a final block
if L == 128: cipher state = C if L == 128: cipher state = C
skipping to change at page 9, line 5 skipping to change at page 9, line 11
values. The use of inadequate pseudo-random number generators values. The use of inadequate pseudo-random number generators
(PRNGs) can result in little or no security. The generation of (PRNGs) can result in little or no security. The generation of
quality random numbers is difficult. [RFC4086] offers random number quality random numbers is difficult. [RFC4086] offers random number
generation guidance. generation guidance.
This document specifies a mechanism for generating keys from This document specifies a mechanism for generating keys from
passphrases or passwords. The use of PBKDF2, a salt, and a large passphrases or passwords. The use of PBKDF2, a salt, and a large
iteration count adds some resistance to off-line dictionary attacks iteration count adds some resistance to off-line dictionary attacks
by passive eavesdroppers. Salting prevents rainbow table attacks, by passive eavesdroppers. Salting prevents rainbow table attacks,
while large iteration counts slow password guess attempts. while large iteration counts slow password guess attempts.
Nonetheless, it is important to choose strong passphrases. Use of Nonetheless, computing power continues to rapidly improve, including
other Kerberos extensions that protect against off-line dictionary the potential for use of graphics processing units (GPUs) in password
attacks should also be considered. guess attempts. It is important to choose strong passphrases. Use of
Kerberos extensions that protect against off-line dictionary attacks
should also be considered, as should the use of public key
cryptography for initial Kerberos authentication [RFC4556] to
eliminate the use of passwords or passphrases within the Kerberos
protocol.
The NIST guidance in section 5.3 of [SP800-38A], requiring that CBC The NIST guidance in section 5.3 of [SP800-38A], requiring that CBC
initialization vectors be unpredictable, is satisfied by the use of a initialization vectors be unpredictable, is satisfied by the use of a
random confounder as the first block of plaintext. The confounder random confounder as the first block of plaintext. The confounder
fills the cryptographic role typically played by an initialization fills the cryptographic role typically played by an initialization
vector. This approach was chosen to align with other Kerberos vector. This approach was chosen to align with other Kerberos
cryptosystem approaches. cryptosystem approaches.
8.1. Random Values in Salt Strings 8.1. Random Values in Salt Strings
NIST guidance in Section 5.1 of [SP800-132] requires at least 128 NIST guidance in Section 5.1 of [SP800-132] requires at least 128
bits of the salt to be randomly generated. The string-to-key function bits of the salt to be randomly generated. The string-to-key function
as defined in [RFC3961] requires the salt to be valid UTF-8 strings. as defined in [RFC3961] requires the salt to be valid UTF-8 strings
Not every 128-bit random string will be valid UTF-8, so a UTF-8 [RFC3629]. Not every 128-bit random string will be valid UTF-8, so a
compatible encoding would be needed to encapsulate the random bits. UTF-8 compatible encoding would be needed to encapsulate the random
However, using a salt containing a random portion may have the bits. However, using a salt containing a random portion may have the
following issues with some implementations: following issues with some implementations:
* Cross-realm krbtgt keys are typically managed by entering the * Cross-realm krbtgt keys are typically managed by entering the
same password at two KDCs to get the same keys. If each KDC uses same password at two KDCs to get the same keys. If each KDC uses
a random salt, they won't have the same keys. a random salt, they won't have the same keys.
* Random salts may interfere with password history checking. * Random salts may interfere with password history checking.
8.2. Algorithm Rationale 8.2. Algorithm Rationale
skipping to change at page 10, line 4 skipping to change at page 10, line 14
enc-type name "aes256-cts-hmac-sha384-192", the truncation of the enc-type name "aes256-cts-hmac-sha384-192", the truncation of the
HMAC-SHA-384 output to 192-bits results in an overall 192-bit level HMAC-SHA-384 output to 192-bits results in an overall 192-bit level
of security. of security.
9. Acknowledgements 9. Acknowledgements
Kelley Burgin was employed at the National Security Agency during Kelley Burgin was employed at the National Security Agency during
much of the work on this document. much of the work on this document.
10. References 10. References
10.1. Normative References 10.1. Normative References
[RFC2104] Krawczyk, H. et al., "HMAC: Keyed-Hashing for Message [RFC2104] Krawczyk, H. et al., "HMAC: Keyed-Hashing for Message
Authentication", RFC 2104, February 1997. Authentication", RFC 2104, February 1997.
[RFC2898] Kaliski, B., "PKCS #5: Password-Based Cryptography [RFC2898] Kaliski, B., "PKCS #5: Password-Based Cryptography
Specification Version 2.0", RFC 2898, September 2000. Specification Version 2.0", RFC 2898, September 2000.
[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
10646", RFC 3629, November 2003.
[RFC3961] Raeburn, K., "Encryption and Checksum Specifications for [RFC3961] Raeburn, K., "Encryption and Checksum Specifications for
Kerberos 5", RFC 3961, February 2005. Kerberos 5", RFC 3961, February 2005.
[RFC3962] Raeburn, K., "Advanced Encryption Standard (AES) [RFC3962] Raeburn, K., "Advanced Encryption Standard (AES)
Encryption for Kerberos 5", RFC 3962, February 2005. Encryption for Kerberos 5", RFC 3962, February 2005.
[FIPS180] National Institute of Standards and Technology, "Secure [FIPS180] National Institute of Standards and Technology, "Secure
Hash Standard", FIPS PUB 180-4, August 2015. Hash Standard", FIPS PUB 180-4, August 2015.
[FIPS197] National Institute of Standards and Technology, [FIPS197] National Institute of Standards and Technology,
 End of changes. 18 change blocks. 
27 lines changed or deleted 40 lines changed or added

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