当前位置:网站首页>04. Tencent cloud IOT device side learning - network connection and device authentication
04. Tencent cloud IOT device side learning - network connection and device authentication
2022-06-24 16:55:00 【fancyxu】
The main purpose of this series is to record the learning notes of Tencent cloud Internet of things device , And on the device side SDK Make a supplementary explanation .
network connections
MQTT Is based on reliable protocols , It's usually used TCP、 perhaps TCP+TLS, among TLS Based on PSK Authentication and certificate based authentication .
Tencent cloud Internet of things C SDK adopt network The network layer implements different adaptations to the network protocols under , It mainly includes three categories :
- TLS:SDK Mainly adapted to mbedtls The corresponding interface of , Use tls Access can be directly adapted mbedtls
- TCP socket: about TCP Access mode , Most uses are socket Interface form , Through adaptation HAL Layer of socket Interface can be implemented TCP Access
- AT: For partial use AT Command controlled equipment ,SDK It also provides general AT frame , By adapting the underlying AT Instruction can realize access
Because it involves security , Most scenarios use mbedtls Mode access , This requires the equipment to mbedtls adapter , Fortunately mbedtls The adaptation is very mature , And not complicated .
Device access authentication
For equipment type , It can be divided into two categories :
- PSK equipment :
- TCP: in the light of TCP Connect , Key authentication is used , adopt PSK Use MQTT Of user name and password For authentication , Please see the Key authentication device access guide
- TCP+TLS+PSK: according to PSK be based on TLS_PSK_WITH_AES_128_CBC_SHA or TLS_PSK_WITH_AES_256_CBC_SHA Suite for authentication and key exchange , This can be done by capturing packets in Client Hello see .
- Certificate equipment : Use TLS Certificate mode for authentication , You can see TLS The handshake process
Other authentication
In addition to device access authentication , Other authentication is also included in the whole Tencent cloud IOT , No more details. , Briefly describe , Understanding can . It mainly includes :
- Device log upload authentication : Use equipment PSK Or certificate key pair hmac_sha1 Sign the time and log content
- Dynamic registration authentication : Use the product key ( Note here is the product PSK, Not equipment PSK), use hmac_sha1 For device information 、 Random number and time
- Dynamic binding authentication of sub devices : Adopt sub equipment PSK Or certificate key pair hmac_sha1 For device information 、 Random number and time
Because it is convenient for device implementation and code reuse , Most authentications are similar , Mainly through the key to the device information , random number 、 Time stamp 、 Other information HMAC, Generate message authentication code , Thus, the server can confirm that the message is sent by the device according to the message authentication code .
边栏推荐
- TVP experts talk about geese factory middleware: innovating forward and meeting the future
- The mystery of redis data migration capacity
- Solution to the problem that kibana's map cannot render longitude and latitude coordinate data
- Don't let [mana] destroy your code!
- Factory mode
- Analysis and introduction of NFT meta universe source code construction
- Development analysis of main chain system
- Introduction to koa (II) building the koa program
- Learn typescript with VAM (phase 1)
- What is the difference between a network card and a port
猜你喜欢
![[leetcode108] convert an ordered array into a binary search tree (medium order traversal)](/img/e1/0fac59a531040d74fd7531e2840eb5.jpg)
[leetcode108] convert an ordered array into a binary search tree (medium order traversal)

Ui- first lesson

Applet - use of template

A survey on dynamic neural networks for natural language processing, University of California

Ps\ai and other design software pondering notes

A survey of training on graphs: taxonomy, methods, and Applications
![[go] concurrent programming channel](/img/6a/d62678467bbc6dfb6a50ae42bacc96.jpg)
[go] concurrent programming channel

MySQL learning -- table structure of SQL test questions

Applet wxss

Problems encountered in the work of product manager
随机推荐
Tencent released "warehouse express" and issued "ID card" for each commodity!
How to get the response body content in gin?
Development analysis of main chain system
主链系统发展解析
How important is it to document the project? I was chosen by the top 100 up leaders and stood up again
Applet - use of template
Introduction to koa (III) koa routing
Memo list: useful commands for ffmpeg command line tools
Zblog system realizes the tutorial of the number of articles published on the same day when the foreground calls
Introduction to koa (II) building the koa program
Ps\ai and other design software pondering notes
Tencent releases the full platform version of reasoning framework TNN, and supports mobile terminal, desktop terminal and server terminal at the same time
Activeindex selection and redirection in the menu bar on the right of easycvs
构建跨公链平台解决DApp开发问题
AI video structured intelligent security platform easycvr realizes intelligent security monitoring scheme for procuratorate building
FPGA project development: experience sharing of lmk04821 chip project development based on jesd204b (I)
What is a server
Complete the log service CLS questionnaire in 1 minute and receive the Tencent cloud 30 yuan threshold free voucher ~
Zblog determines whether a plug-in installs the enabled built-in function code
The problem is as big as the middle stage