PSK TLS GCM suites: Pre-Shared Key Cipher Suites for TLS with SHA-256/384 and AES Galois Counter Mode
Eighteen new TLS cipher suites that pair a pre-shared key with SHA-256/384 and AES in Galois Counter Mode.
Badra, M., "Pre-Shared Key Cipher Suites for TLS with SHA-256/384 and AES Galois Counter Mode", RFC 5487, DOI 10.17487/RFC5487, March 2009, <https://www.rfc-editor.org/info/rfc5487>.
@misc{rfc5487,
series = {Request for Comments},
number = 5487,
howpublished = {RFC 5487},
publisher = {RFC Editor},
doi = {10.17487/RFC5487},
url = {https://www.rfc-editor.org/info/rfc5487},
author = {M. Badra},
title = {{Pre-Shared Key Cipher Suites for TLS with SHA-256/384 and AES Galois Counter Mode}},
pagetotal = 7,
year = 2009,
month = mar,
} RFC text
Contents
Network Working Group M. Badra
Request for Comments: 5487 CNRS/LIMOS Laboratory
Category: Standards Track March 2009
Pre-Shared Key Cipher Suites for TLS with
SHA-256/384 and AES Galois Counter Mode
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (c) 2009 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents in effect on the date of
publication of this document (http://trustee.ietf.org/license-info).
Please review these documents carefully, as they describe your rights
and restrictions with respect to this document.
This document may contain material from IETF Documents or IETF
Contributions published or made publicly available before November
10, 2008. The person(s) controlling the copyright in some of this
material may not have granted the IETF Trust the right to allow
modifications of such material outside the IETF Standards Process.
Without obtaining an adequate license from the person(s) controlling
the copyright in such materials, this document may not be modified
outside the IETF Standards Process, and derivative works of it may
not be created outside the IETF Standards Process, except to format
it for publication as an RFC or to translate it into languages other
than English.
Abstract
RFC 4279 and RFC 4785 describe pre-shared key cipher suites for
Transport Layer Security (TLS). However, all those cipher suites use
SHA-1 in their Message Authentication Code (MAC) algorithm. This
document describes a set of pre-shared key cipher suites for TLS that
uses stronger digest algorithms (i.e., SHA-256 or SHA-384) and
another set that uses the Advanced Encryption Standard (AES) in
Galois Counter Mode (GCM).
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Applicability Statement . . . . . . . . . . . . . . . . . . 3
1.2. Conventions Used in This Document . . . . . . . . . . . . . 3
2. PSK, DHE_PSK, and RSA_PSK Key Exchange Algorithms with
AES-GCM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. PSK, DHE_PSK, and RSA_PSK Key Exchange with SHA-256/384 . . . . 4
3.1. PSK Key Exchange Algorithm with SHA-256/384 . . . . . . . . 4
3.2. DHE_PSK Key Exchange Algorithm with SHA-256/384 . . . . . . 5
3.3. RSA_PSK Key Exchange Algorithm with SHA-256/384 . . . . . . 5
4. Security Considerations . . . . . . . . . . . . . . . . . . . . 5
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5
6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 6
7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 6
7.1. Normative References . . . . . . . . . . . . . . . . . . . 6
7.2. Informative References . . . . . . . . . . . . . . . . . . 7
1. Introduction
The benefits of pre-shared symmetric-key vs. public-/private-key pair
based authentication for the key exchange in TLS have been explained
in the Introduction of [RFC4279]. This document leverages the
already defined algorithms for the application of newer, generally
regarded stronger, cryptographic primitives and building blocks.
TLS 1.2 [RFC5246] adds support for authenticated encryption with
additional data (AEAD) cipher modes [RFC5116]. This document
describes the use of Advanced Encryption Standard [AES] in Galois
Counter Mode [GCM] (AES-GCM) with various pre-shared key (PSK)
authenticated key exchange mechanisms ([RFC4279] and [RFC4785]) in
cipher suites for TLS.
This document also specifies PSK cipher suites for TLS that replace
SHA-1 by SHA-256 or SHA-384 [SHS]. RFC 4279 [RFC4279] and RFC 4785
[RFC4785] describe PSK cipher suites for TLS. However, all of the
RFC 4279 and the RFC 4785 cipher suites use HMAC-SHA1 as their MAC
algorithm. Due to recent analytic work on SHA-1 [Wang05], the IETF
is gradually moving away from SHA-1 and towards stronger hash
algorithms.
Related TLS cipher suites with key exchange algorithms that are
authenticated using public/private key pairs have recently been
specified:
o RSA-, DSS-, and Diffie-Hellman-based cipher suites in [RFC5288],
and
o ECC-based cipher suites with SHA-256/384 and AES-GCM in [RFC5289].
The reader is expected to become familiar with these two memos prior
to studying this document.
1.1. Applicability Statement
The cipher suites defined in Section 3 can be negotiated, whatever
the negotiated TLS version is.
The cipher suites defined in Section 2 can be negotiated in TLS
version 1.2 or higher.
The applicability statement in [RFC4279] applies to this document as
well.
1.2. Conventions Used in This Document
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. PSK, DHE_PSK, and RSA_PSK Key Exchange Algorithms with AES-GCM
The following six cipher suites use the new authenticated encryption
modes defined in TLS 1.2 with AES in Galois Counter Mode [GCM]. The
cipher suites with the DHE_PSK key exchange algorithm
(TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 and
TLS_DHE_PSK_WITH_AES_256_GCM_SHA348) provide Perfect Forward Secrecy
(PFS).
CipherSuite TLS_PSK_WITH_AES_128_GCM_SHA256 = {0x00,0xA8};
CipherSuite TLS_PSK_WITH_AES_256_GCM_SHA384 = {0x00,0xA9};
CipherSuite TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = {0x00,0xAA};
CipherSuite TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = {0x00,0xAB};
CipherSuite TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = {0x00,0xAC};
CipherSuite TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = {0x00,0xAD};
These cipher suites use authenticated encryption with additional data
(AEAD) algorithms, AEAD_AES_128_GCM and AEAD_AES_256_GCM, as
described in RFC 5116. GCM is used as described in [RFC5288].
The PSK, DHE_PSK, and RSA_PSK key exchanges are performed as defined
in [RFC4279].
The Pseudo-Random Function (PRF) algorithms SHALL be as follows:
o For cipher suites ending with _SHA256, the PRF is the TLS PRF
[RFC5246] with SHA-256 as the hash function.
o For cipher suites ending with _SHA384, the PRF is the TLS PRF
[RFC5246] with SHA-384 as the hash function.
Implementations MUST send a TLS Alert 'bad_record_mac' for all types
of failures encountered in processing the AES-GCM algorithm.
3. PSK, DHE_PSK, and RSA_PSK Key Exchange with SHA-256/384
The first two cipher suites described in each of the following three
sections use AES [AES] in Cipher Block Chaining (CBC) mode [MODES]
for data confidentiality, whereas the other two cipher suites do not
provide data confidentiality; all cipher suites provide integrity
protection and authentication using HMAC-based MACs.
3.1. PSK Key Exchange Algorithm with SHA-256/384
CipherSuite TLS_PSK_WITH_AES_128_CBC_SHA256 = {0x00,0xAE};
CipherSuite TLS_PSK_WITH_AES_256_CBC_SHA384 = {0x00,0xAF};
CipherSuite TLS_PSK_WITH_NULL_SHA256 = {0x00,0xB0};
CipherSuite TLS_PSK_WITH_NULL_SHA384 = {0x00,0xB1};
The above four cipher suites are the same as the corresponding cipher
suites in RFC 4279 and RFC 4785 (with names ending in "_SHA" in place
of "_SHA256" or "_SHA384"), except for the hash and PRF algorithms,
as explained below.
o For cipher suites with names ending in "_SHA256":
* The MAC is HMAC [RFC2104] with SHA-256 as the hash function.
* When negotiated in a version of TLS prior to 1.2, the PRF from
that version is used; otherwise, the PRF is the TLS PRF
[RFC5246] with SHA-256 as the hash function.
o For cipher suites with names ending in "_SHA384":
* The MAC is HMAC [RFC2104] with SHA-384 as the hash function.
* When negotiated in a version of TLS prior to 1.2, the PRF from
that version is used; otherwise, the PRF is the TLS PRF
[RFC5246] with SHA-384 as the hash function.
3.2. DHE_PSK Key Exchange Algorithm with SHA-256/384
CipherSuite TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = {0x00,0xB2};
CipherSuite TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = {0x00,0xB3};
CipherSuite TLS_DHE_PSK_WITH_NULL_SHA256 = {0x00,0xB4};
CipherSuite TLS_DHE_PSK_WITH_NULL_SHA384 = {0x00,0xB5};
The above four cipher suites are the same as the corresponding cipher
suites in RFC 4279 and RFC 4785 (with names ending in "_SHA" in place
of "_SHA256" or "_SHA384"), except for the hash and PRF algorithms,
as explained in Section 3.1.
3.3. RSA_PSK Key Exchange Algorithm with SHA-256/384
CipherSuite TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = {0x00,0xB6};
CipherSuite TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = {0x00,0xB7};
CipherSuite TLS_RSA_PSK_WITH_NULL_SHA256 = {0x00,0xB8};
CipherSuite TLS_RSA_PSK_WITH_NULL_SHA384 = {0x00,0xB9};
The above four cipher suites are the same as the corresponding cipher
suites in RFC 4279 and RFC 4785 (with names ending in "_SHA" in place
of "_SHA256" or "_SHA384"), except for the hash and PRF algorithms,
as explained in Section 3.1.
4. Security Considerations
The security considerations in [RFC4279], [RFC4785], and [RFC5288]
apply to this document as well. In particular, as authentication-
only cipher suites (with no encryption) defined here do not support
confidentiality, care should be taken not to send sensitive
information (such as passwords) over connections protected with one
of the cipher suites with NULL encryption defined in this document.
5. IANA Considerations
IANA has assigned the following values for the cipher suites defined
in this document:
CipherSuite TLS_PSK_WITH_AES_128_GCM_SHA256 = {0x00,0xA8};
CipherSuite TLS_PSK_WITH_AES_256_GCM_SHA384 = {0x00,0xA9};
CipherSuite TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = {0x00,0xAA};
CipherSuite TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = {0x00,0xAB};
CipherSuite TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = {0x00,0xAC};
CipherSuite TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = {0x00,0xAD};
CipherSuite TLS_PSK_WITH_AES_128_CBC_SHA256 = {0x00,0xAE};
CipherSuite TLS_PSK_WITH_AES_256_CBC_SHA384 = {0x00,0xAF};
CipherSuite TLS_PSK_WITH_NULL_SHA256 = {0x00,0xB0};
CipherSuite TLS_PSK_WITH_NULL_SHA384 = {0x00,0xB1};
CipherSuite TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = {0x00,0xB2};
CipherSuite TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = {0x00,0xB3};
CipherSuite TLS_DHE_PSK_WITH_NULL_SHA256 = {0x00,0xB4};
CipherSuite TLS_DHE_PSK_WITH_NULL_SHA384 = {0x00,0xB5};
CipherSuite TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = {0x00,0xB6};
CipherSuite TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = {0x00,0xB7};
CipherSuite TLS_RSA_PSK_WITH_NULL_SHA256 = {0x00,0xB8};
CipherSuite TLS_RSA_PSK_WITH_NULL_SHA384 = {0x00,0xB9};
6. Acknowledgments
This document borrows from [RFC5289]. The author appreciates Alfred
Hoenes for his detailed review and effort on resolving issues in
discussion. The author would like also to acknowledge Ibrahim
Hajjeh, Simon Josefsson, Hassnaa Moustafa, Joseph Salowey, and Pascal
Urien for their reviews of the content of the document.
7. References
7.1. Normative References
[AES] National Institute of Standards and Technology,
"Specification for the Advanced Encryption Standard
(AES)", FIPS 197, November 2001.
[GCM] National Institute of Standards and Technology,
"Recommendation for Block Cipher Modes of Operation:
Galois/Counter Mode (GCM) for Confidentiality and
Authentication", SP 800-38D, November 2007.
[MODES] National Institute of Standards and Technology,
"Recommendation for Block Cipher Modes of Operation -
Methods and Techniques", SP 800-38A, December 2001.
[RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-
Hashing for Message Authentication", RFC 2104,
February 1997.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC4279] Eronen, P. and H. Tschofenig, "Pre-Shared Key Ciphersuites
for Transport Layer Security (TLS)", RFC 4279,
December 2005.
[RFC4785] Blumenthal, U. and P. Goel, "Pre-Shared Key (PSK)
Ciphersuites with NULL Encryption for Transport Layer
Security (TLS)", RFC 4785, January 2007.
[RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated
Encryption", RFC 5116, January 2008.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, August 2008.
[RFC5288] Salowey, J., Choudhury, A., and D. McGrew, "AES Galois
Counter Mode (GCM) Cipher Suites for TLS", RFC 5288,
August 2008.
[SHS] National Institute of Standards and Technology, "Secure
Hash Standard", FIPS 180-2, August 2002.
7.2. Informative References
[RFC5289] Rescorla, E., "TLS Elliptic Curve Cipher Suites with SHA-
256/384 and AES Galois Counter Mode (GCM)", RFC 5289,
August 2008.
[Wang05] Wang, X., Yin, Y., and H. Yu, "Finding Collisions in the
Full SHA-1", CRYPTO 2005, August 2005.
Author's Address
Mohamad Badra
CNRS/LIMOS Laboratory
Campus de cezeaux, Bat. ISIMA
Aubiere 63170
France
EMail: badra@isima.fr
AI ELI5
On this page
§1Why New PSK Cipher Suites
A pre-shared key (PSK) cipher suite lets two TLS endpoints authenticate each other with a symmetric secret they already hold, instead of public/private key pairs. The benefits of that approach are explained in the introduction of RFC 4279; this document reuses those key exchanges and only upgrades the cryptographic building blocks.
Two things drive the upgrade. First, TLS 1.2 (RFC 5246) added support for authenticated encryption with additional data (AEAD) cipher modes from RFC 5116. Second, every cipher suite in RFC 4279 and RFC 4785 uses HMAC-SHA1 as its MAC, and, citing recent analytic work on SHA-1, the RFC says the IETF is gradually moving towards stronger hash algorithms.
The RFC points to two related documents for public-key suites, RFC 5288 and RFC 5289, and expects the reader to know them first.
The old locks used a hash that people had started to find weak spots in. This note brings in better locks that work with the same shared secret.
§1.1Where the Suites Can Be Used
The RFC splits its suites into two groups, and each group has its own version rule. The suites in Section 3 (the SHA-256/384 ones) can be negotiated whatever the negotiated TLS version is. The suites in Section 2 (the AES-GCM ones) can be negotiated in TLS version 1.2 or higher.
The applicability statement in RFC 4279 applies here as well.
The newest locks need the newest version of the lock-making rules. The other new locks work with any version.
§2The AES-GCM Suites
Six cipher suites use AES in Galois Counter Mode (AES-GCM), an AEAD mode, together with the PSK, DHE_PSK and RSA_PSK key exchanges. They use the AEAD algorithms AEAD_AES_128_GCM and AEAD_AES_256_GCM from RFC 5116, and GCM is used as described in RFC 5288. The key exchanges themselves are performed as defined in RFC 4279.
The two DHE_PSK suites provide Perfect Forward Secrecy (PFS). The Pseudo-Random Function (PRF) SHALL be the TLS PRF from RFC 5246 with SHA-256 for suites ending in _SHA256, and with SHA-384 for suites ending in _SHA384.
Implementations MUST send a TLS Alert bad_record_mac for all types of failures encountered while processing the AES-GCM algorithm.
These locks scramble the message and stamp it with a seal in one step. If anything goes wrong opening it, the receiver always shouts the same alarm word.
§3The SHA-256 and SHA-384 Suites
Twelve more suites, spread across the PSK, DHE_PSK and RSA_PSK key exchanges, copy the matching suites from RFC 4279 and RFC 4785 and change only the hash and PRF. Within each key exchange, the first two use AES in Cipher Block Chaining (CBC) mode for confidentiality (AES-128 with SHA-256, AES-256 with SHA-384). The other two use NULL encryption, so they give integrity protection and authentication but no confidentiality.
For names ending in _SHA256 or _SHA384, the MAC is HMAC (RFC 2104) with SHA-256 or SHA-384 as the hash. When negotiated in a TLS version before 1.2, the PRF of that version is used. Otherwise, the PRF is the TLS PRF with the same hash.
Only the PSK suites are spelled out in Section 3.1. The DHE_PSK and RSA_PSK sections say they work the same way, with the same hash and PRF changes.
These keep the old lock design but swap the stamp-maker for a stronger one. Some versions skip scrambling and only stamp the message.
§4Security Considerations
The security considerations of RFC 4279, RFC 4785 and RFC 5288 apply to this document too.
The authentication-only suites with NULL encryption do not support confidentiality. Care should be taken not to send sensitive information, such as passwords, over connections protected with one of them.
Some of these locks only prove who sent the message and do not hide it. Never put a secret in a message that is not hidden.
§5IANA Registrations
IANA assigned a two-byte value to each of the eighteen suites, all starting with 0x00. The AES-GCM suites take 0xA8 to 0xAD. The SHA-256/384 suites take 0xAE to 0xB9, in the order PSK, DHE_PSK and RSA_PSK, with AES-128 CBC, AES-256 CBC, NULL SHA256 and NULL SHA384 in each group.
Each new lock gets its own number so both sides can say which one they want.
- 0x00,0xA8TLS_PSK_WITH_AES_128_GCM_SHA256 — PSK key exchange with AES-128-GCM.
- 0x00,0xA9TLS_PSK_WITH_AES_256_GCM_SHA384 — PSK key exchange with AES-256-GCM.
- 0x00,0xAATLS_DHE_PSK_WITH_AES_128_GCM_SHA256 — DHE_PSK with AES-128-GCM; provides PFS.
- 0x00,0xABTLS_DHE_PSK_WITH_AES_256_GCM_SHA384 — DHE_PSK with AES-256-GCM; provides PFS.
- 0x00,0xACTLS_RSA_PSK_WITH_AES_128_GCM_SHA256 — RSA_PSK with AES-128-GCM.
- 0x00,0xADTLS_RSA_PSK_WITH_AES_256_GCM_SHA384 — RSA_PSK with AES-256-GCM.