RFC 7345

UDP Transport Layer (UDPTL) over Datagram Transport Layer Security (DTLS)

πŸ“… published August 2014, from ietf

RFC 7345 ✨ UDP Transport Layer (UDPTL) over Datagram Transport Layer Security (DTLS)

  • Stream: Internet Engineering Task Force (IETF)
  • Request for Comments: 7345
  • Authors: C. Holmberg (Ericsson), I. Sedlacek (Ericsson), G. Salgueiro (Cisco)
  • Category: Standards Track πŸŽ€
  • ISSN: 2070-1721
  • Date: August 2014
  • Obsoletes / Updates: the title block doesn't list anything this one obsoletes or updates πŸ¦‹

Abstract

Okay bestie, this doc explains how the UDP Transport Layer (UDPTL) protocol, the predominant transport protocol for T.38 fax πŸ“ , can ride on top of Datagram Transport Layer Security (DTLS). It also covers how using UDPTL over DTLS gets flagged in the Session Description Protocol (SDP), and how UDPTL over DTLS gets negotiated in a session set up with the Session Initiation Protocol (SIP) πŸ’–

Status of This Memo

This is an Internet Standards Track document πŸ”₯

This document comes from the Internet Engineering Task Force (IETF) and represents the consensus of the IETF community. It went through public review and got approved for publication by the Internet Engineering Steering Group (IESG). For more on Internet Standards, check Section 2 of RFC 5741 ✨

Want to know the current status, any errata, or how to send feedback? Head to http://www.rfc-editor.org/info/rfc7345 🌈

Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved. πŸ’…

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as in effect on the date of publication. Please read these carefully, because they spell out your rights and restrictions for this document πŸ“œ Code Components pulled out of this document must include Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come without warranty, as described in the Simplified BSD License 🫢

Table of Contents

1. Introduction ....................................................3
2. Conventions .....................................................5
3. Secure Channel ..................................................5
4. SDP Offerer/Answerer Procedures .................................6
   4.1. General ....................................................6
   4.2. Generating the Initial Offer ...............................7
   4.3. Generating the Answer ......................................7
   4.4. Offerer Processing of the Answer ...........................7
   4.5. Modifying the Session ......................................7
5. Miscellaneous Considerations ....................................8
   5.1. Anonymous Calls ............................................8
   5.2. NAT Traversal ..............................................8
        5.2.1. ICE Usage ...........................................8
        5.2.2. STUN Interaction ....................................8
   5.3. Rekeying ...................................................9
   5.4. Compatibility with UDPTL over UDP ..........................9
6. Security Considerations .........................................9
7. IANA Considerations ............................................10
8. Acknowledgments ................................................10
9. References .....................................................11
   9.1. Normative References ......................................11
   9.2. Informative References ....................................12
Appendix A.  Examples .............................................13
  A.1.  General ...................................................13
  A.2.  Basic Message Flow ........................................13
  A.3.  Message Flow of T.38 Fax Replacing Audio Media Stream in
        an Existing Audio-Only Session ............................20

1. Introduction ✨

Okay so, you can absolutely send super sensitive documents with traditional telephony encryption devices πŸ”, but secure fax on the Public Switched Telephone Network (PSTN) never really got the spotlight. Mostly that's because of the challenges around malevolent people getting physical access to telephony equipment πŸ™ˆ Now that real-time communications are moving onto IP networks, where information can be intercepted or spoofed, fax needs a proper level of security. It needs integrity and confidentiality protection, and it's vital πŸ’…

UDPTL-based fax transport is the overwhelming favourite, as described in Section 9.1 of [ITU.T38.2010]. Here's the protocol stack for fax transport using UDPTL in Figure 1 πŸ¦‹

                         +-----------------------------+
                         | Internet facsimile protocol |
                         +-----------------------------+
                         |            UDPTL            |
                         +-----------------------------+
                         |            UDP              |
                         +-----------------------------+
                         |            IP               |
                         +-----------------------------+

                Figure 1: Protocol Stack for UDPTL over UDP

There are two mechanisms available for securing fax:

  • Annex H of [ITU.T30.2005] gives fax application-layer integrity and confidentiality protection πŸ”’ that doesn't care which transport protocol you use. It's based on the RSA algorithm, and it's meant for the T.30 telephony protocol used by Group 3 facsimile equipment (G3FE).
  • [ITU.T38.2010] covers fax transport over RTP/SAVP, which enables integrity and confidentiality protection of fax in IP networks ✨

