Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
WebRTCを支えるマイナーなプロトコルSRTP/DTLS/SCTPを分かった気になる / ...
Search
iwashi
November 26, 2022
Technology
22
1.7k
WebRTCを支えるマイナーなプロトコル SRTP/DTLS/SCTPを分かった気になる / Slightly understand WebRTC Protocols like SRTP/DTLS/SCTP
WebRTC Meetup Tokyo #3の発表資料です。
WebRTCを支えるマイナーなプロトコルSRTP/DTLS/SCTPを分かった気になる資料です。
iwashi
November 26, 2022
Tweet
Share
More Decks by iwashi
See All by iwashi
n=1の経験が紡ぐエンジニアリングマネジメントの可能性 / The Possibilities of Engineering Management from n=1 Experiences
iwashi86
20
6.3k
エンジニアリングが好きな私たちのためのエンジニアリングマネジャー入門 / Engineering management for the rest of us
iwashi86
22
5.3k
エレガントパズル 30分 ダイジェスト版/ Elegant Puzzle 30min Digest
iwashi86
5
570
エレガントパズル エンジニアのマネジメントという難問にあなたはどう立ち向かうのか / Elegant Puzzle
iwashi86
18
4k
ベロシティを高く保つ仕事のすすめ方 / Maintaining a High Velocity as Productivity Hacks
iwashi86
54
20k
マネージャー&リーダー向け 社内トレーニング / Training of management and leadership for Stockmark
iwashi86
65
32k
30分でわかる「エンジニアのためのドキュメントライティング」- インフラエンジニアBooks / Docs for Developers within 30 minutes
iwashi86
9
2.5k
エンジニアのためのドキュメントライティング / Docs for Developers
iwashi86
34
22k
なぜ変化を起こすのが難しいのか? - 数年以上にわたって難しさに向き合い・考え取り組んできたこと / The reason why changing organization is so hard - What I thought and faced for more than several years
iwashi86
60
88k
Other Decks in Technology
See All in Technology
Fraxinus00tw assembly manual
fukumay
0
110
AWSアカウントのセキュリティ自動化、どこまで進める? 最適な設計と実践ポイント
yuobayashi
7
630
EMConf JP 2025 懇親会LT / EMConf JP 2025 social gathering
sugamasao
2
200
Iceberg Meetup Japan #1 : Iceberg and Databricks
databricksjapan
0
370
Visualize, Visualize, Visualize and rclone
tomoaki0705
9
83k
偏光画像処理ライブラリを作った話
elerac
1
170
【内製開発Summit 2025】イオンスマートテクノロジーの内製化組織の作り方/In-house-development-summit-AST
aeonpeople
2
680
LINEギフトにおけるバックエンド開発
lycorptech_jp
PRO
0
300
"TEAM"を導入したら最高のエンジニア"Team"を実現できた / Deploying "TEAM" and Building the Best Engineering "Team"
yuj1osm
1
190
役員・マネージャー・著者・エンジニアそれぞれの立場から見たAWS認定資格
nrinetcom
PRO
4
6.1k
自分だけの仮想クラスタを高速かつ効率的に作る kubefork
donkomura
0
100
OCI Success Journey OCIの何が評価されてる?疑問に答える事例セミナー(2025年2月実施)
oracle4engineer
PRO
2
160
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
Faster Mobile Websites
deanohume
306
31k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
990
The Cost Of JavaScript in 2023
addyosmani
47
7.4k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
570
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Mobile First: as difficult as doing things right
swwweet
223
9.4k
Code Review Best Practice
trishagee
67
18k
Transcript
WebRTCを支えるマイナーなプロトコル SRTP/DTLS/SCTPを分かった気になる - kind of feel like understanding SRTP/DTLS/SCTP -
@iwashi86 2014/08/01 WebRTC Meetup Tokyo #3
•Attribute Name Yoshimasa Iwase @iwashi86 web iwashi.co •Work ・Web Engineer@NTT
Com ・HTML5 Experts.jp Editor •Recently ・has become PHPer for 2 months (ついにぺちぱーになりました)
Takeaway 本日お持ち帰りいただくこと
IP UDP DTLS SRTP SCTP Audio/Video Data WebRTC protocol stack
IP UDP DTLS SRTP SCTP Audio/Video Data Understanding…
After this talk you’ll be able to answer このお話が終わる頃には 次の質問に答えられるように
What’s DTLS? What’s SRTP? What’s SCTP? DTLS,SRTP,SCTP? 何それ美味しいの?
Caveat ※注
Feel like understanding (Please check RFC for further information) 分かった気になってるだけ
(詳細はRFC読んでね)
Main Topic ここから本題
IP UDP DTLS SRTP SCTP Audio/Video Data Let’s start with
SRTP ではSRTPから
SRTP
S + RTP
S + RTP Secure
S + RTP Secure Real-time Transport Protocol
RTP?
Protocol for Send/Receive and Audio/Video Real-time 音声映像をリアルタイムに送受信するプロトコルのこと
Why? How? 何で必要なの?どう動くの?
H e l l o Ideal(理想)
Real world with UDP/IP
H e l l o Jitter(ゆらぎ) Real world with UDP/IP
H e l l o Jitter(ゆらぎ) Out-of-order (ホレルになった) H o
l e l Real world with UDP/IP
H e l l o Jitter(ゆらぎ) Out-of-order (ホレルになった) Loss (まさかの地獄行き)
H e l l o H o l e l Real world with UDP/IP
Problem and Solutions of RTP 課題とその解決方法 Jitter (ゆらぎ) Out-of-order (順序逆転)
Loss (消失)
Jitter (ゆらぎ) Out-of-order (順序逆転) Loss (消失) Timestamp タイムスタンプでいつ送ったか記録しておけば タイミングよく再生できるよ Problem
and Solutions of RTP 課題とその解決方法
Jitter (ゆらぎ) Out-of-order (順序逆転) Loss (消失) Timestamp タイムスタンプでいつ送ったか記録しておけば タイミングよく再生できるよ Sequence
Number シーケンス番号があれば並べ替えできるよ Problem and Solutions of RTP 課題とその解決方法
Jitter (ゆらぎ) Out-of-order (順序逆転) Loss (消失) Timestamp タイムスタンプでいつ送ったか記録しておけば タイミングよく再生できるよ Sequence
Number シーケンス番号があれば並べ替えできるよ Give up (don’t have time of retransmission) 再送するほど暇じゃない Problem and Solutions of RTP 課題とその解決方法
RTP is a thin wrapper of UDP RTPはUDPの薄皮みたいなもの http://www.cl.cam.ac.uk/~jac22/books/mm/book/node159.html
SRTP is a just secure RTP SRTPはRTPを安全にしただけ Encrypted Payload 暗号化されたペイロード
http://flylib.com/books/2/110/1/html/2/images/ct402614.jpg
Hey, where is encryption key? あれ? 暗号化の鍵はどこにあるの?
IP UDP DTLS SRTP SCTP Audio/Video Data That’s why we
have DTLS そこでDTLSですよ
DTLS
D + TLS Datagram (UDPの)
D + TLS Datagram (UDPの) Transport Layer Security
TLS?
You know! 知らないとは言わせない
This one! ここ!
Under the food of HTTPS 内部ではこう動いている https://devcentral.f5.com/Portals/0/images/metapost/News-Articles/ltwagnon/2013/Jun/Windows-Live-Writer-525a2ddcdc82_787C-Modif ied%20TLS%20Handshake_2.jpg
What if there is a packet loss パケロスがあったら… https://devcentral.f5.com/Portals/0/images/metapost/News-Articles/ltwagnon/2013/Jun/Windows-Live-Writer-525a2ddcdc82_787C-Modif ied%20TLS%20Handshake_2.jpg
What if there is a packet loss パケロスがあったら… https://devcentral.f5.com/Portals/0/images/metapost/News-Articles/ltwagnon/2013/Jun/Windows-Live-Writer-525a2ddcdc82_787C-Modif ied%20TLS%20Handshake_2.jpg
Can’t share key 鍵を共有できない
We need reliability! 信頼性さえあれば!
So we’ve added TCP functions to TLS そこでTLSにTCPの機能をつけてみた
DLTS = TLS + TCP (ex. Seq, Order-control) DTLSはTLSにTCPの機能つけたようなもの Retransmission
再送する
IP UDP DTLS SRTP SCTP Audio/Video Data End with SCTP
最後は SCTP
You’re using now! 使ってないとは言わせない
STCP is running in LTE core NW SCTPはLTEキャリアコア網の中で動いている https://www.nttdocomo.co.jp/binary/pdf/corporate/technology/rd/technical_journal/bn/vol19_1/vol19_1_011jp.pdf
SCTP ≒ TCP 結構似てる(似せられる) SCTP ≒ HTTP2 レイヤは違えど考え方が似ている
Handshake SYN SYN + ACK ACK INIT INIT-ACK COOKIE COOKIE-ECHO
TCP SCTP
Difference between STCP and TCP で、何が違うの? SCTP TCP UDP(参考) Reliability
到達保証 Configurable 選べる Yes No Order 順序制御 Configurable 選べる Yes No Transmission 転送志向 Message メッセージ志向 Byte バイト志向 Message メッセージ志向 Multi Stream マルチストリーム有無 Yes No - Flow / Congestion Control 流量/輻輳制御 Yes Yes No
Now you might be able to answer そろそろなんとなく答えられるはず?
What’s DTLS? What’s SRTP? What’s SCTP?
Thanks! おしまい