SlideShare a Scribd company logo
5
Most read
6
Most read
7
Most read
SIP over TLS
• Hossein Yavari
• April 2022
None SIP/TLS
SIP
UDP
IP
RTP
UDP
IP
Signaling Media
SIP
TCP
IP
RTP
UDP
IP
Signaling Media
SIP over UDP SIP over TCP
SIP/TLS
SIP
TCP
IP
RTP
UDP
IP
Signaling Media
SIP over TLS
TLS sRTP
SIP Server
SIP Server
UDP/TCP
Listener
TLS
Listener
Excample.com:5060
Excample.com:5061
SIP/UDP or TCP
SIP/TLS
TLS Handshake
Client Server
Step 1:
TCP Handshake
SYN
SYN ACK
ACK
Step 2:
TLS Handshake
* Mutual Authentication/
Server Authentication
Client Hello
Server Hello
Server Certificate
Client Certificate Request
Server key Exchange
Server Hello Done
Client Certificate
Client Key Exchange
Certificate Verify
Change Cipher Spec
Finished
Change Cipher Spec
Encrypted Data
Close Messages
TLS Handshake (Cont.)
1.Client Hello: The client sends a Client Hello message specifying the TLS version, a list of
suggested cipher suites it supports, and a string of random bytes known as the "client
random“.
2.Server Hello: The server responds with a Server Hello message with the TLS version, a chosen
cipher suite and its own randomly selected prime number called a “server random”.
3.Server Certificate: The server presents an X.509 certificate or certificate chain to the client for
verification as part of the initial TLS handshake.
4.Server Key Exchange: This is an optional message, only needed for certain key exchange
methods (Diffie-Hellman) that require the server provides additional data.
5.Client Certificate Request: The server then requests a certificate from the client so the
connection can be mutually authenticated. (optional)
6.Server Hello Done: The server sends a Server Hello Done message to tell the client it is
finished with initial negotiations.
TLS Handshake (Cont.)
7. Client Certificate: If the server requests a certificate, the client must send the certificate or certificate chain.
8. Client Key Exchange: The client sends a Client Key Exchange message which may contain a Public Key, or
nothing depending on the cipher suite chosen (TLSv1.2).
9. Certificate Verify: This message is sent when the client presents a certificate as above. Its purpose is to allow
the server to complete the process of authenticating the client.
10. Change cipher spec: The client sends a message telling the server to change to encrypted mode.
11. Finished: The client tells the server that it is ready for secure data communication to begin. This is the end of
the SSL handshake.
12. Change Cipher Spec: The server sends a message telling the client to change to encrypted mode.
13. Finished: The server tells the client that it is ready for secure data communication to begin. This is the end of
the SSL handshake.
14. Encrypted data: The client and the server communicate securely.
15. Close Messages: At the end of the connection, each side will send a close_notify message to inform the peer
that the connection is closed.
TLS Versions
TLS 1.3’s handshake
makes just a single
round trip, so it is
faster.
https://www.thesslstore.com/blog/explaining-ssl-handshake/#the-tls-12-handshake-diffie-hellman-edition
TLS 1.3 Cipher Suites
https://www.thesslstore.com/blog/explaining-ssl-handshake/#the-tls-12-handshake-diffie-hellman-edition
• TLS_AES_256_GCM_SHA384
• TLS_CHACHA20_POLY1305_SHA256
• TLS_AES_128_GCM_SHA256
• TLS_AES_128_CCM_8_SHA256
• TLS_AES_128_CCM_SHA256
PCAP Sample
PCAP Sample (Cont.)
TLS Terminology
• CA: Certificate Authority, a trusted entity, such as VeriSign, used to issue certs and to validate the
authenticity of a cert. One type of cert, called a self-signed cert, does not require a CA.
• Certificate chain: Often you will not have a certificate signed by your CA's root private key.
Instead, you have your cert along with one or more intermediate certs that form a chain. The last
intermediate cert in the chain is typically signed by the CA's root private key.
• PEM: The Privacy Enhanced Mail (PEM) format is a text-based ASCII format that is a Base64
encoding of the binary Distinguished Encoding Rules (DER) format.
• PEM certificates can be opened in any Text Editor and the actual certificate content is
delimited between the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- statements.
• It complies with the X.509 format for storing a certificate, certificate chain, or private key.
Media Encryption
• SRTP is not a protocol! It is a profile of
RTP.
• SRTP extends RTP to include encryption
and authentication.
• SIP/TLS with RTP is also possible but
SIP/UDP/TCP with SRTP is not!
Normal RTP Packet
Media Encryption (Cont.)
sRTP Packet
RTP
Header
Encrypted
Payload
MKI AUTH
Media Encryption (Cont.)
• SRTP does not contain integrated key management!
• It uses one of these key management protocols:
• SDES-SRTP
• DTLS-SRTP
• ZRTP
• SDES: Keys are transported in the SDP attachment of a SIP message using the TLS transport layer.
• Media attribute defined by SDES is “crypto”:
a=crypto:<tag> <crypto-suite> <key-params> [<session-params>]
a=crypto:1 AES_CM_128_HMAC_SHA1_80
inline:xecNW9BAUUfsgvZgE2OApkYJ20OM3guIqql5gayD
• 3 commonly used crypto suites are :
• AES_CM_128_HMAC_SHA1_80
• AES_CM_128_HMAC_SHA1_32
• F8_128_HMAC_SHA1_32
Media Encryption (Cont.)
• DTLS: DTLS keying happens on the media path, independent of any out-of-band signaling channel.
Media Encryption (Cont.)
• ZRTP: a cryptographic key-agreement protocol
meant to negotiate the keys for encryption between
two endpoints.
• ZRTP uses the Diffie-Hellman algorithm which
enables secure key agreement and avoids the
overhead of certificate management or any other
prior setup.
• The key agreement algorithm can be divided into 4
steps:
• Discovery - Hello & HelloACK
• Hash commitment - Commit
• Diffie-Hellman exchange and key derivation -
DHPart1 DHPart2
• Confirmation - Confirm1, Confirm2 &
Conf2ACK
Media Encryption (Cont.)
• An offer can include any of these:
• Plain RTP (RTP/AVP),
• RTP with RTCP-based feedback
(RTP/AVPF),
• Secure RTP (RTP/SAVP), or
• Secure RTP with RTCP-based
feedback (RTP/SAVPF)

