UART interface content protection device
By introducing data encryption and decryption module and UART interface module into the UART interface, the problem of information leakage during data transmission of UART interface is solved, and the encryption and decryption of UART interface data is realized, and the data security is improved.
Patent Information
- Application Number
- CN202510085970.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-05-23
AI Technical Summary
There is a risk of information leakage during data transmission of UART interfaces. Attackers can steal or tamper with the data transmitted by the interface through the UART interface to obtain sensitive information.
A UART interface content protection device is designed, including a data encryption and decryption module and a UART interface module. The data encryption and decryption module uses the encryption algorithm module and the decryption algorithm module to encrypt and decrypt data using the key, while the UART interface module is responsible for sending and receiving data.
By encrypting and decrypting the UART interface data, the data leakage during transmission is effectively avoided, the security of the UART interface data is improved, and the protection of sensitive information is ensured.
Smart Images

Figure CN120030567A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of integrated circuits, and in particular to a UART interface content protection device. Background Art
[0002] UART is an asynchronous transmission mode serial communication interface used to transmit data between computers and external devices. It is a serial interface protocol based on asynchronous transmission mode, and its transmission rate is determined by negotiation between the sender and the receiver. UART interface is often used to connect microcontrollers, sensors, modems and other external devices. It has the advantages of simplicity, reliability and low cost, and is widely used in embedded systems, communication systems, industrial control and other fields.
[0003] While UART interface circuits are widely used, they also face the risk of information leakage. For example, UART interfaces are used for data transmission and communication in the fields of smart homes and smart wearables. These data often contain users' private information. Attackers can steal and tamper with the data transmitted through the UART interface to obtain sensitive information.
[0004] With the development of information technology, information security issues have become increasingly severe, and the content protection of the UART interface has become increasingly important. Summary of the invention
[0005] The purpose of the present invention is to provide a UART interface content protection device to solve the problems in the background technology.
[0006] In order to solve the above technical problems, the present invention provides a UART interface content protection device, comprising:
[0007] Data encryption and decryption module, used for data encryption and decryption processing;
[0008] The UART interface module sends the ciphertext in UART timing, or receives the ciphertext in UART timing and sends it to the data encryption and decryption module.
[0009] In one embodiment, the data encryption and decryption module includes a data generator, an encryption algorithm module, an encryptor, a decryption algorithm module, and a decryptor;
[0010] The data generator is used to generate an initial key value;
[0011] The encryption algorithm module calculates and generates a key 1 according to the initial value generated by the data generator;
[0012] The encryptor encrypts the plain text output by the host computer with key 1 to generate cipher text;
[0013] The decryption algorithm module calculates and generates a key 2 according to the initial value generated by the data generator;
[0014] The decryptor decrypts the ciphertext output by the receiving data register using key 2 to generate plaintext.
[0015] In one embodiment, the UART interface module includes a transmit data register, a transmit state machine controller, a data transmitter, a receive state machine controller, a receive data register, and a data receiver;
[0016] The sending data register is used to cache the ciphertext output by the data encryption and decryption module;
[0017] The sending state machine controller controls the state jump of the data transmitter;
[0018] The data transmitter converts the parallel data into UART serial data and sends it to the outside;
[0019] The data receiver receives external UART serial data and converts it into parallel data;
[0020] The receiving state machine controller controls the state jump of the data receiver;
[0021] The received data register is used to buffer the ciphertext output by the data receiver.
[0022] In one implementation, the working process of the UART interface content protection device includes: a data generator generates an initial key value, and generates a key 1 and a key 2 respectively through an encryption algorithm module and a decryption algorithm module;
[0023] Regarding the data transmission process, key 1 encrypts the plaintext sent by the host computer through the encryptor to generate ciphertext, and caches the ciphertext in the transmission data register waiting for transmission. Finally, the ciphertext is sent to the outside in UART timing through the transmission state machine controller and the data transmitter;
[0024] Regarding the data receiving process, the data receiver and the receiving state machine controller receive the UART timing ciphertext from the outside, convert it into parallel data and cache it in the receiving data register; the key 2 decrypts the ciphertext in the receiving data register through the decryptor, generates plaintext and returns it to the host computer.
[0025] In one implementation, the encryption algorithm module uses an RSA algorithm public key generation module, and the decryption algorithm module uses an RSA algorithm private key generation module.
[0026] In one implementation, the UART interface content protection device is compatible with the UART protocol.
[0027] In one implementation, the UART interface content protection device protects the UART interface content to prevent leakage of UART interface signals when they are transmitted between devices.
[0028] A UART interface content protection device provided by the present invention adds a data encryption and decryption module on the basis of being compatible with the UART protocol, thereby improving the security of UART interface data. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a schematic diagram of a UART interface content protection device of the present invention;
[0030] Figure 2 It is a schematic diagram of a data encryption and decryption module in a UART interface content protection device of the present invention;
[0031] Figure 3 It is a schematic diagram of a typical encryption and decryption module implementation scheme of the present invention. DETAILED DESCRIPTION
[0032] The following is a further detailed description of a UART interface content protection device proposed by the present invention in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will become clearer according to the following description. It should be noted that the accompanying drawings are all in a very simplified form and are not in precise proportions, and are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention.
[0033] The present invention provides a UART interface content protection device, the structure of which is as follows: Figure 1 As shown, it includes a data encryption and decryption module and a UART interface module.
[0034] like Figure 2 As shown, the data encryption and decryption module includes a data generator, an encryption algorithm module, an encryptor, a decryption algorithm module, and a decryptor. The data generator is used to generate an initial value of the key; the encryption algorithm module calculates and generates key 1 according to the initial value generated by the data generator; the encryptor encrypts the plaintext output by the host computer with key 1 to generate ciphertext; the decryption algorithm module calculates and generates key 2 according to the initial value generated by the data generator; the decryptor decrypts the ciphertext output by the receiving data register with key 2 to generate plaintext.
[0035] Please continue reading Figure 1The UART interface module includes a transmit data register, a transmit state machine controller, a data transmitter, a receive state machine controller, a receive data register, and a data receiver. The transmit data register is used to cache the ciphertext output by the data encryption and decryption module; the transmit state machine controller controls the state jump of the data transmitter; the data transmitter converts parallel data into UART serial data and sends it to the outside; the data receiver receives the external UART serial data and converts it into parallel data; the receive state machine controller controls the state jump of the data receiver; the receive data register is used to cache the ciphertext output by the data receiver.
[0036] The working process of a UART interface content protection device of the present invention is as follows: a data generator generates an initial key value, and generates key 1 and key 2 respectively through an encryption algorithm module and a decryption algorithm module. Regarding the data sending process, key 1 encrypts the plaintext sent by the host computer through an encryptor to generate ciphertext, and caches the ciphertext in a sending data register to wait for sending, and finally sends the ciphertext to the outside in UART timing through a sending state machine controller and a data transmitter. Regarding the data receiving process, a data receiver and a receiving state machine controller receive UART timing ciphertext from the outside, convert it into parallel data and cache it in a receiving data register. Key 2 decrypts the ciphertext in the receiving data register through a decryptor, generates plaintext and returns it to the host computer.
[0037] Figure 3 The figure shows a specific implementation method of the data encryption and decryption module.
[0038] The data generator of the data encryption and decryption module uses a prime number generator to generate two random prime numbers; the encryption algorithm module uses the RSA algorithm public key generation module to generate key 1; the encryptor uses key 1 to encrypt the plaintext sent by the host computer, and generates ciphertext to send to the data register. The decryption algorithm module uses the RSA algorithm private key generation module to generate key 2; the decryptor uses key 2 to decrypt the received ciphertext, and the plaintext is obtained after decryption.
[0039] The above description is only a description of the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention. Any changes or modifications made by a person skilled in the art in the field of the present invention based on the above disclosure shall fall within the scope of protection of the claims.
Claims
1. A UART interface content protection device, characterized in that: include: Data encryption and decryption module, used for data encryption and decryption processing; The UART interface module sends the ciphertext in UART timing, or receives the ciphertext in UART timing and sends it to the data encryption and decryption module.
2. The UART interface content protection device according to claim 1, characterized in that: The data encryption and decryption module includes a data generator, an encryption algorithm module, an encryptor, a decryption algorithm module, and a decryptor; The data generator is used to generate an initial key value; The encryption algorithm module calculates and generates a key 1 according to the initial value generated by the data generator; The encryptor encrypts the plain text output by the host computer with key 1 to generate cipher text; The decryption algorithm module calculates and generates a key 2 according to the initial value generated by the data generator; The decryptor decrypts the ciphertext output by the receiving data register using key 2 to generate plaintext.
3. The UART interface content protection device according to claim 2, characterized in that: The UART interface module includes a transmit data register, a transmit state machine controller, a data transmitter, a receive state machine controller, a receive data register, and a data receiver; The sending data register is used to cache the ciphertext output by the data encryption and decryption module; The sending state machine controller controls the state jump of the data transmitter; The data transmitter converts the parallel data into UART serial data and sends it to the outside; The data receiver receives external UART serial data and converts it into parallel data; The receiving state machine controller controls the state jump of the data receiver; The received data register is used to buffer the ciphertext output by the data receiver.
4. The UART interface content protection device according to claim 1, characterized in that: The working process of the UART interface content protection device includes: a data generator generates an initial key value, and generates a key 1 and a key 2 respectively through an encryption algorithm module and a decryption algorithm module; Regarding the data transmission process, key 1 encrypts the plaintext sent by the host computer through the encryptor to generate ciphertext, and caches the ciphertext in the transmission data register waiting for transmission. Finally, the ciphertext is sent to the outside in UART timing through the transmission state machine controller and the data transmitter; Regarding the data receiving process, the data receiver and the receiving state machine controller receive the UART timing ciphertext from the outside, convert it into parallel data and cache it in the receiving data register; the key 2 decrypts the ciphertext in the receiving data register through the decryptor, generates plaintext and returns it to the host computer.
5. The UART interface content protection device according to claim 1, characterized in that: The encryption algorithm module adopts an RSA algorithm public key generation module, and the decryption algorithm module adopts an RSA algorithm private key generation module.
6. The UART interface content protection device according to claim 1, characterized in that: The UART interface content protection device is compatible with the UART protocol.
7. The UART interface content protection device according to claim 1, characterized in that: The UART interface content protection device protects the UART interface content and prevents leakage of UART interface signals when they are transmitted between devices.