{"id":706,"date":"2022-05-04T12:09:42","date_gmt":"2022-05-04T04:09:42","guid":{"rendered":"https:\/\/www.fanyamin.com\/wordpress\/?p=706"},"modified":"2022-05-04T12:10:45","modified_gmt":"2022-05-04T04:10:45","slug":"dtls-handshake","status":"publish","type":"post","link":"https:\/\/www.fanyamin.com\/wordpress\/?p=706","title":{"rendered":"DTLS handshake"},"content":{"rendered":"<h1>DTLS record header<\/h1>\n<p><img decoding=\"async\" src=\"https:\/\/www.fanyamin.com\/wordpress\/wp-content\/uploads\/2022\/05\/image-1651636732356.png\" alt=\"file\" \/><\/p>\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<thead>\n<tr>\n<th>DTLS Header Field<\/th>\n<th>Purpose<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>8-bit Message Type<\/td>\n<td>This field contains the type of DTLS record being sent. Valid types are as follows:<br \/>- ChangeCipherSpec: 0x14<br \/>- Alert: 0x15<br \/>- Handshake: 0x16<br \/>- Application Data: 0x17<\/td>\n<\/tr>\n<tr>\n<td>16-bit Protocol Version<\/td>\n<td>This field contains the DTLS protocol version. Valid values are as follows:<br \/>- DTLS 1.1: 0xFEFD<\/td>\n<\/tr>\n<tr>\n<td>16-bit Epoch<\/td>\n<td>This field contains the DTLS \u201cepoch\u201d which is a counter that is incremented each time the encryption state is changed (e.g. when generating new session keys).<\/td>\n<\/tr>\n<tr>\n<td>48-bit Sequence Number<\/td>\n<td>This field contains a sequence number which identifies this particular record. It is used by DTLS to maintain record ordering and check for retransmission need.<\/td>\n<\/tr>\n<tr>\n<td>16-bit Length<\/td>\n<td>This field contains the length of the data encapsulated in the DTLS record.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>DTLS Handshake Record header<\/h1>\n<p><img decoding=\"async\" src=\"https:\/\/www.fanyamin.com\/wordpress\/wp-content\/uploads\/2022\/05\/image-1651636787509.png\" alt=\"file\" \/><\/p>\n<h1>DTLS Handshake flow<\/h1>\n<p><img decoding=\"async\" src=\"https:\/\/www.fanyamin.com\/wordpress\/wp-content\/uploads\/2022\/05\/image-1651637107583.png\" alt=\"file\" \/><\/p>\n<table>\n<thead>\n<tr>\n<th>TLS Header Field<\/th>\n<th>Purpose<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>8-bit Message Type<\/td>\n<td>This field contains the type of DTLS record being sent. Valid types are as follows: <br \/>- ChangeCipherSpec: 0x14<br \/>- Alert: 0x15<br \/>- Handshake: 0x16<br \/>- Application Data: 0x17<\/td>\n<\/tr>\n<tr>\n<td>16-bit Epoch<\/td>\n<td>This field contains the DTLS \u201cepoch\u201d which is a counter that is incremented each time the encryption state is changed (e.g. when generating new session keys).<\/td>\n<\/tr>\n<tr>\n<td>48-bit Sequence Number<\/td>\n<td>This field contains a sequence number which identifies this particular record. It is used by DTLS to maintain record ordering and check for retransmission need.<\/td>\n<\/tr>\n<tr>\n<td>16-bit Protocol Version<\/td>\n<td>This field contains the DTLS protocol version. Valid values are as follows:<br \/>- DTLS 1.1: 0xFEFD<\/td>\n<\/tr>\n<tr>\n<td>16-bit Length<\/td>\n<td>This field contains the length of the data encapsulated in the DTLS record.<\/td>\n<\/tr>\n<tr>\n<td>8-bit Handshake Type<\/td>\n<td>This field contains the handshake message type. Valid values are as follows:<br \/>- HelloRequest: 0x00<br \/>- ClientHello: 0x01<br \/>- ServerHello: 0x02<br \/>- Certificate: 0x0B<br \/>- ServerKeyExchange: 0x0C<br \/>- CertificateRequest: 0x0D<br \/>- ServerHelloDone: 0x0E<br \/>- CertificateVerify: 0x0F<br \/>- ClientKeyExchange: 0x10<br \/>- Finished: 0x14<\/td>\n<\/tr>\n<tr>\n<td>24-bit Length<\/td>\n<td>This field contains the length of the handshake message data.<\/td>\n<\/tr>\n<tr>\n<td>16-bit Sequence Number<\/td>\n<td>This field contains a sequence number.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>Reference<\/h1>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/rtos\/netx-duo\/netx-secure-dtls\/chapter3\">https:\/\/docs.microsoft.com\/en-us\/azure\/rtos\/netx-duo\/netx-secure-dtls\/chapter3<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>DTLS record header DTLS Header Field Purpose 8-bit Message Type This field contains the type of DTLS record being sent. Valid types are as follows:- ChangeCipherSpec: 0x14- Alert: 0x15- Handshake: 0x16- Application Data: 0x17 16-bit Protocol Version This field contains the DTLS protocol version. Valid values are as follows:- DTLS 1.1: 0xFEFD 16-bit Epoch This [&hellip;] <a class=\"read-more\" href=\"https:\/\/www.fanyamin.com\/wordpress\/?p=706\" title=\"Permanent Link to: DTLS handshake\">&rarr;Read&nbsp;more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-706","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/706"}],"collection":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=706"}],"version-history":[{"count":2,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/706\/revisions"}],"predecessor-version":[{"id":711,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/706\/revisions\/711"}],"wp:attachment":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}