Answer the question
In order to leave comments, you need to log in
What technologies will help make a secure data transmission channel?
Good afternoon. I want to assemble two devices on microcontrollers and organize a secure communication channel between them. Speed is of little importance. data volumes are small: something like a burglar alarm on a car and a remote control for it. The criteria are:
Answer the question
In order to leave comments, you need to log in
TLS is used for this. This is a special protocol that solves all the issues that you want to solve. There is the possibility of encryption, mutual authentication of both the client and the server, and all that. Cons - computationally difficult. That is, on weak microcontrollers, the process of establishing a TLS session can take time, plus battery consumption. Pluses - there are already ready-made libs for many platforms / architectures that can be used so as not to reinvent the wheel and write your own.
The replay attack guarantee is achieved by the fact that in order to send a command, the parties need to authenticate, i.e. it is always a two-way exchange. Technically, the parties first exchange certificates, verify them, then, based on the Diffie-Hellman algorithm, they form a symmetric encryption key that will be used to encrypt the data stream. In general, this key will be different in each session. There are caching and state saving mechanisms to speed up the establishment of a TLS session (for example, in case the client has already connected recently - this is necessary to increase the speed of negotiating a TLS connection), but this is all optional and disabled.
You can put anything inside TLS - a custom binary protocol based on TCP / IP or REST API based on HTTP - it doesn't matter.
The connection is maintained only for the duration of the data transfer.
Trite:
Add a signature to the request with the time and a random set of characters.
On the device side - prohibit repeated requests for 10 years.
Bottom line: even knowing what you sent, you can’t use it in any way.
If you want to encrypt the "body" of the request itself (so that they don't read it) - encrypt it in any way (the main thing is - do not use session TOKEN for encryption! ).
Here in detail.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question