A simple encryption method
By adding modulation and demodulation modules to the master and slave ends of smart devices, and superimposing encrypted signals with parameters agreed upon by existing communication bus protocols, the problem of communication encryption in low-cost devices is solved, and low-cost, fast encrypted communication is achieved.
Patent Information
- Application Number
- CN202411925236.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2044-12-25
AI Technical Summary
In existing low-cost smart devices, the communication encryption methods between the master control chip and the slave chip cannot be directly applied, which leads to increased equipment development costs or insufficient performance, and replacing the chip will prolong the development cycle.
Modulation and demodulation modules are added to the master and slave ends. The encryption signal parameters are agreed upon using the existing communication bus protocol. Encryption is achieved by superimposing modulation and demodulation signals, including carrier, signal lines and modulation parameters, to ensure that the voltage swing is within ±10%. It supports SPI, IIC and 1-WIRE protocols.
It enables the overlay of encrypted signals onto the existing communication bus without the need for additional chips, thereby reducing equipment development costs, simplifying system design, controlling the development cycle, and improving communication efficiency and concealment.
Smart Images

Figure CN119783134B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data communication encryption technology, specifically a simple encryption method. Background Technology
[0002] In some smart devices such as printers and smart cars, communication between the master control chip and the slave chip is based on SPI (Serial Peripheral Interface), IIC (Inter-Integrated Circuit), and 1-WIRE protocols. Encryption of this communication is typically achieved using existing software or hardware encryption methods. However, for devices requiring strict cost control, the performance of existing chips is relatively low. If hardware encryption is implemented, additional encryption chips are needed, increasing overall R&D costs. If software encryption is used, the existing chip's storage and performance may not support the algorithm's operation, necessitating chip replacement. This forces the original system design to change in sync with the chip development, lengthening the device's development cycle. Summary of the Invention
[0003] To address the issue that existing encryption methods cannot be directly applied to the chips of some low-cost smart devices, this invention provides a simple encryption method that can utilize the existing chips in the device to send encrypted data at a lower cost, while effectively controlling the device's development cycle.
[0004] The technical solution of this invention is as follows: a simple encryption method, characterized by comprising the following steps:
[0005] S1: Add a set of modulation and demodulation modules to both the master and slave ends. The modulation and demodulation modules are used for analog signal modulation and demodulation and transmission and reception.
[0006] S2: Based on the protocol type of the communication bus between the master terminal and the slave terminal, agree on encryption parameters for the encryption signal between the master terminal and the slave terminal;
[0007] The encryption parameters include: carrier wave, signal lines for carrying, and modulation parameters; the modulation parameters include: encryption frequency modulation or encryption amplitude modulation.
[0008] S3: The main control terminal acts as the sending end to control the transmission of encrypted signals;
[0009] The specific process of sending the encrypted signal includes the following steps:
[0010] a1: The transmitting end uses a modulation and demodulation module to generate an encrypted signal based on the encryption parameters of the data that needs to be encrypted;
[0011] a2: The transmitting end selects a signal interval in the signal line to carry the encrypted signal, denoted as: encrypted signal carrying signal segment;
[0012] a3: The transmitting end superimposes the encrypted signal onto the frequency domain of the encrypted signal carrying signal segment based on the modulation and demodulation module, and sends it to the receiving end through the carrying signal line;
[0013] S4: After the slave terminal demodulates the encrypted signal based on the modulation and demodulation module, the slave terminal performs corresponding processing according to the received signal;
[0014] S5: The slave terminal sends back a feedback signal;
[0015] S6: After receiving the feedback signal from the sending end, the master control terminal completes one communication process.
[0016] Its further features are:
[0017] The modulation and demodulation modules of the master control terminal and the slave terminal are always in working state, and perform modulation and demodulation processing on all received signals;
[0018] When the modulation and demodulation module modulates the encrypted signal, the voltage swing cannot exceed ±10% of the original circuit's standard voltage;
[0019] In step S2, the total length L of each data transmission also needs to be agreed upon between the master control terminal and the slave terminal;
[0020] The total length L is set as the maximum length of the data that needs to be encrypted between the master terminal and the slave terminal;
[0021] The data sent by the sender must be the same length as L; if the length is not L, it will be padded with 0.
[0022] The encrypted signal carries a signal segment of at least 1.
[0023] The protocol type of the communication bus includes: SPI, IIC, or 1-WIRE;
[0024] In step S2, when the protocol type of the communication bus between the master terminal and the slave terminal is not 1-WIRE, any data line in the protocol is selected as the signal line for mounting.
[0025] In step a2, when the protocol type of the communication bus between the master terminal and the slave terminal is 1-WIRE, the encrypted signal carrying signal segment can only be set to the high-level signal segment;
[0026] In step S5, the slave end can send back feedback signals in the following ways: encrypted signal transmission and standard protocol response.
[0027] This invention provides a simple encryption method that superimposes an encryption signal onto the data lines of an existing communication bus and adds a modulation and demodulation module to the existing circuit. No additional chips are required, allowing the transmission of encrypted data based on the existing chips. This method uses the existing communication bus protocol to define the encryption parameters of the encryption signal, without altering the existing circuitry or data communication method. The encryption signal transmission method can be implemented with relatively simple logic. This method achieves encrypted data transmission at a low cost while effectively controlling the equipment development cycle. Attached Figure Description
[0028] Figure 1 This is a schematic diagram of the encryption system of this application;
[0029] Figure 2 Here is an example comparing frequency domain signals and time domain signals;
[0030] Figure 3 This is an example of the read / write timing of the 1-WIRE protocol in existing technology;
[0031] Figure 4 This is an example of amplitude modulation signal encryption in the high-level signal segment;
[0032] Figure 5 This is an example of encrypting a frequency-modulated signal in the high-level signal band;
[0033] Figure 6 This refers to the SPI communication signal in existing technology;
[0034] Figure 7 Example 1 shows how to encrypt and transmit signals in SPI communication based on this method;
[0035] Figure 8 Example 2 is an example of encrypting and transmitting signals in SPI communication signals based on this method. Detailed Implementation
[0036] In this application's method, encrypted data is transmitted within the modulated signal. Conventional communication protocols exhibit typical time-domain signal characteristics in their voltage and time signals, but they also implicitly contain some frequency-domain information, such as... Figure 2 As shown. A time-domain signal is a signal that can be directly analyzed along the time axis, such as... Figure 2 The time-domain signal is represented by 0s and 1s. The frequency-domain signal, on the other hand, exhibits its frequency characteristics along the time axis, such as... Figure 2The intermediate frequency (IF) signal is a periodic waveform on the time axis. A clock signal with a 10ns cycle is converted to 100MHz, a fixed frequency. A 20us clock signal is 50MHz. Information can be transmitted periodically according to different signal frequencies. This method adds modulation information to conventional communication protocols, which can improve communication efficiency per unit time and increase communication concealment.
[0037] This application includes a simple encryption method comprising the following steps.
[0038] S1: Add a modulation and demodulation module to both the master and slave ends. This module is used for analog signal modulation, demodulation, and transmission / reception. See Figure 1 for details. In this method, the superimposed signal can be reduced to the millivolt level using the modulation and demodulation module, whereas normal communication typically uses 3.3V.
[0039] S2: Based on the protocol type of the communication bus between the master and slave ends, the encryption parameters for the encrypted signal are agreed upon between the master and slave ends. The encryption parameters include: carrier wave, signal line used for encryption, and modulation parameters; the modulation parameters include: frequency modulation for encryption or amplitude modulation for encryption.
[0040] The communication bus protocol types include SPI, IIC, or 1-WIRE. When the communication bus protocol type between the master and slave ends is not 1-WIRE, any data line in the protocol is selected as the signal line for transmission.
[0041] In this protocol, 1-WIRE communication uses a single wire for master-slave communication. Since there's only one wire, this signal line must handle both power supply and communication. This invention only requires adding some interaction to achieve simple encryption while ensuring the chip receives normal power (without adjusting the 1-WIRE sequence). The specific method is as follows.
[0042] like Figure 3 The write timing section in the diagram represents the binary 0 and 1 waveforms of the write process in the standard 1-WIRE protocol. These are primarily distinguished by changing the communication duty cycle. This waveform is controlled by the master controller; a "0" slot indicates a write 0 operation, and a "1" slot indicates a write 1 operation from the master to the slave. The VPU in the diagram refers to the power pull-up resistor on the master controller. The power supply in the 1-WIRE protocol is provided by this pull-up resistor. Therefore, during read and write operations, the maximum pull-down time is typically 120µs. When the signal is low, the power supply is maintained by capacitors integrated into the chip. The red line represents the master controller control, and the black line represents the VPU pull-up resistor control. Figure 3The timing diagram shows the waveforms of binary 0s and 1s responded by the slave chip. The red line is controlled by the master, while the blue line is controlled by the slave during response. The black line is pulled high by the pull-up resistor after the master and slave are released. The intersecting lines in the diagram represent time redundancy, which can be adjusted freely.
[0043] During 1-WIRE protocol communication, a set of modulated signals can be sent when the signal is high. These modulated signals can be either amplitude modulation (AM) or frequency modulation (FM), as follows: Figure 4 It's an amplitude modulation signal encryption. Figure 5 Both methods involve encrypting the FM signal, with an AM signal being sent simultaneously during the high-level transition between the write-1 interval and the high-level transition. The demodulation module on the slave end, after demodulating the signal, can selectively respond using the standard protocol or reply using the same method.
[0044] In multi-wire protocols such as SPI, IIC, or UART, this method allows for more efficient implementation because it is not limited by the power supply environment. Figure 6 This includes: SPI communication, CS as the control enable pin, SCLK as the synchronization clock, and MOSI / MISO as the data pins (which can also be independent lines).
[0045] Figure 7 To select the CS signal as the carrier signal line, a modulated communication signal based on this method is superimposed on the SPI signal. To simplify the system structure and make it more suitable for low-cost devices with limited chip performance, the superimposed signal in this method generally only uses amplitude modulation or frequency modulation. The voltage of the SPI standard protocol is generally 3.3V or 5V, so the voltage of the modulated signal is best controlled within ±10%. The smaller the signal voltage, the weaker the signal, and the harder it is for the signal observer to observe. Unlike traditional wireless communication methods, this wired communication scheme requires ensuring normal time-domain communication function, which is the primary signal communication. It combines frequency-domain communication methods to "intersperse" some hidden data information into the standard wired communication. Since it is a modulated signal, its modulation frequency can be set according to the system cost requirements. Of course, the higher the frequency, the shorter the signal, and the easier it is for the signal to be misjudged as noise, thus enhancing its communication security. Traditional wireless communication uses radio waves on one or several channels and uses specific modulation rules for data communication, and its system complexity is much higher than that of wired communication.
[0046] Figure 8 This example demonstrates using the SPI clock signal SCLK as the carrier signal line. The transmitted digital signal is the same; some information can be conveyed through frequency variations of SCLK. However... Figure 8 Because this method is visible in the time domain, it is easily discovered by the observer, and therefore it is not recommended for practical applications.
[0047] Other multi-line communication protocols also select the signal lines to be used in a similar way to SPI. When applying this method, designers can choose to add a modulation module to any wired communication line for the transmission and reception of frequency domain information.
[0048] To reduce the complexity of the chip's processing logic, in step S2, the total length L of each data transmission needs to be agreed upon between the master and slave ends. The total length L is set as the maximum length of the encrypted data that needs to be transmitted between the master and slave ends. The data sent by the sender must be the same length as L; if the length is less than L, it is padded with zeros. The specific value of L can be set according to actual needs. After agreeing on the signal length L, the encrypted signal can be sent as a whole or in segments based on this method, without the need for more complex judgment logic. Moreover, the specific value of the length L is not limited, ensuring that this method is more practical.
[0049] S3: The master control unit acts as the sending end to control the transmission of encrypted signals.
[0050] The specific process of sending encrypted signals includes the following steps:
[0051] a1: The sending end uses the modulation and demodulation module to generate an encrypted signal based on the encryption parameters of the data that needs to be encrypted.
[0052] The modem modules at both the master and slave ends are always operational, performing real-time modulation and demodulation processing on all received signals. When the modem modules modulate encrypted signals, the voltage swing cannot exceed ±10% of the original circuit's standard voltage to ensure that the transmission of the original signal is not affected.
[0053] a2: The transmitting end selects the signal interval for carrying the encrypted signal in the signal line, which is denoted as: encrypted signal carrying signal segment.
[0054] The encrypted signal carries at least one signal segment, meaning the length of each segment can be greater than or equal to L, or less than L. Since the implementation specifies the total length L of the encrypted signal, the modulation / demodulation module at the receiving end considers it a complete encrypted signal if it meets the length L requirement. Therefore, even if the encrypted signal is received in segments, it is considered a complete signal once the length L is met.
[0055] In step a2, when the protocol type of the communication bus between the master and slave ends is 1-WIRE, the encryption signal carrying signal segment can only be set to the high-level signal segment.
[0056] a3: The transmitting end uses a modulation and demodulation module to superimpose the encrypted signal onto the frequency domain of the encrypted signal carrying signal segment, and then sends it to the receiving end through the carrying signal line.
[0057] S4: After the slave end demodulates the encrypted signal based on the modulation and demodulation module, the slave end performs corresponding processing according to the received signal.
[0058] S5: The slave device sends back a feedback signal. The slave device can send back feedback signals in two ways: encrypted signal transmission and standard protocol response.
[0059] S6: After receiving the encrypted signal from the transmitter, the master control unit completes a communication process by extracting the signal based on the modulation and demodulation module.
[0060] After using the technical solution of the present invention, based on the protocol type of the communication bus between the master terminal and the slave terminal, a signal line for carrying is selected, and a second signal is superimposed on the encrypted signal carrying signal segment of the signal line for carrying, resulting in higher communication efficiency per unit time; the superimposed signal can be made at the millivolt level through the modulation and demodulation module, so that the signal can be hidden in the normal signal and is not easily detected, thus achieving a communication method with better encryption effect at a lower cost.
Claims
1. A simple encryption method, characterized in that, It includes the following steps: S1: Add a set of modulation and demodulation modules to both the master and slave ends. The modulation and demodulation modules are used for analog signal modulation and demodulation and transmission and reception. S2: Based on the protocol type of the communication bus between the master terminal and the slave terminal, agree on encryption parameters for the encryption signal between the master terminal and the slave terminal; The encryption parameters include: carrier wave, signal lines for carrying, and modulation parameters; the modulation parameters include: frequency modulation for encryption or amplitude modulation for encryption. S3: The main control terminal acts as the sending end to control the transmission of encrypted signals; The specific process of sending the encrypted signal includes the following steps: a1: The transmitting end uses a modulation and demodulation module to generate an encrypted signal based on the encryption parameters from the data that needs to be encrypted; a2: The transmitting end selects a signal interval in the signal line to carry the encrypted signal, denoted as: encrypted signal carrying signal segment; a3: The transmitting end superimposes the encrypted signal onto the frequency domain of the encrypted signal carrying signal segment based on the modulation and demodulation module, and sends it to the receiving end through the carrying signal line; S4: After the slave terminal demodulates the encrypted signal based on the modulation and demodulation module, the slave terminal performs corresponding processing according to the received signal; S5: The slave terminal sends back a feedback signal; S6: After receiving the feedback signal from the sending end, the main control terminal completes one communication process; The protocol type of the communication bus includes: SPI, IIC, or 1-WIRE; In step a2, when the protocol type of the communication bus between the master terminal and the slave terminal is 1-WIRE, the encrypted signal carrying signal segment can only be set to the high-level signal segment.
2. The simplified encryption method according to claim 1, characterized in that: The modulation and demodulation modules of the master control terminal and the slave terminal are always in working state, and perform modulation and demodulation processing on all received signals.
3. The simplified encryption method according to claim 1, characterized in that: When the modulation and demodulation module modulates the encrypted signal, the voltage swing cannot exceed ±10% of the original circuit standard voltage.
4. The simplified encryption method according to claim 1, characterized in that: In step S2, the total length L of each data transmission also needs to be agreed upon between the master control terminal and the slave terminal; The total length L is set as the maximum length of the data that needs to be encrypted between the master terminal and the slave terminal; The data sent by the sender must be the same length as L; if the length is not L, it will be padded with 0s.
5. The simplified encryption method according to claim 1, characterized in that: The encrypted signal carries a signal segment of at least one.
6. The simplified encryption method according to claim 1, characterized in that: In step S2, when the protocol type of the communication bus between the master terminal and the slave terminal is not 1-WIRE, any data line in the protocol is selected as the signal line for mounting.
7. The simplified encryption method according to claim 1, characterized in that: In step S5, the slave end can send back feedback signals in the following ways: encrypted signal transmission and standard protocol response.
Citation Information
Patent Citations
Communication system
US20180152315A1
Signal protection and retrieval by non-linear analog modulation
US20240333504A1