draft-ietf-tram-stunbis-15.txt   draft-ietf-tram-stunbis-16.txt 
TRAM M. Petit-Huguenin TRAM M. Petit-Huguenin
Internet-Draft Impedance Mismatch Internet-Draft Impedance Mismatch
Obsoletes: 5389 (if approved) G. Salgueiro Obsoletes: 5389 (if approved) G. Salgueiro
Intended status: Standards Track J. Rosenberg Intended status: Standards Track J. Rosenberg
Expires: July 23, 2018 Cisco Expires: September 6, 2018 Cisco
D. Wing D. Wing
R. Mahy R. Mahy
Unaffiliated Unaffiliated
P. Matthews P. Matthews
Nokia Nokia
January 19, 2018 March 5, 2018
Session Traversal Utilities for NAT (STUN) Session Traversal Utilities for NAT (STUN)
draft-ietf-tram-stunbis-15 draft-ietf-tram-stunbis-16
Abstract Abstract
Session Traversal Utilities for NAT (STUN) is a protocol that serves Session Traversal Utilities for NAT (STUN) is a protocol that serves
as a tool for other protocols in dealing with Network Address as a tool for other protocols in dealing with Network Address
Translator (NAT) traversal. It can be used by an endpoint to Translator (NAT) traversal. It can be used by an endpoint to
determine the IP address and port allocated to it by a NAT. It can determine the IP address and port allocated to it by a NAT. It can
also be used to check connectivity between two endpoints, and as a also be used to check connectivity between two endpoints, and as a
keep-alive protocol to maintain NAT bindings. STUN works with many keep-alive protocol to maintain NAT bindings. STUN works with many
existing NATs, and does not require any special behavior from them. existing NATs, and does not require any special behavior from them.
skipping to change at page 1, line 49 skipping to change at page 1, line 49
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on July 23, 2018. This Internet-Draft will expire on September 6, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 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
(https://trustee.ietf.org/license-info) in effect on the date of (https://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 45 skipping to change at page 2, line 45
6.3.1.1. Forming a Success or Error Response . . . . . . . 18 6.3.1.1. Forming a Success or Error Response . . . . . . . 18
6.3.1.2. Sending the Success or Error Response . . . . . . 19 6.3.1.2. Sending the Success or Error Response . . . . . . 19
6.3.2. Processing an Indication . . . . . . . . . . . . . . 19 6.3.2. Processing an Indication . . . . . . . . . . . . . . 19
6.3.3. Processing a Success Response . . . . . . . . . . . . 20 6.3.3. Processing a Success Response . . . . . . . . . . . . 20
6.3.4. Processing an Error Response . . . . . . . . . . . . 20 6.3.4. Processing an Error Response . . . . . . . . . . . . 20
7. FINGERPRINT Mechanism . . . . . . . . . . . . . . . . . . . . 21 7. FINGERPRINT Mechanism . . . . . . . . . . . . . . . . . . . . 21
8. DNS Discovery of a Server . . . . . . . . . . . . . . . . . . 21 8. DNS Discovery of a Server . . . . . . . . . . . . . . . . . . 21
8.1. STUN URI Scheme Semantics . . . . . . . . . . . . . . . . 22 8.1. STUN URI Scheme Semantics . . . . . . . . . . . . . . . . 22
9. Authentication and Message-Integrity Mechanisms . . . . . . . 23 9. Authentication and Message-Integrity Mechanisms . . . . . . . 23
9.1. Short-Term Credential Mechanism . . . . . . . . . . . . . 23 9.1. Short-Term Credential Mechanism . . . . . . . . . . . . . 23
9.1.1. HMAC Key . . . . . . . . . . . . . . . . . . . . . . 23 9.1.1. HMAC Key . . . . . . . . . . . . . . . . . . . . . . 24
9.1.2. Forming a Request or Indication . . . . . . . . . . . 24 9.1.2. Forming a Request or Indication . . . . . . . . . . . 24
9.1.3. Receiving a Request or Indication . . . . . . . . . . 24 9.1.3. Receiving a Request or Indication . . . . . . . . . . 24
9.1.4. Receiving a Response . . . . . . . . . . . . . . . . 25 9.1.4. Receiving a Response . . . . . . . . . . . . . . . . 25
9.1.5. Sending Subsequent Requests . . . . . . . . . . . . . 26 9.1.5. Sending Subsequent Requests . . . . . . . . . . . . . 26
9.2. Long-Term Credential Mechanism . . . . . . . . . . . . . 26 9.2. Long-Term Credential Mechanism . . . . . . . . . . . . . 26
9.2.1. Bid Down Attack Prevention . . . . . . . . . . . . . 27 9.2.1. Bid Down Attack Prevention . . . . . . . . . . . . . 27
9.2.2. HMAC Key . . . . . . . . . . . . . . . . . . . . . . 28 9.2.2. HMAC Key . . . . . . . . . . . . . . . . . . . . . . 28
9.2.3. Forming a Request . . . . . . . . . . . . . . . . . . 28 9.2.3. Forming a Request . . . . . . . . . . . . . . . . . . 28
9.2.3.1. First Request . . . . . . . . . . . . . . . . . . 29 9.2.3.1. First Request . . . . . . . . . . . . . . . . . . 29
9.2.3.2. Subsequent Requests . . . . . . . . . . . . . . . 29 9.2.3.2. Subsequent Requests . . . . . . . . . . . . . . . 29
skipping to change at page 3, line 21 skipping to change at page 3, line 21
12. Basic Server Behavior . . . . . . . . . . . . . . . . . . . . 34 12. Basic Server Behavior . . . . . . . . . . . . . . . . . . . . 34
13. STUN Usages . . . . . . . . . . . . . . . . . . . . . . . . . 35 13. STUN Usages . . . . . . . . . . . . . . . . . . . . . . . . . 35
14. STUN Attributes . . . . . . . . . . . . . . . . . . . . . . . 36 14. STUN Attributes . . . . . . . . . . . . . . . . . . . . . . . 36
14.1. MAPPED-ADDRESS . . . . . . . . . . . . . . . . . . . . . 37 14.1. MAPPED-ADDRESS . . . . . . . . . . . . . . . . . . . . . 37
14.2. XOR-MAPPED-ADDRESS . . . . . . . . . . . . . . . . . . . 38 14.2. XOR-MAPPED-ADDRESS . . . . . . . . . . . . . . . . . . . 38
14.3. USERNAME . . . . . . . . . . . . . . . . . . . . . . . . 39 14.3. USERNAME . . . . . . . . . . . . . . . . . . . . . . . . 39
14.4. USERHASH . . . . . . . . . . . . . . . . . . . . . . . . 39 14.4. USERHASH . . . . . . . . . . . . . . . . . . . . . . . . 39
14.5. MESSAGE-INTEGRITY . . . . . . . . . . . . . . . . . . . 39 14.5. MESSAGE-INTEGRITY . . . . . . . . . . . . . . . . . . . 39
14.6. MESSAGE-INTEGRITY-SHA256 . . . . . . . . . . . . . . . . 40 14.6. MESSAGE-INTEGRITY-SHA256 . . . . . . . . . . . . . . . . 40
14.7. FINGERPRINT . . . . . . . . . . . . . . . . . . . . . . 41 14.7. FINGERPRINT . . . . . . . . . . . . . . . . . . . . . . 41
14.8. ERROR-CODE . . . . . . . . . . . . . . . . . . . . . . . 41 14.8. ERROR-CODE . . . . . . . . . . . . . . . . . . . . . . . 42
14.9. REALM . . . . . . . . . . . . . . . . . . . . . . . . . 43 14.9. REALM . . . . . . . . . . . . . . . . . . . . . . . . . 43
14.10. NONCE . . . . . . . . . . . . . . . . . . . . . . . . . 43 14.10. NONCE . . . . . . . . . . . . . . . . . . . . . . . . . 43
14.11. PASSWORD-ALGORITHMS . . . . . . . . . . . . . . . . . . 43 14.11. PASSWORD-ALGORITHMS . . . . . . . . . . . . . . . . . . 44
14.12. PASSWORD-ALGORITHM . . . . . . . . . . . . . . . . . . . 44 14.12. PASSWORD-ALGORITHM . . . . . . . . . . . . . . . . . . . 44
14.13. UNKNOWN-ATTRIBUTES . . . . . . . . . . . . . . . . . . . 45 14.13. UNKNOWN-ATTRIBUTES . . . . . . . . . . . . . . . . . . . 45
14.14. SOFTWARE . . . . . . . . . . . . . . . . . . . . . . . . 45 14.14. SOFTWARE . . . . . . . . . . . . . . . . . . . . . . . . 45
14.15. ALTERNATE-SERVER . . . . . . . . . . . . . . . . . . . . 45 14.15. ALTERNATE-SERVER . . . . . . . . . . . . . . . . . . . . 45
14.16. ALTERNATE-DOMAIN . . . . . . . . . . . . . . . . . . . . 46 14.16. ALTERNATE-DOMAIN . . . . . . . . . . . . . . . . . . . . 46
15. Security Considerations . . . . . . . . . . . . . . . . . . . 46 15. Security Considerations . . . . . . . . . . . . . . . . . . . 46
15.1. Attacks against the Protocol . . . . . . . . . . . . . . 46 15.1. Attacks against the Protocol . . . . . . . . . . . . . . 46
15.1.1. Outside Attacks . . . . . . . . . . . . . . . . . . 46 15.1.1. Outside Attacks . . . . . . . . . . . . . . . . . . 46
15.1.2. Inside Attacks . . . . . . . . . . . . . . . . . . . 47 15.1.2. Inside Attacks . . . . . . . . . . . . . . . . . . . 47
15.2. Attacks Affecting the Usage . . . . . . . . . . . . . . 47 15.2. Attacks Affecting the Usage . . . . . . . . . . . . . . 47
skipping to change at page 3, line 48 skipping to change at page 3, line 48
15.2.4. Attack IV: Eavesdropping . . . . . . . . . . . . . . 49 15.2.4. Attack IV: Eavesdropping . . . . . . . . . . . . . . 49
15.3. Hash Agility Plan . . . . . . . . . . . . . . . . . . . 49 15.3. Hash Agility Plan . . . . . . . . . . . . . . . . . . . 49
16. IAB Considerations . . . . . . . . . . . . . . . . . . . . . 50 16. IAB Considerations . . . . . . . . . . . . . . . . . . . . . 50
17. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 50 17. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 50
17.1. STUN Security Features Registry . . . . . . . . . . . . 50 17.1. STUN Security Features Registry . . . . . . . . . . . . 50
17.2. STUN Methods Registry . . . . . . . . . . . . . . . . . 50 17.2. STUN Methods Registry . . . . . . . . . . . . . . . . . 50
17.3. STUN Attribute Registry . . . . . . . . . . . . . . . . 50 17.3. STUN Attribute Registry . . . . . . . . . . . . . . . . 50
17.3.1. Updated Attributes . . . . . . . . . . . . . . . . . 51 17.3.1. Updated Attributes . . . . . . . . . . . . . . . . . 51
17.3.2. New Attributes . . . . . . . . . . . . . . . . . . . 51 17.3.2. New Attributes . . . . . . . . . . . . . . . . . . . 51
17.4. STUN Error Code Registry . . . . . . . . . . . . . . . . 51 17.4. STUN Error Code Registry . . . . . . . . . . . . . . . . 51
17.5. Password Algorithm Registry . . . . . . . . . . . . . . 52 17.5. STUN Password Algorithm Registry . . . . . . . . . . . . 52
17.5.1. Password Algorithms . . . . . . . . . . . . . . . . 52 17.5.1. Password Algorithms . . . . . . . . . . . . . . . . 52
17.5.1.1. MD5 . . . . . . . . . . . . . . . . . . . . . . 52 17.5.1.1. MD5 . . . . . . . . . . . . . . . . . . . . . . 52
17.5.1.2. SHA256 . . . . . . . . . . . . . . . . . . . . . 52 17.5.1.2. SHA-256 . . . . . . . . . . . . . . . . . . . . 52
17.6. STUN UDP and TCP Port Numbers . . . . . . . . . . . . . 52 17.6. STUN UDP and TCP Port Numbers . . . . . . . . . . . . . 52
18. Changes since RFC 5389 . . . . . . . . . . . . . . . . . . . 53 18. Changes since RFC 5389 . . . . . . . . . . . . . . . . . . . 53
19. References . . . . . . . . . . . . . . . . . . . . . . . . . 53 19. References . . . . . . . . . . . . . . . . . . . . . . . . . 53
19.1. Normative References . . . . . . . . . . . . . . . . . . 53 19.1. Normative References . . . . . . . . . . . . . . . . . . 53
19.2. Informative References . . . . . . . . . . . . . . . . . 55 19.2. Informative References . . . . . . . . . . . . . . . . . 55
Appendix A. C Snippet to Determine STUN Message Types . . . . . 57 Appendix A. C Snippet to Determine STUN Message Types . . . . . 57
Appendix B. Test Vectors . . . . . . . . . . . . . . . . . . . . 58 Appendix B. Test Vectors . . . . . . . . . . . . . . . . . . . . 58
B.1. Sample Request with Long-Term Authentication with B.1. Sample Request with Long-Term Authentication with
MESSAGE-INTEGRITY-SHA256 and USERHASH . . . . . . . . . . 58 MESSAGE-INTEGRITY-SHA256 and USERHASH . . . . . . . . . . 58
Appendix C. Release notes . . . . . . . . . . . . . . . . . . . 60 Appendix C. Release notes . . . . . . . . . . . . . . . . . . . 60
C.1. Modifications between draft-ietf-tram-stunbis-14 and C.1. Modifications between draft-ietf-tram-stunbis-16 and
draft-ietf-tram-stunbis-13 . . . . . . . . . . . . . . . 60 draft-ietf-tram-stunbis-15 . . . . . . . . . . . . . . . 60
C.2. Modifications between draft-ietf-tram-stunbis-13 and C.2. Modifications between draft-ietf-tram-stunbis-15 and
draft-ietf-tram-stunbis-12 . . . . . . . . . . . . . . . 60 draft-ietf-tram-stunbis-14 . . . . . . . . . . . . . . . 61
C.3. Modifications between draft-ietf-tram-stunbis-12 and C.3. Modifications between draft-ietf-tram-stunbis-14 and
draft-ietf-tram-stunbis-11 . . . . . . . . . . . . . . . 60 draft-ietf-tram-stunbis-13 . . . . . . . . . . . . . . . 61
C.4. Modifications between draft-ietf-tram-stunbis-11 and C.4. Modifications between draft-ietf-tram-stunbis-13 and
draft-ietf-tram-stunbis-10 . . . . . . . . . . . . . . . 61 draft-ietf-tram-stunbis-12 . . . . . . . . . . . . . . . 61
C.5. Modifications between draft-ietf-tram-stunbis-10 and C.5. Modifications between draft-ietf-tram-stunbis-12 and
draft-ietf-tram-stunbis-09 . . . . . . . . . . . . . . . 61 draft-ietf-tram-stunbis-11 . . . . . . . . . . . . . . . 61
C.6. Modifications between draft-ietf-tram-stunbis-09 and C.6. Modifications between draft-ietf-tram-stunbis-11 and
draft-ietf-tram-stunbis-08 . . . . . . . . . . . . . . . 61 draft-ietf-tram-stunbis-10 . . . . . . . . . . . . . . . 62
C.7. Modifications between draft-ietf-tram-stunbis-09 and C.7. Modifications between draft-ietf-tram-stunbis-10 and
draft-ietf-tram-stunbis-09 . . . . . . . . . . . . . . . 62
C.8. Modifications between draft-ietf-tram-stunbis-09 and
draft-ietf-tram-stunbis-08 . . . . . . . . . . . . . . . 62 draft-ietf-tram-stunbis-08 . . . . . . . . . . . . . . . 62
C.8. Modifications between draft-ietf-tram-stunbis-08 and C.9. Modifications between draft-ietf-tram-stunbis-09 and
draft-ietf-tram-stunbis-07 . . . . . . . . . . . . . . . 62 draft-ietf-tram-stunbis-08 . . . . . . . . . . . . . . . 63
C.9. Modifications between draft-ietf-tram-stunbis-07 and C.10. Modifications between draft-ietf-tram-stunbis-08 and
draft-ietf-tram-stunbis-06 . . . . . . . . . . . . . . . 63 draft-ietf-tram-stunbis-07 . . . . . . . . . . . . . . . 63
C.10. Modifications between draft-ietf-tram-stunbis-06 and C.11. Modifications between draft-ietf-tram-stunbis-07 and
draft-ietf-tram-stunbis-05 . . . . . . . . . . . . . . . 63 draft-ietf-tram-stunbis-06 . . . . . . . . . . . . . . . 64
C.11. Modifications between draft-ietf-tram-stunbis-05 and C.12. Modifications between draft-ietf-tram-stunbis-06 and
draft-ietf-tram-stunbis-04 . . . . . . . . . . . . . . . 63 draft-ietf-tram-stunbis-05 . . . . . . . . . . . . . . . 64
C.12. Modifications between draft-ietf-tram-stunbis-04 and C.13. Modifications between draft-ietf-tram-stunbis-05 and
draft-ietf-tram-stunbis-03 . . . . . . . . . . . . . . . 63 draft-ietf-tram-stunbis-04 . . . . . . . . . . . . . . . 64
C.13. Modifications between draft-ietf-tram-stunbis-03 and C.14. Modifications between draft-ietf-tram-stunbis-04 and
draft-ietf-tram-stunbis-02 . . . . . . . . . . . . . . . 64 draft-ietf-tram-stunbis-03 . . . . . . . . . . . . . . . 64
C.14. Modifications between draft-ietf-tram-stunbis-02 and C.15. Modifications between draft-ietf-tram-stunbis-03 and
draft-ietf-tram-stunbis-01 . . . . . . . . . . . . . . . 64 draft-ietf-tram-stunbis-02 . . . . . . . . . . . . . . . 65
C.15. Modifications between draft-ietf-tram-stunbis-01 and C.16. Modifications between draft-ietf-tram-stunbis-02 and
draft-ietf-tram-stunbis-00 . . . . . . . . . . . . . . . 65 draft-ietf-tram-stunbis-01 . . . . . . . . . . . . . . . 65
C.16. Modifications between draft-salgueiro-tram-stunbis-02 and C.17. Modifications between draft-ietf-tram-stunbis-01 and
draft-ietf-tram-stunbis-00 . . . . . . . . . . . . . . . 65 draft-ietf-tram-stunbis-00 . . . . . . . . . . . . . . . 66
C.17. Modifications between draft-salgueiro-tram-stunbis-02 and C.18. Modifications between draft-salgueiro-tram-stunbis-02 and
draft-salgueiro-tram-stunbis-01 . . . . . . . . . . . . . 65 draft-ietf-tram-stunbis-00 . . . . . . . . . . . . . . . 66
C.18. Modifications between draft-salgueiro-tram-stunbis-01 and C.19. Modifications between draft-salgueiro-tram-stunbis-02 and
draft-salgueiro-tram-stunbis-00 . . . . . . . . . . . . . 66 draft-salgueiro-tram-stunbis-01 . . . . . . . . . . . . . 66
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 66
Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 66 C.20. Modifications between draft-salgueiro-tram-stunbis-01 and
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 67 draft-salgueiro-tram-stunbis-00 . . . . . . . . . . . . . 67
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 67
Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 68
1. Introduction 1. Introduction
The protocol defined in this specification, Session Traversal The protocol defined in this specification, Session Traversal
Utilities for NAT, provides a tool for dealing with NATs. It Utilities for NAT, provides a tool for dealing with NATs. It
provides a means for an endpoint to determine the IP address and port provides a means for an endpoint to determine the IP address and port
allocated by a NAT that corresponds to its private IP address and allocated by a NAT that corresponds to its private IP address and
port. It also provides a way for an endpoint to keep a NAT binding port. It also provides a way for an endpoint to keep a NAT binding
alive. With some extensions, the protocol can be used to do alive. With some extensions, the protocol can be used to do
connectivity checks between two endpoints [I-D.ietf-ice-rfc5245bis], connectivity checks between two endpoints [I-D.ietf-ice-rfc5245bis],
skipping to change at page 8, line 26 skipping to change at page 8, line 26
some out-of-band method prior to the STUN exchange. For example, in some out-of-band method prior to the STUN exchange. For example, in
the ICE usage [I-D.ietf-ice-rfc5245bis] the two endpoints use out-of- the ICE usage [I-D.ietf-ice-rfc5245bis] the two endpoints use out-of-
band signaling to exchange a username and password. These are used band signaling to exchange a username and password. These are used
to integrity protect and authenticate the request and response. to integrity protect and authenticate the request and response.
There is no challenge or nonce used. There is no challenge or nonce used.
3. Terminology 3. Terminology
In this document, the key words "MUST", "MUST NOT", "REQUIRED", In this document, the key words "MUST", "MUST NOT", "REQUIRED",
"SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
and "OPTIONAL" are to be interpreted as described in BCP14, RFC 2119 and "OPTIONAL" are to be interpreted as described in BCP14, RFC 8174
[RFC2119] and indicate requirement levels for compliant STUN [RFC8174] and indicate requirement levels for compliant STUN
implementations. implementations.
4. Definitions 4. Definitions
STUN Agent: A STUN agent is an entity that implements the STUN STUN Agent: A STUN agent is an entity that implements the STUN
protocol. The entity can be either a STUN client or a STUN protocol. The entity can be either a STUN client or a STUN
server. server.
STUN Client: A STUN client is an entity that sends STUN requests and STUN Client: A STUN client is an entity that sends STUN requests and
receives STUN responses. A STUN client can also send indications. receives STUN responses and STUN indications. A STUN client can
In this specification, the terms STUN client and client are also send indications. In this specification, the terms STUN
synonymous. client and client are synonymous.
STUN Server: A STUN server is an entity that receives STUN requests STUN Server: A STUN server is an entity that receives STUN requests
and sends STUN responses. A STUN server can also send and STUN indications, and sends STUN responses. A STUN server can
indications. In this specification, the terms STUN server and also send indications. In this specification, the terms STUN
server are synonymous. server and server are synonymous.
Transport Address: The combination of an IP address and port number Transport Address: The combination of an IP address and port number
(such as a UDP or TCP port number). (such as a UDP or TCP port number).
Reflexive Transport Address: A transport address learned by a client Reflexive Transport Address: A transport address learned by a client
that identifies that client as seen by another host on an IP that identifies that client as seen by another host on an IP
network, typically a STUN server. When there is an intervening network, typically a STUN server. When there is an intervening
NAT between the client and the other host, the reflexive transport NAT between the client and the other host, the reflexive transport
address represents the mapped address allocated to the client on address represents the mapped address allocated to the client on
the public side of the NAT. Reflexive transport addresses are the public side of the NAT. Reflexive transport addresses are
skipping to change at page 10, line 13 skipping to change at page 10, line 13
that request. that request.
5. STUN Message Structure 5. STUN Message Structure
STUN messages are encoded in binary using network-oriented format STUN messages are encoded in binary using network-oriented format
(most significant byte or octet first, also commonly known as big- (most significant byte or octet first, also commonly known as big-
endian). The transmission order is described in detail in Appendix B endian). The transmission order is described in detail in Appendix B
of [RFC0791]. Unless otherwise noted, numeric constants are in of [RFC0791]. Unless otherwise noted, numeric constants are in
decimal (base 10). decimal (base 10).
All STUN messages MUST start with a 20-byte header followed by zero All STUN messages comprise a 20-byte header followed by zero or more
or more Attributes. The STUN header contains a STUN message type, Attributes. The STUN header contains a STUN message type, magic
magic cookie, transaction ID, and message length. cookie, transaction ID, and message length.
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0| STUN Message Type | Message Length | |0 0| STUN Message Type | Message Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Magic Cookie | | Magic Cookie |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | |
| Transaction ID (96 bits) | | Transaction ID (96 bits) |
| | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 2: Format of STUN Message Header Figure 2: Format of STUN Message Header
The most significant 2 bits of every STUN message MUST be zeroes. The most significant 2 bits of every STUN message MUST be zeroes.
This can be used to differentiate STUN packets from other protocols This can be used to differentiate STUN packets from other protocols
when STUN is multiplexed with other protocols on the same port. when STUN is multiplexed with other protocols on the same port.
The message type defines the message class (request, success The message type defines the message class (request, success
response, failure response, or indication) and the message method response, error response, or indication) and the message method (the
(the primary function) of the STUN message. Although there are four primary function) of the STUN message. Although there are four
message classes, there are only two types of transactions in STUN: message classes, there are only two types of transactions in STUN:
request/response transactions (which consist of a request message and request/response transactions (which consist of a request message and
a response message) and indication transactions (which consist of a a response message) and indication transactions (which consist of a
single indication message). Response classes are split into error single indication message). Response classes are split into error
and success responses to aid in quickly processing the STUN message. and success responses to aid in quickly processing the STUN message.
The message type field is decomposed further into the following The message type field is decomposed further into the following
structure: structure:
0 1 0 1
skipping to change at page 15, line 42 skipping to change at page 15, line 42
value has been chosen to equalize the TCP and UDP timeouts for the value has been chosen to equalize the TCP and UDP timeouts for the
default initial RTO. default initial RTO.
In addition, if the client is unable to establish the TCP connection, In addition, if the client is unable to establish the TCP connection,
or the TCP connection is reset or fails before a response is or the TCP connection is reset or fails before a response is
received, any request/response transaction in progress is considered received, any request/response transaction in progress is considered
to have failed. to have failed.
The client MAY send multiple transactions over a single TCP (or TLS- The client MAY send multiple transactions over a single TCP (or TLS-
over-TCP) connection, and it MAY send another request before over-TCP) connection, and it MAY send another request before
receiving a response to the previous. The client SHOULD keep the receiving a response to the previous request. The client SHOULD keep
connection open until it: the connection open until it:
o has no further STUN requests or indications to send over that o has no further STUN requests or indications to send over that
connection, and connection, and
o has no plans to use any resources (such as a mapped address o has no plans to use any resources (such as a mapped address
(MAPPED-ADDRESS or XOR-MAPPED-ADDRESS) or relayed address (MAPPED-ADDRESS or XOR-MAPPED-ADDRESS) or relayed address
[RFC5766]) that were learned though STUN requests sent over that [RFC5766]) that were learned though STUN requests sent over that
connection, and connection, and
o if multiplexing other application protocols over that port, has o if multiplexing other application protocols over that port, has
finished using that other application, and finished using that other protocol, and
o if using that learned port with a remote peer, has established o if using that learned port with a remote peer, has established
communications with that remote peer, as is required by some TCP communications with that remote peer, as is required by some TCP
NAT traversal techniques (e.g., [RFC6544]). NAT traversal techniques (e.g., [RFC6544]).
At the server end, the server SHOULD keep the connection open, and At the server end, the server SHOULD keep the connection open, and
let the client close it, unless the server has determined that the let the client close it, unless the server has determined that the
connection has timed out (for example, due to the client connection has timed out (for example, due to the client
disconnecting from the network). Bindings learned by the client will disconnecting from the network). Bindings learned by the client will
remain valid in intervening NATs only while the connection remains remain valid in intervening NATs only while the connection remains
skipping to change at page 19, line 33 skipping to change at page 19, line 33
The response (success or error) is sent over the same transport as The response (success or error) is sent over the same transport as
the request was received on. If the request was received over UDP or the request was received on. If the request was received over UDP or
DTLS-over-UDP the destination IP address and port of the response are DTLS-over-UDP the destination IP address and port of the response are
the source IP address and port of the received request message, and the source IP address and port of the received request message, and
the source IP address and port of the response are equal to the the source IP address and port of the response are equal to the
destination IP address and port of the received request message. If destination IP address and port of the received request message. If
the request was received over TCP or TLS-over-TCP, the response is the request was received over TCP or TLS-over-TCP, the response is
sent back on the same TCP connection as the request was received on. sent back on the same TCP connection as the request was received on.
The server is allowed to send responses in a different order than it
received the requests.
6.3.2. Processing an Indication 6.3.2. Processing an Indication
If the indication contains unknown comprehension-required attributes, If the indication contains unknown comprehension-required attributes,
the indication is discarded and processing ceases. the indication is discarded and processing ceases.
The agent then does any additional checking that the method or the The agent then does any additional checking that the method or the
specific usage requires. If all the checks succeed, the agent then specific usage requires. If all the checks succeed, the agent then
processes the indication. No response is generated for an processes the indication. No response is generated for an
indication. indication.
skipping to change at page 20, line 37 skipping to change at page 20, line 41
attribute, then the transaction is simply considered to have failed. attribute, then the transaction is simply considered to have failed.
The client then does any processing specified by the authentication The client then does any processing specified by the authentication
mechanism (see Section 9). This may result in a new transaction mechanism (see Section 9). This may result in a new transaction
attempt. attempt.
The processing at this point depends on the error code, the method, The processing at this point depends on the error code, the method,
and the usage; the following are the default rules: and the usage; the following are the default rules:
o If the error code is 300 through 399, the client SHOULD consider o If the error code is 300 through 399, the client SHOULD consider
the transaction as failed unless the ALTERNATE-SERVER extension is the transaction as failed unless the ALTERNATE-SERVER extension
being used. See Section 10. (Section 10) is being used.
o If the error code is 400 through 499, the client declares the o If the error code is 400 through 499, the client declares the
transaction failed; in the case of 420 (Unknown Attribute), the transaction failed; in the case of 420 (Unknown Attribute), the
response should contain a UNKNOWN-ATTRIBUTES attribute that gives response should contain a UNKNOWN-ATTRIBUTES attribute that gives
additional information. additional information.
o If the error code is 500 through 599, the client MAY resend the o If the error code is 500 through 599, the client MAY resend the
request; clients that do so MUST limit the number of times they do request; clients that do so MUST limit the number of times they do
this. this.
skipping to change at page 23, line 30 skipping to change at page 23, line 33
credentials. An overview of these two mechanisms is given in credentials. An overview of these two mechanisms is given in
Section 2. Section 2.
Each mechanism specifies the additional processing required to use Each mechanism specifies the additional processing required to use
that mechanism, extending the processing specified in Section 6. The that mechanism, extending the processing specified in Section 6. The
additional processing occurs in three different places: when forming additional processing occurs in three different places: when forming
a message, when receiving a message immediately after the basic a message, when receiving a message immediately after the basic
checks have been performed, and when doing the detailed processing of checks have been performed, and when doing the detailed processing of
error responses. error responses.
Note that agents MUST ignore all attributes that follow MESSAGE-
INTEGRITY, with the exception of the MESSAGE-INTEGRITY-SHA256 and
FINGERPRINT attributes. Similarly agents MUST ignore all attributes
that follow the MESSAGE-INTEGRITY-SHA256 attribute if the MESSAGE-
INTEGRITY attribute is not present, with the exception of the
FINGERPRINT attribute.
9.1. Short-Term Credential Mechanism 9.1. Short-Term Credential Mechanism
The short-term credential mechanism assumes that, prior to the STUN The short-term credential mechanism assumes that, prior to the STUN
transaction, the client and server have used some other protocol to transaction, the client and server have used some other protocol to
exchange a credential in the form of a username and password. This exchange a credential in the form of a username and password. This
credential is time-limited. The time limit is defined by the usage. credential is time-limited. The time limit is defined by the usage.
As an example, in the ICE usage [I-D.ietf-ice-rfc5245bis], the two As an example, in the ICE usage [I-D.ietf-ice-rfc5245bis], the two
endpoints use out-of-band signaling to agree on a username and endpoints use out-of-band signaling to agree on a username and
password, and this username and password are applicable for the password, and this username and password are applicable for the
duration of the media session. duration of the media session.
skipping to change at page 25, line 35 skipping to change at page 25, line 47
error response. This is because, in these failure cases, the server error response. This is because, in these failure cases, the server
cannot determine the shared secret necessary to compute the MESSAGE- cannot determine the shared secret necessary to compute the MESSAGE-
INTEGRITY-SHA256 or MESSAGE-INTEGRITY attributes. INTEGRITY-SHA256 or MESSAGE-INTEGRITY attributes.
9.1.4. Receiving a Response 9.1.4. Receiving a Response
The client looks for the MESSAGE-INTEGRITY or the MESSAGE-INTEGRITY- The client looks for the MESSAGE-INTEGRITY or the MESSAGE-INTEGRITY-
SHA256 attribute in the response. If present and if the client only SHA256 attribute in the response. If present and if the client only
sent only one of MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-SHA256 sent only one of MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-SHA256
attributes in the request (because of the external indication in attributes in the request (because of the external indication in
section Section 9.2.3, or this being a subsequent request as defined Section 9.1.2, or this being a subsequent request as defined in
in Section 9.1.5) the algorithm in the response has to match Section 9.1.5) the algorithm in the response has to match otherwise
otherwise the response MUST be discarded. the response MUST be discarded.
The client then computes the message integrity over the response as The client then computes the message integrity over the response as
defined in Section 14.5 or Section 14.6, respectively, using the same defined in Section 14.5 or Section 14.6, respectively, using the same
password it utilized for the request. If the resulting value matches password it utilized for the request. If the resulting value matches
the contents of the MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-SHA256 the contents of the MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-SHA256
attribute, respectively, the response is considered authenticated. attribute, respectively, the response is considered authenticated.
If the value does not match, or if both MESSAGE-INTEGRITY and If the value does not match, or if both MESSAGE-INTEGRITY and
MESSAGE-INTEGRITY-SHA256 were absent, the processing depends on the MESSAGE-INTEGRITY-SHA256 were absent, the processing depends on the
request been sent over a reliable or an unreliable transport. request been sent over a reliable or an unreliable transport.
skipping to change at page 27, line 12 skipping to change at page 27, line 22
invalid by the server, in which case the rejection provides a new invalid by the server, in which case the rejection provides a new
nonce to the client. nonce to the client.
Note that the long-term credential mechanism cannot be used to Note that the long-term credential mechanism cannot be used to
protect indications, since indications cannot be challenged. Usages protect indications, since indications cannot be challenged. Usages
utilizing indications must either use a short-term credential or omit utilizing indications must either use a short-term credential or omit
authentication and message integrity for them. authentication and message integrity for them.
To indicate that it supports this specification, a server MUST To indicate that it supports this specification, a server MUST
prepend the NONCE attribute value with the character string composed prepend the NONCE attribute value with the character string composed
of "obMatJos2" concatenated with the Base64 [RFC4648] encoding of the of "obMatJos2" concatenated with the (4 character) Base64 [RFC4648]
24 bit STUN Security Features as defined in Section 17.1. The 24 bit encoding of the 24 bit STUN Security Features as defined in
Security Feature set is encoded as a 24 bit integer in network order. Section 17.1. The 24 bit Security Feature set is encoded as a 24 bit
If no security features are used, then the value 0 MUST be encoded integer in network order. If no security features are used, then the
instead. For the remainder of this document the term "nonce cookie" value 0 MUST be encoded instead. For the remainder of this document
will refer to the complete 13 character string prepended to the NONCE the term "nonce cookie" will refer to the complete 13 character
attribute value. string prepended to the NONCE attribute value.
Since the long-term credential mechanism is susceptible to offline Since the long-term credential mechanism is susceptible to offline
dictionary attacks, deployments SHOULD utilize passwords that are dictionary attacks, deployments SHOULD utilize passwords that are
difficult to guess. In cases where the credentials are not entered difficult to guess. In cases where the credentials are not entered
by the user, but are rather placed on a client device during device by the user, but are rather placed on a client device during device
provisioning, the password SHOULD have at least 128 bits of provisioning, the password SHOULD have at least 128 bits of
randomness. In cases where the credentials are entered by the user, randomness. In cases where the credentials are entered by the user,
they should follow best current practices around password structure. they should follow best current practices around password structure.
9.2.1. Bid Down Attack Prevention 9.2.1. Bid Down Attack Prevention
skipping to change at page 28, line 29 skipping to change at page 28, line 39
a single colon; (3) the realm, with any quotes and trailing nulls a single colon; (3) the realm, with any quotes and trailing nulls
removed and after processing using OpaqueString; (4) a single colon; removed and after processing using OpaqueString; (4) a single colon;
and (5) the password, with any trailing nulls removed and after and (5) the password, with any trailing nulls removed and after
processing using OpaqueString. For example, if the username was processing using OpaqueString. For example, if the username was
'user', the realm was 'realm', and the password was 'pass', then the 'user', the realm was 'realm', and the password was 'pass', then the
16-byte HMAC key would be the result of performing an MD5 hash on the 16-byte HMAC key would be the result of performing an MD5 hash on the
string 'user:realm:pass', the resulting hash being string 'user:realm:pass', the resulting hash being
0x8493fbc53ba582fb4c044c456bdc40eb. 0x8493fbc53ba582fb4c044c456bdc40eb.
The structure of the key when used with long-term credentials The structure of the key when used with long-term credentials
facilitates deployment in systems that also utilize SIP. Typically, facilitates deployment in systems that also utilize SIP [RFC3261].
SIP systems utilizing SIP's digest authentication mechanism do not Typically, SIP systems utilizing SIP's digest authentication
actually store the password in the database. Rather, they store a mechanism do not actually store the password in the database.
value called H(A1), which is equal to the key defined above. Rather, they store a value called H(A1), which is equal to the key
defined above.
When a PASSWORD-ALGORITHM is used, the key length and algorithm to When a PASSWORD-ALGORITHM is used, the key length and algorithm to
use are described in Section 17.5.1. use are described in Section 17.5.1.
9.2.3. Forming a Request 9.2.3. Forming a Request
There are two cases when forming a request. In the first case, this There are two cases when forming a request. In the first case, this
is the first request from the client to the server (as identified by is the first request from the client to the server (as identified by
its IP address and port). In the second case, the client is hostname, if the DNS procedures of Section 8 are used, else IP
submitting a subsequent request once a previous request/response address if not). In the second case, the client is submitting a
transaction has completed successfully. Forming a request as a subsequent request once a previous request/response transaction has
consequence of a 401 or 438 error response is covered in completed successfully. Forming a request as a consequence of a 401
Section 9.2.5 and is not considered a "subsequent request" and thus or 438 error response is covered in Section 9.2.5 and is not
does not utilize the rules described in Section 9.2.3.2. considered a "subsequent request" and thus does not utilize the rules
described in Section 9.2.3.2.
The difference between a first request and a subsequent request is The difference between a first request and a subsequent request is
the presence or absence of some attributes, so omitting or including the presence or absence of some attributes, so omitting or including
them is a MUST. them is a MUST.
9.2.3.1. First Request 9.2.3.1. First Request
If the client has not completed a successful request/response If the client has not completed a successful request/response
transaction with the server (as identified by hostname, if the DNS transaction with the server, it MUST omit the USERNAME, USERHASH,
procedures of Section 8 are used, else IP address if not), it MUST MESSAGE-INTEGRITY, MESSAGE-INTEGRITY-SHA256, REALM, NONCE, PASSWORD-
omit the USERNAME, USERHASH, MESSAGE-INTEGRITY, MESSAGE-INTEGRITY- ALGORITHMS, and PASSWORD-ALGORITHM attributes. In other words, the
SHA256, REALM, NONCE, PASSWORD-ALGORITHMS, and PASSWORD-ALGORITHM first request is sent as if there were no authentication or message
attributes. In other words, the very first request is sent as if integrity applied.
there were no authentication or message integrity applied.
9.2.3.2. Subsequent Requests 9.2.3.2. Subsequent Requests
Once a request/response transaction has completed successfully, the Once a request/response transaction has completed successfully, the
client will have been presented a realm and nonce by the server, and client will have been presented a realm and nonce by the server, and
selected a username and password with which it authenticated. The selected a username and password with which it authenticated. The
client SHOULD cache the username, password, realm, and nonce for client SHOULD cache the username, password, realm, and nonce for
subsequent communications with the server. When the client sends a subsequent communications with the server. When the client sends a
subsequent request, it MUST include either the USERNAME or USERHASH, subsequent request, it MUST include either the USERNAME or USERHASH,
REALM, NONCE, and PASSWORD-ALGORITHM attributes with these cached REALM, NONCE, and PASSWORD-ALGORITHM attributes with these cached
skipping to change at page 29, line 41 skipping to change at page 29, line 50
After the server has done the basic processing of a request, it After the server has done the basic processing of a request, it
performs the checks listed below in the order specified: performs the checks listed below in the order specified:
o If the message does not contain a MESSAGE-INTEGRITY or MESSAGE- o If the message does not contain a MESSAGE-INTEGRITY or MESSAGE-
INTEGRITY-SHA256 attribute, the server MUST generate an error INTEGRITY-SHA256 attribute, the server MUST generate an error
response with an error code of 401 (Unauthenticated). This response with an error code of 401 (Unauthenticated). This
response MUST include a REALM value. It is RECOMMENDED that the response MUST include a REALM value. It is RECOMMENDED that the
REALM value be the domain name of the provider of the STUN server. REALM value be the domain name of the provider of the STUN server.
The response MUST include a NONCE, selected by the server. The The response MUST include a NONCE, selected by the server. The
server MUST ensure that the same NONCE cannot be selected for server MUST NOT choose the same NONCE for two requests unless they
clients that use different source IP addresses, different source have the same source IP address and port. The server MAY support
ports, or both different source IP addresses and source ports. alternate password algorithms, in which case it can list them in
The server MAY support alternate password algorithms, in which preferential order in a PASSWORD-ALGORITHMS attribute. If the
case it can list them in preferential order in a PASSWORD- server adds a PASSWORD-ALGORITHMS attribute it MUST set the STUN
ALGORITHMS attribute. If the server adds a PASSWORD-ALGORITHMS Security Feature "Password algorithms" bit set to 1. The server
attribute it MUST set the STUN Security Feature "Password MAY support anonymous username, in which case it MUST set the STUN
algorithms" bit set to 1. The server MAY support anonymous Security Feature "Username anonymity" bit set to 1. The response
username, in which case it MUST set the STUN Security Feature SHOULD NOT contain a USERNAME, USERHASH, MESSAGE-INTEGRITY or
"Anonymous username" bit set to 1. The response SHOULD NOT MESSAGE-INTEGRITY-SHA256 attribute.
contain a USERNAME, USERHASH, MESSAGE-INTEGRITY or MESSAGE-
INTEGRITY-SHA256 attribute.
Note: Reusing a NONCE for different source IP addresses or ports was Note: Reusing a NONCE for different source IP addresses or ports was
not explicitly forbidden in [RFC5389]. not explicitly forbidden in [RFC5389].
o If the message contains a MESSAGE-INTEGRITY or a MESSAGE- o If the message contains a MESSAGE-INTEGRITY or a MESSAGE-
INTEGRITY-SHA256 attribute, but is missing either the USERNAME or INTEGRITY-SHA256 attribute, but is missing either the USERNAME or
USERHASH, REALM, or NONCE attribute, the server MUST generate an USERHASH, REALM, or NONCE attribute, the server MUST generate an
error response with an error code of 400 (Bad Request). This error response with an error code of 400 (Bad Request). This
response SHOULD NOT include a USERNAME, USERHASH, NONCE, or REALM. response SHOULD NOT include a USERNAME, USERHASH, NONCE, or REALM.
The response cannot contain a MESSAGE-INTEGRITY or MESSAGE- The response cannot contain a MESSAGE-INTEGRITY or MESSAGE-
INTEGRITY-SHA256 attribute, as the attributes required to generate INTEGRITY-SHA256 attribute, as the attributes required to generate
them are missing. them are missing.
o If the NONCE attribute starts with the "nonce cookie" with the o If the NONCE attribute starts with the "nonce cookie" with the
STUN Security Feature "Password algorithm" bit set to 1 but STUN Security Feature "Password algorithm" bit set to 1, the
PASSWORD-ALGORITHMS does not match the value sent in the response server performs these checks in the order specified:
that sent this NONCE, then the server MUST generate an error
response with an error code of 400 (Bad Request).
o If the NONCE attribute starts with the "nonce cookie" with the
STUN Security Feature "Password algorithm" bit set to 1 but the
request contains neither PASSWORD-ALGORITHMS nor PASSWORD-
ALGORITHM, then the request is processed as though PASSWORD-
ALGORITHM were MD5 (Note that if the original PASSWORD-ALGORITHMS
attribute did not contain MD5, this will result in a 400 Bad
Request in a later step below).
o If the NONCE attribute starts with the "nonce cookie" with the * If the request contains neither PASSWORD-ALGORITHMS nor
STUN Security Feature "Password algorithm" bit set to 1 but only PASSWORD- ALGORITHM, then the request is processed as though
one of PASSWORD-ALGORITHM or PASSWORD-ALGORITHMS is present, then PASSWORD- ALGORITHM were MD5 (Note that if the original
the server MUST generate an error response with an error code of PASSWORD-ALGORITHMS attribute did not contain MD5, this will
400 (Bad Request). result in a 400 Bad Request in a later step below).
o If the NONCE attribute starts with the "nonce cookie" with the * Otherwise, unless (1) PASSWORD-ALGORITHM and PASSWORD-
STUN Security Feature "Password algorithm" bit set to 1 but ALGORITHMS are both present, (2) PASSWORD-ALGORITHMS matches
PASSWORD-ALGORITHM does not match one of the entries in PASSWORD- the value sent in the response that sent this NONCE, and (3)
ALGORITHMS, then the server MUST generate an error response with PASSWORD-ALGORITHM matches one of the entries in PASSWORD-
an error code of 400 (Bad Request). ALGORITHMS, the server MUST generate an error response with an
error code of 400 (Bad Request).
o If the NONCE is no longer valid and at the same time the MESSAGE- o If the NONCE is no longer valid and at the same time the MESSAGE-
INTEGRITY or a MESSAGE-INTEGRITY-SHA256 attribute is invalid, the INTEGRITY or a MESSAGE-INTEGRITY-SHA256 attribute is invalid, the
server MUST generate an error response with an error code of 401. server MUST generate an error response with an error code of 401.
This response MUST include NONCE, REALM, and PASSWORD-ALGORITHMS This response MUST include NONCE, REALM, and PASSWORD-ALGORITHMS
attributes and SHOULD NOT include the USERNAME or USERHASH attributes and SHOULD NOT include the USERNAME or USERHASH
attribute. The response MAY include a MESSAGE-INTEGRITY or attribute. The NONCE attribute value MUST be valid. The response
MESSAGE-INTEGRITY-SHA256 attribute, using the previous NONCE to MAY include a MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-SHA256
calculate it. attribute, using the previous NONCE to calculate it.
o If the NONCE is no longer valid, the server MUST generate an error o If the NONCE is no longer valid, the server MUST generate an error
response with an error code of 438 (Stale Nonce). This response response with an error code of 438 (Stale Nonce). This response
MUST include NONCE, REALM, and PASSWORD-ALGORITHMS attributes and MUST include NONCE, REALM, and PASSWORD-ALGORITHMS attributes and
SHOULD NOT include the USERNAME, USERHASH attribute, The response SHOULD NOT include the USERNAME, USERHASH attribute, The NONCE
MAY include a MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-SHA256 attribute value MUST be valid. The response MAY include a
attribute, using the previous NONCE to calculate it. Servers can MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-SHA256 attribute, using the
invalidate nonces in order to provide additional security. See previous NONCE to calculate it. Servers can revoke nonces in
Section 4.3 of [RFC7616] for guidelines. order to provide additional security. See Section 5.4 of
[RFC7616] for guidelines.
o If the value of the USERNAME or USERHASH attribute is not valid, o If the value of the USERNAME or USERHASH attribute is not valid,
the server MUST generate an error response with an error code of the server MUST generate an error response with an error code of
401 (Unauthenticated). This response MUST include a REALM value. 401 (Unauthenticated). This response MUST include a REALM value.
It is RECOMMENDED that the REALM value be the domain name of the It is RECOMMENDED that the REALM value be the domain name of the
provider of the STUN server. The response MUST include a NONCE, provider of the STUN server. The response MUST include a NONCE,
selected by the server. The response MUST include a PASSWORD- selected by the server. The response MUST include a PASSWORD-
ALGORITHMS attribute. The response SHOULD NOT contain a USERNAME, ALGORITHMS attribute. The response SHOULD NOT contain a USERNAME,
USERHASH attribute. The response MAY include a MESSAGE-INTEGRITY USERHASH attribute. The response MAY include a MESSAGE-INTEGRITY
or MESSAGE-INTEGRITY-SHA256 attribute, using the previous password or MESSAGE-INTEGRITY-SHA256 attribute, using the previous password
skipping to change at page 32, line 6 skipping to change at page 32, line 7
attributes SHOULD NOT be included. attributes SHOULD NOT be included.
9.2.5. Receiving a Response 9.2.5. Receiving a Response
If the response is an error response with an error code of 401 If the response is an error response with an error code of 401
(Unauthenticated) or 438 (Stale Nonce), the client MUST test if the (Unauthenticated) or 438 (Stale Nonce), the client MUST test if the
NONCE attribute value starts with the "nonce cookie". If the test NONCE attribute value starts with the "nonce cookie". If the test
succeeds and the "nonce cookie" has the STUN Security Feature succeeds and the "nonce cookie" has the STUN Security Feature
"Password algorithm" bit set to 1 but no PASSWORD-ALGORITHMS "Password algorithm" bit set to 1 but no PASSWORD-ALGORITHMS
attribute is present, then the client MUST NOT retry the request with attribute is present, then the client MUST NOT retry the request with
a new transaction. If the test succeeds and the "nonce cookie" has a new transaction.
the STUN Security Feature "Username anonymity" bit set to 1 but no
USERHASH attribute is present, then the client MUST NOT retry the
request with a new transaction.
If the response is an error response with an error code of 401 If the response is an error response with an error code of 401
(Unauthenticated), the client SHOULD retry the request with a new (Unauthenticated), the client SHOULD retry the request with a new
transaction. This request MUST contain a USERNAME or a USERHASH, transaction. This request MUST contain a USERNAME or a USERHASH,
determined by the client as the appropriate username for the REALM determined by the client as the appropriate username for the REALM
from the error response. If the "nonce cookie" was present and had from the error response. If the "nonce cookie" was present and had
the STUN Security Feature "Username anonymity" bit set to 1 then the the STUN Security Feature "Username anonymity" bit set to 1 then the
USERHASH attribute MUST be used, else the USERNAME attribute MUST be USERHASH attribute MUST be used, else the USERNAME attribute MUST be
used. The request MUST contain the REALM, copied from the error used. The request MUST contain the REALM, copied from the error
response. The request MUST contain the NONCE, copied from the error response. The request MUST contain the NONCE, copied from the error
skipping to change at page 32, line 42 skipping to change at page 32, line 40
If the response is an error response with an error code of 438 (Stale If the response is an error response with an error code of 438 (Stale
Nonce), the client MUST retry the request, using the new NONCE Nonce), the client MUST retry the request, using the new NONCE
attribute supplied in the 438 (Stale Nonce) response. This retry attribute supplied in the 438 (Stale Nonce) response. This retry
MUST also include either the USERNAME or USERHASH, REALM and either MUST also include either the USERNAME or USERHASH, REALM and either
the MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-SHA256 attributes. the MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-SHA256 attributes.
For all other responses, if the NONCE attribute starts with the For all other responses, if the NONCE attribute starts with the
"nonce cookie" with the STUN Security Feature "Password algorithm" "nonce cookie" with the STUN Security Feature "Password algorithm"
bit set to 1 but PASSWORD-ALGORITHMS is not present, the response bit set to 1 but PASSWORD-ALGORITHMS is not present, the response
MUST be ignored. For all other responses, if the NONCE attribute
starts with the "nonce cookie" with the STUN Security Feature "User
anonymity" bit set to 1 but USERHASH is not present, the response
MUST be ignored. MUST be ignored.
If the response is an error response with an error code of 400, and If the response is an error response with an error code of 400, and
does not contains either MESSAGE-INTEGRITY or MESSAGE-INTEGRITY- does not contains either MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-
SHA256 attribute then the response MUST be discarded, as if it was SHA256 attribute then the response MUST be discarded, as if it was
never received. This means that retransmits, if applicable, will never received. This means that retransmits, if applicable, will
continue. continue.
Note: In that case the 400 will never reach the application,
resulting in a timeout.
The client looks for the MESSAGE-INTEGRITY or MESSAGE-INTEGRITY- The client looks for the MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-
SHA256 attribute in the response (either success or failure). If SHA256 attribute in the response (either success or failure). If
present, the client computes the message integrity over the response present, the client computes the message integrity over the response
as defined in Section 14.5 or Section 14.6, using the same password as defined in Section 14.5 or Section 14.6, using the same password
it utilized for the request. If the resulting value matches the it utilized for the request. If the resulting value matches the
contents of the MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-SHA256 contents of the MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-SHA256
attribute, the response is considered authenticated. If the value attribute, the response is considered authenticated. If the value
does not match, or if both MESSAGE-INTEGRITY and MESSAGE-INTEGRITY- does not match, or if both MESSAGE-INTEGRITY and MESSAGE-INTEGRITY-
SHA256 were absent, the processing depends on the request been sent SHA256 were absent, the processing depends on the request been sent
over a reliable or an unreliable transport. over a reliable or an unreliable transport.
skipping to change at page 33, line 35 skipping to change at page 33, line 35
signal that an attack took place. signal that an attack took place.
If the response contains a PASSWORD-ALGORITHMS attribute, the If the response contains a PASSWORD-ALGORITHMS attribute, the
subsequent request MUST be authenticated using MESSAGE-INTEGRITY- subsequent request MUST be authenticated using MESSAGE-INTEGRITY-
SHA256 only. SHA256 only.
10. ALTERNATE-SERVER Mechanism 10. ALTERNATE-SERVER Mechanism
This section describes a mechanism in STUN that allows a server to This section describes a mechanism in STUN that allows a server to
redirect a client to another server. This extension is optional, and redirect a client to another server. This extension is optional, and
a usage must define if and when this extension is used. a usage must define if and when this extension is used. The
ALTERNATE-SERVER attribute carries an IP address.
A server using this extension redirects a client to another server by A server using this extension redirects a client to another server by
replying to a request message with an error response message with an replying to a request message with an error response message with an
error code of 300 (Try Alternate). The server MUST include an error code of 300 (Try Alternate). The server MUST include an
ALTERNATE-SERVER attribute in the error response. The error response ALTERNATE-SERVER attribute in the error response. The error response
message MAY be authenticated; however, there are uses cases for message MAY be authenticated; however, there are use cases for
ALTERNATE-SERVER where authentication of the response is not possible ALTERNATE-SERVER where authentication of the response is not possible
or practical. If the transaction uses TLS or DTLS and if the or practical. If the transaction uses TLS or DTLS and if the
transaction is authenticated by a MESSAGE-INTEGRITY-SHA256 attribute transaction is authenticated by a MESSAGE-INTEGRITY-SHA256 attribute
and if the server wants to redirect to a server that uses a different and if the server wants to redirect to a server that uses a different
certificate, then it MUST include an ALTERNATE-DOMAIN attribute certificate, then it MUST include an ALTERNATE-DOMAIN attribute
containing the subjectAltName of that certificate. containing the subjectAltName of that certificate.
A client using this extension handles a 300 (Try Alternate) error A client using this extension handles a 300 (Try Alternate) error
code as follows. The client looks for an ALTERNATE-SERVER attribute code as follows. The client looks for an ALTERNATE-SERVER attribute
in the error response. If one is found, then the client considers in the error response. If one is found, then the client considers
skipping to change at page 34, line 14 skipping to change at page 34, line 15
the server specified in the attribute, using the same transport the server specified in the attribute, using the same transport
protocol used for the previous request. That request, if protocol used for the previous request. That request, if
authenticated, MUST utilize the same credentials that the client authenticated, MUST utilize the same credentials that the client
would have used in the request to the server that performed the would have used in the request to the server that performed the
redirection. If the transport protocol uses TLS or DTLS, then the redirection. If the transport protocol uses TLS or DTLS, then the
client looks for an ALTERNATE-DOMAIN attribute. If the attribute is client looks for an ALTERNATE-DOMAIN attribute. If the attribute is
found, the domain MUST be used to validate the certificate using the found, the domain MUST be used to validate the certificate using the
recommendations in [RFC6125]. If the attribute is not found, the recommendations in [RFC6125]. If the attribute is not found, the
same domain that was used for the original request MUST be used to same domain that was used for the original request MUST be used to
validate the certificate. If the client has been redirected to a validate the certificate. If the client has been redirected to a
server on which it has already tried this request within the last server to which it has already sent this request within the last five
five minutes, it MUST ignore the redirection and consider the minutes, it MUST ignore the redirection and consider the transaction
transaction to have failed. This prevents infinite ping-ponging to have failed. This prevents infinite ping-ponging between servers
between servers in case of redirection loops. in case of redirection loops.
11. Backwards Compatibility with RFC 3489 11. Backwards Compatibility with RFC 3489
In addition to the backward compatibility already described in In addition to the backward compatibility already described in
Section 12 of [RFC5389], DTLS MUST NOT be used with [RFC3489] (also Section 12 of [RFC5389], DTLS MUST NOT be used with [RFC3489] (also
referred to as "classic STUN"). Any STUN request or indication referred to as "classic STUN"). Any STUN request or indication
without the magic cookie (see Section 6 of [RFC5389]) over DTLS MUST without the magic cookie (see Section 6 of [RFC5389]) over DTLS MUST
always result in an error. be considered invalid: all requests MUST generate a "500 Server
Error" error response and indications MUST be ignored.
12. Basic Server Behavior 12. Basic Server Behavior
This section defines the behavior of a basic, stand-alone STUN This section defines the behavior of a basic, stand-alone STUN
server. server.
Historically, "classic STUN [RFC3489]" only defined the behavior of a Historically, "classic STUN [RFC3489]" only defined the behavior of a
server that was providing clients with server reflexive transport server that was providing clients with server reflexive transport
addresses by receiving and replying to STUN Binding requests. addresses by receiving and replying to STUN Binding requests.
[RFC5389] redefined the protocol as an extensible framework and the [RFC5389] redefined the protocol as an extensible framework and the
skipping to change at page 35, line 30 skipping to change at page 35, line 31
13. STUN Usages 13. STUN Usages
STUN by itself is not a solution to the NAT traversal problem. STUN by itself is not a solution to the NAT traversal problem.
Rather, STUN defines a tool that can be used inside a larger Rather, STUN defines a tool that can be used inside a larger
solution. The term "STUN usage" is used for any solution that uses solution. The term "STUN usage" is used for any solution that uses
STUN as a component. STUN as a component.
A STUN usage defines how STUN is actually utilized -- when to send A STUN usage defines how STUN is actually utilized -- when to send
requests, what to do with the responses, and which optional requests, what to do with the responses, and which optional
procedures defined here (or in an extension to STUN) are to be used. procedures defined here (or in an extension to STUN) are to be used.
A usage would also define: A usage also defines:
o Which STUN methods are used. o Which STUN methods are used.
o What transports are used. If DTLS-over-UDP is used then o What transports are used. If DTLS-over-UDP is used then
implementing the denial-of-service countermeasure described in implementing the denial-of-service countermeasure described in
Section 4.2.1 of [RFC6347] is mandatory. Section 4.2.1 of [RFC6347] is mandatory.
o What authentication and message-integrity mechanisms are used. o What authentication and message-integrity mechanisms are used.
o The considerations around manual vs. automatic key derivation for o The considerations around manual vs. automatic key derivation for
skipping to change at page 36, line 14 skipping to change at page 36, line 14
o How simultaneous use of IPv4 and IPv6 addresses (Happy Eyeballs o How simultaneous use of IPv4 and IPv6 addresses (Happy Eyeballs
[RFC8305]) works with non-idempotent transactions when both [RFC8305]) works with non-idempotent transactions when both
address families are found for the STUN server. address families are found for the STUN server.
o Whether backwards compatibility to RFC 3489 is required. o Whether backwards compatibility to RFC 3489 is required.
o What optional attributes defined here (such as FINGERPRINT and o What optional attributes defined here (such as FINGERPRINT and
ALTERNATE-SERVER) or in other extensions are required. ALTERNATE-SERVER) or in other extensions are required.
o If MESSAGE-INTEGRITY-256 truncation is permitted, and the limits o If MESSAGE-INTEGRITY-SHA256 truncation is permitted, and the
permitted for truncation. limits permitted for truncation.
In addition, any STUN usage must consider the security implications In addition, any STUN usage must consider the security implications
of using STUN in that usage. A number of attacks against STUN are of using STUN in that usage. A number of attacks against STUN are
known (see the Security Considerations section in this document), and known (see the Security Considerations section in this document), and
any usage must consider how these attacks can be thwarted or any usage must consider how these attacks can be thwarted or
mitigated. mitigated.
Finally, a usage must consider whether its usage of STUN is an Finally, a usage must consider whether its usage of STUN is an
example of the Unilateral Self-Address Fixing approach to NAT example of the Unilateral Self-Address Fixing approach to NAT
traversal, and if so, address the questions raised in RFC 3424 traversal, and if so, address the questions raised in RFC 3424
skipping to change at page 39, line 17 skipping to change at page 39, line 17
but misguided attempt at providing a generic ALG function. Such but misguided attempt at providing a generic ALG function. Such
behavior interferes with the operation of STUN and also causes behavior interferes with the operation of STUN and also causes
failure of STUN's message-integrity checking. failure of STUN's message-integrity checking.
14.3. USERNAME 14.3. USERNAME
The USERNAME attribute is used for message integrity. It identifies The USERNAME attribute is used for message integrity. It identifies
the username and password combination used in the message-integrity the username and password combination used in the message-integrity
check. check.
The value of USERNAME is a variable-length value. It MUST contain a The value of USERNAME is a variable-length value containing the
UTF-8 [RFC3629] encoded sequence of less than 513 bytes, and MUST authentication username. It MUST contain a UTF-8 [RFC3629] encoded
have been processed using the OpaqueString profile [RFC8265]. sequence of less than 509 bytes, and MUST have been processed using
the OpaqueString profile [RFC8265]. A compliant implementation MUST
be able to parse UTF-8 encoded sequence of less than 763.
14.4. USERHASH 14.4. USERHASH
The USERHASH attribute is used as a replacement for the USERNAME The USERHASH attribute is used as a replacement for the USERNAME
attribute when username anonymity is supported. attribute when username anonymity is supported.
The value of USERHASH has a fixed length of 32 bytes. The username The value of USERHASH has a fixed length of 32 bytes. The username
MUST have been processed using the OpaqueString profile [RFC8265] and the realm MUST have been processed using the OpaqueString profile
before hashing. [RFC8265] before hashing.
The following is the operation that the client will perform to hash The following is the operation that the client will perform to hash
the username: the username:
userhash = SHA256(username ":" realm) userhash = SHA-256(Opaque(username) ":" Opaque(realm))
14.5. MESSAGE-INTEGRITY 14.5. MESSAGE-INTEGRITY
The MESSAGE-INTEGRITY attribute contains an HMAC-SHA1 [RFC2104] of The MESSAGE-INTEGRITY attribute contains an HMAC-SHA1 [RFC2104] of
the STUN message. The MESSAGE-INTEGRITY attribute can be present in the STUN message. The MESSAGE-INTEGRITY attribute can be present in
any STUN message type. Since it uses the SHA1 hash, the HMAC will be any STUN message type. Since it uses the SHA-1 hash, the HMAC will
at 20 bytes. be 20 bytes.
The text used as input to HMAC is the STUN message, including the
header, up to and including the attribute preceding the MESSAGE-
INTEGRITY attribute. With the exception of the MESSAGE-INTEGRITY-
SHA256 and FINGERPRINT attributes, which appear after MESSAGE-
INTEGRITY, agents MUST ignore all other attributes that follow
MESSAGE-INTEGRITY.
The key for the HMAC depends on which credential mechanism is in use. The key for the HMAC depends on which credential mechanism is in use.
Section 9.1.1 defines the key for the short-term credential mechanism Section 9.1.1 defines the key for the short-term credential mechanism
and Section 9.2.2 defines the key for the long-term credential and Section 9.2.2 defines the key for the long-term credential
mechanism. Other credential mechanisms MUST define the key that is mechanism. Other credential mechanisms MUST define the key that is
used for the HMAC. used for the HMAC.
Based on the rules above, the hash used to construct MESSAGE- The text used as input to HMAC is the STUN message, up to and
INTEGRITY includes the length field from the STUN message header. including the attribute preceding the MESSAGE-INTEGRITY attribute.
Prior to performing the hash, the MESSAGE-INTEGRITY attribute MUST be
inserted into the message (with dummy content). The length MUST then The length field of the STUN message header is adjusted to point to
be set to point to the length of the message up to, and including, the end of the MESSAGE-INTEGRITY attribute. The value of the
the MESSAGE-INTEGRITY attribute itself, but excluding any attributes MESSAGE-INTEGRITY attribute is set to a dummy value.
after it. Once the computation is performed, the value of the
MESSAGE-INTEGRITY attribute can be filled in, and the value of the Once the computation is performed, the value of the MESSAGE-INTEGRITY
length in the STUN header can be set to its correct value -- the attribute is filled in, and the value of the length in the STUN
length of the entire message. Similarly, when validating the header is set to its correct value -- the length of the entire
MESSAGE-INTEGRITY, the length field should be adjusted to point to message.
the end of the MESSAGE-INTEGRITY attribute prior to calculating the
HMAC. Such adjustment is necessary when attributes, such as Similarly, when validating the MESSAGE-INTEGRITY, the length field in
FINGERPRINT, appear after MESSAGE-INTEGRITY. the STUN header must be adjusted to point to the end of the MESSAGE-
INTEGRITY attribute prior to calculating the HMAC over the STUN
message, up to and including the attribute preceding the MESSAGE-
INTEGRITY attribute. Such adjustment is necessary when attributes,
such as FINGERPRINT and MESSAGE-INTEGRITY-SHA256, appear after
MESSAGE-INTEGRITY. See also [RFC5769] for examples of such
calculations.
14.6. MESSAGE-INTEGRITY-SHA256 14.6. MESSAGE-INTEGRITY-SHA256
The MESSAGE-INTEGRITY-SHA256 attribute contains an HMAC-SHA-256 The MESSAGE-INTEGRITY-SHA256 attribute contains an HMAC-SHA256
[RFC2104] of the STUN message. The MESSAGE-INTEGRITY-SHA256 [RFC2104] of the STUN message. The MESSAGE-INTEGRITY-SHA256
attribute can be present in any STUN message type. Since it uses the attribute can be present in any STUN message type. The MESSAGE-
SHA256 hash, the HMAC will be at most 32 bytes. The HMAC MUST NOT be INTEGRITY-SHA256 attribute contains an initial portion of the HMAC-
truncated below a minimum size of 16 bytes. If truncation is SHA-256 [RFC2104] of the STUN message. The value will be at most 32
employed then the HMAC size MUST be a multiple of 4. Truncation MUST bytes and MUST be a positive multiple of 4 bytes. The HMAC MUST NOT
be done by stripping off the final bytes. STUN Usages can define be truncated below a minimum size of 16 bytes. The value must be the
their own truncation limits, as long as they adhere to the guidelines full 32 bytes unless the STUN Usage explicitly specifies that
specificed above. STUN Usages that do not define truncation limits truncation is allowed. STUN Usages may specify a minimum length
MUST NOT use truncation at all. longer than 4 bytes.
The text used as input to HMAC is the STUN message, including the
header, up to and including the attribute preceding the MESSAGE-
INTEGRITY-SHA256 attribute. With the exception of the FINGERPRINT
attribute, which appears after MESSAGE-INTEGRITY-SHA256, agents MUST
ignore all other attributes that follow MESSAGE-INTEGRITY-SHA256.
The key for the HMAC depends on which credential mechanism is in use. The key for the HMAC depends on which credential mechanism is in use.
Section 9.1.1 defines the key for the short-term credential mechanism Section 9.1.1 defines the key for the short-term credential mechanism
and Section 9.2.2 defines the key for the long-term credential and Section 9.2.2 defines the key for the long-term credential
mechanism. Other credential mechanism MUST define the key that is mechanism. Other credential mechanism MUST define the key that is
used for the HMAC. used for the HMAC.
Based on the rules above, the hash used to construct MESSAGE- The text used as input to HMAC is the STUN message, up to and
INTEGRITY-SHA256 includes the length field from the STUN message including the attribute preceding the MESSAGE-INTEGRITY-SHA256
header. Prior to performing the hash, the MESSAGE-INTEGRITY-SHA256 attribute. The length field of the STUN message header is adjusted
attribute MUST be inserted into the message (with dummy content). to point to the end of the MESSAGE-INTEGRITY-SHA256 attribute. The
The length MUST then be set to point to the length of the message up value of the MESSAGE-INTEGRITY-SHA256 attribute is set to a dummy
to, and including, the MESSAGE-INTEGRITY-SHA256 attribute itself, but value.
excluding any attributes after it. Once the computation is
performed, the value of the MESSAGE-INTEGRITY-SHA256 attribute can be Once the computation is performed, the value of the MESSAGE-
filled in, and the value of the length in the STUN header can be set INTEGRITY-SHA256 attribute is filled in, and the value of the length
to its correct value -- the length of the entire message. Similarly, in the STUN header is set to its correct value -- the length of the
when validating the MESSAGE-INTEGRITY-SHA256, the length field should entire message. Similarly, when validating the MESSAGE-INTEGRITY-
be adjusted to point to the end of the MESSAGE-INTEGRITY-SHA256 SHA256, the length field in the STUN header must be adjusted to point
attribute prior to calculating the HMAC. Such adjustment is to the end of the MESSAGE-INTEGRITY-SHA256 attribute prior to
necessary when attributes, such as FINGERPRINT, appear after MESSAGE- calculating the HMAC over the STUN message, up to and including the
INTEGRITY-SHA256. attribute preceding the MESSAGE-INTEGRITY-SHA256 attribute. Such
adjustment is necessary when attributes, such as FINGERPRINT, appear
after MESSAGE-INTEGRITY-SHA256. See also Appendix B.1 for examples
of such calculations.
14.7. FINGERPRINT 14.7. FINGERPRINT
The FINGERPRINT attribute MAY be present in all STUN messages. The The FINGERPRINT attribute MAY be present in all STUN messages.
value of the attribute is computed as the CRC-32 of the STUN message
up to (but excluding) the FINGERPRINT attribute itself, XOR'ed with The value of the attribute is computed as the CRC-32 of the STUN
the 32-bit value 0x5354554e (the XOR helps in cases where an message up to (but excluding) the FINGERPRINT attribute itself,
application packet is also using CRC-32 in it). The 32-bit CRC is XOR'ed with the 32-bit value 0x5354554e. (The XOR operation ensures
the one defined in ITU V.42 [ITU.V42.2002], which has a generator that the FINGERPRINT test will not report a false positive on a
polynomial of x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1. packet containing a CRC-32 generated by an application protocol.)
See the sample code for the CRC-32 in Section 8 of [RFC1952]. The 32-bit CRC is the one defined in ITU V.42 [ITU.V42.2002], which
has a generator polynomial of
x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1. See the sample
code for the CRC-32 in Section 8 of [RFC1952].
When present, the FINGERPRINT attribute MUST be the last attribute in When present, the FINGERPRINT attribute MUST be the last attribute in
the message, and thus will appear after MESSAGE-INTEGRITY. the message, and thus will appear after MESSAGE-INTEGRITY and
MESSAGE-INTEGRITY-SHA256.
The FINGERPRINT attribute can aid in distinguishing STUN packets from The FINGERPRINT attribute can aid in distinguishing STUN packets from
packets of other protocols. See Section 7. packets of other protocols. See Section 7.
As with MESSAGE-INTEGRITY, the CRC used in the FINGERPRINT attribute As with MESSAGE-INTEGRITY and MESSAGE-INTEGRITY-SHA256, the CRC used
covers the length field from the STUN message header. Therefore, in the FINGERPRINT attribute covers the length field from the STUN
this value must be correct and include the CRC attribute as part of message header. Therefore, this value must be correct and include
the message length, prior to computation of the CRC. When using the the CRC attribute as part of the message length, prior to computation
FINGERPRINT attribute in a message, the attribute is first placed of the CRC. When using the FINGERPRINT attribute in a message, the
into the message with a dummy value, then the CRC is computed, and attribute is first placed into the message with a dummy value, then
then the value of the attribute is updated. If the MESSAGE-INTEGRITY the CRC is computed, and then the value of the attribute is updated.
attribute is also present, then it must be present with the correct If the MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-SHA256 attribute are
message-integrity value before the CRC is computed, since the CRC is also present, then they must be present with the correct message-
done over the value of the MESSAGE-INTEGRITY attribute as well. integrity value before the CRC is computed, since the CRC is done
over the value of the MESSAGE-INTEGRITY and MESSAGE-INTEGRITY-SHA256
attributes as well.
14.8. ERROR-CODE 14.8. ERROR-CODE
The ERROR-CODE attribute is used in error response messages. It The ERROR-CODE attribute is used in error response messages. It
contains a numeric error code value in the range of 300 to 699 plus a contains a numeric error code value in the range of 300 to 699 plus a
textual reason phrase encoded in UTF-8 [RFC3629], and is consistent textual reason phrase encoded in UTF-8 [RFC3629], and is consistent
in its code assignments and semantics with SIP [RFC3261] and HTTP in its code assignments and semantics with SIP [RFC3261] and HTTP
[RFC7231]. The reason phrase is meant for user consumption, and can [RFC7231]. The reason phrase is meant for user consumption, and can
be anything appropriate for the error code. Recommended reason be anything appropriate for the error code. Recommended reason
phrases for the defined error codes are included in the IANA registry phrases for the defined error codes are included in the IANA registry
for error codes. The reason phrase MUST be a UTF-8 [RFC3629] encoded for error codes. The reason phrase MUST be a UTF-8 [RFC3629] encoded
sequence of less than 128 characters (which can be as long as 763 sequence of less than 128 characters (which can be as long as 509
bytes). bytes when encoding them or 763 bytes when decoding them).
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved, should be 0 |Class| Number | | Reserved, should be 0 |Class| Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reason Phrase (variable) .. | Reason Phrase (variable) ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 7: ERROR-CODE Attribute Figure 7: ERROR-CODE Attribute
To facilitate processing, the class of the error code (the hundreds To facilitate processing, the class of the error code (the hundreds
digit) is encoded separately from the rest of the code, as shown in digit) is encoded separately from the rest of the code, as shown in
Figure 7. Figure 7.
The Reserved bits SHOULD be 0, and are for alignment on 32-bit The Reserved bits SHOULD be 0, and are for alignment on 32-bit
boundaries. Receivers MUST ignore these bits. The Class represents boundaries. Receivers MUST ignore these bits. The Class represents
the hundreds digit of the error code. The value MUST be between 3 the hundreds digit of the error code. The value MUST be between 3
and 6. The Number represents the error code modulo 100, and its and 6. The Number represents the binary encoding of the error code
value MUST be between 0 and 99. modulo 100, and its value MUST be between 0 and 99.
The following error codes, along with their recommended reason The following error codes, along with their recommended reason
phrases, are defined: phrases, are defined:
300 Try Alternate: The client should contact an alternate server for 300 Try Alternate: The client should contact an alternate server for
this request. This error response MUST only be sent if the this request. This error response MUST only be sent if the
request included either a USERNAME or USERHASH attribute and a request included either a USERNAME or USERHASH attribute and a
valid MESSAGE-INTEGRITY attribute; otherwise, it MUST NOT be sent valid MESSAGE-INTEGRITY attribute; otherwise, it MUST NOT be sent
and error code 400 (Bad Request) is suggested. This error and error code 400 (Bad Request) is suggested. This error
response MUST be protected with the MESSAGE-INTEGRITY attribute, response MUST be protected with the MESSAGE-INTEGRITY attribute,
skipping to change at page 43, line 28 skipping to change at page 43, line 34
client should try again. client should try again.
14.9. REALM 14.9. REALM
The REALM attribute may be present in requests and responses. It The REALM attribute may be present in requests and responses. It
contains text that meets the grammar for "realm-value" as described contains text that meets the grammar for "realm-value" as described
in [RFC3261] but without the double quotes and their surrounding in [RFC3261] but without the double quotes and their surrounding
whitespace. That is, it is an unquoted realm-value (and is therefore whitespace. That is, it is an unquoted realm-value (and is therefore
a sequence of qdtext or quoted-pair). It MUST be a UTF-8 [RFC3629] a sequence of qdtext or quoted-pair). It MUST be a UTF-8 [RFC3629]
encoded sequence of less than 128 characters (which can be as long as encoded sequence of less than 128 characters (which can be as long as
763 bytes), and MUST have been processed using the OpaqueString 509 bytes when encoding them and a long as 763 bytes when decoding
profile [RFC8265]. them), and MUST have been processed using the OpaqueString profile
[RFC8265].
Presence of the REALM attribute in a request indicates that long-term Presence of the REALM attribute in a request indicates that long-term
credentials are being used for authentication. Presence in certain credentials are being used for authentication. Presence in certain
error responses indicates that the server wishes the client to use a error responses indicates that the server wishes the client to use a
long-term credential for authentication. long-term credential in that realm for authentication.
14.10. NONCE 14.10. NONCE
The NONCE attribute may be present in requests and responses. It The NONCE attribute may be present in requests and responses. It
contains a sequence of qdtext or quoted-pair, which are defined in contains a sequence of qdtext or quoted-pair, which are defined in
RFC 3261 [RFC3261]. Note that this means that the NONCE attribute RFC 3261 [RFC3261]. Note that this means that the NONCE attribute
will not contain actual quote characters. See [RFC7616], will not contain actual the surrounding quote characters. See
Section 5.4, for guidance on selection of nonce values in a server. [RFC7616], Section 5.4, for guidance on selection of nonce values in
It MUST be less than 128 characters (which can be as long as 763 a server. It MUST be less than 128 characters (which can be as long
bytes). as 763 bytes).
14.11. PASSWORD-ALGORITHMS 14.11. PASSWORD-ALGORITHMS
The PASSWORD-ALGORITHMS attribute may be present in requests and The PASSWORD-ALGORITHMS attribute may be present in requests and
responses. It contains the list of algorithms that the server can responses. It contains the list of algorithms that the server can
use to derive the long-term password. use to derive the long-term password.
The set of known algorithms is maintained by IANA. The initial set The set of known algorithms is maintained by IANA. The initial set
defined by this specification is found in Section 17.5. defined by this specification is found in Section 17.5.
The attribute contains a list of algorithm numbers and variable The attribute contains a list of algorithm numbers and variable
length parameters. The algorithm number is a 16-bit value as defined length parameters. The algorithm number is a 16-bit value as defined
in Section 17.5. The parameters start with the actual length of the in Section 17.5. The parameters start with the length (prior to
parameters as a 16-bit value, followed by the parameters that are padding) of the parameters as a 16-bit value, followed by the
specific to each algorithm. The parameters are padded to a 32-bit parameters that are specific to each algorithm. The parameters are
boundary, in the same manner as an attribute. padded to a 32-bit boundary, in the same manner as an attribute.
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Algorithm 1 | Algorithm 1 Parameters Length | | Algorithm 1 | Algorithm 1 Parameters Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Algorithm 1 Parameters (variable) | Algorithm 1 Parameters (variable)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Algorithm 2 | Algorithm 2 Parameters Length | | Algorithm 2 | Algorithm 2 Parameters Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
skipping to change at page 44, line 41 skipping to change at page 44, line 47
The PASSWORD-ALGORITHM attribute is present only in requests. It The PASSWORD-ALGORITHM attribute is present only in requests. It
contains the algorithms that the server must use to derive the long- contains the algorithms that the server must use to derive the long-
term password. term password.
The set of known algorithms is maintained by IANA. The initial set The set of known algorithms is maintained by IANA. The initial set
defined by this specification is found in Section 17.5. defined by this specification is found in Section 17.5.
The attribute contains an algorithm number and variable length The attribute contains an algorithm number and variable length
parameters. The algorithm number is a 16-bit value as defined in parameters. The algorithm number is a 16-bit value as defined in
Section 17.5. The parameters starts with the actual length of the Section 17.5. The parameters starts with the length (prior to
parameters as a 16-bit value, followed by the parameters that are padding) of the parameters as a 16-bit value, followed by the
specific to the algorithm. The parameters are padded to a 32-bit parameters that are specific to the algorithm. The parameters are
boundary, in the same manner as an attribute. padded to a 32-bit boundary, in the same manner as an attribute.
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Algorithm | Algorithm Parameters Length | | Algorithm | Algorithm Parameters Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Algorithm Parameters (variable) | Algorithm Parameters (variable)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 9: Format of PASSWORD-ALGORITHM Attribute Figure 9: Format of PASSWORD-ALGORITHM Attribute
skipping to change at page 45, line 46 skipping to change at page 45, line 46
14.14. SOFTWARE 14.14. SOFTWARE
The SOFTWARE attribute contains a textual description of the software The SOFTWARE attribute contains a textual description of the software
being used by the agent sending the message. It is used by clients being used by the agent sending the message. It is used by clients
and servers. Its value SHOULD include manufacturer and version and servers. Its value SHOULD include manufacturer and version
number. The attribute has no impact on operation of the protocol, number. The attribute has no impact on operation of the protocol,
and serves only as a tool for diagnostic and debugging purposes. The and serves only as a tool for diagnostic and debugging purposes. The
value of SOFTWARE is variable length. It MUST be a UTF-8 [RFC3629] value of SOFTWARE is variable length. It MUST be a UTF-8 [RFC3629]
encoded sequence of less than 128 characters (which can be as long as encoded sequence of less than 128 characters (which can be as long as
763 bytes). 509 when encoding them and as long as 763 bytes when decoding them).
14.15. ALTERNATE-SERVER 14.15. ALTERNATE-SERVER
The alternate server represents an alternate transport address The alternate server represents an alternate transport address
identifying a different STUN server that the STUN client should try. identifying a different STUN server that the STUN client should try.
It is encoded in the same way as MAPPED-ADDRESS, and thus refers to a It is encoded in the same way as MAPPED-ADDRESS, and thus refers to a
single server by IP address. The IP address family MUST be identical single server by IP address. The IP address family MUST be identical
to that of the source IP address of the request. to that of the source IP address of the request.
14.16. ALTERNATE-DOMAIN 14.16. ALTERNATE-DOMAIN
The alternate domain represents the domain name that is used to The alternate domain represents the domain name that is used to
verify the IP address in the ALTERNATE-SERVER attribute when the verify the IP address in the ALTERNATE-SERVER attribute when the
transport protocol uses TLS or DTLS. transport protocol uses TLS or DTLS.
The value of ALTERNATE-DOMAIN is variable length. It MUST be a UTF-8 The value of ALTERNATE-DOMAIN is variable length. It MUST be a UTF-8
[RFC3629] encoded sequence of less than 128 characters (which can be [RFC3629] encoded sequence of less than 128 characters (which can be
as long as 763 bytes). as long as 509 bytes when encoding them and as long as 763 bytes when
decoding them).
15. Security Considerations 15. Security Considerations
15.1. Attacks against the Protocol 15.1. Attacks against the Protocol
15.1.1. Outside Attacks 15.1.1. Outside Attacks
An attacker can try to modify STUN messages in transit, in order to An attacker can try to modify STUN messages in transit, in order to
cause a failure in STUN operation. These attacks are detected for cause a failure in STUN operation. These attacks are detected for
both requests and responses through the message-integrity mechanism, both requests and responses through the message-integrity mechanism,
skipping to change at page 47, line 23 skipping to change at page 47, line 23
which is subject to bid down attacks by an on-path attacker. which is subject to bid down attacks by an on-path attacker.
Protection of the channel itself, using TLS or DTLS, mitigates these Protection of the channel itself, using TLS or DTLS, mitigates these
attacks. Timely removal of the support of MESSAGE-INTEGRITY in a attacks. Timely removal of the support of MESSAGE-INTEGRITY in a
future version of STUN is necessary. future version of STUN is necessary.
15.1.2. Inside Attacks 15.1.2. Inside Attacks
A rogue client may try to launch a DoS attack against a server by A rogue client may try to launch a DoS attack against a server by
sending it a large number of STUN requests. Fortunately, STUN sending it a large number of STUN requests. Fortunately, STUN
requests can be processed statelessly by a server, making such requests can be processed statelessly by a server, making such
attacks hard to launch. attacks hard to launch effectively.
A rogue client may use a STUN server as a reflector, sending it A rogue client may use a STUN server as a reflector, sending it
requests with a falsified source IP address and port. In such a requests with a falsified source IP address and port. In such a
case, the response would be delivered to that source IP and port. case, the response would be delivered to that source IP and port.
There is no amplification of the number of packets with this attack There is no amplification of the number of packets with this attack
(the STUN server sends one packet for each packet sent by the (the STUN server sends one packet for each packet sent by the
client), though there is a small increase in the amount of data, client), though there is a small increase in the amount of data,
since STUN responses are typically larger than requests. This attack since STUN responses are typically larger than requests. This attack
is mitigated by ingress source address filtering. is mitigated by ingress source address filtering.
skipping to change at page 49, line 27 skipping to change at page 49, line 27
the attack, the attacker must have already been able to observe the attack, the attacker must have already been able to observe
packets from the client to the STUN server. In most cases (such as packets from the client to the STUN server. In most cases (such as
when the attack is launched from an access network), this means that when the attack is launched from an access network), this means that
the attacker could already observe packets sent to the client. This the attacker could already observe packets sent to the client. This
attack is, as a result, only useful for observing traffic by attack is, as a result, only useful for observing traffic by
attackers on the path from the client to the STUN server, but not attackers on the path from the client to the STUN server, but not
generally on the path of packets being routed towards the client. generally on the path of packets being routed towards the client.
15.3. Hash Agility Plan 15.3. Hash Agility Plan
This specification uses both HMAC-SHA-1 and HMAC-SHA-256 for This specification uses both HMAC-SHA1 and HMAC-SHA256 for
computation of the message integrity. If, at a later time, HMAC- computation of the message integrity. If, at a later time, HMAC-
SHA-256 is found to be compromised, the following is the remedy that SHA256 is found to be compromised, the following is the remedy that
will be applied: will be applied:
o Both a new message-integrity attribute and a new STUN Security o Both a new message-integrity attribute and a new STUN Security
Feature bit will be allocated in a Standard Track document. The Feature bit will be allocated in a Standard Track document. The
new message-integrity attribute will have its value computed using new message-integrity attribute will have its value computed using
a new hash. The STUN Security Feature bit will be used to a new hash. The STUN Security Feature bit will be used to
simultaneously signal to a STUN client using the Long Term simultaneously signal to a STUN client using the Long Term
Credential Mechanism that this server supports this new hash Credential Mechanism that this server supports this new hash
algorithm, and will prevent bid down attacks on the new message- algorithm, and will prevent bid down attacks on the new message-
integrity attribute. integrity attribute.
o STUN Client and Server using the Short Term Credential Mechanism o STUN Client and Server using the Short Term Credential Mechanism
will need to get an updated external mechanism that they can use will need to get an updated external mechanism that they can use
to signal what message-integrity attributes are in use. to signal what message-integrity attributes are in use.
The bid down protection mechanism described in this document is new, The bid down protection mechanism described in this document is new,
and thus cannot currently protect against a bid down attack that and thus cannot currently protect against a bid down attack that
lowers the strength of the hash algorithm to HMAC-SHA-1. This is lowers the strength of the hash algorithm to HMAC-SHA1. This is why,
why, after a transition period, a new document updating this document after a transition period, a new document updating this document will
will assign a new STUN Security Feature bit for deprecating HMAC-SHA- assign a new STUN Security Feature bit for deprecating HMAC-SHA1.
1. When used, this bit will signal that HMAC-SHA-1 is deprecated and When used, this bit will signal that HMAC-SHA1 is deprecated and
should no longer be used. should no longer be used.
16. IAB Considerations 16. IAB Considerations
The IAB has studied the problem of Unilateral Self-Address Fixing The IAB has studied the problem of Unilateral Self-Address Fixing
(UNSAF), which is the general process by which a client attempts to (UNSAF), which is the general process by which a client attempts to
determine its address in another realm on the other side of a NAT determine its address in another realm on the other side of a NAT
through a collaborative protocol reflection mechanism ([RFC3424]). through a collaborative protocol reflection mechanism ([RFC3424]).
STUN can be used to perform this function using a Binding request/ STUN can be used to perform this function using a Binding request/
response transaction if one agent is behind a NAT and the other is on response transaction if one agent is behind a NAT and the other is on
skipping to change at page 50, line 25 skipping to change at page 50, line 25
The IAB has suggested that protocols developed for this purpose The IAB has suggested that protocols developed for this purpose
document a specific set of considerations. Because some STUN usages document a specific set of considerations. Because some STUN usages
provide UNSAF functions (such as ICE [I-D.ietf-ice-rfc5245bis] ), and provide UNSAF functions (such as ICE [I-D.ietf-ice-rfc5245bis] ), and
others do not (such as SIP Outbound [RFC5626]), answers to these others do not (such as SIP Outbound [RFC5626]), answers to these
considerations need to be addressed by the usages themselves. considerations need to be addressed by the usages themselves.
17. IANA Considerations 17. IANA Considerations
17.1. STUN Security Features Registry 17.1. STUN Security Features Registry
A STUN Security Feature set is a 24 bit value. A STUN Security Feature set defines 24 bit as flags.
IANA is requested to create a new registry containing the STUN IANA is requested to create a new registry containing the STUN
Security Features that are protected by the bid down attack Security Features that are protected by the bid down attack
prevention mechanism described in section Section 9.2.1. prevention mechanism described in section Section 9.2.1.
The initial STUN Security Features are: The initial STUN Security Features are:
0x000001: Password algorithms Bit 0: Password algorithms
0x000002: Username anonymity Bit 1: Username anonymity
Bit 2-23: Unassigned
New Security Features are assigned by a Standard Action [RFC8126]. New Security Features are assigned by a Standards Action [RFC8126].
17.2. STUN Methods Registry 17.2. STUN Methods Registry
IANA is requested to update the name for method 0x002 and the IANA is requested to update the name for method 0x002 and the
reference from RFC 5389 to RFC-to-be for the following STUN methods: reference from RFC 5389 to RFC-to-be for the following STUN methods:
0x000: (Reserved) 0x000: (Reserved)
0x001: Binding 0x001: Binding
0x002: (Reserved; prior to [RFC5389] this was SharedSecret) 0x002: (Reserved; prior to [RFC5389] this was SharedSecret)
skipping to change at page 51, line 43 skipping to change at page 51, line 43
IANA is requested to add the following attribute to the STUN IANA is requested to add the following attribute to the STUN
Attribute Registry: Attribute Registry:
Comprehension-required range (0x0000-0x7FFF): Comprehension-required range (0x0000-0x7FFF):
0xXXXX: MESSAGE-INTEGRITY-SHA256 0xXXXX: MESSAGE-INTEGRITY-SHA256
0xXXXX: PASSWORD-ALGORITHM 0xXXXX: PASSWORD-ALGORITHM
0xXXXX: USERHASH 0xXXXX: USERHASH
Comprehension-optional range (0x8000-0xFFFF) Comprehension-optional range (0x8000-0xFFFF)
0xXXXX: PASSSORD-ALGORITHMS 0xXXXX: PASSWORD-ALGORITHMS
0xXXXX: ALTERNATE-DOMAIN 0xXXXX: ALTERNATE-DOMAIN
17.4. STUN Error Code Registry 17.4. STUN Error Code Registry
IANA is requested to update the reference from RFC 5389 to RFC-to-be IANA is requested to update the reference from RFC 5389 to RFC-to-be
for the Error Codes given in Section 14.8. for the Error Codes given in Section 14.8.
17.5. Password Algorithm Registry IANA is requested to change the name of the 401 Error Code from
"Unauthorized" to "Unauthenticated".
17.5. STUN Password Algorithm Registry
IANA is requested to create a new registry for Password Algorithm. IANA is requested to create a new registry for Password Algorithm.
A Password Algorithm is a hex number in the range 0x0000 - 0xFFFF. A Password Algorithm is a hex number in the range 0x0000 - 0xFFFF.
The initial Password Algorithms are: The initial Password Algorithms are:
0x0000: Reserved
0x0001: MD5 0x0001: MD5
0x0002: SHA256 0x0002: SHA-256
0x0003-0xFFFF: Unassigned
Password Algorithms in the first half of the range (0x0000 - 0x7FFF) Password Algorithms in the first half of the range (0x0000 - 0x7FFF)
are assigned by IETF Review [RFC8126]. Password Algorithms in the are assigned by IETF Review [RFC8126]. Password Algorithms in the
second half of the range (0x8000 - 0xFFFF) are assigned by Designated second half of the range (0x8000 - 0xFFFF) are assigned by Designated
Expert [RFC8126]. Expert [RFC8126].
17.5.1. Password Algorithms 17.5.1. Password Algorithms
17.5.1.1. MD5 17.5.1.1. MD5
This password algorithm is taken from [RFC1321]. This password algorithm is taken from [RFC1321].
The key length is 20 bytes and the parameters value is empty. The key length is 20 bytes and the parameters value is empty.
Note: This algorithm MUST only be used for compatibility with legacy Note: This algorithm MUST only be used for compatibility with legacy
systems. systems.
key = MD5(username ":" realm ":" OpaqueString(password)) key = MD5(username ":" realm ":" OpaqueString(password))
17.5.1.2. SHA256 17.5.1.2. SHA-256
This password algorithm is taken from [RFC7616]. This password algorithm is taken from [RFC7616].
The key length is 32 bytes and the parameters value is empty. The key length is 32 bytes and the parameters value is empty.
key = SHA256(username ":" realm ":" OpaqueString(password)) key = SHA-256(username ":" realm ":" OpaqueString(password))
17.6. STUN UDP and TCP Port Numbers 17.6. STUN UDP and TCP Port Numbers
IANA is requested to update the reference from RFC 5389 to RFC-to-be IANA is requested to update the reference from RFC 5389 to RFC-to-be
for the following ports: for the following ports in the Service Name and Transport Protocol
Port Number Registry.
stun 3478/tcp Session Traversal Utilities for NAT (STUN) port stun 3478/tcp Session Traversal Utilities for NAT (STUN) port
stun 3478/udp Session Traversal Utilities for NAT (STUN) port stun 3478/udp Session Traversal Utilities for NAT (STUN) port
stuns 5349/tcp Session Traversal Utilities for NAT (STUN) port stuns 5349/tcp Session Traversal Utilities for NAT (STUN) port
18. Changes since RFC 5389 18. Changes since RFC 5389
This specification obsoletes [RFC5389]. This specification differs This specification obsoletes [RFC5389]. This specification differs
from RFC 5389 in the following ways: from RFC 5389 in the following ways:
o Added support for DTLS-over-UDP (RFC 6347). o Added support for DTLS-over-UDP [RFC6347].
o Made clear that the RTO is considered stale if there is no o Made clear that the RTO is considered stale if there is no
transactions with the server. transactions with the server.
o Aligned the RTO calculation with RFC 6298. o Aligned the RTO calculation with [RFC6298].
o Updated the cipher suites for TLS. o Updated the cipher suites for TLS.
o Added support for STUN URI (RFC 7064). o Added support for STUN URI [RFC7064].
o Added support for SHA256 message integrity. o Added support for SHA256 message integrity.
o Updated the PRECIS support to RFC 8265. o Updated the PRECIS support to [RFC8265].
o Added protocol and registry to choose the password encryption o Added protocol and registry to choose the password encryption
algorithm. algorithm.
o Added support for anonymous username. o Added support for anonymous username.
o Added protocol and registry for preventing biddown attacks. o Added protocol and registry for preventing biddown attacks.
o Sharing a NONCE is no longer permitted. o Sharing a NONCE is no longer permitted.
skipping to change at page 54, line 19 skipping to change at page 54, line 23
[RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, [RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
DOI 10.17487/RFC1321, April 1992, DOI 10.17487/RFC1321, April 1992,
<https://www.rfc-editor.org/info/rfc1321>. <https://www.rfc-editor.org/info/rfc1321>.
[RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-
Hashing for Message Authentication", RFC 2104, Hashing for Message Authentication", RFC 2104,
DOI 10.17487/RFC2104, February 1997, DOI 10.17487/RFC2104, February 1997,
<https://www.rfc-editor.org/info/rfc2104>. <https://www.rfc-editor.org/info/rfc2104>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>.
[RFC2782] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for [RFC2782] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for
specifying the location of services (DNS SRV)", RFC 2782, specifying the location of services (DNS SRV)", RFC 2782,
DOI 10.17487/RFC2782, February 2000, DOI 10.17487/RFC2782, February 2000,
<https://www.rfc-editor.org/info/rfc2782>. <https://www.rfc-editor.org/info/rfc2782>.
[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November
2003, <https://www.rfc-editor.org/info/rfc3629>. 2003, <https://www.rfc-editor.org/info/rfc3629>.
[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data
skipping to change at page 55, line 23 skipping to change at page 55, line 23
[RFC7350] Petit-Huguenin, M. and G. Salgueiro, "Datagram Transport [RFC7350] Petit-Huguenin, M. and G. Salgueiro, "Datagram Transport
Layer Security (DTLS) as Transport for Session Traversal Layer Security (DTLS) as Transport for Session Traversal
Utilities for NAT (STUN)", RFC 7350, DOI 10.17487/RFC7350, Utilities for NAT (STUN)", RFC 7350, DOI 10.17487/RFC7350,
August 2014, <https://www.rfc-editor.org/info/rfc7350>. August 2014, <https://www.rfc-editor.org/info/rfc7350>.
[RFC7616] Shekh-Yusef, R., Ahrens, D., and S. Bremer, "HTTP Digest [RFC7616] Shekh-Yusef, R., Ahrens, D., and S. Bremer, "HTTP Digest
Access Authentication", RFC 7616, DOI 10.17487/RFC7616, Access Authentication", RFC 7616, DOI 10.17487/RFC7616,
September 2015, <https://www.rfc-editor.org/info/rfc7616>. September 2015, <https://www.rfc-editor.org/info/rfc7616>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <http://www.rfc-editor.org/info/rfc8174>.
[RFC8200] Deering, S. and R. Hinden, "Internet Protocol, Version 6 [RFC8200] Deering, S. and R. Hinden, "Internet Protocol, Version 6
(IPv6) Specification", RFC 8200, STD 86, (IPv6) Specification", RFC 8200, STD 86,
DOI 10.17487/RFC8200, July 2017, DOI 10.17487/RFC8200, July 2017,
<https://www.rfc-editor.org/info/rf8200>. <https://www.rfc-editor.org/info/rf8200>.
[RFC8265] Saint-Andre, P. and A. Melnikov, "Preparation, [RFC8265] Saint-Andre, P. and A. Melnikov, "Preparation,
Enforcement, and Comparison of Internationalized Strings Enforcement, and Comparison of Internationalized Strings
Representing Usernames and Passwords", RFC 8265, Representing Usernames and Passwords", RFC 8265,
DOI 10.17487/RFC8265, October 2017, DOI 10.17487/RFC8265, October 2017,
<https://www.rfc-editor.org/info/rfc8265>. <https://www.rfc-editor.org/info/rfc8265>.
skipping to change at page 60, line 9 skipping to change at page 60, line 9
Note: Before publication, the XX XX placeholder must be replaced by Note: Before publication, the XX XX placeholder must be replaced by
the value assigned to MESSAGE-INTEGRITY-SHA256 and USERHASH by the value assigned to MESSAGE-INTEGRITY-SHA256 and USERHASH by
IANA. The MESSAGE-INTEGRITY-SHA256 attribute value will need to IANA. The MESSAGE-INTEGRITY-SHA256 attribute value will need to
be updated after this. be updated after this.
Appendix C. Release notes Appendix C. Release notes
This section must be removed before publication as an RFC. This section must be removed before publication as an RFC.
C.1. Modifications between draft-ietf-tram-stunbis-14 and draft-ietf- C.1. Modifications between draft-ietf-tram-stunbis-16 and draft-ietf-
tram-stunbis-15
o Replace "failure response" with "error response".
o Fix wrong section number.
o Use "Username anonymity" everywhere.
o Align with UTF-8 deprecation.
o Fix MESSAGE-INTEGRITY-256.
o Update references.
o Updates in the IANA sections.
o s/HMAC-SHA-1/HMAC-SHA1/, s/HMAC-SHA-256/HMAC-SHA256/, s/SHA1/SHA-
1/, and s/SHA256/SHA-256/.
o Fixed definitions of STUN clients/servers.
o Fixed STUN message structure definition.
o Missing text.
o Add text explicitly saying that responses do not have to be in the
same orders than requests.
o /other application/other protocol/
o Add text explicitly saying that the security feature encoding is 4
character.
o Fixed discrepancy in section 9.2.3/9.2.3.1.
o s/invalidate/revoke/.
o Removed sentences about checking USERHASH in responses, as this
should not happen.
o Specify that ALTERNATE-SERVER carries an IP address.
o More modifications following review...
C.2. Modifications between draft-ietf-tram-stunbis-15 and draft-ietf-
tram-stunbis-14
o Reverted the RFC 2119 boilerplate to what was in RFC 5389.
o Reverted the V.42 reference to the 2002 version.
o Updated some references.
C.3. Modifications between draft-ietf-tram-stunbis-14 and draft-ietf-
tram-stunbis-13 tram-stunbis-13
o Reorder the paragraphs in section 9.1.4. o Reorder the paragraphs in section 9.1.4.
o The realm is now processed through Opaque in section 9.2.2. o The realm is now processed through Opaque in section 9.2.2.
o Make clear in section 9.2.4 that it is an exclusive-xor. o Make clear in section 9.2.4 that it is an exclusive-xor.
o Removed text that implied that nonce sharing was explicitly o Removed text that implied that nonce sharing was explicitly
permitted in RFC 5389. permitted in RFC 5389.
o In same section, s/username/value/ for USERCASH. o In same section, s/username/value/ for USERCASH.
o Modify the IANA requests to explicitly say that the reserved o Modify the IANA requests to explicitly say that the reserved
codepoints were prior to RFC 5389. codepoints were prior to RFC 5389.
C.2. Modifications between draft-ietf-tram-stunbis-13 and draft-ietf- C.4. Modifications between draft-ietf-tram-stunbis-13 and draft-ietf-
tram-stunbis-12 tram-stunbis-12
o Update references. o Update references.
o Fixes some text following Shepherd review. o Fixes some text following Shepherd review.
o Update co-author info. o Update co-author info.
C.3. Modifications between draft-ietf-tram-stunbis-12 and draft-ietf- C.5. Modifications between draft-ietf-tram-stunbis-12 and draft-ietf-
tram-stunbis-11 tram-stunbis-11
o Clarifies the procedure to define a new hash algorithm for o Clarifies the procedure to define a new hash algorithm for
message-integrity. message-integrity.
o Explain the procedure to deprecate SHA1 as message-integrity. o Explain the procedure to deprecate SHA1 as message-integrity.
o Added procedure for Happy Eyeballs (RFC 6555). o Added procedure for Happy Eyeballs (RFC 6555).
o Added verification that Happy Eyeballs works in the STUN Usage o Added verification that Happy Eyeballs works in the STUN Usage
checklist. checklist.
o Add reference to Base64 RFC. o Add reference to Base64 RFC.
o Changed co-author affiliation. o Changed co-author affiliation.
C.4. Modifications between draft-ietf-tram-stunbis-11 and draft-ietf- C.6. Modifications between draft-ietf-tram-stunbis-11 and draft-ietf-
tram-stunbis-10 tram-stunbis-10
o Made clear that the same HMAC than received in response of short o Made clear that the same HMAC than received in response of short
term credential must be used for subsequent transactions. term credential must be used for subsequent transactions.
o s/URL/URI/ o s/URL/URI/
o The "nonce cookie" is now mandatory to signal that SHA256 must be o The "nonce cookie" is now mandatory to signal that SHA256 must be
used in the next transaction. used in the next transaction.
o s/SHA1/SHA256/ o s/SHA1/SHA256/
o Changed co-author affiliation. o Changed co-author affiliation.
C.5. Modifications between draft-ietf-tram-stunbis-10 and draft-ietf- C.7. Modifications between draft-ietf-tram-stunbis-10 and draft-ietf-
tram-stunbis-09 tram-stunbis-09
o Removed the reserved value in the security registry, as it does o Removed the reserved value in the security registry, as it does
not make sense in a bitset. not make sense in a bitset.
o Updated change list. o Updated change list.
o Updated the minimum truncation size for M-I-256 to 16 bytes. o Updated the minimum truncation size for M-I-256 to 16 bytes.
o Changed the truncation order to match RFC 7518. o Changed the truncation order to match RFC 7518.
skipping to change at page 61, line 43 skipping to change at page 62, line 47
o Stated that STUN Usages have to explicitly state that they can use o Stated that STUN Usages have to explicitly state that they can use
truncation. truncation.
o Removed truncation from the MESSAGE-INTEGRITY attribute. o Removed truncation from the MESSAGE-INTEGRITY attribute.
o Add reference to C code in RFC 1952. o Add reference to C code in RFC 1952.
o Replaced RFC 2818 reference to RFC 6125. o Replaced RFC 2818 reference to RFC 6125.
C.6. Modifications between draft-ietf-tram-stunbis-09 and draft-ietf- C.8. Modifications between draft-ietf-tram-stunbis-09 and draft-ietf-
tram-stunbis-08 tram-stunbis-08
o Removed the reserved value in the security registry, as it does o Removed the reserved value in the security registry, as it does
not make sense in a bitset. not make sense in a bitset.
o Updated change list. o Updated change list.
o Updated the minimum truncation size for M-I-256 to 16 bytes. o Updated the minimum truncation size for M-I-256 to 16 bytes.
o Changed the truncation order to match RFC 7518. o Changed the truncation order to match RFC 7518.
skipping to change at page 62, line 18 skipping to change at page 63, line 22
o Stated that STUN Usages have to explicitly state that they can use o Stated that STUN Usages have to explicitly state that they can use
truncation. truncation.
o Removed truncation from the MESSAGE-INTEGRITY attribute. o Removed truncation from the MESSAGE-INTEGRITY attribute.
o Add reference to C code in RFC 1952. o Add reference to C code in RFC 1952.
o Replaced RFC 2818 reference to RFC 6125. o Replaced RFC 2818 reference to RFC 6125.
C.7. Modifications between draft-ietf-tram-stunbis-09 and draft-ietf- C.9. Modifications between draft-ietf-tram-stunbis-09 and draft-ietf-
tram-stunbis-08 tram-stunbis-08
o Packets discarded in a reliable or unreliable transaction triggers o Packets discarded in a reliable or unreliable transaction triggers
an attack error instead of a timeout error. An attack error on a an attack error instead of a timeout error. An attack error on a
reliable transport is signaled immediately instead of waiting for reliable transport is signaled immediately instead of waiting for
the timeout. the timeout.
o Explicitly state that a received 400 response without o Explicitly state that a received 400 response without
authentication will be dropped until timeout. authentication will be dropped until timeout.
skipping to change at page 62, line 43 skipping to change at page 63, line 47
o The 401 and 438 error response to subsequent requests may use the o The 401 and 438 error response to subsequent requests may use the
previous NONCE/password to authenticate, if they are still previous NONCE/password to authenticate, if they are still
available. available.
o Change "401 Unauthorized" to "401 Unauthenticated" o Change "401 Unauthorized" to "401 Unauthenticated"
o Make clear that in some cases it is impossible to add a MI or MI2 o Make clear that in some cases it is impossible to add a MI or MI2
even if the text says SHOULD NOT. even if the text says SHOULD NOT.
C.8. Modifications between draft-ietf-tram-stunbis-08 and draft-ietf- C.10. Modifications between draft-ietf-tram-stunbis-08 and draft-ietf-
tram-stunbis-07 tram-stunbis-07
o Updated list of changes since RFC 5389. o Updated list of changes since RFC 5389.
o More examples are automatically generated. o More examples are automatically generated.
o Message integrity truncation is fixed at a multiple of 4 bytes, o Message integrity truncation is fixed at a multiple of 4 bytes,
because the padding will not decrease by more than this. because the padding will not decrease by more than this.
o USERHASH contains the 32 bytes of the hash, not a character o USERHASH contains the 32 bytes of the hash, not a character
string. string.
o Updated the example to use the USERHASH attribute and the modified o Updated the example to use the USERHASH attribute and the modified
NONCE attribute. NONCE attribute.
o Updated ICEbis reference. o Updated ICEbis reference.
C.9. Modifications between draft-ietf-tram-stunbis-07 and draft-ietf- C.11. Modifications between draft-ietf-tram-stunbis-07 and draft-ietf-
tram-stunbis-06 tram-stunbis-06
o Add USERHASH attribute to carry the hashed version of the o Add USERHASH attribute to carry the hashed version of the
username. username.
o Add IANA registry and nonce encoding for Security Features that o Add IANA registry and nonce encoding for Security Features that
need to be protected from bid down attacks. need to be protected from bid down attacks.
o Modified MESSAGE-INTEGRITY and MESSAGE-INTEGRITY-SHA256 to support o Modified MESSAGE-INTEGRITY and MESSAGE-INTEGRITY-SHA256 to support
truncation limits (pending cryptographic review), truncation limits (pending cryptographic review),
C.10. Modifications between draft-ietf-tram-stunbis-06 and draft-ietf- C.12. Modifications between draft-ietf-tram-stunbis-06 and draft-ietf-
tram-stunbis-05 tram-stunbis-05
o Changed I-D references to RFC references. o Changed I-D references to RFC references.
o Changed CHANGE-ADDRESS to CHANGE-REQUEST (Errata #4233). o Changed CHANGE-ADDRESS to CHANGE-REQUEST (Errata #4233).
o Added test vector for MESSAGE-INTEGRITY-SHA256. o Added test vector for MESSAGE-INTEGRITY-SHA256.
o Address additional review comments from Jonathan Lennox and o Address additional review comments from Jonathan Lennox and
Brandon Williams. Brandon Williams.
C.11. Modifications between draft-ietf-tram-stunbis-05 and draft-ietf- C.13. Modifications between draft-ietf-tram-stunbis-05 and draft-ietf-
tram-stunbis-04 tram-stunbis-04
o Address review comments from Jonathan Lennox and Brandon Williams. o Address review comments from Jonathan Lennox and Brandon Williams.
C.12. Modifications between draft-ietf-tram-stunbis-04 and draft-ietf- C.14. Modifications between draft-ietf-tram-stunbis-04 and draft-ietf-
tram-stunbis-03 tram-stunbis-03
o Remove SCTP. o Remove SCTP.
o Remove DANE. o Remove DANE.
o s/MESSAGE-INTEGRITY2/MESSAGE-INTEGRITY-SHA256/ o s/MESSAGE-INTEGRITY2/MESSAGE-INTEGRITY-SHA256/
o Remove Salted SHA256 password hash. o Remove Salted SHA256 password hash.
o The RTO delay between transactions is removed. o The RTO delay between transactions is removed.
o Make clear that reusing NONCE will trigger a wasted round trip. o Make clear that reusing NONCE will trigger a wasted round trip.
C.13. Modifications between draft-ietf-tram-stunbis-03 and draft-ietf- C.15. Modifications between draft-ietf-tram-stunbis-03 and draft-ietf-
tram-stunbis-02 tram-stunbis-02
o SCTP prefix is now 0b00000101 instead of 0x11. o SCTP prefix is now 0b00000101 instead of 0x11.
o Add SCTP at various places it was needed. o Add SCTP at various places it was needed.
o Update the hash agility plan to take in account HMAC-SHA-256. o Update the hash agility plan to take in account HMAC-SHA-256.
o Adds the bid down attack on message-integrity in the security o Adds the bid down attack on message-integrity in the security
section. section.
C.14. Modifications between draft-ietf-tram-stunbis-02 and draft-ietf- C.16. Modifications between draft-ietf-tram-stunbis-02 and draft-ietf-
tram-stunbis-01 tram-stunbis-01
o STUN hash algorithm agility (currently only SHA-1 is allowed). o STUN hash algorithm agility (currently only SHA-1 is allowed).
o Clarify terminology, text and guidance for STUN fragmentation. o Clarify terminology, text and guidance for STUN fragmentation.
o Clarify whether it's valid to share nonces across TURN o Clarify whether it's valid to share nonces across TURN
allocations. allocations.
o Prevent the server to allocate the same NONCE to clients with o Prevent the server to allocate the same NONCE to clients with
skipping to change at page 65, line 5 skipping to change at page 66, line 5
transactions, not to serial transactions. That prevents a 3RTT transactions, not to serial transactions. That prevents a 3RTT
delay between the first transaction and the second transaction delay between the first transaction and the second transaction
with long term authentication. with long term authentication.
o Add text saying ORIGIN can increase a request size beyond the MTU o Add text saying ORIGIN can increase a request size beyond the MTU
and so require an SCTPoUDP transport. and so require an SCTPoUDP transport.
o Move the Acknowledgments and Contributor sections to the end of o Move the Acknowledgments and Contributor sections to the end of
the document, in accordance with RFC 7322 section 4. the document, in accordance with RFC 7322 section 4.
C.15. Modifications between draft-ietf-tram-stunbis-01 and draft-ietf- C.17. Modifications between draft-ietf-tram-stunbis-01 and draft-ietf-
tram-stunbis-00 tram-stunbis-00
o Add negotiation mechanism for new password algorithms. o Add negotiation mechanism for new password algorithms.
o Describe the MESSAGE-INTEGRITY/MESSAGE-INTEGRITY2 protocol. o Describe the MESSAGE-INTEGRITY/MESSAGE-INTEGRITY2 protocol.
o Add support for SCTP to solve the fragmentation problem. o Add support for SCTP to solve the fragmentation problem.
o Merge RFC 7350: o Merge RFC 7350:
skipping to change at page 65, line 40 skipping to change at page 66, line 40
* DNS discovery is done from the URI. * DNS discovery is done from the URI.
* Reorganized the text about default ports. * Reorganized the text about default ports.
o Add more C snippets. o Add more C snippets.
o Make clear that the cached RTO is discarded only if there is no o Make clear that the cached RTO is discarded only if there is no
new transations for 10 minutes. new transations for 10 minutes.
C.16. Modifications between draft-salgueiro-tram-stunbis-02 and draft- C.18. Modifications between draft-salgueiro-tram-stunbis-02 and draft-
ietf-tram-stunbis-00 ietf-tram-stunbis-00
o Draft adopted as WG item. o Draft adopted as WG item.
C.17. Modifications between draft-salgueiro-tram-stunbis-02 and draft- C.19. Modifications between draft-salgueiro-tram-stunbis-02 and draft-
salgueiro-tram-stunbis-01 salgueiro-tram-stunbis-01
o Add definition of MESSAGE-INTEGRITY2. o Add definition of MESSAGE-INTEGRITY2.
o Update text and reference from RFC 2988 to RFC 6298. o Update text and reference from RFC 2988 to RFC 6298.
o s/The IAB has mandated/The IAB has suggested/ (Errata #3737). o s/The IAB has mandated/The IAB has suggested/ (Errata #3737).
o Fix the figure for the UNKNOWN-ATTRIBUTES (Errata #2972). o Fix the figure for the UNKNOWN-ATTRIBUTES (Errata #2972).
skipping to change at page 66, line 25 skipping to change at page 67, line 25
o Update text and reference from RFC 2988 to RFC 6298. o Update text and reference from RFC 2988 to RFC 6298.
o s/The IAB has mandated/The IAB has suggested/ (Errata #3737). o s/The IAB has mandated/The IAB has suggested/ (Errata #3737).
o Fix the figure for the UNKNOWN-ATTRIBUTES (Errata #2972). o Fix the figure for the UNKNOWN-ATTRIBUTES (Errata #2972).
o Fix section number and make clear that the original domain name is o Fix section number and make clear that the original domain name is
used for the server certificate verification. This is consistent used for the server certificate verification. This is consistent
with what RFC 5922 (section 4) is doing. (Errata #2010) with what RFC 5922 (section 4) is doing. (Errata #2010)
C.18. Modifications between draft-salgueiro-tram-stunbis-01 and draft- C.20. Modifications between draft-salgueiro-tram-stunbis-01 and draft-
salgueiro-tram-stunbis-00 salgueiro-tram-stunbis-00
o Restore the RFC 5389 text. o Restore the RFC 5389 text.
o Add list of open issues. o Add list of open issues.
Acknowledgements Acknowledgements
Thanks to Michael Tuexen, Tirumaleswar Reddy, Oleg Moskalenko, Simon Thanks to Michael Tuexen, Tirumaleswar Reddy, Oleg Moskalenko, Simon
Perreault, Benjamin Schwartz, Rifaat Shekh-Yusef, Alan Johnston, Perreault, Benjamin Schwartz, Rifaat Shekh-Yusef, Alan Johnston,
Jonathan Lennox, Brandon Williams, Olle Johansson, Martin Thomson, Jonathan Lennox, Brandon Williams, Olle Johansson, Martin Thomson,
Mihaly Meszaros and Tolga Asveren for the comments, suggestions, and Mihaly Meszaros, Tolga Asveren, Noriyuki Torii, Spencer Dawkins, and
questions that helped improve this document. Dale Worley for the comments, suggestions, and questions that helped
improve this document.
The authors of RFC 5389 would like to thank Cedric Aoun, Pete The authors of RFC 5389 would like to thank Cedric Aoun, Pete
Cordell, Cullen Jennings, Bob Penfield, Xavier Marjou, Magnus Cordell, Cullen Jennings, Bob Penfield, Xavier Marjou, Magnus
Westerlund, Miguel Garcia, Bruce Lowekamp, and Chris Sullivan for Westerlund, Miguel Garcia, Bruce Lowekamp, and Chris Sullivan for
their comments, and Baruch Sterman and Alan Hawrylyshen for initial their comments, and Baruch Sterman and Alan Hawrylyshen for initial
implementations. Thanks for Leslie Daigle, Allison Mankin, Eric implementations. Thanks for Leslie Daigle, Allison Mankin, Eric
Rescorla, and Henning Schulzrinne for IESG and IAB input on this Rescorla, and Henning Schulzrinne for IESG and IAB input on this
work. work.
Contributors Contributors
 End of changes. 101 change blocks. 
298 lines changed or deleted 369 lines changed or added

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