当前位置:网站首页>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 .
边栏推荐
- The problem is as big as the middle stage
- 未来银行需要用明天的思维,来思考今天架构
- Automatically refresh CDN cache in real time based on cos log
- How Tencent cloud es achieves cross cluster data copy & lt through reindex; Lower & gt;
- Recent progress of ffmpeg go
- Tencent blue whale Zhiyun community version v6.0.3 was officially released together with the container management platform!
- Serial of H3CNE experiment column - VLAN configuration experiment, access and trunk
- How to save data to the greatest extent after deleting LV by misoperation under AIX?
- Data acquisition and transmission instrument reservoir dam safety monitoring
- Experience and suggestions on cloud development database
猜你喜欢
![[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)

MySQL learning -- table structure of SQL test questions

Ui- first lesson

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

Problems encountered in the work of product manager

Daily algorithm & interview questions, 28 days of special training in large factories - the 15th day (string)

A survey on model compression for natural language processing (NLP model compression overview)

Ps\ai and other design software pondering notes

Cognition and difference of service number, subscription number, applet and enterprise number (enterprise wechat)
随机推荐
构建跨公链平台解决DApp开发问题
Abstract factory pattern
IBM:以现代化架构支撑AI与多云时代的企业数字化重塑
主链系统发展解析
[leetcode108] convert an ordered array into a binary search tree (medium order traversal)
重新定义存储架构,华为用了不止5颗“芯”
A survey of training on graphs: taxonomy, methods, and Applications
zblog系统如何根据用户ID获取用户相关信息的教程
Automatically refresh CDN cache in real time based on cos log
实现TypeScript运行时类型检查
Modern finite element analysis can easily achieve accurate results
How to perform concurrent stress testing on RTSP video streams distributed by audio and video streaming servers?
How to save data to the greatest extent after deleting LV by misoperation under AIX?
Learn typescript with VAM (phase 1)
How FEA and FEM work together
How does the easynvr/easygbs live video platform use Wireshark to capture and analyze data locally?
Swift array map/flatmap/compactmap/filter/reduce/chaining Usage Summary
Can you remember the code of a programming boss? Can you hit it out without Baidu?
Principle analysis of robot hardware in the loop system
Solution to the problem that kibana's map cannot render longitude and latitude coordinate data