CN108574663B - Safe transmission method and system - Google Patents

Safe transmission method and system Download PDF

Info

Publication number
CN108574663B
CN108574663B CN201710137181.6A CN201710137181A CN108574663B CN 108574663 B CN108574663 B CN 108574663B CN 201710137181 A CN201710137181 A CN 201710137181A CN 108574663 B CN108574663 B CN 108574663B
Authority
CN
China
Prior art keywords
data
level signal
terminal
timing
communication interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710137181.6A
Other languages
Chinese (zh)
Other versions
CN108574663A (en
Inventor
李明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tendyron Corp
Original Assignee
李明
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 李明 filed Critical 李明
Priority to CN201710137181.6A priority Critical patent/CN108574663B/en
Publication of CN108574663A publication Critical patent/CN108574663A/en
Application granted granted Critical
Publication of CN108574663B publication Critical patent/CN108574663B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • H04L63/1466Active attacks involving interception, injection, modification, spoofing of data unit addresses, e.g. hijacking, packet injection or TCP sequence number attacks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1416Event detection, e.g. attack signature detection

Abstract

The invention provides a safe transmission method and a system, wherein the method comprises the following steps: the method comprises the steps that a first terminal starts first timing when edge change of a level signal at a first wired communication interface meets a timing trigger condition in the process of sending the level signal of first data; the second terminal receives the level signal of the first data and processes the first data to obtain second data; the first terminal generates a level signal of third data when the first timing reaches a first prescribed value; the first terminal starts second timing when the edge change of the level signal at the first wired communication interface meets a timing trigger condition in the process of sending the level signal of the third data; the second terminal receives a level signal of third data through the second wired communication interface; the second terminal generates a level signal of the second data and transmits the level signal of the second data; the first terminal allows the level signal of the second data to be received through the first wired communication interface when the second timing reaches a second prescribed value.

Description

Safe transmission method and system
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a secure transmission method and system.
Background
When the electronic signature device communicates with a host device (for example, a PC device, a mobile device, etc.), the host device sends data to be processed to the electronic signature device, the electronic signature device receives the data to be processed and performs corresponding processing on the data to be processed to obtain processed data, the electronic signature device sends the processed data to the host device, and according to an existing communication protocol, if the host device receives the processed data within a specified waiting time, the received data is considered as normal data, and subsequent operations (for example, transaction operations, authorization operations, etc.) are continued.
However, if data communication is performed between the electronic signature device and the host device, the third party illegal device hijacks data transmitted by the electronic signature device and performs illegal operations such as forwarding or tampering to obtain illegal data, and as long as the illegal data can be returned to the host device within the waiting time specified by the existing communication protocol, the host device still considers the received illegal data as normal data and continues to use the illegal data to perform subsequent operations, which affects the security of the subsequent operations. The prior art can not ensure the security of data transmission, and can not effectively identify illegal data after the data remote hijacking occurs.
Disclosure of Invention
The present invention is directed to solving the above problems.
The main object of the present invention is to provide a secure transmission method, in which a first wired communication interface of a first terminal is connected to a second wired communication interface of a second terminal, the method comprising: the first terminal generates a level signal of first data and transmits the level signal of the first data through the first wired communication interface; the first terminal detects edge changes of the level signals at the first wired communication interface in the process of sending the level signals of the first data, and starts first timing when the edge changes of the level signals at the first wired communication interface meet timing triggering conditions; the second terminal receives the level signal of the first data through the second wired communication interface, and processes the first data to obtain second data; when the first timing reaches a first specified value, the first terminal generates a level signal of third data, and sends the level signal of the third data through the first wired communication interface, wherein the third data is notification indication information; the first terminal detects edge changes of the level signals at the first wired communication interface in the process of sending the level signals of the third data, and starts second timing when the edge changes of the level signals at the first wired communication interface meet timing triggering conditions; the second terminal receives a level signal of the third data through the second wired communication interface; the second terminal generates a level signal of the second data and transmits the level signal of the second data through the second wired communication interface; and when the second timing reaches a second specified value, the first terminal allows the first wired communication interface to receive the level signal of the second data, wherein the second specified value is the time required from the completion of the second terminal receiving the level signal of the third data to the sending of the level signal of the second data.
Wherein, when the edge change of the level signal at the first wired communication interface meets the timing trigger condition, the first terminal starts the first timing, which comprises: when the first terminal detects that the edge change in the level signal at the first wired communication interface conforms to the edge change characteristic of the start bit, the first terminal continues to detect whether the edge change in the subsequent level signal at the first wired communication interface conforms to the edge change generated when data is transmitted, if so, the first timing is started, and the edge change characteristic of the start bit is the edge change in a preset form or the edge change with specific regularity change; when the edge change of the level signal at the first wired communication interface meets a timing trigger condition, the first terminal starts second timing, which comprises: when the first terminal detects that the edge change in the level signal at the first wired communication interface conforms to the edge change characteristic of the start bit, the first terminal continues to detect whether the edge change in the subsequent level signal at the first wired communication interface conforms to the edge change generated when data is transmitted, if so, the second timing is started, and the edge change characteristic of the start bit is the edge change in a preset form or the edge change which changes in a specific regularity.
Wherein, when the edge change of the level signal at the first wired communication interface meets the timing trigger condition, the first terminal starts the first timing, which comprises: the first terminal detects whether the edge change accords with the edge change generated when transmitting data in the level signal at the first wired communication interface, if so, when the edge change is continuously detected to accord with an end bit edge change characteristic in a subsequent level signal at the first wired communication interface, a first timing is started, wherein the end bit edge change characteristic comprises: edge changes in a preset form or edge changes with specific regularity; when the edge change of the level signal at the first wired communication interface meets a timing trigger condition, the first terminal starts second timing, which comprises: the first terminal detects whether the edge change accords with the edge change generated when transmitting data in the level signal at the first wired communication interface, if so, when the edge change is continuously detected to accord with the edge change characteristic of an end bit in the subsequent level signal at the first wired communication interface, the second terminal starts second timing, wherein the edge change characteristic of the end bit comprises: edge variations in a preset form or edge variations that vary with a certain regularity.
Wherein, when the edge change of the level signal at the first wired communication interface meets the timing trigger condition, the first terminal starts the first timing, which comprises: when the first terminal detects that the edge change in the level signal at the first wired communication interface conforms to the edge change characteristic of the initial bit, starting first timing, continuously detecting whether the subsequent level signal at the first wired communication interface carries data or not, if so, continuously timing, and if not, ending timing; wherein the start bit edge variation feature comprises: edge changes in a preset form or edge changes with specific regularity; when the edge change of the level signal at the first wired communication interface meets a timing trigger condition, the first terminal starts second timing, which comprises: when the first terminal detects that the edge change in the level signal at the first wired communication interface conforms to the edge change characteristic of the initial bit, starting second timing, continuously detecting whether the subsequent level signal at the first wired communication interface carries data or not, if so, continuing timing, and if not, ending timing; wherein the start bit edge variation feature comprises: edge variations in a preset form or edge variations that vary with a certain regularity.
Wherein, when the edge change of the level signal at the first wired communication interface meets the timing trigger condition, the first terminal starts the first timing, which comprises: when the first terminal detects that edge change in a level signal at the first wired communication interface conforms to the edge change characteristic of an end bit, starting first timing, continuously detecting whether a subsequent level signal at the first wired communication interface carries data or not, if so, ending timing, and if not, continuously timing; the end bit edge change characteristics comprise edge changes in a preset form or edge changes with specific regularity; when the edge change of the level signal at the first wired communication interface meets a timing trigger condition, the first terminal starts second timing, which comprises: when the first terminal detects that the edge change in the level signal at the first wired communication interface conforms to the edge change characteristic of an end bit, starting second timing, continuously detecting whether the subsequent level signal at the first wired communication interface carries data or not, if so, ending the timing, and if not, continuously timing; the end bit edge change characteristics comprise edge changes in a preset form or edge changes with specific regularity.
The first specified value is greater than or equal to the time required by the second terminal for processing the first data to obtain second data; the first prescribed value is pre-stored in the first terminal, or obtained by negotiation between the first terminal and the second terminal before the first terminal sends first data to the second terminal; the second predetermined value is pre-stored in the first terminal, or obtained by the first terminal and the second terminal negotiating before the first terminal sends the first data to the second terminal.
Wherein, the first specified value is a first preset duration, and when the first timing reaches the first specified value, the method includes: when the time length obtained by the first timing reaches a first preset time length; the second specified value is a second preset duration, and when the second timing reaches the second specified value, the method includes: when the duration obtained by the second timing reaches a second preset duration; or, the first predetermined value is a first preset count value, and the starting the first timer includes: starting a first count; when the first timing reaches a first prescribed value, the method includes: when the value obtained by the first counting reaches a first preset counting value; the second predetermined value is a second preset count value, and the starting of the second timing includes: starting a second count; when the second timing reaches a second prescribed value, the method includes: and when the value obtained by the second counting reaches a second preset counting value.
Another object of the present invention is to provide a secure transmission system in which a first wired communication interface of a first terminal is connected to a second wired communication interface of a second terminal, the system comprising: the first terminal is specifically configured to generate a level signal of first data, and send the level signal of the first data through the first wired communication interface; detecting edge change of a level signal at the first wired communication interface in the process of sending the level signal of the first data, and starting first timing when the edge change of the level signal at the first wired communication interface meets a timing trigger condition; the second terminal is specifically configured to receive a level signal of the first data through the second wired communication interface, and process the first data to obtain second data; the first terminal is further configured to generate a level signal of third data when the first timing reaches a first prescribed value, and send the level signal of the third data through the first wired communication interface, where the third data is notification indication information; detecting edge change of the level signal at the first wired communication interface in the process of sending the level signal of the third data, and starting second timing when the edge change of the level signal at the first wired communication interface meets a timing trigger condition; the second terminal is further configured to receive a level signal of the third data through the second wired communication interface; generating a level signal of the second data and transmitting the level signal of the second data through the second wired communication interface; the first terminal is further configured to allow the first wired communication interface to receive the level signal of the second data when the second timing reaches a second predetermined value, where the second predetermined value is a time required for the second terminal to transmit the level signal of the second data after receiving the level signal of the third data.
The first terminal is specifically configured to, in a process of sending the level signal of the first data, when it is detected that an edge change in the level signal at the first wired communication interface conforms to an edge change feature of a start bit, continue to detect whether the edge change in a subsequent level signal at the first wired communication interface conforms to the edge change generated when the data is transmitted, and if so, start first timing, where the edge change feature of the start bit is an edge change in a preset form or an edge change that changes in a specific regularity; the first terminal is further specifically configured to, in a process of sending the level signal of the third data, when it is detected that an edge change in the level signal at the first wired communication interface conforms to an edge change feature of a start bit, continue to detect whether the edge change in a subsequent level signal at the first wired communication interface conforms to the edge change generated when the data is transmitted, and if so, start second timing, where the edge change feature of the start bit is an edge change in a preset form or an edge change that changes in a specific regularity.
The first terminal is specifically configured to detect, in a level signal at the first wired communication interface, whether an edge change in the level signal meets an edge change generated when data is transmitted, and if yes, start first timing when an edge change in a subsequent level signal at the first wired communication interface is detected to meet an end bit edge change feature, where the end bit edge change feature includes: edge changes in a preset form or edge changes with specific regularity; the first terminal is further specifically configured to detect, in a level signal at the first wired communication interface, whether an edge change in the level signal corresponds to an edge change generated when data is transmitted, and if so, start second timing when an edge change detected in a subsequent level signal at the first wired communication interface continues to correspond to an end bit edge change feature, where the end bit edge change feature includes: edge variations in a preset form or edge variations that vary with a certain regularity.
The first terminal is specifically configured to, in a process of sending a level signal of the first data, start first timing when detecting that an edge change in a level signal at a first wired communication interface meets an edge change characteristic of a start bit, continue to detect whether a subsequent level signal at the first wired communication interface carries data, continue to time if the subsequent level signal carries data, and end the timing if the subsequent level signal does not carry data; wherein the start bit edge variation feature comprises: edge changes in a preset form or edge changes with specific regularity; the first terminal is further specifically configured to, in a process of sending the level signal of the third data, start second timing when detecting that an edge change in the level signal at the first wired communication interface conforms to an edge change characteristic of a start bit, continue to detect whether a subsequent level signal at the first wired communication interface carries data, continue to time if the subsequent level signal carries data, and end the timing if the subsequent level signal does not carry data; wherein the start bit edge variation feature comprises: edge variations in a preset form or edge variations that vary with a certain regularity.
The first terminal is specifically configured to, in a process of sending a level signal of the first data, start first timing when edge change is detected in a level signal at the first wired communication interface to meet an edge change characteristic of an end bit, continue to detect whether a subsequent level signal at the first wired communication interface carries data, end timing if the subsequent level signal carries data, and continue to perform timing if the subsequent level signal does not carry data; the end bit edge change characteristics comprise edge changes in a preset form or edge changes with specific regularity; the first terminal is further specifically configured to, in a process of sending the level signal of the third data, start second timing when detecting that an edge change in the level signal at the first wired communication interface meets an edge change characteristic of an end bit, continue to detect whether a subsequent level signal at the first wired communication interface carries data, end timing if carrying data, and continue to perform timing if not carrying data; the end bit edge change characteristics comprise edge changes in a preset form or edge changes with specific regularity.
The first specified value is greater than or equal to the time required by the second terminal for processing the first data to obtain second data; the first prescribed value is pre-stored in the first terminal, or obtained by negotiation between the first terminal and the second terminal before the first terminal sends first data to the second terminal; the second predetermined value is pre-stored in the first terminal, or obtained by the first terminal and the second terminal negotiating before the first terminal sends the first data to the second terminal.
The first terminal is specifically configured to generate a level signal of third data when the duration obtained by the first timing reaches a first preset duration; the second specified value is a second preset duration, and the first terminal is specifically configured to allow the first wired communication interface to receive the level signal of the second data when the duration obtained by the second timing reaches the second preset duration; or, the first prescribed value is a first preset counting value, and the first terminal is specifically configured to start a first counting; the first terminal is specifically configured to generate a level signal of third data when a value obtained by the first counting reaches a first preset counting value; the second specified value is a second preset counting value, and the first terminal is specifically used for starting second counting; the first terminal is specifically configured to allow the first wired communication interface to receive the level signal of the second data when the value obtained by the second counting reaches a second preset counting value.
According to the technical scheme provided by the invention, under the condition of normal communication, the first terminal starts second timing while sending third data (namely notification indication information), and the second terminal sends second data to the first terminal after receiving the third data (namely notification indication information). That is, under normal communication conditions, the first terminal starts timing while transmitting the third data to the second terminal, the second terminal immediately transmits the second data after receiving the third data (notification indication information), and ignores the transmission delay, so that the first terminal will just receive the second data when the second time reaches the second specified value.
If the remote hijacking of the third-party illegal device exists between the first terminal and the second terminal, and the third-party illegal device needs to take a certain time after carrying out illegal operations such as forwarding or tampering on the hijacked data, the second terminal always sends the second data after receiving the third data (namely the notification indication information), and the second data is sent to the first terminal after the remote hijacking of the third-party illegal device, at the moment, the time for the first terminal to receive the returned illegal data inevitably exceeds a second specified value reached by timing, the first terminal only allows the second data to be received when the timing reaches the second specified value, and the data reached by timing is not allowed to be received, so that the illegal data can be effectively identified after the remote hijacking of the data, and corresponding processing measures can be taken, such as interrupting subsequent processing, Discarding illegal data, disconnecting the communication connection between the first terminal and the second terminal, and the like, thereby ensuring the security of data transmission between the first terminal and the second terminal.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a flowchart of a secure transmission method according to embodiment 1 of the present invention;
fig. 2 is a block diagram of a secure transmission system according to embodiment 2 of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on those shown in the drawings, and are used only for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and thus, are not to be construed as limiting the present invention. Furthermore, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or quantity or location.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
In this embodiment, a first wired communication interface is disposed on a first terminal, and a second wired communication interface is disposed on a second terminal, where the first terminal includes, but is not limited to, a PC, a mobile terminal, a palm computer, a card reader (such as a POS) supporting a contact type IC card interface, and the second terminal includes, but is not limited to, an electronic signature device (usbkey, audio key), and a contact type IC card; the first wired communication interface and the second wired communication interface may be both USB interfaces, contact IC card communication interfaces, and the like.
The first wired communication interface of the first terminal is in wired connection with the second wired communication interface of the second terminal, so that wired communication can be conveniently carried out between the first terminal and the second terminal.
Example 1
Fig. 1 is a flowchart illustrating a secure transmission method according to an embodiment of the present invention; the method comprises the following steps:
101. the first terminal generates a level signal of first data and transmits the level signal of the first data through the first wired communication interface;
in this embodiment, after the first terminal and the second terminal establish the wired communication connection, the first terminal and the second terminal send data through the high and low level signals. When the first terminal sends the first data to the second terminal, the first terminal generates a level signal of the first data and sends the level signal through the first wired communication interface, at the moment, the level change of the first wired communication interface caused by sending the level signal of the first data also causes the second wired communication interface to generate corresponding level change, and the second terminal can receive the first data by detecting the level change generated by the second wired communication interface.
102. The first terminal detects edge changes of the level signals at the first wired communication interface in the process of sending the level signals of the first data, and starts first timing when the edge changes of the level signals at the first wired communication interface meet timing triggering conditions;
in this embodiment, in the process of sending the level signal of the first data by the first terminal, an edge change of the level signal at the first wired communication interface is detected. The edge change of the level signal may be, for example, an edge change generated when the level signal changes from a high level to a low level, or an edge change generated when the level signal changes from a low level to a high level.
In this embodiment, the number of pins for data transmission in the first wired communication interface may be multiple, for example, when the first wired communication interface is a USB interface, the number of pins for data transmission is two, and the two pins are a D + pin and a D-pin respectively. It is understood that the edge variation of the level signal at the first wired communication interface specifically refers to: for example, taking a USB interface as an example, the edge change of the level signal at the USB interface specifically refers to: edge variations of the level signal at the D + pin and edge variations of the level signal at the D-pin. Other interface forms are similar and are not described in detail herein.
In this embodiment, if the edge change of the level signal at the first wired communication interface satisfies the timing trigger condition, the start of the first timing is triggered, so that the level signal of the third data is generated when the first timing reaches the first prescribed value.
The implementation manner of the first timing includes but is not limited to the following: timing by adopting a clock, wherein the numerical value obtained by timing is duration; or a counter is adopted for timing, and the numerical value obtained by timing is a counting numerical value.
103. The second terminal receives the level signal of the first data through the second wired communication interface, and processes the first data to obtain second data;
in this embodiment, the first wired communication interface is connected to the second wired communication interface by a wired connection, and when the first terminal sends the level signal of the first data through the first wired communication interface, correspondingly, the second terminal may receive the level signal of the first data through the second wired communication interface. It will be appreciated that the edge variations of the level signal at the first wired communication interface are identical to the edge variations of the level signal at the second wired communication interface.
In this embodiment, after receiving the first data, the second terminal processes the first data to obtain second data. For example, the first data is data to be signed, and the second data obtained by processing the first data by the second terminal may specifically be signed data obtained by signing the data to be signed.
104. When the first timing reaches a first specified value, the first terminal generates a level signal of third data, and sends the level signal of the third data through the first wired communication interface, wherein the third data is notification indication information;
in this embodiment, the first predetermined value is greater than or equal to a time required for the second terminal to process the first data to obtain second data; the first terminal sends the third data when the first timing reaches the first specified value, the second terminal sends the second data to the first terminal after receiving the third data, and the first specified value is set to be greater than or equal to the time required by the second terminal for processing the first data to obtain the second data, so that the situation that the second terminal cannot obtain the second data because the second terminal has not processed the first data after receiving the third data can be avoided.
In this embodiment, the third data is notification indication information for indicating the second terminal to return the second data to the first terminal. And after the first terminal sends the third data to the second terminal, the second terminal receives the notification indication information and sends the second data to the first terminal.
105. The first terminal detects edge changes of the level signals at the first wired communication interface in the process of sending the level signals of the third data, and starts second timing when the edge changes of the level signals at the first wired communication interface meet timing triggering conditions;
in this embodiment, in the process of sending the level signal of the third data by the first terminal, an edge change of the level signal at the first wired communication interface is detected. The edge change of the level signal may be, for example, an edge change generated when the level signal changes from a high level to a low level, or an edge change generated when the level signal changes from a low level to a high level.
In this embodiment, the number of pins for data transmission in the first wired communication interface may be multiple, for example, when the first wired communication interface is a USB interface, the number of pins for data transmission is two, and the two pins are a D + pin and a D-pin respectively. It is understood that the edge variation of the level signal at the first wired communication interface specifically refers to: for example, taking a USB interface as an example, the edge change of the level signal at the USB interface specifically refers to: edge variations of the level signal at the D + pin and edge variations of the level signal at the D-pin. Other interface forms are similar and are not described in detail herein.
In this embodiment, if the edge change of the level signal at the first wired communication interface satisfies the timing trigger condition, the start of the second timing is triggered, so that the level signal of the second data is allowed to be received through the first wired communication interface when the second timing reaches a second specified value.
The implementation of the second timing includes but is not limited to the following: timing by adopting a clock, wherein the numerical value obtained by timing is duration; or a counter is adopted for timing, and the numerical value obtained by timing is a counting numerical value.
In this embodiment, the second timing and the first timing may adopt the same timing mode or different timing modes. And is not limited herein.
106. The second terminal receives a level signal of the third data through the second wired communication interface;
in this embodiment, the first wired communication interface is connected to the second wired communication interface by a wired connection, and when the first terminal sends the level signal of the third data through the first wired communication interface, correspondingly, the second terminal may receive the level signal of the third data through the second wired communication interface. It will be appreciated that the edge variations of the level signal at the first wired communication interface are identical to the edge variations of the level signal at the second wired communication interface.
107. The second terminal generates a level signal of the second data and transmits the level signal of the second data through the second wired communication interface;
in this embodiment, the second terminal does not immediately return the second data to the first terminal after obtaining the second data, but after receiving the third data (i.e., the notification indication information), the second terminal sends the second data to the first terminal through the second wired communication interface, so that the second terminal can receive the second data when the second timing reaches the second predetermined value.
In this embodiment, if the second terminal does not receive the notification indication information, the operation of generating the level signal of the second data and transmitting the level signal of the second data through the second wired communication interface is not performed.
108. And the first terminal allows the first wired communication interface to receive the level signal of the second data when the second timing reaches a second specified value.
In this embodiment, the second predetermined value is a time required for the second terminal to send the level signal of the second data after receiving the level signal of the third data.
In this embodiment, the first terminal allows the second data to be received when the second timing reaches the second predetermined value, and the first terminal does not allow the data to be received when the second timing does not reach or exceeds the second predetermined value.
In this embodiment, in a normal communication situation, the first terminal starts the second timing while sending the third data (i.e., the notification indicator), and after receiving the third data (i.e., the notification indicator), the second terminal sends the second data to the first terminal. That is, under normal communication conditions, the first terminal starts timing while transmitting the third data to the second terminal, the second terminal immediately transmits the second data after receiving the third data (notification indication information), and ignores the transmission delay, so that the first terminal will just receive the second data when the second time reaches the second specified value.
If the remote hijacking of the third-party illegal device exists between the first terminal and the second terminal, and the third-party illegal device needs to take a certain time after carrying out illegal operations such as forwarding or tampering on the hijacked data, the second terminal always sends the second data after receiving the third data (namely the notification indication information), and the second data is sent to the first terminal after the remote hijacking of the third-party illegal device, at the moment, the time for the first terminal to receive the returned illegal data inevitably exceeds a second specified value reached by timing, the first terminal only allows the second data to be received when the timing reaches the second specified value, and the data reached by timing is not allowed to be received, so that the illegal data can be effectively identified after the remote hijacking of the data, and corresponding processing measures can be taken, such as interrupting subsequent processing, Discarding illegal data, disconnecting the communication connection between the first terminal and the second terminal, and the like, thereby ensuring the security of data transmission between the first terminal and the second terminal.
As an optional implementation manner of this embodiment, the first prescribed value may be pre-stored in the first terminal, for example, the first prescribed value may be pre-stored in a secure storage area in the first terminal in advance, and when the first terminal needs to be used, the first prescribed value is acquired from the secure storage area.
As an alternative to this embodiment, the first prescribed value may also be obtained by: before the first terminal sends first data to the second terminal, the first terminal and the second terminal negotiate to obtain the first data; the negotiation to obtain the first prescribed value may be carried out in the following manner: the first terminal and the second terminal carry out bidirectional identity authentication, and after the bidirectional identity authentication is passed, the first terminal and the second terminal negotiate to obtain a transmission key; the second terminal generates the first specified value, encrypts the first specified value by using the transmission key, and sends the encrypted first specified value to the first terminal; the first terminal decrypts the encrypted first specified numerical value by using the transmission key to obtain the first specified numerical value, and stores the first specified numerical value; or, the first terminal generates the first prescribed value, encrypts the first prescribed value by using the transmission key, and transmits the encrypted first prescribed value to the second terminal; the second terminal decrypts the encrypted first specified numerical value by using the transmission key to obtain the first specified numerical value and stores the first specified numerical value; alternatively, the negotiation to obtain the first prescribed value may be implemented in the following manner: the first terminal and the second terminal carry out bidirectional identity authentication; after the bidirectional identity authentication is passed, the second terminal generates the first specified value, encrypts the first specified value by using the public key of the first terminal, and sends the encrypted first specified value to the first terminal; the first terminal decrypts the encrypted first specified numerical value by using a private key of the first terminal to obtain the first specified numerical value and stores the first specified numerical value; or after the bidirectional identity authentication is passed, the first terminal generates the first specified value, encrypts the first specified value by using the public key of the second terminal, and sends the encrypted first specified value to the second terminal; and the second terminal decrypts the encrypted first specified numerical value by using a private key of the second terminal to obtain the first specified numerical value and stores the first specified numerical value.
As an optional implementation manner of this embodiment, the second specified value may be pre-stored in the first terminal, for example, the second specified value may be pre-stored in a secure storage area in the first terminal in advance, and when the first terminal needs to be used, the second specified value is obtained from the secure storage area.
As an alternative to this embodiment, the second prescribed value may also be obtained by: and before the first terminal sends the first data to the second terminal, the first terminal and the second terminal negotiate to obtain the first data. The negotiation to obtain the second prescribed value may be achieved in the following manner: the first terminal and the second terminal carry out bidirectional identity authentication, and after the bidirectional identity authentication is passed, the first terminal and the second terminal negotiate to obtain a transmission key; the second terminal generates the second specified value, encrypts the second specified value by using the transmission key, and sends the encrypted second specified value to the first terminal; the first terminal decrypts the encrypted second specified numerical value by using the transmission key to obtain the second specified numerical value, and stores the second specified numerical value; or, the first terminal generates the second prescribed value, encrypts the second prescribed value by using the transmission key, and transmits the encrypted second prescribed value to the second terminal; the second terminal decrypts the encrypted second specified numerical value by using the transmission key to obtain the second specified numerical value, and stores the second specified numerical value; alternatively, the following manner may be adopted to implement the negotiation to obtain the second prescribed value: the first terminal and the second terminal carry out bidirectional identity authentication; after the bidirectional identity authentication is passed, the second terminal generates the second specified value, encrypts the second specified value by using the public key of the first terminal, and sends the encrypted second specified value to the first terminal; the first terminal decrypts the encrypted second specified numerical value by using a private key of the first terminal to obtain the second specified numerical value, and stores the second specified numerical value; or after the bidirectional identity authentication is passed, the first terminal generates the second specified value, encrypts the second specified value by using a public key of the second terminal, and sends the encrypted second specified value to the second terminal; and the second terminal decrypts the encrypted second specified numerical value by using a private key of the second terminal to obtain the second specified numerical value and stores the second specified numerical value.
As an optional implementation manner of this embodiment, when the timing manner is clock timing, the first specified value is a first preset time length, and when the first timing reaches the first specified value, the method includes: when the time length obtained by the first timing reaches a first preset time length; the second specified value is a second preset duration, and when the second timing reaches the second specified value, the method includes: when the duration obtained by the second timing reaches a second preset duration;
or, when the timing manner is counting by a counter, the first predetermined value is a first preset count value, and the starting of the first timing includes: starting a first count; when the first timing reaches a first prescribed value, the method includes: when the value obtained by the first counting reaches a first preset counting value; the second predetermined value is a second preset count value, and the starting of the second timing includes: starting a second count; when the second timing reaches a second prescribed value, the method includes: and when the value obtained by the second counting reaches a second preset counting value.
As an optional implementation manner of this embodiment, the above timing may be triggered at the beginning of data transmission, and the specific implementation of triggering timing is as follows:
when the first terminal detects that the edge change in the level signal at the first wired communication interface conforms to the edge change characteristic of a start bit in the process of sending the level signal of the first data, the first terminal continues to detect whether the edge change in the subsequent level signal at the first wired communication interface conforms to the edge change generated when the data is transmitted, if so, the first terminal starts first timing, and the edge change characteristic of the start bit is the edge change in a preset form or the edge change in a specific regularity;
and when the first terminal detects that the edge change in the level signal at the first wired communication interface conforms to the edge change characteristic of the start bit in the process of sending the level signal of the third data, the first terminal continues to detect whether the edge change in the subsequent level signal at the first wired communication interface conforms to the edge change generated when the data is transmitted, and if so, the second timing is started, wherein the edge change characteristic of the start bit is the edge change in a preset form or the edge change in a specific regularity.
Taking the first wired communication interface and the second wired communication interface as USB interfaces as an example, the following implementation processes of the first terminal and the second terminal performing communication through the USB interfaces are briefly introduced: when data is not transmitted, the USB interface is in an idle state, when data needs to be transmitted, level signals at D + and D-in the USB interface are switched from the idle state to a K state (this process is also referred to as a start of packet (SOP) state), and then, the D + and D-in the USB interface start to transmit data by using differential signals, where a first bit of data is usually a first bit of a SYNC field SYNC, and when the first bit of the SYNC field SYNC is detected, it can be determined that the USB interface is in a data transmission state. When the data transmission is finished, the last bit of the data is usually the check bit CRC, and after the check bit CRC is transmitted, the D + and D-level signals in the USB interface enter the SE0 state, and then the state is changed from the SE0 state to the J state (this process is also referred to as an end of packet (EOP) state). The characteristics of the level signals at D + and D-positions in the USB interface in the SOP state and the EOP state may specifically refer to the relevant specifications in the USB protocol, and are not described herein again.
The implementation scheme based on the USB interface triggering timing is as follows: when the first terminal detects that the edge change of the level signals at the D + pin and the D-pin of the first wired communication interface accords with the edge change characteristic generated by the level signal corresponding to the state that the idle state enters the K state (namely, the data packet starting SOP is detected), the first terminal indicates that the level signal which accords with the edge change characteristic of the start bit is detected, the edge change of the level signals at the D + pin and the D-pin is continuously detected, if the edge change accords with the edge change characteristic generated by the level signal corresponding to the first bit (for example, the first bit of the synchronous field SYNC) of the transmission information packet, the edge change which detects the level signal accords with the edge change generated when the transmission data is detected, namely, the first wired communication interface is in a data transmission state, and the first timing is started (the implementation process of the second timing is similar to the implementation of the first timing, and will not be described in detail herein).
Of course, the first wired communication interface and the second wired communication interface may also be contact IC card communication interfaces, and the following implementation process of the first terminal and the second terminal performing communication through the contact IC card communication interfaces is briefly described: the input/output I/O interface of the contact type IC card adopts a character mode to transmit data. Before data transmission, the I/O interface is in a high state. Each character consists of 10 consecutive bits: a start bit of 1 low state, 8 data bits constituting a data byte, and 1 parity bit. And after the character transmission is finished, the I/O interface enters the protection time, and the I/O interface is in a high level state in the protection time.
The contact type IC card communication interface based triggering timing is realized as follows: when the first terminal detects that the edge change of the level signal at the first wired communication interface (i.e., I/O interface) conforms to the edge change characteristic generated by switching from high level to low level, it indicates that the level signal conforming to the edge change characteristic of the start bit is detected, and when it continues to detect that the edge change of the subsequent level signal at the first wired communication interface (i.e., I/O interface) conforms to the edge change characteristic generated by the level signal corresponding to the first data bit among the 8 data bits, it indicates that the edge change of the level signal conforms to the edge change generated when data is transmitted, and the first wired communication interface (i.e., I/O interface) is in a data transmission state, then the first timing is started (the implementation process of the second timing is similar to the implementation of the first timing, and is not described herein again);
of course, the first wired communication interface and the second wired communication interface may also adopt the following third communication mode: two data pins for transmitting data are arranged in the first wired communication interface and the second wired communication interface. Data transmission is performed through the differential signal formed by the two data pins, a start bit is usually set when data transmission is started, the start bit of data is usually represented by parallel signals, for example, the two data pins are both high levels, or the two data pins are both low levels, the start bit is formed by specifically adopting the combination of the high levels, the low levels, the level values and the levels, and can be set differently according to different application scenes, and the description is omitted here. After data starts to be transmitted, the transmitted data is represented by differential signals, for example, one of the two data pins is at a high level, the other is at a low level, the transmitted data is different, the differential signals formed by the two data pins are also different, and the differential signals can be specifically set according to different application scenarios, which is not described herein again. When data transmission is finished, an end bit is set, and the end bit of data is usually represented by a parallel signal, for example, both the two data pins are at a high level, or both the two data pins are at a low level, and the end bit formed by specifically adopting a combination of a high level or a low level, the level value and the level value can be set differently according to different application scenarios, which is not described herein again. It is understood that the specific level value of the parallel signal used by the start bit of the data is different from the specific level value of the parallel signal used by the end bit of the data for distinguishing.
The implementation of triggering timing based on the third communication mode is as follows: taking the first wired communication interface provided with a first pin and a second pin for transmitting data as an example; the number of the level signals of the first terminal detecting the edge change in the level signal at the first pin and the level signal at the second pin is one, and when the number of the level signals of the subsequent level signal detecting the edge change in the level signal at the first pin and the level signal at the second pin is two, it indicates that the level signal conforming to the edge change characteristic of the start bit is detected first, and then data transmission is detected, and then the first timing is started (the implementation process of the second timing is similar to the implementation of the first timing, and is not described herein again).
Since the level signal indicating the start bit is a parallel signal in this communication mode, the level signal indicating data to be transmitted is a differential signal in the data transmission process, when the parallel signals are changed into differential signals, the edge of one of the level signals at the two data pins changes, the data to be transmitted in the data transmission process are different, the differential signals are also different, the change of the differential signals can cause the edges of the two level signals in the level signals at the two data pins to change, if the number of the level signals of which the edges are changed when the level signals of the first terminal detect at the two data pins is one, and the number of the level signals of which the edges are changed when the level signals of the two data pins detect subsequently is two, the data start bit is detected firstly, and then the data transmission is detected, so that the timing is started.
As an optional implementation manner of this embodiment, the above timing may be triggered at the end of data transmission, and the specific implementation of triggering timing is as follows:
in this embodiment, in the process of sending the level signal of the first data, the first terminal detects whether an edge change in the level signal at the first wired communication interface meets an edge change generated when data is transmitted, and if so, when an edge change detected in a subsequent level signal at the first wired communication interface continues to meet an end bit edge change feature, the first terminal starts first timing, where the end bit edge change feature includes: edge changes in a preset form or edge changes with specific regularity;
in the process of sending the level signal of the third data, the first terminal detects whether the edge change in the level signal at the first wired communication interface conforms to the edge change generated when data is transmitted, and if so, when the edge change detected in the subsequent level signal at the first wired communication interface continuously conforms to an end bit edge change characteristic, a second timing is started, wherein the end bit edge change characteristic comprises: edge variations in a preset form or edge variations that vary with a certain regularity.
The implementation scheme based on the USB interface trigger timing is as follows (see the above related description for the implementation process of communication based on the USB interface, which is not described here again):
the first terminal detects edge changes of level signals at a D + pin and a D-pin in the first wired communication interface, if the edge changes meet edge change characteristics generated by a level signal corresponding to a last bit (for example, a check bit CRC) of a transmission packet, it indicates that the edge changes of the level signals meet the edge changes generated when data is transmitted, the edge changes of the level signals at the D + pin and the D-pin are continuously detected, and if the edge changes meet the edge change characteristics generated by the level signal corresponding to a state transition from an SE0 state to a J state (that is, an end of data packet (EOP) state) is detected, it indicates that the level signals meeting the edge change characteristics of an end bit are detected, and a first timing is started (the implementation process of a second timing is similar to the implementation of the first timing, and is not described herein again).
The implementation of triggering timing based on the contact IC card communication interface is as follows (the implementation of communication based on the contact IC card communication interface is described above and is not described here again):
when the first terminal detects that the edge change of the level signal of the first wired communication interface (i.e., I/O interface) conforms to the edge change characteristic generated by the level signal corresponding to the last data bit of the 8 data bits, it indicates that the edge change of the level signal conforms to the edge change generated when data is transmitted, and when the edge change of the subsequent level signal of the first wired communication interface (i.e., I/O interface) conforms to the edge change characteristic generated by the high level signal corresponding to the protection time, it indicates that the level signal conforming to the edge change characteristic of the end bit is detected, and then the first timing is started (the implementation process of the second timing is similar to the implementation of the first timing, and is not repeated here).
The implementation of triggering timing based on the third communication method is as follows (the implementation of communication based on the third communication method is described above and is not described here again):
taking the first wired communication interface provided with a first pin and a second pin for transmitting data as an example;
the number of the level signals of the first terminal detecting the edge change in the level signal at the first pin and the level signal at the second pin is two, and the number of the level signals detecting the edge change in the level signal at the first pin and the level signal at the second pin is one, which indicates that data transmission is detected first, and then the level signal conforming to the edge change at the end bit is detected, and then first timing is started (the implementation process of the second timing is similar to the implementation process of the first timing, and is not described herein again).
Since the level signal indicating the start bit is a parallel signal in this communication mode, the level signal indicating data to be transmitted is a differential signal in the data transmission process, when the parallel signals are changed into differential signals, the edge of one of the level signals at the two data pins changes, the data to be transmitted in the data transmission process are different, the differential signals are also different, the change of the differential signals can cause the edges of the two level signals in the level signals at the two data pins to change, if the number of the level signals of the first terminal, which are detected by the level signals at the two data pins and the edge of which is changed, is two, and the number of the level signals, which are detected by the level signals at the two data pins and the edge of which is changed, is one, the first terminal detects that data is transmitted, and then detects the data end bit, so that timing is started.
As an optional implementation manner of this embodiment, the above-mentioned timing may be triggered at the beginning of data transmission, and another implementation of triggering timing is as follows:
in this embodiment, in the process of sending the level signal of the first data, when detecting that the edge change in the level signal at the first wired communication interface conforms to the edge change characteristic of the start bit, the first terminal starts first timing, continues to detect whether the subsequent level signal at the first wired communication interface carries data, continues timing if the subsequent level signal carries data, and ends timing if the subsequent level signal does not carry data; wherein the start bit edge variation feature comprises: edge changes in a preset form or edge changes with specific regularity;
when the first terminal detects that the edge change in the level signal at the first wired communication interface meets the edge change characteristic of the initial bit in the process of sending the level signal of the third data, starting second timing, continuously detecting whether the subsequent level signal at the first wired communication interface carries data or not, if the subsequent level signal carries data, continuously timing, and if the subsequent level signal does not carry data, ending timing; wherein the start bit edge variation feature comprises: edge variations in a preset form or edge variations that vary with a certain regularity.
The implementation scheme based on the USB interface trigger timing is as follows (see the above related description for the implementation process of communication based on the USB interface, which is not described here again):
when the first terminal detects that the edge change of the level signals at the D + pin and the D-pin at the first wired communication interface conforms to the edge change characteristic of the level signals corresponding to the state from the idle state to the state K (namely, the data packet start SOP) is detected, the first terminal indicates that the level signals conforming to the edge change characteristic of the start bit are detected, then first timing is started, the level signals at the subsequent D + pin and the D-pin are continuously detected, and data decoding is carried out on the level signals, if the level signals can be decoded to obtain the level signals carrying data, the data transmission starts normally after the level signals conforming to the edge change characteristic of the start bit are detected, timing is continuously carried out, and if the decoding fails or the data cannot be obtained due to the abnormal situation, the data transmission possibly occurs, and then the timing is temporarily stopped.
The implementation process of the second timing is similar to that of the first timing, and is not described herein again.
The implementation of triggering timing based on the contact IC card communication interface is as follows (the implementation of communication based on the contact IC card communication interface is described above and is not described here again):
when the first terminal detects that the edge change of a level signal at a first wired communication interface (namely an I/O interface) accords with an edge change characteristic generated by switching from a high level to a low level, the first terminal indicates that the level signal which accords with the edge change characteristic of a start bit is detected, starts first timing, continues to detect a subsequent level signal at the first wired communication interface (namely the I/O interface), decodes the level signal, if the level signal can be decoded to obtain data carried by the level signal, indicates that normal data transmission is started after the level signal which accords with the edge change characteristic of the start bit is detected, continues timing, and if the decoding fails or the data cannot be obtained due to abnormality, indicates that the data transmission may be abnormal, suspends timing.
The implementation process of the second timing is similar to that of the first timing, and is not described herein again.
The implementation of triggering timing based on the third communication method is as follows (the implementation of communication based on the third communication method is described above and is not described here again):
taking the first wired communication interface provided with a first pin and a second pin for transmitting data as an example; if the number of the level signals of which the edge changes are detected in the level signals at the first pin and the level signals at the second pin of the first terminal is one, starting first timing, continuously detecting whether data are carried in subsequent level signals at the first wired communication interface, if the data are carried, indicating that normal data transmission is started after the level signals conforming to the edge change characteristics of the start bit are detected, continuing timing, and if the data are not carried, indicating that the data transmission is possibly abnormal, ending timing;
the implementation process of the second timing is similar to that of the first timing, and is not described herein again.
Because the level signal indicating the start bit is a parallel signal, the level signal indicating data to be transmitted is a differential signal in the data transmission process, when the parallel signal is changed into the differential signal, the edge of one level signal in the level signals at the two data pins changes, the data to be transmitted is different in the data transmission process, the differential signal is also different, the change of the differential signal can cause the edges of the two level signals in the level signals at the two data pins to change, if the number of the level signals of which the edges change is detected by the level signals at the two data pins by the first terminal is one, timing can be started, and the level signals are detected to carry data, which indicates that the data start bit is detected first, and then the data is detected to be transmitted, so that the timing is continued.
As an optional implementation manner of this embodiment, the above-mentioned timing may be triggered at the end of data transmission, and another implementation of triggering timing is as follows:
in this embodiment, in the process of sending the level signal of the first data, when detecting that an edge change in the level signal at the first wired communication interface conforms to an edge change characteristic of an end bit, the first terminal starts first timing, continues to detect whether a subsequent level signal at the first wired communication interface carries data, ends timing if carrying data, and continues timing if not carrying data; the end bit edge change characteristics comprise edge changes in a preset form or edge changes with specific regularity;
when the first terminal detects that the edge change in the level signal at the first wired communication interface meets the edge change characteristic of an end bit in the process of sending the level signal of the third data, starting second timing, continuously detecting whether the subsequent level signal at the first wired communication interface carries data or not, if the subsequent level signal carries data, ending the timing, and if the subsequent level signal does not carry data, continuously timing; the end bit edge change characteristics comprise edge changes in a preset form or edge changes with specific regularity.
The implementation scheme based on the USB interface trigger timing is as follows (see the above related description for the implementation process of communication based on the USB interface, which is not described here again):
the first terminal detects edge changes of level signals at a D + pin and a D-pin in the first wired communication interface, when the edge changes are detected to be in accordance with the edge change characteristics of the level signals corresponding to the transition from an SE0 state to a J state (namely, the end of data packet (EOP) state is detected), the level signals in accordance with the edge change characteristics of an end bit are detected, first timing is started, the level signals at the subsequent D + pin and the D-pin are continuously detected, data decoding is carried out on the level signals, if the data cannot be obtained after decoding, data transmission is completed, timing is continuously carried out, otherwise, if the data can be obtained through decoding, the data transmission is not completely completed or the data transmission is abnormal, the timing is ended.
The implementation process of the second timing is similar to that of the first timing, and is not described herein again.
The implementation of triggering timing based on the contact IC card communication interface is as follows (the implementation of communication based on the contact IC card communication interface is described above and is not described here again):
when the first terminal detects that the edge change of the level signal of the first wired communication interface (i.e. the I/O interface) conforms to the edge change characteristic generated by the high level signal corresponding to the protection time, which indicates that the level signal conforming to the edge change characteristic of the end bit is detected, the first timing is started, the subsequent level signal at the first wired communication interface (i.e. the I/O interface) is continuously detected, the level signal is subjected to data decoding, if the data cannot be obtained after the decoding, the timing is continuously performed, otherwise, if the data can be obtained after the decoding, the timing is ended.
The implementation process of the second timing is similar to that of the first timing, and is not described herein again.
The implementation of triggering timing based on the third communication method is as follows (the implementation of communication based on the third communication method is described above and is not described here again):
taking the first wired communication interface provided with a first pin and a second pin for transmitting data as an example;
if the number of the level signals of the first terminal detecting the edge change in the level signal at the first pin and the level signal at the second pin is one, starting first timing, continuously detecting whether a subsequent level signal at the first wired communication interface carries data or not, if so, ending timing, and if not, continuously timing;
the implementation process of the second timing is similar to that of the first timing, and is not described herein again.
In this embodiment, as can be seen from the above description, the edge variation characteristic of the data start bit is an edge variation in a preset form, for example, a level signal conforming to the edge variation characteristic of the data start bit in the contact IC card communication interface is represented by a low level, a level signal conforming to the edge variation characteristic of the data end bit is represented by a high level (the protection time is a period of high level), or the edge variation characteristic of the data start bit edge is represented by a specific regularity, for example, a level signal conforming to the edge variation characteristic of the data start bit in the USB interface is represented by SOP (the level signal is shifted from an idle state to a K state), and a level signal conforming to the edge variation characteristic of the data end bit is represented by EOP (the level signal is shifted from an SE0 state to a J state). Of course, without limitation, different types of edge variation characteristics may be used to represent the data start bit characteristics according to different communication interfaces, for example, a combination of multiple high levels and low levels, or a single high level, or a single low level, etc., may also be used, and is not limited herein.
Example 2
This embodiment provides a secure transmission system, as shown in fig. 2, where a first wired communication interface of a first terminal is connected to a second wired communication interface of a second terminal, the system including: a first terminal 10 and a second terminal 20;
the first terminal 10 is specifically configured to generate a level signal of first data, and send the level signal of the first data through the first wired communication interface; detecting edge change of a level signal at the first wired communication interface in the process of sending the level signal of the first data, and starting first timing when the edge change of the level signal at the first wired communication interface meets a timing trigger condition;
the second terminal 20 is specifically configured to receive the level signal of the first data through the second wired communication interface, and process the first data to obtain second data;
the first terminal 10 is further configured to generate a level signal of third data when the first timing reaches a first predetermined value, and send the level signal of the third data through the first wired communication interface, where the third data is notification indication information; detecting edge change of the level signal at the first wired communication interface in the process of sending the level signal of the third data, and starting second timing when the edge change of the level signal at the first wired communication interface meets a timing trigger condition;
the second terminal 20 is further configured to receive a level signal of the third data through the second wired communication interface; generating a level signal of the second data and transmitting the level signal of the second data through the second wired communication interface;
the first terminal 10 is further configured to allow the first wired communication interface to receive the level signal of the second data when the second timing reaches a second predetermined value, where the second predetermined value is a time required for the second terminal to send the level signal of the second data after receiving the level signal of the third data.
In this embodiment, in a normal communication situation, the first terminal starts the second timing while sending the third data (i.e., the notification indicator), and after receiving the third data (i.e., the notification indicator), the second terminal sends the second data to the first terminal. That is, under normal communication conditions, the first terminal starts timing while transmitting the third data to the second terminal, the second terminal immediately transmits the second data after receiving the third data (notification indication information), and ignores the transmission delay, so that the first terminal will just receive the second data when the second time reaches the second specified value.
If the remote hijacking of the third-party illegal equipment exists between the first terminal and the second terminal, and the third-party illegal equipment needs to take a certain time after carrying out illegal operations such as forwarding or tampering on the hijacked data, the second terminal always sends the second data after receiving the third data (namely the notification indication information), the second data is remotely hijacked by the third-party illegal equipment and then sends the processed illegal data to the first terminal, at the moment, the time for the first terminal to receive the returned illegal data is inevitably over the second specified value reached by timing, the first terminal only allows the second data to be received when the timing reaches the second specified value, and the overtime arrived data can not be received, so that the illegal data can be effectively identified after the remote hijacking of the data occurs, and corresponding processing measures can be taken, such as interrupting subsequent processing, discarding illegal data, disconnecting the communication connection between the first terminal and the second terminal, etc., the security of data transmission between the first terminal and the second terminal is ensured.
In this embodiment, the first predetermined value is greater than or equal to a time required for the second terminal to process the first data to obtain second data;
as an optional implementation manner of this embodiment, the first prescribed value may be pre-stored in the first terminal, for example, the first prescribed value may be pre-stored in a secure storage area in the first terminal in advance, and when the first terminal needs to be used, the first prescribed value is acquired from the secure storage area.
As an alternative to this embodiment, the first prescribed value may also be obtained by: before the first terminal sends first data to the second terminal, the first terminal and the second terminal negotiate to obtain the first data; the negotiation to obtain the first prescribed value may be carried out in the following manner: the first terminal and the second terminal carry out bidirectional identity authentication, and after the bidirectional identity authentication is passed, the first terminal and the second terminal negotiate to obtain a transmission key; the second terminal generates the first specified value, encrypts the first specified value by using the transmission key, and sends the encrypted first specified value to the first terminal; the first terminal decrypts the encrypted first specified numerical value by using the transmission key to obtain the first specified numerical value, and stores the first specified numerical value; or, the first terminal generates the first prescribed value, encrypts the first prescribed value by using the transmission key, and transmits the encrypted first prescribed value to the second terminal; the second terminal decrypts the encrypted first specified numerical value by using the transmission key to obtain the first specified numerical value and stores the first specified numerical value; alternatively, the negotiation to obtain the first prescribed value may be implemented in the following manner: the first terminal and the second terminal carry out bidirectional identity authentication; after the bidirectional identity authentication is passed, the second terminal generates the first specified value, encrypts the first specified value by using the public key of the first terminal, and sends the encrypted first specified value to the first terminal; the first terminal decrypts the encrypted first specified numerical value by using a private key of the first terminal to obtain the first specified numerical value and stores the first specified numerical value; or after the bidirectional identity authentication is passed, the first terminal generates the first specified value, encrypts the first specified value by using the public key of the second terminal, and sends the encrypted first specified value to the second terminal; and the second terminal decrypts the encrypted first specified numerical value by using a private key of the second terminal to obtain the first specified numerical value and stores the first specified numerical value.
As an optional implementation manner of this embodiment, the second specified value may be pre-stored in the first terminal, for example, the second specified value may be pre-stored in a secure storage area in the first terminal in advance, and when the first terminal needs to be used, the second specified value is obtained from the secure storage area.
As an alternative to this embodiment, the second prescribed value may also be obtained by: and before the first terminal sends the first data to the second terminal, the first terminal and the second terminal negotiate to obtain the first data. The negotiation to obtain the second prescribed value may be achieved in the following manner: the first terminal and the second terminal carry out bidirectional identity authentication, and after the bidirectional identity authentication is passed, the first terminal and the second terminal negotiate to obtain a transmission key; the second terminal generates the second specified value, encrypts the second specified value by using the transmission key, and sends the encrypted second specified value to the first terminal; the first terminal decrypts the encrypted second specified numerical value by using the transmission key to obtain the second specified numerical value, and stores the second specified numerical value; or, the first terminal generates the second prescribed value, encrypts the second prescribed value by using the transmission key, and transmits the encrypted second prescribed value to the second terminal; the second terminal decrypts the encrypted second specified numerical value by using the transmission key to obtain the second specified numerical value, and stores the second specified numerical value; alternatively, the following manner may be adopted to implement the negotiation to obtain the second prescribed value: the first terminal and the second terminal carry out bidirectional identity authentication; after the bidirectional identity authentication is passed, the second terminal generates the second specified value, encrypts the second specified value by using the public key of the first terminal, and sends the encrypted second specified value to the first terminal; the first terminal decrypts the encrypted second specified numerical value by using a private key of the first terminal to obtain the second specified numerical value, and stores the second specified numerical value; or after the bidirectional identity authentication is passed, the first terminal generates the second specified value, encrypts the second specified value by using a public key of the second terminal, and sends the encrypted second specified value to the second terminal; and the second terminal decrypts the encrypted second specified numerical value by using a private key of the second terminal to obtain the second specified numerical value and stores the second specified numerical value.
As an optional implementation manner of this embodiment, when the timing manner is clock timing, the first specified value is a first preset time duration, and the first terminal is specifically configured to generate a level signal of third data when the time duration obtained by the first timing reaches the first preset time duration; the second specified value is a second preset duration, and the first terminal is specifically configured to allow the first wired communication interface to receive the level signal of the second data when the duration obtained by the second timing reaches the second preset duration;
or, when the timing manner is that a counter counts, the first prescribed value is a first preset count value, and the first terminal is specifically configured to start first counting; the first terminal is specifically configured to generate a level signal of third data when a value obtained by the first counting reaches a first preset counting value; the second specified value is a second preset counting value, and the first terminal is specifically used for starting second counting; the first terminal is specifically configured to allow the first wired communication interface to receive the level signal of the second data when the value obtained by the second counting reaches a second preset counting value.
As an optional implementation manner of this embodiment, the above timing may be triggered at the beginning of data transmission, and the specific implementation of triggering timing is as follows:
the first terminal is specifically configured to, when it is detected that an edge change in a level signal at the first wired communication interface meets an edge change characteristic of a start bit in a process of sending the level signal of the first data, continue to detect whether the edge change in a subsequent level signal at the first wired communication interface meets the edge change generated when the data is transmitted, and if so, start first timing, where the edge change characteristic of the start bit is an edge change in a preset form or an edge change that changes in a specific regularity;
the first terminal is further specifically configured to, in a process of sending the level signal of the third data, when it is detected that an edge change in the level signal at the first wired communication interface conforms to an edge change feature of a start bit, continue to detect whether the edge change in a subsequent level signal at the first wired communication interface conforms to the edge change generated when the data is transmitted, and if so, start second timing, where the edge change feature of the start bit is an edge change in a preset form or an edge change that changes in a specific regularity.
Taking the first wired communication interface and the second wired communication interface as USB interfaces as an example, the following implementation processes of the first terminal and the second terminal performing communication through the USB interfaces are briefly introduced: when data is not transmitted, the USB interface is in an idle state, when data needs to be transmitted, level signals at D + and D-in the USB interface are switched from the idle state to a K state (this process is also referred to as a start of packet (SOP) state), and then, the D + and D-in the USB interface start to transmit data by using differential signals, where a first bit of data is usually a first bit of a SYNC field SYNC, and when the first bit of the SYNC field SYNC is detected, it can be determined that the USB interface is in a data transmission state. When the data transmission is finished, the last bit of the data is usually the check bit CRC, and after the check bit CRC is transmitted, the D + and D-level signals in the USB interface enter the SE0 state, and then the state is changed from the SE0 state to the J state (this process is also referred to as an end of packet (EOP) state). The characteristics of the level signals at D + and D-positions in the USB interface in the SOP state and the EOP state may specifically refer to the relevant specifications in the USB protocol, and are not described herein again.
The implementation scheme based on the USB interface triggering timing is as follows: when the first terminal detects that the edge change of the level signals at the D + pin and the D-pin of the first wired communication interface accords with the edge change characteristic generated by the level signal corresponding to the state that the idle state enters the K state (namely, the data packet starting SOP is detected), the first terminal indicates that the level signal which accords with the edge change characteristic of the start bit is detected, the edge change of the level signals at the D + pin and the D-pin is continuously detected, if the edge change accords with the edge change characteristic generated by the level signal corresponding to the first bit (for example, the first bit of the synchronous field SYNC) of the transmission information packet, the edge change which detects the level signal accords with the edge change generated when the transmission data is detected, namely, the first wired communication interface is in a data transmission state, and the first timing is started (the implementation process of the second timing is similar to the implementation of the first timing, and will not be described in detail herein).
Of course, the first wired communication interface and the second wired communication interface may also be contact IC card communication interfaces, and the following implementation process of the first terminal and the second terminal performing communication through the contact IC card communication interfaces is briefly described: the input/output I/O interface of the contact type IC card adopts a character mode to transmit data. Before data transmission, the I/O interface is in a high state. Each character consists of 10 consecutive bits: a start bit of 1 low state, 8 data bits constituting a data byte, and 1 parity bit. And after the character transmission is finished, the I/O interface enters the protection time, and the I/O interface is in a high level state in the protection time.
The contact type IC card communication interface based triggering timing is realized as follows: when the first terminal detects that the edge change of the level signal at the first wired communication interface (i.e., I/O interface) conforms to the edge change characteristic generated by switching from high level to low level, it indicates that the level signal conforming to the edge change characteristic of the start bit is detected, and when it continues to detect that the edge change of the subsequent level signal at the first wired communication interface (i.e., I/O interface) conforms to the edge change characteristic generated by the level signal corresponding to the first data bit among the 8 data bits, it indicates that the edge change of the level signal conforms to the edge change generated when data is transmitted, and the first wired communication interface (i.e., I/O interface) is in a data transmission state, then the first timing is started (the implementation process of the second timing is similar to the implementation of the first timing, and is not described herein again);
of course, the first wired communication interface and the second wired communication interface may also adopt the following third communication mode: two data pins for transmitting data are arranged in the first wired communication interface and the second wired communication interface. Data transmission is performed through the differential signal formed by the two data pins, a start bit is usually set when data transmission is started, the start bit of data is usually represented by parallel signals, for example, the two data pins are both high levels, or the two data pins are both low levels, the start bit is formed by specifically adopting the combination of the high levels, the low levels, the level values and the levels, and can be set differently according to different application scenes, and the description is omitted here. After data starts to be transmitted, the transmitted data is represented by differential signals, for example, one of the two data pins is at a high level, the other is at a low level, the transmitted data is different, the differential signals formed by the two data pins are also different, and the differential signals can be specifically set according to different application scenarios, which is not described herein again. When data transmission is finished, an end bit is set, and the end bit of data is usually represented by a parallel signal, for example, both the two data pins are at a high level, or both the two data pins are at a low level, and the end bit formed by specifically adopting a combination of a high level or a low level, the level value and the level value can be set differently according to different application scenarios, which is not described herein again. It is understood that the specific level value of the parallel signal used by the start bit of the data is different from the specific level value of the parallel signal used by the end bit of the data for distinguishing.
The implementation of triggering timing based on the third communication mode is as follows: taking the first wired communication interface provided with a first pin and a second pin for transmitting data as an example; the number of the level signals of the first terminal detecting the edge change in the level signal at the first pin and the level signal at the second pin is one, and when the number of the level signals of the subsequent level signal detecting the edge change in the level signal at the first pin and the level signal at the second pin is two, it indicates that the level signal conforming to the edge change characteristic of the start bit is detected first, and then data transmission is detected, and then the first timing is started (the implementation process of the second timing is similar to the implementation of the first timing, and is not described herein again).
Since the level signal indicating the start bit is a parallel signal in this communication mode, the level signal indicating data to be transmitted is a differential signal in the data transmission process, when the parallel signals are changed into differential signals, the edge of one of the level signals at the two data pins changes, the data to be transmitted in the data transmission process are different, the differential signals are also different, the change of the differential signals can cause the edges of the two level signals in the level signals at the two data pins to change, if the number of the level signals of which the edges are changed when the level signals of the first terminal detect at the two data pins is one, and the number of the level signals of which the edges are changed when the level signals of the two data pins detect subsequently is two, the data start bit is detected firstly, and then the data transmission is detected, so that the timing is started.
As an optional implementation manner of this embodiment, the above timing may be triggered at the end of data transmission, and the specific implementation of triggering timing is as follows:
in this embodiment, the first terminal is specifically configured to detect, in a level signal at the first wired communication interface, whether an edge change in the level signal meets an edge change generated when data is transmitted, and if yes, start first timing when an edge change in a subsequent level signal at the first wired communication interface is detected to meet an end bit edge change feature, where the end bit edge change feature includes: edge changes in a preset form or edge changes with specific regularity;
the first terminal is further specifically configured to, in a process of sending the level signal of the third data, detect whether an edge change in the level signal at the first wired communication interface meets an edge change generated when data is transmitted, and if so, start second timing when an edge change is continuously detected in a subsequent level signal at the first wired communication interface and meets an end bit edge change feature, where the end bit edge change feature includes: edge variations in a preset form or edge variations that vary with a certain regularity.
The implementation scheme based on the USB interface trigger timing is as follows (see the above related description for the implementation process of communication based on the USB interface, which is not described here again):
the first terminal detects edge changes of level signals at a D + pin and a D-pin in the first wired communication interface, if the edge changes meet edge change characteristics generated by a level signal corresponding to a last bit (for example, a check bit CRC) of a transmission packet, it indicates that the edge changes of the level signals meet the edge changes generated when data is transmitted, the edge changes of the level signals at the D + pin and the D-pin are continuously detected, and if the edge changes meet the edge change characteristics generated by the level signal corresponding to a state transition from an SE0 state to a J state (that is, an end of data packet (EOP) state) is detected, it indicates that the level signals meeting the edge change characteristics of an end bit are detected, and a first timing is started (the implementation process of a second timing is similar to the implementation of the first timing, and is not described herein again).
The implementation of triggering timing based on the contact IC card communication interface is as follows (the implementation of communication based on the contact IC card communication interface is described above and is not described here again):
when the first terminal detects that the edge change of the level signal of the first wired communication interface (i.e., I/O interface) conforms to the edge change characteristic generated by the level signal corresponding to the last data bit of the 8 data bits, it indicates that the edge change of the level signal conforms to the edge change generated when data is transmitted, and when the edge change of the subsequent level signal of the first wired communication interface (i.e., I/O interface) conforms to the edge change characteristic generated by the high level signal corresponding to the protection time, it indicates that the level signal conforming to the edge change characteristic of the end bit is detected, and then the first timing is started (the implementation process of the second timing is similar to the implementation of the first timing, and is not repeated here).
The implementation of triggering timing based on the third communication method is as follows (the implementation of communication based on the third communication method is described above and is not described here again):
taking the first wired communication interface provided with a first pin and a second pin for transmitting data as an example;
the number of the level signals of the first terminal detecting the edge change in the level signal at the first pin and the level signal at the second pin is two, and the number of the level signals detecting the edge change in the level signal at the first pin and the level signal at the second pin is one, which indicates that data transmission is detected first, and then the level signal conforming to the edge change at the end bit is detected, and then first timing is started (the implementation process of the second timing is similar to the implementation process of the first timing, and is not described herein again).
Since the level signal indicating the start bit is a parallel signal in this communication mode, the level signal indicating data to be transmitted is a differential signal in the data transmission process, when the parallel signals are changed into differential signals, the edge of one of the level signals at the two data pins changes, the data to be transmitted in the data transmission process are different, the differential signals are also different, the change of the differential signals can cause the edges of the two level signals in the level signals at the two data pins to change, if the number of the level signals of the first terminal, which are detected by the level signals at the two data pins and the edge of which is changed, is two, and the number of the level signals, which are detected by the level signals at the two data pins and the edge of which is changed, is one, the first terminal detects that data is transmitted, and then detects the data end bit, so that timing is started.
As an optional implementation manner of this embodiment, the above-mentioned timing may be triggered at the beginning of data transmission, and another implementation of triggering timing is as follows:
in this embodiment, the first terminal is specifically configured to, in a process of sending a level signal of the first data, start first timing when detecting that an edge change in the level signal at the first wired communication interface meets an edge change characteristic of an initial bit, continue to detect whether a subsequent level signal at the first wired communication interface carries data, continue to time if the subsequent level signal carries data, and end timing if the subsequent level signal does not carry data; wherein the start bit edge variation feature comprises: edge changes in a preset form or edge changes with specific regularity;
the first terminal is further specifically configured to, in a process of sending the level signal of the third data, start second timing when detecting that an edge change in the level signal at the first wired communication interface meets an edge change characteristic of a start bit, continue to detect whether a subsequent level signal at the first wired communication interface carries data, continue to time if the subsequent level signal carries data, and end the timing if the subsequent level signal does not carry data; wherein the start bit edge variation feature comprises: edge variations in a preset form or edge variations that vary with a certain regularity.
The implementation scheme based on the USB interface trigger timing is as follows (see the above related description for the implementation process of communication based on the USB interface, which is not described here again):
when the first terminal detects that the edge change of the level signals at the D + pin and the D-pin at the first wired communication interface conforms to the edge change characteristic of the level signals corresponding to the state from the idle state to the state K (namely, the data packet start SOP) is detected, the first terminal indicates that the level signals conforming to the edge change characteristic of the start bit are detected, then first timing is started, the level signals at the subsequent D + pin and the D-pin are continuously detected, and data decoding is carried out on the level signals, if the level signals can be decoded to obtain the level signals carrying data, the data transmission starts normally after the level signals conforming to the edge change characteristic of the start bit are detected, timing is continuously carried out, and if the decoding fails or the data cannot be obtained due to the abnormal situation, the data transmission possibly occurs, and then the timing is temporarily stopped.
The implementation process of the second timing is similar to that of the first timing, and is not described herein again.
The implementation of triggering timing based on the contact IC card communication interface is as follows (the implementation of communication based on the contact IC card communication interface is described above and is not described here again):
when the first terminal detects that the edge change of a level signal at a first wired communication interface (namely an I/O interface) accords with an edge change characteristic generated by switching from a high level to a low level, the first terminal indicates that the level signal which accords with the edge change characteristic of a start bit is detected, starts first timing, continues to detect a subsequent level signal at the first wired communication interface (namely the I/O interface), decodes the level signal, if the level signal can be decoded to obtain data carried by the level signal, indicates that normal data transmission is started after the level signal which accords with the edge change characteristic of the start bit is detected, continues timing, and if the decoding fails or the data cannot be obtained due to abnormality, indicates that the data transmission may be abnormal, suspends timing.
The implementation process of the second timing is similar to that of the first timing, and is not described herein again.
The implementation of triggering timing based on the third communication method is as follows (the implementation of communication based on the third communication method is described above and is not described here again):
taking the first wired communication interface provided with a first pin and a second pin for transmitting data as an example; if the number of the level signals of which the edge changes are detected in the level signals at the first pin and the level signals at the second pin of the first terminal is one, starting first timing, continuously detecting whether data are carried in subsequent level signals at the first wired communication interface, if the data are carried, indicating that normal data transmission is started after the level signals conforming to the edge change characteristics of the start bit are detected, continuing timing, and if the data are not carried, indicating that the data transmission is possibly abnormal, ending timing;
the implementation process of the second timing is similar to that of the first timing, and is not described herein again.
Because the level signal indicating the start bit is a parallel signal, the level signal indicating data to be transmitted is a differential signal in the data transmission process, when the parallel signal is changed into the differential signal, the edge of one level signal in the level signals at the two data pins changes, the data to be transmitted is different in the data transmission process, the differential signal is also different, the change of the differential signal can cause the edges of the two level signals in the level signals at the two data pins to change, if the number of the level signals of which the edges change is detected by the level signals at the two data pins by the first terminal is one, timing can be started, and the level signals are detected to carry data, which indicates that the data start bit is detected first, and then the data is detected to be transmitted, so that the timing is continued.
As an optional implementation manner of this embodiment, the above-mentioned timing may be triggered at the end of data transmission, and another implementation of triggering timing is as follows:
in this embodiment, the first terminal is specifically configured to, in a process of sending a level signal of the first data, start first timing when detecting that an edge change in the level signal at the first wired communication interface meets an edge change characteristic of an end bit, continue to detect whether a subsequent level signal at the first wired communication interface carries data, end timing if the subsequent level signal carries data, and continue to time if the subsequent level signal does not carry data; the end bit edge change characteristics comprise edge changes in a preset form or edge changes with specific regularity;
the first terminal is further specifically configured to, in a process of sending the level signal of the third data, start second timing when detecting that an edge change in the level signal at the first wired communication interface meets an edge change characteristic of an end bit, continue to detect whether a subsequent level signal at the first wired communication interface carries data, end timing if carrying data, and continue to perform timing if not carrying data; the end bit edge change characteristics comprise edge changes in a preset form or edge changes with specific regularity.
The implementation scheme based on the USB interface trigger timing is as follows (see the above related description for the implementation process of communication based on the USB interface, which is not described here again):
the first terminal detects edge changes of level signals at a D + pin and a D-pin in the first wired communication interface, when the edge changes are detected to be in accordance with the edge change characteristics of the level signals corresponding to the transition from an SE0 state to a J state (namely, the end of data packet (EOP) state is detected), the level signals in accordance with the edge change characteristics of an end bit are detected, first timing is started, the level signals at the subsequent D + pin and the D-pin are continuously detected, data decoding is carried out on the level signals, if the data cannot be obtained after decoding, data transmission is completed, timing is continuously carried out, otherwise, if the data can be obtained through decoding, the data transmission is not completely completed or the data transmission is abnormal, the timing is ended.
The implementation process of the second timing is similar to that of the first timing, and is not described herein again.
The implementation of triggering timing based on the contact IC card communication interface is as follows (the implementation of communication based on the contact IC card communication interface is described above and is not described here again):
when the first terminal detects that the edge change of the level signal of the first wired communication interface (i.e. the I/O interface) conforms to the edge change characteristic generated by the high level signal corresponding to the protection time, which indicates that the level signal conforming to the edge change characteristic of the end bit is detected, the first timing is started, the subsequent level signal at the first wired communication interface (i.e. the I/O interface) is continuously detected, the level signal is subjected to data decoding, if the data cannot be obtained after the decoding, the timing is continuously performed, otherwise, if the data can be obtained after the decoding, the timing is ended.
The implementation process of the second timing is similar to that of the first timing, and is not described herein again.
The implementation of triggering timing based on the third communication method is as follows (the implementation of communication based on the third communication method is described above and is not described here again):
taking the first wired communication interface provided with a first pin and a second pin for transmitting data as an example;
if the number of the level signals of the first terminal detecting the edge change in the level signal at the first pin and the level signal at the second pin is one, starting first timing, continuously detecting whether a subsequent level signal at the first wired communication interface carries data or not, if so, ending timing, and if not, continuously timing;
the implementation process of the second timing is similar to that of the first timing, and is not described herein again.
In this embodiment, as can be seen from the above description, the edge variation characteristic of the data start bit is an edge variation in a preset form, for example, a level signal conforming to the edge variation characteristic of the data start bit in the contact IC card communication interface is represented by a low level, a level signal conforming to the edge variation characteristic of the data end bit is represented by a high level (the protection time is a period of high level), or the edge variation characteristic of the data start bit edge is represented by a specific regularity, for example, a level signal conforming to the edge variation characteristic of the data start bit in the USB interface is represented by SOP (the level signal is shifted from an idle state to a K state), and a level signal conforming to the edge variation characteristic of the data end bit is represented by EOP (the level signal is shifted from an SE0 state to a J state). Of course, without limitation, different types of edge variation characteristics may be used to represent the data start bit characteristics according to different communication interfaces, for example, a combination of multiple high levels and low levels, or a single high level, or a single low level, etc., may also be used, and is not limited herein.
It should be noted that the system provided in this embodiment may implement the data interaction method provided in embodiment 1, the related function implementation of the first terminal may also refer to the description related to the first terminal side in embodiment 1, and the related function implementation of the second terminal may also refer to the description related to the second terminal side in embodiment 1, which is not described herein again.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made in the above embodiments by those of ordinary skill in the art without departing from the principle and spirit of the present invention. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (14)

1. A secure transmission method, wherein a first wired communication interface of a first terminal is connected to a second wired communication interface of a second terminal, the method comprising:
the first terminal generates a level signal of first data and transmits the level signal of the first data through the first wired communication interface;
the first terminal detects edge changes of the level signals at the first wired communication interface in the process of sending the level signals of the first data, and starts first timing when the edge changes of the level signals at the first wired communication interface meet timing triggering conditions;
the second terminal receives the level signal of the first data through the second wired communication interface, and processes the first data to obtain second data;
when the first timing reaches a first specified value, the first terminal generates a level signal of third data, and sends the level signal of the third data through the first wired communication interface, wherein the third data is notification indication information;
the first terminal detects edge changes of the level signals at the first wired communication interface in the process of sending the level signals of the third data, and starts second timing when the edge changes of the level signals at the first wired communication interface meet timing triggering conditions;
the second terminal receives a level signal of the third data through the second wired communication interface;
the second terminal generates a level signal of the second data and transmits the level signal of the second data through the second wired communication interface;
and when the second timing reaches a second specified value, the first terminal allows the first wired communication interface to receive the level signal of the second data, wherein the second specified value is the time required from the completion of the second terminal receiving the level signal of the third data to the sending of the level signal of the second data.
2. The method of claim 1,
the first terminal starts first timing when an edge change of a level signal at the first wired communication interface meets a timing trigger condition in a process of sending the level signal of the first data, and the first terminal includes:
when the first terminal detects that the edge change in the level signal at the first wired communication interface conforms to the edge change characteristic of a start bit in the process of sending the level signal of the first data, the first terminal continues to detect whether the edge change in the subsequent level signal at the first wired communication interface conforms to the edge change generated when the data is transmitted, if so, the first terminal starts first timing, and the edge change characteristic of the start bit is the edge change in a preset form or the edge change in a specific regularity;
in the process of sending the level signal of the third data, when the edge change of the level signal at the first wired communication interface meets a timing trigger condition, the first terminal starts a second timing, including:
and when the first terminal detects that the edge change in the level signal at the first wired communication interface conforms to the edge change characteristic of the start bit in the process of sending the level signal of the third data, the first terminal continues to detect whether the edge change in the subsequent level signal at the first wired communication interface conforms to the edge change generated when the data is transmitted, and if so, the second timing is started, wherein the edge change characteristic of the start bit is the edge change in a preset form or the edge change in a specific regularity.
3. The method of claim 1,
the first terminal starts first timing when an edge change of a level signal at the first wired communication interface meets a timing trigger condition in a process of sending the level signal of the first data, and the first terminal includes:
in the process of sending the level signal of the first data, the first terminal detects whether an edge change in the level signal at the first wired communication interface conforms to an edge change generated when data is transmitted, and if so, when the edge change detected in the subsequent level signal at the first wired communication interface continuously conforms to an end bit edge change characteristic, a first timing is started, wherein the end bit edge change characteristic comprises: edge changes in a preset form or edge changes with specific regularity;
in the process of sending the level signal of the third data, when the edge change of the level signal at the first wired communication interface meets a timing trigger condition, the first terminal starts a second timing, including:
in the process of sending the level signal of the third data, the first terminal detects whether the edge change in the level signal at the first wired communication interface conforms to the edge change generated when data is transmitted, and if so, when the edge change detected in the subsequent level signal at the first wired communication interface continuously conforms to an end bit edge change characteristic, a second timing is started, wherein the end bit edge change characteristic comprises: edge variations in a preset form or edge variations that vary with a certain regularity.
4. The method of claim 1,
the first terminal starts first timing when an edge change of a level signal at the first wired communication interface meets a timing trigger condition in a process of sending the level signal of the first data, and the first terminal includes:
when the first terminal detects that the edge change in the level signal at the first wired communication interface meets the edge change characteristic of the initial bit in the process of sending the level signal of the first data, starting first timing, continuously detecting whether the subsequent level signal at the first wired communication interface carries data or not, if the subsequent level signal carries data, continuously timing, and if the subsequent level signal does not carry data, ending timing; wherein the start bit edge variation feature comprises: edge changes in a preset form or edge changes with specific regularity;
in the process of sending the level signal of the third data, when the edge change of the level signal at the first wired communication interface meets a timing trigger condition, the first terminal starts a second timing, including:
when the first terminal detects that the edge change in the level signal at the first wired communication interface meets the edge change characteristic of the initial bit in the process of sending the level signal of the third data, starting second timing, continuously detecting whether the subsequent level signal at the first wired communication interface carries data or not, if the subsequent level signal carries data, continuously timing, and if the subsequent level signal does not carry data, ending timing; wherein the start bit edge variation feature comprises: edge variations in a preset form or edge variations that vary with a certain regularity.
5. The method of claim 1,
the first terminal starts first timing when an edge change of a level signal at the first wired communication interface meets a timing trigger condition in a process of sending the level signal of the first data, and the first terminal includes:
when the first terminal detects that edge change in the level signal at the first wired communication interface meets the edge change characteristic of an end bit in the process of sending the level signal of the first data, starting first timing, continuously detecting whether a subsequent level signal at the first wired communication interface carries data or not, if the subsequent level signal carries the data, ending the timing, and if the subsequent level signal does not carry the data, continuously timing; the end bit edge change characteristics comprise edge changes in a preset form or edge changes with specific regularity;
in the process of sending the level signal of the third data, when the edge change of the level signal at the first wired communication interface meets a timing trigger condition, the first terminal starts a second timing, including:
when the first terminal detects that the edge change in the level signal at the first wired communication interface meets the edge change characteristic of an end bit in the process of sending the level signal of the third data, starting second timing, continuously detecting whether the subsequent level signal at the first wired communication interface carries data or not, if the subsequent level signal carries data, ending the timing, and if the subsequent level signal does not carry data, continuously timing; the end bit edge change characteristics comprise edge changes in a preset form or edge changes with specific regularity.
6. The method according to any one of claims 1 to 5,
the first specified value is greater than or equal to the time required by the second terminal for processing the first data to obtain second data;
the first prescribed value is pre-stored in the first terminal, or obtained by negotiation between the first terminal and the second terminal before the first terminal sends first data to the second terminal;
the second predetermined value is pre-stored in the first terminal, or obtained by the first terminal and the second terminal negotiating before the first terminal sends the first data to the second terminal.
7. The method according to any one of claims 1 to 5,
the first specified value is a first preset time length, and when the first timing reaches the first specified value, the method includes: when the time length obtained by the first timing reaches a first preset time length; the second specified value is a second preset duration, and when the second timing reaches the second specified value, the method includes: when the duration obtained by the second timing reaches a second preset duration;
or, the first predetermined value is a first preset count value, and the starting the first timer includes: starting a first count; when the first timing reaches a first prescribed value, the method includes: when the value obtained by the first counting reaches a first preset counting value; the second predetermined value is a second preset count value, and the starting of the second timing includes: starting a second count; when the second timing reaches a second prescribed value, the method includes: and when the value obtained by the second counting reaches a second preset counting value.
8. A secure transmission system in which a first wired communication interface of a first terminal is connected to a second wired communication interface of a second terminal, the system comprising:
the first terminal is specifically configured to generate a level signal of first data, and send the level signal of the first data through the first wired communication interface; detecting edge change of a level signal at the first wired communication interface in the process of sending the level signal of the first data, and starting first timing when the edge change of the level signal at the first wired communication interface meets a timing trigger condition;
the second terminal is specifically configured to receive a level signal of the first data through the second wired communication interface, and process the first data to obtain second data;
the first terminal is further configured to generate a level signal of third data when the first timing reaches a first prescribed value, and send the level signal of the third data through the first wired communication interface, where the third data is notification indication information; detecting edge change of the level signal at the first wired communication interface in the process of sending the level signal of the third data, and starting second timing when the edge change of the level signal at the first wired communication interface meets a timing trigger condition;
the second terminal is further configured to receive a level signal of the third data through the second wired communication interface; generating a level signal of the second data and transmitting the level signal of the second data through the second wired communication interface;
the first terminal is further configured to allow the first wired communication interface to receive the level signal of the second data when the second timing reaches a second predetermined value, where the second predetermined value is a time required for the second terminal to transmit the level signal of the second data after receiving the level signal of the third data.
9. The system of claim 8,
the first terminal is specifically configured to, when it is detected that an edge change in a level signal at the first wired communication interface meets an edge change characteristic of a start bit in a process of sending the level signal of the first data, continue to detect whether the edge change in a subsequent level signal at the first wired communication interface meets the edge change generated when the data is transmitted, and if so, start first timing, where the edge change characteristic of the start bit is an edge change in a preset form or an edge change that changes in a specific regularity;
the first terminal is further specifically configured to, in a process of sending the level signal of the third data, when it is detected that an edge change in the level signal at the first wired communication interface conforms to an edge change feature of a start bit, continue to detect whether the edge change in a subsequent level signal at the first wired communication interface conforms to the edge change generated when the data is transmitted, and if so, start second timing, where the edge change feature of the start bit is an edge change in a preset form or an edge change that changes in a specific regularity.
10. The system of claim 8,
the first terminal is specifically configured to detect, in a level signal at the first wired communication interface, whether an edge change in the level signal meets an edge change generated when data is transmitted, and if yes, start first timing when an edge change in a subsequent level signal at the first wired communication interface is continuously detected to meet an end bit edge change feature, where the end bit edge change feature includes: edge changes in a preset form or edge changes with specific regularity;
the first terminal is further specifically configured to detect, in a level signal at the first wired communication interface, whether an edge change in the level signal corresponds to an edge change generated when data is transmitted, and if so, start second timing when an edge change detected in a subsequent level signal at the first wired communication interface continues to correspond to an end bit edge change feature, where the end bit edge change feature includes: edge variations in a preset form or edge variations that vary with a certain regularity.
11. The system of claim 8,
the first terminal is specifically configured to, in a process of sending a level signal of the first data, start first timing when detecting that an edge change in a level signal at the first wired communication interface conforms to an edge change characteristic of a start bit, continue to detect whether a subsequent level signal at the first wired communication interface carries data, continue to time if the subsequent level signal carries data, and end the timing if the subsequent level signal does not carry data; wherein the start bit edge variation feature comprises: edge changes in a preset form or edge changes with specific regularity;
the first terminal is further specifically configured to, in a process of sending the level signal of the third data, start second timing when detecting that an edge change in the level signal at the first wired communication interface conforms to an edge change characteristic of a start bit, continue to detect whether a subsequent level signal at the first wired communication interface carries data, continue to time if the subsequent level signal carries data, and end the timing if the subsequent level signal does not carry data; wherein the start bit edge variation feature comprises: edge variations in a preset form or edge variations that vary with a certain regularity.
12. The system of claim 8,
the first terminal is specifically configured to, in a process of sending a level signal of the first data, start first timing when detecting that an edge change in a level signal at the first wired communication interface meets an edge change characteristic of an end bit, continue to detect whether a subsequent level signal at the first wired communication interface carries data, end timing if the subsequent level signal carries data, and continue to perform timing if the subsequent level signal does not carry data; the end bit edge change characteristics comprise edge changes in a preset form or edge changes with specific regularity;
the first terminal is further specifically configured to, in a process of sending the level signal of the third data, start second timing when detecting that an edge change in the level signal at the first wired communication interface meets an edge change characteristic of an end bit, continue to detect whether a subsequent level signal at the first wired communication interface carries data, end timing if carrying data, and continue to perform timing if not carrying data; the end bit edge change characteristics comprise edge changes in a preset form or edge changes with specific regularity.
13. The system according to any one of claims 8-12,
the first specified value is greater than or equal to the time required by the second terminal for processing the first data to obtain second data;
the first prescribed value is pre-stored in the first terminal, or obtained by negotiation between the first terminal and the second terminal before the first terminal sends first data to the second terminal;
the second predetermined value is pre-stored in the first terminal, or obtained by the first terminal and the second terminal negotiating before the first terminal sends the first data to the second terminal.
14. The system according to any one of claims 8-12,
the first specified value is a first preset time length, and the first terminal is specifically configured to generate a level signal of third data when the time length obtained by the first timing reaches the first preset time length; the second specified value is a second preset duration, and the first terminal is specifically configured to allow the first wired communication interface to receive the level signal of the second data when the duration obtained by the second timing reaches the second preset duration;
or, the first prescribed value is a first preset counting value, and the first terminal is specifically configured to start a first counting; the first terminal is specifically configured to generate a level signal of third data when a value obtained by the first counting reaches a first preset counting value; the second specified value is a second preset counting value, and the first terminal is specifically used for starting second counting; the first terminal is specifically configured to allow the first wired communication interface to receive the level signal of the second data when the value obtained by the second counting reaches a second preset counting value.
CN201710137181.6A 2017-03-09 2017-03-09 Safe transmission method and system Active CN108574663B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710137181.6A CN108574663B (en) 2017-03-09 2017-03-09 Safe transmission method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710137181.6A CN108574663B (en) 2017-03-09 2017-03-09 Safe transmission method and system

Publications (2)

Publication Number Publication Date
CN108574663A CN108574663A (en) 2018-09-25
CN108574663B true CN108574663B (en) 2021-08-13

Family

ID=63577713

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710137181.6A Active CN108574663B (en) 2017-03-09 2017-03-09 Safe transmission method and system

Country Status (1)

Country Link
CN (1) CN108574663B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420736A (en) * 2010-09-27 2012-04-18 罗伯特·博世有限公司 Serial ring communication arrangement and corresponding method
CN105634737A (en) * 2014-10-31 2016-06-01 腾讯科技(深圳)有限公司 Data transmission method, terminals and system thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007020930A1 (en) * 2005-08-15 2007-02-22 Sony Corporation Imaging device, noise reduction device, noise reduction method, and program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420736A (en) * 2010-09-27 2012-04-18 罗伯特·博世有限公司 Serial ring communication arrangement and corresponding method
CN105634737A (en) * 2014-10-31 2016-06-01 腾讯科技(深圳)有限公司 Data transmission method, terminals and system thereof

Also Published As

Publication number Publication date
CN108574663A (en) 2018-09-25

Similar Documents

Publication Publication Date Title
US8923513B2 (en) Secure wiegand communications
US7596699B2 (en) Battery authentication system
US20100197271A1 (en) Wireless device monitoring system including unauthorized apparatus and authentication apparatus with security authentication function
KR20110096810A (en) Receiving system for use in near field communication and mode detection method therefore
US20150228284A1 (en) Working method of sound transmission-based dynamic token
WO2015139551A1 (en) Method for implementing data transmission by means of audio interface
CN101645124B (en) Method for unlocking PIN code and intelligent secret key device
CN108573157B (en) Data interaction method and system
CN108573158B (en) Data communication method and system
EP3157185A1 (en) Electronic device and data verification method
CN108574663B (en) Safe transmission method and system
CN108574665B (en) Safe transmission method and system
JP2007519280A5 (en)
CN111654451B (en) Message anti-replay method and electronic equipment
CN108574662B (en) Data communication method and system
CN109992437B (en) Processing method, device and equipment for hard disk flash break and storage medium
CN112688774A (en) Secure communication method and system for protecting key negotiation by using timing communication
TWI581104B (en) Host devices and methods for transmitting data
CN112713991A (en) Secure communication method and system for protecting key negotiation by using timing communication
CN101639883B (en) Method for checking PIN code and intelligent key equipment
CN107688760B (en) Data communication method and data communication system
JP6873375B2 (en) Communication equipment, communication system and communication method
CN115361095B (en) Data transmission method, intelligent key, device, control system and medium
CN103631740A (en) Method and circuit for achieving self-adaptation byte alignment transmission of SD card under SPI mode
CN111903096B (en) Communication system, receiving apparatus, transmission interval changing method, and computer program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220408

Address after: Tiantianrong building, No. 1, Zhongguancun, Beiqing Road, Haidian District, Beijing 100094

Patentee after: TENDYRON Corp.

Address before: 100086 room 603, building 12, taiyueyuan, Haidian District, Beijing

Patentee before: Li Ming

TR01 Transfer of patent right