More Related Content

PDF
Kanban boards step by step
PPTX
Internet security
PDF
AWS Summit Seoul 2023 | 다중 계정 및 하이브리드 환경에서 안전한 IAM 체계 만들기
PPT
RTP.ppt
PDF
Introduction To Confluence
PPTX
Diabetes Mellitus
PPTX
Hypertension
PPTX
Republic Act No. 11313 Safe Spaces Act (Bawal Bastos Law).pptx
Kanban boards step by step
Internet security
AWS Summit Seoul 2023 | 다중 계정 및 하이브리드 환경에서 안전한 IAM 체계 만들기
RTP.ppt
Introduction To Confluence
Diabetes Mellitus
Hypertension
Republic Act No. 11313 Safe Spaces Act (Bawal Bastos Law).pptx

What's hot (20)

PPTX
SSL TLS Protocol
PDF
Indroduction to SIP
PDF
Voice over IP (VoIP)
PDF
Routing fundamentals with mikrotik
PPTX
Session initiation protocol SIP
PPT
Socket Programming
PPT
Matrix Telecom Solutions: SETU VTEP - Fixed VoIP to T1/E1 PRI Gateway
PPTX
Transport Layer Security (TLS)
PPTX
session initiation protocol - SIP
PPTX
PDF
SIP - The Basics
PPT
Static Routing
PPTX
OSI model and TCP/IP model
PPT
Ims, Ip Multimedia System
PPT
Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...
PDF
MQTT - MQ Telemetry Transport for Message Queueing
PPT
Basic socket programming
PDF
Analysis of attacks / vulnerabilities SS7 / Sigtran using Wireshark (and / or...
PDF
Lte attach-messaging
SSL TLS Protocol
Indroduction to SIP
Voice over IP (VoIP)
Routing fundamentals with mikrotik
Session initiation protocol SIP
Socket Programming
Matrix Telecom Solutions: SETU VTEP - Fixed VoIP to T1/E1 PRI Gateway
Transport Layer Security (TLS)
session initiation protocol - SIP
SIP - The Basics
Static Routing
OSI model and TCP/IP model
Ims, Ip Multimedia System
Sip Detailed , Call flows , Architecture descriptions , SIP services , sip se...
MQTT - MQ Telemetry Transport for Message Queueing
Basic socket programming
Analysis of attacks / vulnerabilities SS7 / Sigtran using Wireshark (and / or...
Lte attach-messaging
Ad

Similar to SIP over TLS (20)

PPTX
Transport Layer Security
PPTX
PDF
BAIT1103 Chapter 4
PPT
ch16-Cryptography and Network Security.ppt
PPT
cryptography and network security thid.ppt
PDF
wolfSSL and TLS 1.3
PPT
Web security.ppt and Information Security introduction and management.pptx
PPTX
Secure Socket Layer.pptx
PPTX
SSL And TLS
PDF
CRYPTOGRAPHY AND NETWORK SECURITY- Transport-level Security
PDF
Webinar SSL English
PPT
ssl
PPT
Ssl (Secure Sockets Layer)
PPT
What is SSL ? The Secure Sockets Layer (SSL) Protocol
PPSX
BSET_Lecture_Crypto and SSL_Overview_FINAL
PPSX
Secure socket layer
PPSX
Secure socket layer
PPT
Introduction to Secure Sockets Layer
PPTX
secure socket layer
Transport Layer Security
BAIT1103 Chapter 4
ch16-Cryptography and Network Security.ppt
cryptography and network security thid.ppt
wolfSSL and TLS 1.3
Web security.ppt and Information Security introduction and management.pptx
Secure Socket Layer.pptx
SSL And TLS
CRYPTOGRAPHY AND NETWORK SECURITY- Transport-level Security
Webinar SSL English
ssl
Ssl (Secure Sockets Layer)
What is SSL ? The Secure Sockets Layer (SSL) Protocol
BSET_Lecture_Crypto and SSL_Overview_FINAL
Secure socket layer
Secure socket layer
Introduction to Secure Sockets Layer
secure socket layer
Ad

More from Hossein Yavari (20)

PDF
What is Matroska?
PDF
SIPREC RTPEngine Media Forking
PDF
Windows Forensics
PPTX
Desjardins Data Breach
PDF
Introduction to Metasploit
PDF
Which IT Certification is Better for You?
PDF
Disassembly Using IDA
PPTX
Introduction to Snort
PDF
DLL Injection
PPTX
SQL Injection in JAVA
PPTX
Malware Static Analysis
PDF
Creativity and Role of the Leaders
PDF
IPsec for IMS
PDF
eSIM Deep Dive
PDF
Yeastar Technical Training Course
PDF
SENA Cloud UC
PDF
FreePBX Disaster Recovery
PDF
eSIM Overview
PDF
LTE Architecture Overview
PDF
Introduction to DIAMETER
What is Matroska?
SIPREC RTPEngine Media Forking
Windows Forensics
Desjardins Data Breach
Introduction to Metasploit
Which IT Certification is Better for You?
Disassembly Using IDA
Introduction to Snort
DLL Injection
SQL Injection in JAVA
Malware Static Analysis
Creativity and Role of the Leaders
IPsec for IMS
eSIM Deep Dive
Yeastar Technical Training Course
SENA Cloud UC
FreePBX Disaster Recovery
eSIM Overview
LTE Architecture Overview
Introduction to DIAMETER

Recently uploaded (20)

PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
medical staffing services at VALiNTRY
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
AI in Product Development-omnex systems
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
L1 - Introduction to python Backend.pptx
PDF
System and Network Administraation Chapter 3
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
ai tools demonstartion for schools and inter college
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
Design an Analysis of Algorithms I-SECS-1021-03
Design an Analysis of Algorithms II-SECS-1021-03
Reimagine Home Health with the Power of Agentic AI​
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
medical staffing services at VALiNTRY
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Operating system designcfffgfgggggggvggggggggg
Navsoft: AI-Powered Business Solutions & Custom Software Development
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Odoo Companies in India – Driving Business Transformation.pdf
AI in Product Development-omnex systems
PTS Company Brochure 2025 (1).pdf.......
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
L1 - Introduction to python Backend.pptx
System and Network Administraation Chapter 3
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
ai tools demonstartion for schools and inter college
How to Migrate SBCGlobal Email to Yahoo Easily

SIP over TLS

  • 1. SIP over TLS • Hossein Yavari • April 2022
  • 5. TLS Handshake Client Server Step 1: TCP Handshake SYN SYN ACK ACK Step 2: TLS Handshake * Mutual Authentication/ Server Authentication Client Hello Server Hello Server Certificate Client Certificate Request Server key Exchange Server Hello Done Client Certificate Client Key Exchange Certificate Verify Change Cipher Spec Finished Change Cipher Spec Encrypted Data Close Messages
  • 6. TLS Handshake (Cont.) 1.Client Hello: The client sends a Client Hello message specifying the TLS version, a list of suggested cipher suites it supports, and a string of random bytes known as the "client random“. 2.Server Hello: The server responds with a Server Hello message with the TLS version, a chosen cipher suite and its own randomly selected prime number called a “server random”. 3.Server Certificate: The server presents an X.509 certificate or certificate chain to the client for verification as part of the initial TLS handshake. 4.Server Key Exchange: This is an optional message, only needed for certain key exchange methods (Diffie-Hellman) that require the server provides additional data. 5.Client Certificate Request: The server then requests a certificate from the client so the connection can be mutually authenticated. (optional) 6.Server Hello Done: The server sends a Server Hello Done message to tell the client it is finished with initial negotiations.
  • 7. TLS Handshake (Cont.) 7. Client Certificate: If the server requests a certificate, the client must send the certificate or certificate chain. 8. Client Key Exchange: The client sends a Client Key Exchange message which may contain a Public Key, or nothing depending on the cipher suite chosen (TLSv1.2). 9. Certificate Verify: This message is sent when the client presents a certificate as above. Its purpose is to allow the server to complete the process of authenticating the client. 10. Change cipher spec: The client sends a message telling the server to change to encrypted mode. 11. Finished: The client tells the server that it is ready for secure data communication to begin. This is the end of the SSL handshake. 12. Change Cipher Spec: The server sends a message telling the client to change to encrypted mode. 13. Finished: The server tells the client that it is ready for secure data communication to begin. This is the end of the SSL handshake. 14. Encrypted data: The client and the server communicate securely. 15. Close Messages: At the end of the connection, each side will send a close_notify message to inform the peer that the connection is closed.
  • 8. TLS Versions TLS 1.3’s handshake makes just a single round trip, so it is faster. https://www.thesslstore.com/blog/explaining-ssl-handshake/#the-tls-12-handshake-diffie-hellman-edition
  • 9. TLS 1.3 Cipher Suites https://www.thesslstore.com/blog/explaining-ssl-handshake/#the-tls-12-handshake-diffie-hellman-edition • TLS_AES_256_GCM_SHA384 • TLS_CHACHA20_POLY1305_SHA256 • TLS_AES_128_GCM_SHA256 • TLS_AES_128_CCM_8_SHA256 • TLS_AES_128_CCM_SHA256
  • 12. TLS Terminology • CA: Certificate Authority, a trusted entity, such as VeriSign, used to issue certs and to validate the authenticity of a cert. One type of cert, called a self-signed cert, does not require a CA. • Certificate chain: Often you will not have a certificate signed by your CA's root private key. Instead, you have your cert along with one or more intermediate certs that form a chain. The last intermediate cert in the chain is typically signed by the CA's root private key. • PEM: The Privacy Enhanced Mail (PEM) format is a text-based ASCII format that is a Base64 encoding of the binary Distinguished Encoding Rules (DER) format. • PEM certificates can be opened in any Text Editor and the actual certificate content is delimited between the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- statements. • It complies with the X.509 format for storing a certificate, certificate chain, or private key.
  • 13. Media Encryption • SRTP is not a protocol! It is a profile of RTP. • SRTP extends RTP to include encryption and authentication. • SIP/TLS with RTP is also possible but SIP/UDP/TCP with SRTP is not! Normal RTP Packet
  • 14. Media Encryption (Cont.) sRTP Packet RTP Header Encrypted Payload MKI AUTH
  • 15. Media Encryption (Cont.) • SRTP does not contain integrated key management! • It uses one of these key management protocols: • SDES-SRTP • DTLS-SRTP • ZRTP • SDES: Keys are transported in the SDP attachment of a SIP message using the TLS transport layer. • Media attribute defined by SDES is “crypto”: a=crypto:<tag> <crypto-suite> <key-params> [<session-params>] a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:xecNW9BAUUfsgvZgE2OApkYJ20OM3guIqql5gayD • 3 commonly used crypto suites are : • AES_CM_128_HMAC_SHA1_80 • AES_CM_128_HMAC_SHA1_32 • F8_128_HMAC_SHA1_32
  • 16. Media Encryption (Cont.) • DTLS: DTLS keying happens on the media path, independent of any out-of-band signaling channel.
  • 17. Media Encryption (Cont.) • ZRTP: a cryptographic key-agreement protocol meant to negotiate the keys for encryption between two endpoints. • ZRTP uses the Diffie-Hellman algorithm which enables secure key agreement and avoids the overhead of certificate management or any other prior setup. • The key agreement algorithm can be divided into 4 steps: • Discovery - Hello & HelloACK • Hash commitment - Commit • Diffie-Hellman exchange and key derivation - DHPart1 DHPart2 • Confirmation - Confirm1, Confirm2 & Conf2ACK
  • 18. Media Encryption (Cont.) • An offer can include any of these: • Plain RTP (RTP/AVP), • RTP with RTCP-based feedback (RTP/AVPF), • Secure RTP (RTP/SAVP), or • Secure RTP with RTCP-based feedback (RTP/SAVPF)