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を分かった気になる / Slightly understand WebRTC Protocols like SRTP/DTLS/SCTP
Search
iwashi
November 26, 2022
Technology
2
760
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
マネージャー&リーダー向け 社内トレーニング / Training of management and leadership for Stockmark
iwashi86
48
28k
30分でわかる「エンジニアのためのドキュメントライティング」- インフラエンジニアBooks / Docs for Developers within 30 minutes
iwashi86
9
2k
エンジニアのためのドキュメントライティング / Docs for Developers
iwashi86
29
17k
なぜ変化を起こすのが難しいのか? - 数年以上にわたって難しさに向き合い・考え取り組んできたこと / The reason why changing organization is so hard - What I thought and faced for more than several years
iwashi86
59
80k
2015年 第4四半期の WebRTC 標準化 アップデート / 2015 update of WebRTC Standards
iwashi86
0
170
外注が主な企業でどのように内製開発を立ち上げ・進化させているのか? / how we start in-house developement in enterprise?
iwashi86
2
29k
Extreme testing of WebRTC Applications
iwashi86
0
120
2019 IaaS Workshop in training for new employee at NTT Com
iwashi86
0
100
2017 SkyWayを使いこなすために / How to use SkyWay (WebRTC) in 2017
iwashi86
0
420
Other Decks in Technology
See All in Technology
IaCジェネレーターとBedrockで詳細設計書を生成してみた
tsukasa_ishimaru
1
180
LLM開発・活用の舞台裏@2024.04.25
yushin_n
1
210
リテール金融(キャッシュレス・ネット銀行・ネット証券)の競争環境と経済圏
8maki
0
1.1k
私が trocco を推す理由
__allllllllez__
1
220
生産性向上チームの紹介
cybozuinsideout
PRO
1
870
Google Cloud の AI を支える裏側のインフラを垣間見る!
maroon1st
0
350
よく聞くけど使ったことないソフトウェアNo.1 KafkaとSnowflake
foursue
4
360
20240418_Google ColabにLLMが搭載されたようなのでPython x データ分析の勉強方法を考えてみる
doradora09
0
130
Hands-on Gemini, the Google DeepMind LLM
meteatamel
1
110
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
120
競技としてのKaggle、役に立つKaggle
yu4u
3
1.3k
オーナーシップを持つ領域を明確にする
konifar
13
3.2k
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
422
63k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
227
16k
Become a Pro
speakerdeck
PRO
11
4.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
355
18k
Typedesign – Prime Four
hannesfritz
36
2.1k
A Philosophy of Restraint
colly
197
16k
A Tale of Four Properties
chriscoyier
151
22k
4 Signs Your Business is Dying
shpigford
175
21k
Navigating Team Friction
lara
178
13k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
6
1.5k
The Pragmatic Product Professional
lauravandoore
25
5.8k
Embracing the Ebb and Flow
colly
80
4.1k
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! おしまい