webrtcを支えるマイナーなプロトコルsrtp/dtls/sctpを分かった気になる
DESCRIPTION
WebRTC Meetup Tokyo #3の発表資料です。 WebRTCを支えるマイナーなプロトコルSRTP/DTLS/SCTPを分かった気になる資料です。 P.38 誤記 Under the food -> hood です。TRANSCRIPT
WebRTC を支えるマイナーなプロトコルSRTP/DTLS/SCTP を分かった気になる
- kind of feel like understanding SRTP/DTLS/SCTP -
@iwashi862014/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本日お持ち帰りいただくこと
IPUDPDTLS
SRTP SCTPAudio/Video Data
WebRTC protocol stack
IPUDPDTLS
SRTP SCTPAudio/Video DataUnderstanding…
After this talkyou’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ここから本題
IPUDPDTLS
SRTP SCTPAudio/Video Data
Let’s start with SRTP では SRTP から
SRTP
S + RTP
S + RTPSecure
S + RTPSecure
Real-timeTransportProtocol
RTP?
Protocol forSend/Receive and Audio/Video
Real-time
音声映像をリアルタイムに送受信するプロトコルのこと
Why? How?何で必要なの?どう動くの?
Hello
Ideal( 理想 )
Real world with UDP/IP
Hello
Jitter( ゆらぎ )
Real world with UDP/IP
Hello
Jitter( ゆらぎ )
Out-of-order ( ホレルになった )
Holel
Real world with UDP/IP
Hello
Jitter( ゆらぎ )
Out-of-order ( ホレルになった )
Loss ( まさかの地獄行き )
Hello
Holel
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 UDPRTP は UDP の薄皮みたいなもの
http://www.cl.cam.ac.uk/~jac22/books/mm/book/node159.html
SRTP is a just secure RTPSRTP は RTP を安全にしただけ
Encrypted Payload暗号化されたペイロード
http://flylib.com/books/2/110/1/html/2/images/ct402614.jpg
Hey, where is encryption key?
あれ? 暗号化の鍵はどこにあるの ?
IPUDPDTLS
SRTP SCTPAudio/Video Data
That’s why we have DTLS そこで DTLS ですよ
DTLS
D + TLS
Datagram(UDP の )
D + TLS
Datagram(UDP の )
TransportLayer
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-Modified%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-Modified%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-Modified%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再送する
IPUDPDTLS
SRTP SCTPAudio/Video Data
End with SCTP 最後は SCTP
You’re using now!
使ってないとは言わせない
STCP is running in LTE core NWSCTP は 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 / CongestionControl流量 / 輻輳制御
Yes Yes No
Now you might be able to answer
そろそろなんとなく答えられるはず?
What’s DTLS?What’s SRTP?What’s SCTP?
Thanks!
おしまい