Both of these have been around for many years and never really got market traction 😭 That's what kicked off an effort to build an approach, based on open standards, for securing fax communications over an IP-based transport 🌈

T.30-style protocols do come with application-level security options, like the RSA-based approach in Annex H of the T.30 specification [ITU.T30.2005]. Ngl though, it's very sparingly implemented and not enforced at the transport level πŸ’€

Worth noting: T.38 over RTP is a seriously viable option for a standards-based IP security solution using Secure Realtime Transport Protocol (SRTP) πŸ”₯ But this fax-over-IP transport never gained any traction in the marketplace, and it accounts for a negligible percentage of fax-over-IP implementations.

So security mechanisms offering integrity and confidentiality protection should be limited to UDPTL-based fax transport, since that's the only broad-based fax-over-IP solution πŸ‘‘ The 3rd Generation Partnership Project (3GPP) launched a study on how best to provide secure fax in the IP Multimedia Subsystem (IMS) for UDPTL. The results confirmed that this security is best achieved by using UDPTL over DTLS πŸŽ€

This document is all about fax transport using UDPTL over DTLS [RFC6347], which enables integrity and confidentiality protection of fax in IP networks. Figure 2 shows the upgraded protocol stack that adds integrity and confidentiality with UDPTL over DTLS 🧚

                         +-----------------------------+
                         | Internet facsimile protocol |
                         +-----------------------------+
                         |            UDPTL            |
                         +-----------------------------+
                         |            DTLS             |
                         +-----------------------------+
                         |            UDP              |
                         +-----------------------------+
                         |            IP               |
                         +-----------------------------+

           Figure 2: Protocol Stack for UDPTL over DTLS over UDP

Why this approach? Here are the main motivations πŸ’–

  • The design of DTLS [RFC6347] is clearly defined and well understood, and implementations are widely available πŸ™Œ
  • No DTLS extensions are required to enable UDPTL transport over DTLS ✨
  • Fax transport using UDPTL over DTLS just needs the DTLS layer slotted between the UDPTL layer and the UDP layer, as shown in Figure 2 πŸ¦‹ The UDPTL layer and everything above it require no modifications.
  • UDPTL [ITU.T38.2010] is by far the most widely deployed fax transport protocol in IP networks πŸ‘‘
  • 3GPP and the IP fax community need a way to transport UDPTL over DTLS, so they can provide secure fax in SIP-based networks (including IMS) 🫢

This document spells out how to transport UDPTL over DTLS using DTLS record layer "application_data" packets [RFC5246] [RFC6347] πŸ’…

Here's the catch: a DTLS "application_data" packet doesn't indicate whether it's carrying UDPTL or some other protocol πŸ™ˆ So the usage of a dedicated DTLS association for UDPTL transport needs to be negotiated, for example with the Session Description Protocol (SDP) [RFC4566] and the SDP offer/answer mechanism [RFC3264].

So this document defines a brand-new <proto> value [RFC4566] for the SDP media description (m= line) [RFC3264], which lets UDPTL over DTLS be indicated in SDP messages [RFC4566] 🌸

2. Conventions

Key words time! ✨ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be read as described in BCP 14, RFC 2119 [RFC2119].

DTLS uses the term "session" for a long-lived set of keying material that spans DTLS associations. In this doc, to stay consistent with SIP/SDP "session" terminology, "session" means a multimedia session, and "DTLS session" means the DTLS construct πŸ’œ We use "DTLS association" for a particular DTLS cipher suite and keying material set that's tied to a single host/port quartet. The same DTLS session can be used to establish the keying material for multiple DTLS associations. And for consistency with other SIP/SDP usage, "connection" is the word we use when we mean a multimedia stream that isn't specifically DTLS πŸ¦‹

3. Secure Channel

The UDPTL-over-DTLS media stream gets negotiated using the SDP offer/answer mechanism [RFC3264]. Check Section 4 for the deets πŸ’–

