Disclosure of Invention
The technical problem to be solved by the present invention is to prevent an illegal signal copied during short-range wireless communication from passing through the authentication of a receiving end, thereby reducing security.
In order to solve the above technical problem, an embodiment of the present invention provides a signal encryption method based on time information, including:
the transmitting terminal reads the local time information of the current moment;
adding and inserting the time information into a preset field of an original signal to obtain an encrypted signal;
and sending the encrypted signal by adopting a visible light signal.
Optionally, after obtaining the encrypted signal, the method further includes: modulating the encrypted signal.
Optionally, after the transmitting end reads the local time information of the current time, the method further includes:
and scrambling the time information.
Optionally, scrambling the time information specifically includes:
and performing negation operation on the time information.
Optionally, scrambling the time information specifically includes:
performing logic operation on the time information and a preset pseudorandom sequence; and/or arithmetic operations.
Optionally, the logical operation includes:
an exclusive OR operation, or a NAND operation.
Wherein the arithmetic operation comprises:
addition, subtraction, multiplication, or division operations.
The scrambling of the time information specifically includes:
the time information is scrambled using an MD5 encryption algorithm, an RSA encryption algorithm, a DES encryption algorithm, or an AES encryption algorithm.
Optionally, the method further includes:
and the transmitting end scrambles the encrypted signal.
Optionally, the merging the time information into the original signal specifically includes:
adding the time information into a preset field of an original signal; or,
the time information is randomly combined into the original signal.
Optionally, the method further comprises:
an original signal is received from the outside.
Wherein the original signal is: a visible light signal, an infrared signal, a far infrared signal, or an ultraviolet signal.
Optionally, the original signal is: a digital signal representing the ID information; or, a digital signal characterizing biometric information.
In order to solve the above technical problem, an embodiment of the present invention further provides a signal decryption method based on time information, including:
a receiving end receives an encrypted signal which is sent by a transmitting end and represented in a visible light signal form;
the receiving end separates time information from a preset field of the encrypted signal;
and reading local time information at the current moment, comparing the time information with the local time information, and judging that the signal is legal if the time difference is less than the preset timeout time.
Optionally, after the receiving end receives the encrypted signal that is sent by the transmitting end and characterized in the form of the visible light signal, the method further includes:
demodulating the encrypted signal.
Optionally, before the receiving end receives the encrypted signal that is sent by the transmitting end and characterized in the form of the visible light signal, the method further includes:
and the receiving end synchronizes the local time information with the time information of the transmitting end.
Optionally, before the receiving end separates the time information from the preset field of the encrypted signal, the method further includes:
descrambling the encrypted signal.
Optionally, after separating the time information from the preset field of the encrypted signal, the method further includes:
and descrambling the time information.
Optionally, descrambling the time information specifically includes:
and performing negation operation on the time information.
Descrambling the time information specifically comprises:
performing logic operation on the time information and a preset pseudorandom sequence; and/or arithmetic operations.
Descrambling the time information specifically comprises:
and descrambling the time information by adopting an MD5 decryption algorithm, an RSA decryption algorithm, a DES decryption algorithm or an AES decryption algorithm.
In order to solve the above technical problem, an embodiment of the present invention further provides a signal encryption apparatus based on time information, where the signal encryption apparatus includes:
the reading unit is used for reading the local time information of the current moment from the clock;
the processing unit is used for adding and inserting the time information into a preset field of an original signal to obtain an encrypted signal; and the number of the first and second groups,
and the visible light signal sending unit is connected with the processing unit and is used for sending the encrypted signal.
Optionally, the signal encryption device further includes a modulation unit connected between the processing unit and the visible light signal sending unit, and configured to modulate the encrypted signal.
Optionally, the signal encryption apparatus further includes a first scrambling unit, configured to scramble the time information read by the reading unit.
Optionally, the first scrambling unit is an inverse operation scrambling unit, and is configured to perform an inverse operation on the time information.
Optionally, the first scrambling unit is a logic operation scrambling unit and/or an arithmetic operation scrambling unit.
The logical operation scrambling unit is an exclusive-OR operation scrambling unit, an exclusive-OR operation scrambling unit or a NAND operation scrambling unit.
Wherein the arithmetic operation scrambling unit is an addition operation scrambling unit, a subtraction operation scrambling unit, a multiplication operation scrambling unit, or a division operation scrambling unit.
Optionally, the signal encryption apparatus further includes a second scrambling unit, configured to scramble the encrypted signal.
The signal encryption device can be integrated on an electronic device such as a mobile phone, an MP3, or a PSP.
In order to solve the above technical problem, an embodiment of the present invention further provides a signal decryption apparatus based on time information, where the signal decryption apparatus includes:
the visible light signal receiving unit is used for receiving the encrypted signal which is sent by the transmitting terminal and represented in the form of the visible light signal;
a separation unit for separating time information from a preset field of the encrypted signal;
and the authentication unit is used for reading the local time information at the current moment, comparing the time information with the local time information, and judging that the signal is legal if the time difference is less than the preset timeout time.
Optionally, the signal decryption apparatus further includes a demodulation unit connected to the receiving unit, and configured to demodulate the encrypted signal.
Optionally, the signal decryption apparatus further includes a first descrambling unit, configured to descramble the time information separated by the separation unit.
Optionally, the first descrambling unit is an inverse operation descrambling unit, and is configured to perform an inverse operation on the time information separated by the separation unit.
Optionally, the first descrambling unit is a logic operation descrambling unit, and is configured to perform logic operation on the time information and a preset pseudorandom sequence; and/or the presence of a gas in the gas,
and the arithmetic operation descrambling unit is used for carrying out arithmetic operation on the time information and a preset pseudorandom sequence.
The logic operation descrambling unit is an exclusive-OR operation descrambling unit, an exclusive-OR operation descrambling unit or a NAND operation descrambling unit.
The arithmetic operation descrambling unit is an addition operation descrambling unit, a subtraction operation descrambling unit, a multiplication operation descrambling unit or a division operation descrambling unit.
Optionally, the signal decryption apparatus further includes a second descrambling unit connected to the separation unit, and configured to descramble the encrypted signal.
The signal decryption device can be integrated on a receiving terminal such as a door lock or a household appliance.
In the technical scheme, the transmitting terminal encrypts the original signal by adopting the local time information, so that the legal signal transmitted by the transmitting terminal changes along with the local time information, the intercepted signal needs time for copying, the copied signal is different from the signal transmitted by the transmitting terminal at the current moment, the time difference between the time information carried by the copied signal and the local time of the receiving terminal is greater than the timeout time, and the authentication of the receiving terminal cannot be passed, thereby improving the safety of signal transmission.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below by referring to the drawings in the embodiments of the present invention, respectively, by way of examples.
First, in order to better understand the technical solution of the present invention, the following briefly describes the technical solution of the present invention:
the principle of the encryption at the transmitting end of the present invention is to incorporate time information in the original signal, which represents the time when the transmitting end transmits the signal. The receiving end judges the time of the transmitting end and the local clock time thereof through the time information field in the received signal, and judges the signal as a legal signal under the condition that the time does not exceed the specified timeout time. Because the time of the transmitting end and the receiving end is calibrated by the same time standard, the time change of the transmitting end and the receiving end is the same, and the time difference between the transmitting end and the receiving end does not exceed the specified time under the conditions of small error and short running time. The copied signal can not change along with time, so the field of the time information can be kept unchanged, the local time of the receiving end is changed, the difference between the finally copied signal time information field and the local time of the receiving end exceeds the specified timeout time along with the change of the time, and the copied signal can be always judged as an illegal signal as long as the specified timeout time is less than the time required for copying the visible light signal to manufacture the same transmitting device.
The overtime time can be set to different values according to the security level, and if the security level requirement is high, the overtime time is set to be 3 minutes; if the requirement of the security level is high, setting the timeout time to be 10 minutes; if the security level requirement is moderate, the timeout time is set to 20 minutes.
Example 1:
referring to fig. 1, which is a flowchart of a method for encrypting and decrypting a signal based on time information according to an embodiment of the present invention, the method for encrypting and decrypting specifically includes:
the encryption process comprises the following steps:
s101: and the transmitting terminal reads the local time information of the current moment through the local clock. For example, the local time information of the current time read by the transmitting terminal from the local clock is 57 minutes at 8, 15, 10 and 2012, and is represented by 201208151057 in a standard time format of decimal numbers.
S102: and the transmitting terminal combines the read local time information into the original signal to obtain an encrypted signal.
Specifically, a random interpolation mode can be adopted to add the local time to the original signal; the time information can also be added to a preset field of the original signal; or time information is inserted into different fields of the original signal according to a preset rule.
For example, the transmitting end inserts the read local time information into a preset field of an original signal, and the data format of the original signal is as follows: header-source-parity bits; the data format of the encrypted signal is: header-source-time information-parity bits. Assuming that the header is represented by binary digits as 1111, the source part field, i.e., the ID number, is represented by binary digits as 10000001, and the check code field is represented by binary digits as 1010, the specified timeout time is set to 10 minutes, wherein the time information field is accurate to minutes. At time T1, the transmitter's time information is assumed to be 57 minutes at 8/15/10/2012, and is represented as 201208151057 in a standard time format with crisscross numbers. Each ten-system number is represented as 001000000001001000001000000101010001000001010111 in binary digits. The encrypted signal at the time T1 is represented in binary as 1111100000010010000000010010000010000001010100010000010101111010.
S103: the transmitting terminal sends out the encrypted signal in the form of a visible light signal. For example, the encrypted signal is transmitted in the form of a flash of light, the light being on to represent a "1" of the binary data and the light being off to represent a "0" of the binary data.
In a specific implementation process, the encrypted signal can also be sent in the form of an infrared signal, a far infrared signal, an ultraviolet signal, a radio frequency signal, a bluetooth signal, a laser signal, or a wifi signal according to the requirements of the communication system.
With the encryption method provided in embodiment 1, if the visible light signal emitted from the visible light signal emitting terminal is photographed by the high-speed camera at time T1 and copied by using the photographed signal, then a visible light emitting device capable of emitting the copied signal is manufactured. Assuming that the minimum time required for manufacturing such a visible light emitting device is 30 minutes, the time has reached the time T2 when the manufacturing is completed, and the copy signal transmitted by the manufactured visible light emitting device at this time is the signal at the time T1, and the time difference between the time T1 and the time T2 is 30 minutes, which is greater than the timeout time 10 minutes, so that the copy signal transmitted by the manufactured visible light emitting device is an illegal signal.
And (II) decryption process:
s104: and the receiving end receives, transmits and sends the encrypted signal characterized in the form of the visible light signal.
In a specific implementation, the encrypted signal may also be characterized in the form of an infrared signal, a far infrared signal, an ultraviolet signal, a radio frequency signal, a bluetooth signal, a laser signal, or a wifi signal.
S105: the receiving end converts the visible light signal representing the encrypted signal into an electrical signal, and then converts the electrical signal into a digital signal. For example, the digital signal characterizing the encrypted signal is obtained as 1111100000010010000000010010000010000001010100010000010101111010.
S106: the receiving end separates the time information from the digital signal representing the encrypted signal. For example, the separated time information is 001000000001001000001000000101010001000001010111, expressed in decimal notation as: 201208151057.
s107: the receiving end reads the local time information. Since the time for the transmitting end to transmit the optical signal to the receiver is very short, and the receiving end and the transmitting end are synchronized in time, the local time information read by the receiving end is also 201208151057.
S108: and the receiving end compares the time information separated in the S106 with the local time information, and if the time difference is smaller than the preset timeout time, the signal is judged to be legal.
The time information separated by the receiving end is 201208151057 with the local time information, the time difference is 0, and the time difference is less than the specified timeout time by 10 minutes, so the signal is a legal signal.
With the decryption method provided in embodiment 1, at time T1, the receiving end receives and converts the data into a decimal standard time format of 201208151057, and at time T2, the receiver receives the copied signal and reads local time of 201208151127. When the two times are compared, the time difference is 30 minutes and is obviously greater than the specified timeout time by 10 minutes, and the signal can be judged to be illegally copied. For a legal transmitting end, the clock is always synchronized with the clock of the receiver, and the time difference does not exceed the specified timeout time, so the legal transmitting end is always considered as a legal signal.
Example 2:
referring to fig. 2, it is a flowchart of a method for encrypting and decrypting a signal based on time information according to a second embodiment of the present invention, where the method for encrypting and decrypting specifically includes:
the encryption process comprises the following steps:
s201: and the transmitting terminal reads the local time information of the current moment through the local clock. Assuming that the current time is T1, the local time information of the current time read by the transmitting terminal from the local clock is 30 minutes at 08 th 12 th 10 th 2012, 201210120830 in the standard time format of decimal numbers, and 001000000001001000010000000100100000100000110000 in each of the decimal numbers.
S202: the transmitting end scrambles the time information. Specifically, the transmitting end can scramble by performing an inversion operation on the time information; the time information can also be scrambled by performing a logical operation with a preset pseudorandom sequence and/or an arithmetic operation, such as an exclusive-nor operation, an exclusive-or operation, or a nand operation in the logical operation, and/or an addition, subtraction, multiplication, or division operation in the arithmetic operation; the time information may also be scrambled using an MD5 encryption algorithm, an RSA encryption algorithm, a DES encryption algorithm, or an AES encryption algorithm.
Taking pseudo-random sequence scrambling as an example, assuming that the pseudo-random sequence is 101001100101001010000100100101100001111100110101, the pseudo-random sequence and the time information are logically operated, for example, after performing xor operation, the scrambled time information is obtained as follows: 100001100100000010010100100001000001011100000101, represented by binary 864094841705.
S203: and the transmitting terminal adds the scrambled local time information into a preset field of the original signal to obtain an encrypted signal.
For example, the data format of the original signal is: header-source-parity bits; the data format of the encrypted signal is: header-source-time information-parity bits. It is assumed that the header is represented by binary digits as 1111, the source part field, i.e., the ID number, is represented by binary digits as 10000001, and the check code field is represented by binary digits as 1010, where the time information field is accurate to minutes. Then the encrypted signal at time T1, i.e., 30 minutes at 10 months, 12 days, 08 days 2012, is represented in binary as 1111100000011000011001000000100101001000010000010111000001011010.
While the encrypted signal not scrambled with the time information, the encrypted signal at the time T1 is represented in binary as 1111100000010010000000010010000100000001001000001000001100001010.
S204: the transmitting end modulates the encrypted signal.
S205: the transmitting terminal sends out the encrypted signal in the form of an infrared signal.
Specifically, the transmitting terminal transmits the infrared signal by powering on and powering off, wherein the powering on is represented by "1", and the powering off is represented by "0".
In a specific implementation process, the encrypted signal may also be sent in the form of a visible light signal, a radio frequency signal, a far infrared signal, a bluetooth signal, a laser signal, or a wifi signal, according to the requirements of the communication system.
Compared with embodiment 1, if the encrypted signal is illegally intercepted and the data inserted into the data of the original signal is found to be changed along with time, but the time information is scrambled, so that the inserted number is '864094841705', and the actual time information '201210120830', it is difficult to find that the inserted data is the time information, that is, the change rule of the transmitted signal is not easy to find, and the safety is further improved.
And (II) decryption process:
s206: the receiving end receives an encrypted signal characterized in the form of an infrared signal.
S207: the receiving end demodulates the received encrypted signal.
S208: the receiving end separates the time information from the demodulated encrypted signal. For example, the separated time information is 100001100100000010010100100001000001011100000101, expressed in decimal notation as: 864094841705.
s209: and the receiving end descrambles the separated time information.
Specifically, the descrambling is performed in a manner corresponding to the scrambling manner of the time information in S203. Taking descrambling with a pseudo-random sequence as an example, assuming that the pseudo-random sequence is 101001100101001010000100100101100001111100110101, performing a logic operation on the pseudo-random sequence and the separated time information, and if an exclusive-or operation is performed, obtaining the time information after descrambling as follows: 001000000001001000010000000100100000100000110000, represented by binary 201210120830.
S210: the receiving end reads the local time information. Because the time for the transmitting end to transmit the infrared signal to the receiver is extremely short, and the receiving end and the transmitting end are synchronous in time, the local time information read by the receiving end does not exceed 10 minutes.
S211: the receiving end compares the time information separated in the step S208 with the local time information, and determines that the signal is legal if the time difference is smaller than a preset timeout.
The time information separated by the receiving end is 201210120830, the local time information is 201210120831, the time difference is 1 minute and is less than the preset timeout time by 10 minutes, so the signal is a legal signal.
By adopting the decryption method provided by embodiment 2, at time T1, the receiving end receives and converts the data into a decimal standard time format of 201210120830, and at time T2, after the receiver receives the copy signal, the read local time is 201210120905. When the two times are compared, the time difference is 35 minutes and is obviously greater than the specified timeout time by 10 minutes, and then the received copy signal can be judged to be an illegal signal. For a legal transmitting end, the clock is always synchronized with the clock of the receiver, and the time difference does not exceed the specified timeout time, so the legal transmitting end is always considered as a legal signal.
Example 3:
referring to fig. 3, which is a flowchart of a method for encrypting and decrypting a signal based on time information according to a third embodiment of the present invention, the method for encrypting and decrypting specifically includes:
(A) encryption Process
S301: and the transmitting terminal reads the local time information of the current moment through the local clock. For example, the local time information of the current time read by the transmitting terminal from the local clock is 57 minutes at 8, 15, 10 and 2012, and is represented by 201208151057 in a standard time format of decimal numbers.
S302: and adding the read local time information into a preset field of the original signal to obtain an encrypted signal.
For example, the data format of the original signal is: header-source-parity bits; the data format of the encrypted signal is: header-source-time information-parity bits. Assuming that the header is represented by binary digits as 1111, the source part field, i.e., the ID number, is represented by binary digits as 10000001, and the check code field is represented by binary digits as 1010, the specified timeout time is set to 10 minutes, wherein the time information field is accurate to minutes. At time T1, the time information of the transmitter is assumed to be 57 minutes at 8, 15, and 10 of 2012, which is represented by a binary number 001000000001001000001000000101010001000001010111. The encrypted signal at the time T1 is represented in binary as 1111100000010010000000010010000010000001010100010000010101111010.
S303: the encrypted signal is scrambled by means of an MD5 encryption algorithm, an RSA encryption algorithm, a DES encryption algorithm, an AES encryption algorithm, negation, or by means of a pseudorandom sequence.
Taking pseudo-random sequence scrambling as an example, assuming that the pseudo-random sequence is 1011100110001010011001010010100001001001011000011111001101010100, the pseudo-random sequence and the time information are logically operated, and if the time information is subjected to exclusive-or operation, the scrambled encryption information is obtained as follows: 0100000110011000011001000000100011001000001100001111011000101110.
the information inserted in the original signal is 100001100100000010001100100000110000111101100010, expressed in decimal notation: 86408128301562, rather than real time information 201208151057.
S304: and sending out the scrambled encrypted signal in the form of a radio frequency signal.
In a specific implementation process, the encrypted signal may also be sent in the form of an infrared signal, a visible light signal, a bluetooth signal, or a wifi signal, according to the requirements of the communication system.
Compared with embodiment 1, if the encrypted signal is illegally intercepted and the data inserted into the original signal is found to be changed along with time, the time information is scrambled, so that the inserted number is '86408128301562' instead of the real time information '201208151057', and therefore, the fact that the inserted data is time information is difficult to find, namely, the change rule of the transmitted signal is not easy to find, and the safety is further improved.
And (II) decryption process:
s305: the receiving end receives an encrypted signal characterized by a radio frequency signal.
S306: the receiving end converts the radio frequency signal into a digital signal. For example, the digital signal characterizing the encrypted signal is 0100000110011000011001000000100011001000001100001111011000101110.
S307: and the receiving end descrambles the digital signal obtained by the conversion in the S306. Taking descrambling of the pseudo-random sequence as an example, assuming that the pseudo-random sequence is 1011100110001010011001010010100001001001011000011111001101010100, performing a logic operation on the pseudo-random sequence and a digital signal representing the encrypted information, if an exclusive-or operation is performed, obtaining the descrambled encrypted information is: 1111100000010010000000010010000010000001010100010000010101111010.
s308: the receiving end separates the time information from the digital signal representing the encrypted signal. For example, the separated time information is 001000000001001000001000000101010001000001010111, expressed in decimal notation as: 201208151057.
s309: the receiving end reads the local time information. Since the time for the transmitting end to transmit the optical signal to the receiver is very short, and the receiving end and the transmitting end are synchronized in time, the local time information read by the receiving end is also 201208151057.
S310: the receiving end compares the time information separated in the step S308 with the local time information, and determines that the signal is legal if the time difference is smaller than the preset timeout time.
The time information separated by the receiving end is 201208151057 with the local time information, the time difference is 0, and the time difference is less than the specified timeout time by 10 minutes, so the signal is a legal signal.
With the decryption method provided in embodiment 1, at time T1, the receiving end receives and converts the signal into a decimal standard time format of 201208151057, and at time T2, when the receiver receives a copy signal obtained by copying the signal at time T1, the read local time is 201208151127. Comparing the two times, the time difference is 30 minutes, which is obviously more than the specified timeout time by 10 minutes, and the received copy signal can be judged as an illegal signal. For a legal transmitting end, the clock is always synchronized with the clock of the receiver, and the time difference does not exceed the specified timeout time, so the legal transmitting end is always considered as a legal signal.
In other embodiments, the time information and the encrypted signal may be scrambled by using an MD5 encryption algorithm, an RSA encryption algorithm, a DES encryption algorithm, an AES encryption algorithm, inversion, or a pseudo-random sequence.
Example 4:
fig. 4 is a schematic structural diagram of a signal encryption and decryption system based on time information according to a fourth embodiment of the present invention. The signal encryption apparatus 400 may be integrated in a mobile electronic device such as a mobile phone, MP3, or PSP, or may be an independent apparatus, and includes a reading unit 401 for reading local time information of the current time from a clock. For example, the local time information of the current time read by the transmitting terminal from the local clock is 57 minutes at 8, 15, 10 and 2012, and is represented by 201208151057 in a standard time format of decimal numbers. A processing unit 402 connected to the reading unit 401 for combining the time information into the original signal to obtain an encrypted signal. For example, the data format of the original signal is: header-source-parity bits; the data format of the encrypted signal is: header-source-time information-parity bits. It is assumed that the header is represented by binary digits as 1111, the source part field, i.e., the ID number, is represented by binary digits as 10000001, and the check code field is represented by binary digits as 1010. The encrypted signal at the time T1 is represented in binary as 1111100000010010000000010010000010000001010100010000010101111010. And a sending unit 403 connected to the processing unit 402, configured to send the encrypted signal processed by the processing unit 402. In a specific implementation process, the sending unit 403 may be a visible light signal sending unit, an infrared signal sending unit, a far infrared signal sending unit, an ultraviolet signal sending unit, a radio frequency signal sending unit, a bluetooth signal sending unit, a laser signal sending unit, or a wifi signal sending unit according to specific requirements.
The decryption apparatus 400 'may be integrated on a receiving terminal such as a door lock, a locker, a home appliance, a vehicle, or a network device, and includes a receiving unit 401' for receiving the encrypted signal transmitted by the encryption apparatus 400 (transmitting terminal). The receiving unit 401' may be a visible light signal receiving unit, an infrared signal receiving unit, a far infrared signal receiving unit, an ultraviolet signal receiving unit, a radio frequency signal receiving unit, a bluetooth signal receiving unit, a laser signal receiving unit, or a wifi signal receiving unit.
A separation unit 402 'connected to the receiving unit 401' for separating time information from the encrypted signal, for example time information 001000000001001000001000000101010001000001010111, in decimal notation 201208151057, from the binary encrypted signal 1111100000010010000000010010000010000001010100010000010101111010. And an authentication unit 403 'connected to the separation unit 402' and configured to read local time information of the current time from a local clock, compare the time information with the local time information, and determine that the signal is legal if the time difference is smaller than a preset timeout time. For example, the time read by the authentication unit 403' from the local clock is 201208151058, the time difference from the received time information is 1 minute, which is less than the preset timeout time of 10 minutes, and the signal is determined to be legitimate.
Example 5:
fig. 5 is a schematic structural diagram of a signal encryption and decryption system based on time information according to a fifth embodiment of the present invention. This embodiment is opposite to the fourth embodiment, and the encryption apparatus 500 further includes a first scrambling unit 501 and a modulation unit 502. The first scrambling unit 501 is configured to scramble the time information read by the reading unit 401. Specifically, the first scrambling unit 501 may be an inverse operation scrambling unit, configured to perform an inverse operation on the time information; the device can be a logic operation scrambling unit used for carrying out logic encryption operation on the time information and a preset pseudorandom sequence, and/or an arithmetic operation scrambling unit used for carrying out arithmetic encryption operation on the time information and the preset pseudorandom sequence, wherein the logic operation scrambling unit is an exclusive-OR operation scrambling unit, an exclusive-OR operation scrambling unit or a NAND operation scrambling unit, and the arithmetic operation scrambling unit is an addition operation scrambling unit, a subtraction operation scrambling unit, a multiplication operation scrambling unit or a division operation scrambling unit; it may also be an MD5 encryption operation unit, an RSA encryption operation unit, a DES encryption operation unit, or an AES encryption operation unit. Modulating section 502 is connected between processing section 402 and transmitting section 403, and modulates the encrypted signal processed by processing section 402.
The decryption device 500 ' further comprises a first descrambling unit 501 ' and a demodulation unit 502 '. The first descrambling unit 501 'is used for descrambling the time information separated by the separation unit 402'. Specifically, descrambling may be performed in a manner corresponding to scrambling by the first scrambling unit 501. For example, the first descrambling unit 501' may be an inverse operation descrambling unit, configured to perform an inverse operation on the time information separated by the separation unit; the descrambling unit can be a logic operation descrambling unit used for carrying out logic decryption operation on the time information and a preset pseudorandom sequence, and/or an arithmetic operation descrambling unit used for carrying out arithmetic decryption operation on the time information and the preset pseudorandom sequence, wherein the logic operation descrambling unit is an exclusive OR operation descrambling unit, an exclusive OR operation descrambling unit or a NAND operation descrambling unit, and the arithmetic operation descrambling unit is an addition operation descrambling unit, a subtraction operation descrambling unit, a multiplication operation descrambling unit or a division operation descrambling unit; it may also be an MD5 decryption operation unit, an RSA decryption operation unit, a DES decryption operation unit, or an AES decryption operation unit. The demodulation unit 502 ' is connected to the receiving unit 401 ' and is configured to demodulate the encrypted signal received by the receiving unit 401 '.
In this embodiment, the first scrambling unit 501 and the modulating unit 502 are added to the encryption apparatus 400, the first descrambling unit 501 'and the demodulating unit 502' are added to the decryption apparatus 400 ', and by adding the first scrambling unit 501 and the first descrambling unit 501', when the encrypted signal is illegally intercepted, the change rule of time is not easily recognized, or the inserted time information is not recognized, so that the security is improved; by adding the modulation unit 502 and the demodulation unit 502', the stability of the signal can be improved.
Example 6:
fig. 6 is a schematic structural diagram of a signal encryption and decryption system based on time information according to a sixth embodiment of the present invention. This embodiment is opposite to the fourth embodiment, and the encryption apparatus 600 further includes a second scrambling unit 601 for scrambling the encrypted signal output by the processing unit 402. Specifically, the time information may be scrambled by using an AES encryption algorithm, negation, or by using a pseudo-random sequence.
The decryption apparatus 600 ' further comprises a second descrambling unit 601 ' for descrambling the time information received by the receiving unit 401 '. Specifically, descrambling may be performed in a manner corresponding to scrambling by the second scrambling unit 601.
In this embodiment, the second scrambling unit 601 is added to the encryption apparatus 400, and the second descrambling unit 601 'is added to the decryption apparatus 400', when the encrypted signal is illegally intercepted, the time information inserted with the change in the original signal is not easily recognized, thereby improving the security.
In summary, the present invention encrypts the original signal by using the local time information of the transmitting end, and the local time information of the transmitting end is changed, so that the intercepted signal cannot be identified by the receiving end at the next time. In a specific implementation process, the original signal may also be scrambled by using a pseudo-random sequence that varies with unit time, and correspondingly, at the same time, the receiving end descrambles by using the same pseudo-random sequence.
While the invention has been described in connection with what is presently considered to be the most practical and preferred embodiment, it is to be understood that the invention is not to be limited to the disclosed embodiment, but on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.