RFC 9257: Guidance for External Pre-Shared Key (PSK) Usage in TLS
- R. Housley,
- J. Hoyland,
- M. Sethi,
- C. A. Wood
Abstract
This document provides usage guidance for external Pre-Shared Keys (PSKs) in Transport Layer Security (TLS) 1.3 as defined in RFC 8446. It lists TLS security properties provided by PSKs under certain assumptions, then it demonstrates how violations of these assumptions lead to attacks. Advice for applications to help meet these assumptions is provided. This document also discusses PSK use cases and provisioning processes. Finally, it lists the privacy and security properties that are not provided by TLS 1.3 when external PSKs are used.¶
Status of This Memo
This document is not an Internet Standards Track specification; it is published for informational purposes.¶
This document is a product of the Internet Engineering Task Force (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). Not all documents approved by the IESG are candidates for any level of Internet Standard; see Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2022 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
(https://
1. Introduction
This document provides guidance on the use of external Pre-Shared Keys (PSKs) in Transport Layer Security (TLS) 1.3 [RFC8446]. This guidance also applies to Datagram TLS (DTLS) 1.3 [RFC9147] and Compact TLS 1.3 [CTLS]. For readability, this document uses the term "TLS" to refer to all such versions.¶
External PSKs are symmetric secret keys provided to the TLS protocol implementation as external inputs. External PSKs are provisioned out of band.¶
This document lists TLS security properties provided by PSKs under certain assumptions and demonstrates how violations of these assumptions lead to attacks. This document discusses PSK use cases, provisioning processes, and TLS stack implementation support in the context of these assumptions. This document also provides advice for applications in various use cases to help meet these assumptions.¶
There are many resources that provide guidance for password generation and verification aimed towards improving security. However, there is no such equivalent for external PSKs in TLS. This document aims to reduce that gap.¶
2. Conventions and Definitions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
3. Notation
For purposes of this document, a "logical node" is a computing presence that other parties can interact with via the TLS protocol. A logical node could potentially be realized with multiple physical instances operating under common administrative control, e.g., a server farm. An "endpoint" is a client or server participating in a connection.¶
4. PSK Security Properties
The use of a previously established PSK allows TLS nodes to authenticate the endpoint identities. It also offers other benefits, including resistance to attacks in the presence of quantum computers; see Section 4.2 for related discussion. However, these keys do not provide privacy protection of endpoint identities, nor do they provide non-repudiation (one endpoint in a connection can deny the conversation); see Section 7 for related discussion.¶
PSK authentication security implicitly assumes one fundamental property: each PSK is known to exactly one client and one server and they never switch roles. If this assumption is violated, then the security properties of TLS are severely weakened as discussed below.¶
4.2. PSK Entropy
Entropy properties of external PSKs may also affect TLS security properties. For example, if a high-entropy PSK is used, then PSK-only key establishment modes provide expected security properties for TLS, including establishment of the same session keys between peers, secrecy of session keys, peer authentication, and downgrade protection. See Appendix E.1 of [RFC8446] for an explanation of these properties. However, these modes lack forward security. Forward security may be achieved by using a PSK-DH mode or by using PSKs with short lifetimes.¶
In contrast, if a low-entropy PSK is used, then PSK-only key establishment modes
are subject to passive exhaustive search attacks, which will reveal the
traffic keys. PSK-DH modes are subject to active attacks in which the attacker
impersonates one side. The exhaustive search phase of these attacks can be mounted
offline if the attacker captures a single handshake using the PSK, but those
attacks will not lead to compromise of the traffic keys for that connection because
those also depend on the Diffie-Hellman (DH) exchange. Low-entropy keys are only
secure against active attack if a Password
5. External PSKs in Practice
PSK ciphersuites were first specified for TLS in 2005. PSKs are now an integral part of the TLS 1.3 specification [RFC8446]. TLS 1.3 also uses PSKs for session resumption. It distinguishes these resumption PSKs from external PSKs that have been provisioned out of band. This section describes known use cases and provisioning processes for external PSKs with TLS.¶
5.1. Use Cases
This section lists some example use cases where pairwise external PSKs (i.e., external PSKs that are shared between only one server and one client) have been used for authentication in TLS. There was no attempt to prioritize the examples in any particular order.¶
There are also use cases where PSKs are shared between more than two entities. Some examples below (as noted by Akhmetzyanova, et al. [AASS19]):¶
5.2. Provisioning Examples
The exact provisioning process depends on the system requirements and threat model. Whenever possible, avoid sharing a PSK between nodes; however, sharing a PSK among several nodes is sometimes unavoidable. When PSK sharing happens, other accommodations SHOULD be used as discussed in Section 6.¶
Examples of PSK provisioning processes are included below.¶
5.3. Provisioning Constraints
PSK provisioning systems are often constrained in application
6. Recommendations for External PSK Usage
Recommended requirements for applications using external PSKs are as follows:¶
6.1. Stack Interfaces
Most major TLS implementations support external PSKs. Stacks supporting external PSKs provide interfaces that applications may use when configuring PSKs for individual connections. Details about some existing stacks at the time of writing are below.¶
6.1.1. PSK Identity Encoding and Comparison
Section 5.1 of [RFC4279] mandates that the PSK identity should be first converted to a character string and then
encoded to octets using UTF-8. This was done to avoid interoperabilit
TLS 1.3 [RFC8446] follows the same practice of specifying
the PSK identity as a sequence of opaque bytes (shown as opaque identity<1
6.1.2. PSK Identity Collisions
It is possible, though unlikely, that an external PSK identity may clash with a resumption PSK identity. The TLS stack implementation and sequencing of PSK callbacks influences the application's behavior when identity collisions occur. When a server receives a PSK identity in a TLS 1.3 ClientHello, some TLS stacks execute the application's registered callback function before checking the stack's internal session resumption cache. This means that if a PSK identity collision occurs, the application's external PSK usage will typically take precedence over the internal session resumption path.¶
Because resumption PSK identities are assigned by the TLS stack implementation, it is RECOMMENDED that these identifiers be assigned in a manner that lets resumption PSKs be distinguished from external PSKs to avoid concerns with collisions altogether.¶
7. Privacy Considerations
PSK privacy properties are orthogonal to security properties described in Section 4. TLS does little to keep PSK identity information private. For example, an adversary learns information about the external PSK or its identifier by virtue of the identifier appearing in cleartext in a ClientHello. As a result, a passive adversary can link two or more connections together that use the same external PSK on the wire. Depending on the PSK identity, a passive attacker may also be able to identify the device, person, or enterprise running the TLS client or TLS server. An active attacker can also use the PSK identity to suppress handshakes or application data from a specific device by blocking, delaying, or rate-limiting traffic. Techniques for mitigating these risks require further analysis and are out of scope for this document.¶
In addition to linkability in the network, external PSKs are intrinsically linkable by PSK receivers. Specifically, servers can link successive connections that use the same external PSK together. Preventing this type of linkability is out of scope.¶
8. Security Considerations
Security considerations are provided throughout this document. It bears repeating that there are concerns related to the use of external PSKs regarding proper identification of TLS 1.3 endpoints and additional risks when external PSKs are known to a group.¶
It is NOT RECOMMENDED to share the same PSK between more than one client and server.
However, as discussed in Section 5.1, there are application scenarios that may
rely on sharing the same PSK among multiple nodes. [RFC9258]
helps in mitigating rerouting and Selfie-style reflection attacks when the PSK
is shared among multiple nodes. This is achieved by correctly using the node
identifiers in the Imported
Each endpoint SHOULD know the identifier of the other endpoint with which it wants
to connect and SHOULD compare it with the other endpoint's identifier used in
Imported
Considerations for external PSK usage extend beyond proper identification. When early data is used with an external PSK, the random value in the ClientHello is the only source of entropy that contributes to key diversity between sessions. As a result, when an external PSK is used more than one time, the random number source on the client has a significant role in the protection of the early data.¶
9. IANA Considerations
This document has no IANA actions.¶
10. References
10.1. Normative References
- [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10
.17487 , , <https:///RFC2119 www >..rfc -editor .org /info /rfc2119 - [RFC8174]
-
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10
.17487 , , <https:///RFC8174 www >..rfc -editor .org /info /rfc8174 - [RFC8446]
-
Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10
.17487 , , <https:///RFC8446 www >..rfc -editor .org /info /rfc8446 - [RFC9258]
-
Benjamin, D. and C. A. Wood, "Importing External Pre-Shared Keys (PSKs) for TLS 1.3", RFC 9258, DOI 10
.17487 , , <https:///RFC9258 www >..rfc -editor .org /info /rfc9258
10.2. Informative References
- [AASS19]
-
Akhmetzyanova, L., Alekseev, E., Smyshlyaeva, E., and A. Sokolov, "Continuing to reflect on TLS 1.3 with external PSK", , <https://
eprint >..iacr .org /2019 /421 .pdf - [CPACE]
-
Abdalla, M., Haase, B., and J. Hesse, "CPace, a balanced composable PAKE", Work in Progress, Internet-Draft, draft
-irtf , , <https://-cfrg -cpace -06 datatracker >..ietf .org /doc /html /draft -irtf -cfrg -cpace -06 - [CTLS]
-
Rescorla, E., Barnes, R., Tschofenig, H., and B. M. Schwartz, "Compact TLS 1.3", Work in Progress, Internet-Draft, draft
-ietf , , <https://-tls -ctls -06 datatracker >..ietf .org /doc /html /draft -ietf -tls -ctls -06 - [EAP-TLS-PSK]
-
Mattsson, J. P., Sethi, M., Aura, T., and O. Friel, "EAP-TLS with PSK Authentication (EAP-TLS-PSK)", Work in Progress, Internet-Draft, draft
-mattsson , , <https://-emu -eap -tls -psk -00 datatracker >..ietf .org /doc /html /draft -mattsson -emu -eap -tls -psk -00 - [GAA]
-
ETSI, "Digital cellular telecommunicati
ons , version 12.0.0, ETSI TR 133 919, , <https://system (Phase 2+); Universal Mobile Telecommunicati ons System (UMTS); LTE; 3G Security; Generic Authentication Architecture (GAA); System description" www >..etsi .org /deliver /etsi _tr /133900 _133999 /133919 /12 .00 .00 _60 /tr _133919v120000p .pdf - [Krawczyk]
-
Krawczyk, H., "SIGMA: The 'SIGn-and-MAc' Approach to Authenticated Diffie-Hellman and Its Use in the IKE Protocols", DOI 10
.1007 , , <https:///978 -3 -540 -45146 -4 _24 link >..springer .com /content /pdf /10 .1007 /978 -3 -540 -45146 -4 _24 .pdf - [LwM2M]
-
Open Mobile Alliance, "Lightweight Machine to Machine Technical Specification", version 1.0, , <http://
www >..openmobileallia nce .org /release /Lightweight M2M /V1 _0 -20170208 -A /OMA -TS -Lightweight M2M -V1 _0 -20170208 -A .pdf - [OPAQUE]
-
Bourdrez, D., Krawczyk, H., Lewi, K., and C. A. Wood, "The OPAQUE Asymmetric PAKE Protocol", Work in Progress, Internet-Draft, draft
-irtf , , <https://-cfrg -opaque -09 datatracker >..ietf .org /doc /html /draft -irtf -cfrg -opaque -09 - [RFC2865]
-
Rigney, C., Willens, S., Rubens, A., and W. Simpson, "Remote Authentication Dial In User Service (RADIUS)", RFC 2865, DOI 10
.17487 , , <https:///RFC2865 www >..rfc -editor .org /info /rfc2865 - [RFC3748]
-
Aboba, B., Blunk, L., Vollbrecht, J., Carlson, J., and H. Levkowetz, Ed., "Extensible Authentication Protocol (EAP)", RFC 3748, DOI 10
.17487 , , <https:///RFC3748 www >..rfc -editor .org /info /rfc3748 - [RFC4122]
-
Leach, P., Mealling, M., and R. Salz, "A Universally Unique IDentifier (UUID) URN Namespace", RFC 4122, DOI 10
.17487 , , <https:///RFC4122 www >..rfc -editor .org /info /rfc4122 - [RFC4279]
-
Eronen, P., Ed. and H. Tschofenig, Ed., "Pre-Shared Key Ciphersuites for Transport Layer Security (TLS)", RFC 4279, DOI 10
.17487 , , <https:///RFC4279 www >..rfc -editor .org /info /rfc4279 - [RFC6066]
-
Eastlake 3rd, D., "Transport Layer Security (TLS) Extensions: Extension Definitions", RFC 6066, DOI 10
.17487 , , <https:///RFC6066 www >..rfc -editor .org /info /rfc6066 - [RFC6614]
-
Winter, S., McCauley, M., Venaas, S., and K. Wierenga, "Transport Layer Security (TLS) Encryption for RADIUS", RFC 6614, DOI 10
.17487 , , <https:///RFC6614 www >..rfc -editor .org /info /rfc6614 - [RFC7925]
-
Tschofenig, H., Ed. and T. Fossati, "Transport Layer Security (TLS) / Datagram Transport Layer Security (DTLS) Profiles for the Internet of Things", RFC 7925, DOI 10
.17487 , , <https:///RFC7925 www >..rfc -editor .org /info /rfc7925 - [RFC8773]
-
Housley, R., "TLS 1.3 Extension for Certificate
-Based , RFC 8773, DOI 10Authentication with an External Pre-Shared Key" .17487 , , <https:///RFC8773 www >..rfc -editor .org /info /rfc8773 - [RFC9147]
-
Rescorla, E., Tschofenig, H., and N. Modadugu, "The Datagram Transport Layer Security (DTLS) Protocol Version 1.3", RFC 9147, DOI 10
.17487 , , <https:///RFC9147 www >..rfc -editor .org /info /rfc9147 - [Selfie]
-
Drucker, N. and S. Gueron, "Selfie: reflections on TLS 1.3 with PSK", DOI 10
.1007 , , <https:///s00145 -021 -09387 -y eprint >..iacr .org /2019 /347 .pdf - [Sethi]
-
Sethi, M., Peltonen, A., and T. Aura, "Misbinding Attacks on Secure Device Pairing and Bootstrapping", DOI 10
.1145 , , <https:///3321705 .3329813 arxiv >..org /pdf /1902 .07550 - [SmartCard]
-
Bundesamt für Sicherheit in der Informationstec
hnik , "Technical Guideline TR-03112-7 eCard , version 1.1.5, , <https://-API -Framework - Protocols" www >..bsi .bund .de /Shared Docs /Downloads /DE /BSI /Publikationen /Technische Richtlinien /TR03112 /TR -03112 -api _teil7 .pdf ?__blob =publication File &v =1
Acknowledgements
This document is the output of the TLS External PSK Design Team, comprised of the following members: Benjamin Beurdouche, Björn Haase, Christopher Wood, Colm MacCarthaigh, Eric Rescorla, Jonathan Hoyland, Martin Thomson, Mohamad Badra, Mohit Sethi, Oleg Pekar, Owen Friel, and Russ Housley.¶
This document was improved by high-quality reviews by Ben Kaduk and John Preuß Mattsson.¶