DTLS is used exactly as specified in [RFC6347] πŸ” Once the DTLS handshake is successfully completed (so that fax data can't get transmitted insecurely), the UDPTL packets MUST be transported in DTLS record layer "application_data" packets ✨

4. SDP Offerer/Answerer Procedures ✨

Part 1 of 4 is done, bestie! 🫢 Part 2 picks up right here with the SDP offerer and answerer procedures πŸ’…πŸŒΈ

4.1. General ✨

Okay so, bestie, both the offerer and the answerer are endpoints, and each one MUST create an SDP media description (m= line) for every UDPTL-over-DTLS media stream πŸ’–. It also MUST assign a UDP/TLS/UDPTL value (see Table 1) to the proto field of that m= line πŸŽ€.

The procedures in this section apply to any m= line tied to a UDPTL-over-DTLS media stream πŸ¦‹.

To negotiate one of these streams, you use these SDP attributes:

  • The SDP attributes defined for UDPTL over UDP, as described in [ITU.T38.2010]; and
  • The SDP attributes, defined in [RFC4145] and [RFC4572], as described in this section.

The endpoint MUST NOT use the SDP connection attribute [RFC4145] πŸ™…β€β™€οΈ. Not me using it, not you either!

To sort out the TLS roles for the UDPTL-over-DTLS transport connection, the endpoint MUST use the SDP setup attribute [RFC4145] 🌸.

Now the security stuff, and it's giving main character energy πŸ‘‘. If the endpoint supports a cipher suite with an associated certificate, and it's willing to use one, the endpoint MUST include an SDP fingerprint attribute [RFC4572] πŸ”. The endpoint MUST support SHA-256 for generating and verifying the SDP fingerprint attribute value. Using SHA-256 is preferred ✨. UDPTL over DTLS, at a minimum, MUST support TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 and MUST support TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 πŸ’…. UDPTL over DTLS MUST prefer TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 and any other Perfect Forward Secrecy (PFS) cipher suites over non-PFS cipher suites 🌈. Implementations SHOULD disable TLS-level compression πŸ“.

If a cipher suite with an associated certificate gets picked during the DTLS handshake, the certificate you receive during that handshake MUST match the fingerprint received in the SDP fingerprint attribute 🫢. If the fingerprint doesn't match the hashed certificate, the endpoint MUST tear down the media session immediately πŸ’€.

Heads up, babe: you're allowed to wait until the other side's fingerprint has arrived before you connect. It's permissible! But it can add latency, so it's kinda a vibe check on speed 😭.

4.2. Generating the Initial Offer 🧚

The offerer SHOULD assign the SDP setup attribute with a value of actpass πŸ¦‹. The exception is when the offerer insists on being either the sender or the receiver of the DTLS ClientHello message. In that case, it can use active (the offerer sends ClientHello) or passive (the offerer receives ClientHello) πŸ’œ. The offerer MUST NOT assign an SDP setup attribute with a holdconn value 🚫.

If the offerer assigns actpass or passive as the SDP setup attribute value, the offerer MUST be prepared to receive a DTLS ClientHello message before it receives the SDP answer πŸ“¬. Be ready, bestie!

4.3. Generating the Answer 🌸

If the answerer accepts the offered UDPTL-over-DTLS transport connection, the answerer MUST assign an SDP setup attribute in the associated SDP answer, with a value of either active or passive, following the procedures in [RFC4145] ✨. The answerer MUST NOT assign an SDP setup attribute with a value of holdconn πŸ™ˆ.

If the answerer assigns an SDP setup attribute with the active value, the answerer MUST initiate a DTLS handshake by sending a DTLS ClientHello message on the negotiated media stream, toward the IP address and port of the offerer πŸ”₯.

4.4. Offerer Processing of the Answer πŸŽ€

When the offerer gets an SDP answer, and it ends up being active, it MUST initiate a DTLS handshake by sending a DTLS ClientHello message on the negotiated media stream, toward the IP address and port of the answerer πŸ™Œ. Main character moment!

4.5. Modifying the Session πŸ¦‹

Once an offer/answer exchange is complete, either endpoint MAY send a new offer to modify the session πŸ’…. The endpoints can reuse the existing DTLS association if the key fingerprint values and transport parameters each endpoint indicated are unchanged 🌈. Otherwise, the endpoints follow the rules for the initial offer/answer exchange. They can negotiate and create a new DTLS association and, once it exists, delete the previous one, again following those same rules 🧚. Each endpoint has to be ready to receive data on both the new and the old DTLS associations for as long as both are alive πŸ’–.


5. Miscellaneous Considerations πŸŽ€

5.1. Anonymous Calls πŸ™ˆ

When making anonymous calls, a new self-signed certificate SHOULD be used for each call πŸ•΅οΈβ€β™€οΈ. The attributes inside the certificate MUST NOT contain information that allows either correlation or identification of the user making anonymous calls 🚫. This is especially important for the subjectAltName and commonName attributes, so be extra careful, periodt πŸ’€.

5.2. NAT Traversal 🌈

5.2.1. ICE Usage 🧚

When Interactive Connectivity Establishment (ICE) [RFC5245] is in use, the ICE connectivity checks happen before the DTLS handshake begins πŸ¦‹. Heads up: if aggressive nomination mode is used, several candidate pairs might get marked valid before ICE finally settles on one candidate pair πŸ‘€. User Agents (UAs) MUST treat all ICE candidate pairs associated with a single component as part of the same DTLS association πŸ’œ. That means there's only ever one DTLS handshake, even with multiple valid candidate pairs 🫢. This may mean adjusting the endpoint IP addresses if the selected candidate pair shifts, just like it would for ordinary media stream packets πŸ”. In the case of an ICE restart, the DTLS handshake procedure is repeated and a new DTLS association is created 🌸. Once the DTLS handshake completes and the new DTLS association exists, the previous DTLS association gets deleted πŸ—‘οΈ.

5.2.2. STUN Interaction 🫢

The UA MUST send Session Traversal Utilities for NAT (STUN) packets [RFC5389] directly over UDP, not over DTLS πŸ“‘. The UA MUST support the following mechanism for demultiplexing packets that arrive on the IP address and port associated with the DTLS association πŸ”€:

  • If the value of the first byte of the packet is 0 or 1, then the packet is STUN.
  • If the value of the first byte of the packet is between 20 and 63 (inclusive), the packet is DTLS.

5.3. Rekeying πŸ”‘

During rekeying, packets protected by the previous set of keys can show up after the DTLS handshake caused by the rekeying has finished, because packets can get reordered on the wire πŸŒ€. To handle this, receivers MUST maintain both sets of keys for some time, so they can still decrypt and verify older packets πŸ”“. How long to keep the previous set of keys after the DTLS handshake finishes is out of scope for this document πŸ™ƒ.

5.4. Compatibility with UDPTL over UDP 🧁

If a user needs fax to be transported securely using UDPTL over DTLS, and the remote user doesn't support UDPTL over DTLS, then a fax media stream can't be established πŸ“ . Not ideal, bestie.

If a user prefers fax to be transported securely using UDPTL over DTLS, but is willing to send the fax insecurely in case the remote user doesn't support UDPTL over DTLS, then the SDP Capability Negotiation mechanism [RFC5939] can offer both UDPTL over DTLS and UDPTL over UDP πŸ™Œ. Or, if the remote user rejects an SDP offer for UDPTL over DTLS, a new SDP offer for a UDPTL-over-UDP media stream can be sent πŸ’Œ.


6. Security Considerations πŸ’€

Fax can carry a huge range of sensitive data, including personal, corporate, and governmental information 🚨. That's why it's critical to protect against threats to the confidentiality and integrity of the transmitted data πŸ”.

The mechanism in this document gives fax integrity and confidentiality protection by specifying fax transport using UDPTL over DTLS [RFC6347] πŸ›‘οΈ.

A DTLS media stream negotiated using SIP/SDP needs a mechanism that makes sure the certificate received via DTLS was issued by the remote party of the SIP session 😀.

The standard DTLS strategy for authenticating the communicating parties is to give the server (and optionally the client) a PKIX [RFC5280] certificate. The client then verifies the certificate and checks that the name in the certificate matches the server's domain name 🧐. This works because there are relatively few servers, and the cost of issuing and deploying PKIX certificates can be justified πŸ’Ό. Issuing and deploying PKIX certificates to all clients is not realistic in most deployment scenarios πŸ™…β€β™€οΈ.

The design in this document is meant to lean on the integrity protection of SIP signaling, without requiring confidentiality πŸ¦‹. As long as each side can verify the integrity of the SDP it received from the other side, the DTLS handshake can't be hijacked via a man-in-the-middle attack πŸ›‘. This integrity protection is easily provided by the caller to the callee via the SIP Identity [RFC4474] mechanism πŸͺͺ. Other mechanisms, such as the S/MIME mechanism [RFC3261] or perhaps future mechanisms yet to be specified, could also do this job ✨.

Warning, bestie: this mechanism can still be used without those integrity mechanisms, but then the security is limited to defense against passive attack by intermediaries. An active attack on the signaling plus an active attack on the media plane can let an attacker attack the connection (R-SIG-MEDIA in the notation of [RFC5479]) πŸ˜±πŸ’€.

7. IANA Considerations πŸ“š

This document updates the "Session Description Protocol (SDP) Parameters" registry as specified in Section 8.2.2 of [RFC4566] πŸ—‚οΈ. Specifically, the values in Table 1 have been added to the SDP proto field registry πŸ’–.

                   +-------+---------------+-----------+
                   |  Type |    SDP Name   | Reference |
                   +-------+---------------+-----------+
                   | proto | UDP/TLS/UDPTL | [RFC7345] |
                   +-------+---------------+-----------+

                     Table 1: SDP "proto" Field Values

8. Acknowledgments 🫢

Special thanks to Peter Dawes, who gave comments on the initial draft of the document 🌷. Also huge thanks to Paul E. Jones, James Rafferty, Albrecht Schwarz, Oscar Ohlsson, David Hanes, Adam Gensler, Ari Keranen, Flemming Andreasen, John Mattsson, and Marc Petit-Huguenin, who gave valuable feedback and input πŸ’œ. Barry Leiba, Spencer Dawkins, Pete Resnick, Kathleen Moriarty, and Stephen Farrell gave valuable feedback during the IESG review ✨. Thanks to Scott Brim for performing the Gen-ART review 🧚. And thanks to Alissa Cooper for her help as sponsoring Area Director πŸ‘‘.


9. References πŸ“–

9.1. Normative References πŸ“š

Okay bestie, these are the docs the spec needs you to have read first πŸ€“. Here's the whole list:

[ITU.T30.2005] International Telecommunications Union, "Procedures for document facsimile transmission in the general switched telephone network", ITU-T Recommendation T.30, September 2005.

[ITU.T38.2010] International Telecommunications Union, "Procedures for real-time Group 3 facsimile communication over IP networks", ITU-T Recommendation T.38, September 2010.

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, June 2002.

[RFC3264] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model with Session Description Protocol (SDP)", RFC 3264, June 2002.

[RFC4145] Yon, D. and G. Camarillo, "TCP-Based Media Transport in the Session Description Protocol (SDP)", RFC 4145, September 2005.

[RFC4474] Peterson, J. and C. Jennings, "Enhancements for Authenticated Identity Management in the Session Initiation Protocol (SIP)", RFC 4474, August 2006.

[RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session Description Protocol", RFC 4566, July 2006.

[RFC4572] Lennox, J., "Connection-Oriented Media Transport over the Transport Layer Security (TLS) Protocol in the Session Description Protocol (SDP)", RFC 4572, July 2006.

[RFC5245] Rosenberg, J., "Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal for Offer/Answer Protocols", RFC 5245, April 2010.

[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, May 2008.

[RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, "Session Traversal Utilities for NAT (STUN)", RFC 5389, October 2008.

[RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer Security Version 1.2", RFC 6347, January 2012.

9.2. Informative References 🧠

These ones are the extra-credit reading, not required, but lowkey worth bookmarking πŸ”–

[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, August 2008.

[RFC5479] Wing, D., Fries, S., Tschofenig, H., and F. Audet, "Requirements and Analysis of Media Security Management Protocols", RFC 5479, April 2009.

[RFC5939] Andreasen, F., "Session Description Protocol (SDP) Capability Negotiation", RFC 5939, September 2010.

Appendix A. Examples πŸŽ€

A.1. General

Okay so before the call even starts, Alice and Bob each make their own self-signed certificates πŸ”. They might use one for a single session, or, more likely, keep reusing them across lots of sessions πŸ’….

Alice's SIP signaling to her proxy goes over TLS, so the channel stays integrity-protected between her and her identity service πŸ›‘οΈ. That identity service vouches for Alice and protects the SIP message, for example with SIP Identity πŸͺͺ. Traffic between proxies should also be protected, for example with TLS πŸ”’.

To keep the flow simple, only one element is shown for each of Alice's and Bob's proxies 🧚.

For the sake of brevity and simplicity, only the mandatory SDP T.38 attributes are shown πŸ“.

A.2. Basic Message Flow

Figure 3 is an example message flow for setting up a session where T.38 fax is transported securely using UDPTL over DTLS πŸ“ βœ¨.

In this flow, Alice is the passive endpoint of the DTLS association, and Bob is the active endpoint 🫢.

      Alice                    Proxies                   Bob
        | (1) SIP INVITE         |                        |
        |----------------------->|                        |
        |                        | (2) SIP INVITE         |
        |                        |----------------------->|
        |                        |   (3) DTLS ClientHello |
        |<------------------------------------------------|
        |    (4) remaining messages of DTLS handshake     |
        |<----------------------------------------------->|
        |                        |                        |
        |                        |                        |
        |                        |         (5) SIP 200 OK |
        |                        |<-----------------------|
        |         (6) SIP 200 OK |                        |
        |<-----------------------|                        |
        | (7) SIP ACK            |                        |
        |------------------------------------------------>|
        |      (8) T.38 message using UDPTL over DTLS     |
        |<----------------------------------------------->|
        |                        |                        |

Figure 3: Basic Message Flow

Message (1):

Figure 4 is the initial INVITE request Alice sends to her proxy, and it carries an SDP offer πŸ’Œ.

The "m=" line in the SDP offer says T.38 fax using UDPTL over DTLS πŸ“ž.

The SDP "setup" attribute, set to "actpass" in the offer, means Alice is asking to be either the active or the passive endpoint πŸ™‹β€β™€οΈ.

The SDP "fingerprint" attribute in the offer holds the certificate fingerprint computed from Alice's self-signed certificate πŸ”.

INVITE sip:bob@example.com SIP/2.0
To: <sip:bob@example.com>
From: "Alice"<sip:alice@example.com>;tag=843c7b0b
Via: SIP/2.0/TLS ua1.example.com;branch=z9hG4bK-0e53sadfkasldkfj
Contact: <sip:alice@ua1.example.com>
Call-ID: 6076913b1c39c212@REVMTEpG
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: xxxx
Supported: from-change

v=0
o=- 1181923068 1181923196 IN IP4 ua1.example.com
s=-
c=IN IP4 ua1.example.com
t=0 0
m=image 6056 UDP/TLS/UDPTL t38
a=setup:actpass
a=fingerprint: SHA-1 \
  4A:AD:B9:B1:3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB
a=T38FaxRateManagement:transferredTCF

Figure 4: Message (1)

Message (2):

Figure 5 is the SIP INVITE request Bob's proxy sends on to Bob πŸ“¨.

When it arrives, Bob checks the identity given in the SIP INVITE request πŸ•΅οΈβ€β™€οΈ.

INVITE sip:bob@ua2.example.com SIP/2.0
To: <sip:bob@example.com>
From: "Alice"<sip:alice@example.com>;tag=843c7b0b
Via: SIP/2.0/TLS proxy.example.com;branch=z9hG4bK-0e53sadfkasldk
Via: SIP/2.0/TLS ua1.example.com;branch=z9hG4bK-0e53sadfkasldkfj
Record-Route: <sip:proxy.example.com;lr>
Contact: <sip:alice@ua1.example.com>
Call-ID: 6076913b1c39c212@REVMTEpG
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE
Max-Forwards: 69
Content-Type: application/sdp
Content-Length: xxxx
Supported: from-change

v=0
o=- 1181923068 1181923196 IN IP4 ua1.example.com
s=-
c=IN IP4 ua1.example.com
t=0 0
m=image 6056 UDP/TLS/UDPTL t38
a=setup:actpass
a=fingerprint: SHA-1 \
  4A:AD:B9:B1:3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB
a=T38FaxRateManagement:transferredTCF

Figure 5: Message (2)

Message (3):

Assuming Alice's identity checks out, Bob sends a DTLS ClientHello straight to Alice 🀝.

Message (4):

Alice and Bob swap the rest of the DTLS handshake messages: HelloVerifyRequest, ClientHello, ServerHello, Certificate, ServerKeyExchange, CertificateRequest, ServerHelloDone, Certificate, ClientKeyExchange, CertificateVerify, ChangeCipherSpec, and Finished πŸ”.

When Bob gets Alice's certificate over DTLS, he checks that the fingerprint calculated from it matches the one in the a=fingerprint SDP attribute of Figure 5 πŸ”. In this flow the check passes, so session setup carries on βœ….

Note that, unlike in this example, you don't have to wait for the DTLS handshake to finish before the SDP answer goes out. If Bob has already sent the SIP 200 (OK) response and then finds that the certificate fingerprints don't match, he will terminate the session 😬.

Message (5):

Figure 6 is the SIP 200 (OK) response to the initial SIP INVITE request, sent by Bob to Bob's proxy. It contains an SDP answer πŸŽ‰.

The "m=" line in the SDP answer says T.38 fax using UDPTL over DTLS πŸ“ .

The SDP "setup" attribute, set to "active" in the answer, means Bob is requesting to be the active endpoint πŸ’ͺ.

The SDP "fingerprint" attribute in the answer holds the certificate fingerprint computed from Bob's self-signed certificate πŸ”.

SIP/2.0 200 OK
To: <sip:bob@example.com>;tag=6418913922105372816
From: "Alice" <sip:alice@example.com>;tag=843c7b0b
Via: SIP/2.0/TLS proxy.example.com:5061;branch=z9hG4bK-0e53sadfkasldk
Via: SIP/2.0/TLS ua1.example.com;branch=z9hG4bK-0e53sadfkasldkfj
Record-Route: <sip:proxy.example.com;lr>
Call-ID: 6076913b1c39c212@REVMTEpG
CSeq: 1 INVITE
Contact: <sip:bob@ua2.example.com>
Content-Type: application/sdp
Content-Length: xxxx
Supported: from-change

v=0
o=- 8965454521 2105372818 IN IP4 ua2.example.com
s=-
c=IN IP4 ua2.example.com
t=0 0
m=image 12000 UDP/TLS/UDPTL t38
a=setup:active
a=fingerprint: SHA-1 \
  FF:FF:FF:B1:3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB
a=T38FaxRateManagement:transferredTCF

Figure 6: Message (5)

Message (6):

Figure 7 is the SIP 200 (OK) response to the initial SIP INVITE request, sent by Alice's proxy to Alice πŸ“¬. Alice checks whether the fingerprint calculated from Bob's certificate received via DTLS is the same as the one in the a=fingerprint SDP attribute of Figure 7 πŸ”Ž. In this flow the check passes, so session setup continues 🌈.

SIP/2.0 200 OK
To: <sip:bob@example.com>;tag=6418913922105372816
From: "Alice" <sip:alice@example.com>;tag=843c7b0b
Via: SIP/2.0/TLS ua1.example.com;branch=z9hG4bK-0e53sadfkasldkfj
Record-Route: <sip:proxy.example.com;lr>
Call-ID: 6076913b1c39c212@REVMTEpG
CSeq: 1 INVITE
Contact: <sip:bob@ua2.example.com>
Content-Type: application/sdp
Content-Length: xxxx
Supported: from-change

v=0
o=- 8965454521 2105372818 IN IP4 ua2.example.com
s=-
c=IN IP4 ua2.example.com
t=0 0
m=image 12000 UDP/TLS/UDPTL t38
a=setup:active
a=fingerprint: SHA-1 \
  FF:FF:FF:B1:3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB
a=T38FaxRateManagement:transferredTCF

Figure 7: Message (6)

Message (7):

Alice sends the SIP ACK request to Bob πŸ₯³.

Message (8):

Now Bob and Alice can swap T.38 fax securely over UDPTL over DTLS πŸ“ πŸ’œ.

A.3. Message Flow of T.38 Fax Replacing Audio Media Stream in an Existing Audio-Only Session πŸ¦‹

okay so bestie, most sessions with non-secure T.38 fax (carried over UDPTL) get set up by turning an ongoing audio call into a fax session πŸ“žβž‘οΈπŸ“ . Figure 8 shows the message flow for doing that with T.38 fax securely transported using UDPTL over DTLS πŸ”. Alice is the passive endpoint of the DTLS association and Bob is the active endpoint πŸ’….

     Alice                    Proxies                   Bob
       |                        |                        |
       |        (1) Audio-only session initiation        |
       |<-----------------------+----------------------->|
       |                        |                        |
       | (2) SIP re-INVITE      |                        |
       |------------------------------------------------>|
       |                        |   (3) DTLS ClientHello |
       |<------------------------------------------------|
       |    (4) remaining messages of DTLS handshake     |
       |<----------------------------------------------->|
       |                        |                        |
       |                        |                        |
       |                        |         (5) SIP 200 OK |
       |<------------------------------------------------|
       | (6) SIP ACK            |                        |
       |------------------------------------------------>|
       |      (7) T.38 message using UDPTL over DTLS     |
       |<----------------------------------------------->|
       |                        |                        |

Figure 8: Message Flow of T.38 Fax Replacing Audio Media Stream in an
                     Existing Audio-Only Session

Message (1):

Session establishment of the audio-only session 🎢. The proxies decide not to record-route πŸ™ˆ.

Message (2):

Alice sends a SIP re-INVITE request πŸ“¨. The SDP offer in that request is shown in Figure 9.

The first "m=" line in the SDP offer indicates the audio media stream being removed πŸ‘‹. The second "m=" line indicates T.38 fax using UDPTL over DTLS being added ✨.

The SDP "setup" attribute with a value of "actpass" in the SDP offer means Alice is asking to be either the active or the passive endpoint πŸ€·β€β™€οΈ.

The SDP "fingerprint" attribute in the SDP offer has the certificate fingerprint computed from Alice's self-signed certificate πŸ”‘.

v=0
o=- 2465353433 3524244442 IN IP4 ua1.example.com
s=-
c=IN IP4 ua1.example.com
t=0 0
m=audio 0 UDP/TLS/RTP/SAVP 0
m=image 46056 UDP/TLS/UDPTL t38
a=setup:actpass
a=fingerprint: SHA-1 \
  4A:AD:B9:B1:3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB
a=T38FaxRateManagement:transferredTCF

               Figure 9: SDP Offer of Message (2)

Message (3):

Bob sends a DTLS ClientHello directly to Alice πŸ“¬.

Message (4):

Alice and Bob swap the rest of the DTLS handshake messages 🀝. That's HelloVerifyRequest, ClientHello, ServerHello, Certificate, ServerKeyExchange, CertificateRequest, ServerHelloDone, Certificate, ClientKeyExchange, CertificateVerify, ChangeCipherSpec, and Finished 🧾.

When Bob gets Alice's certificate via DTLS, Bob checks whether the fingerprint calculated from that certificate matches the one in the SDP "fingerprint" attribute of Figure 9 πŸ•΅οΈβ€β™€οΈ. In this flow the check passes, so session setup keeps going πŸ₯³.

Message (5):

Bob sends a SIP 200 (OK) response to the SIP re-INVITE request πŸ™Œ. The response contains the SDP answer shown in Figure 10.

The first "m=" line in the SDP offer indicates audio media stream being removed. The second "m=" line in the SDP answer indicates T.38 fax using UDPTL over DTLS being added πŸŽ€.

The SDP "setup" attribute with a value of "active" in the SDP answer means Bob has asked to be the active endpoint πŸ’ͺ.

The SDP "fingerprint" attribute in the SDP answer has the certificate fingerprint computed from Bob's self-signed certificate πŸ”.

v=0
o=- 4423478999 5424222292 IN IP4 ua2.example.com
s=-
c=IN IP4 ua2.example.com
t=0 0
m=audio 0 UDP/TLS/RTP/SAVP 0
m=image 32000 UDP/TLS/UDPTL t38
a=setup:active
a=fingerprint: SHA-1 \
  FF:FF:FF:B1:3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB
a=T38FaxRateManagement:transferredTCF

              Figure 10: SDP Answer of Message (5)

Message (6):

Alice sends the SIP ACK request to Bob πŸ’Œ.

Message (7):

And now Bob and Alice can exchange T.38 fax securely transported using UDPTL over DTLS πŸ“ πŸ’–. Main character energy πŸ‘‘.


Authors' Addresses

Christer Holmberg
Ericsson
Hirsalantie 11
Jorvas  02420
Finland

EMail: christer.holmberg@ericsson.com


Ivo Sedlacek
Ericsson
Sokolovska 79
Praha  18600
Czech Republic

EMail: ivo.sedlacek@ericsson.com


Gonzalo Salgueiro
Cisco Systems, Inc.
7200-12 Kit Creek Road
Research Triangle Park, NC  27709
US

EMail: gsalguei@cisco.com
πŸ“¦ where this page comes from