Verification method and device of communication equipment and storage medium
By using the slave time parameters and power consumption parameters of the communication equipment for double verification, the problem of single and easy-to-solve legality verification method in the prior art is solved, and safety and accuracy are improved.
Patent Information
- Application Number
- CN202411921870.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-11
AI Technical Summary
The legality verification method of existing communication equipment is relatively single and is easily reverse cracked, resulting in lower security.
Double verification of the slave's time parameters and power consumption parameters is performed to judge the legitimacy of the slave and avoid the single verification method being cracked.
Improve the security and accuracy of legality verification to prevent illegal slaves from passing the legal verification of the host.
Smart Images

Figure CN119814422A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of communication equipment, and in particular to a verification method, device and storage medium for communication equipment. Background Art
[0002] Current communication devices include a host and a slave. The encrypted data between the master and the slave can be communicated through an IIC (Inter-Integrated Circuit) or SPI (Serial Peripheral Interface) bus. However, since the bus is easily monitored by a third party, an illegal user can extract the encrypted data during the communication process and decrypt the encrypted data to obtain the plaintext data, which has low security. It is easy to crack the encryption rules between the master and the slave and tamper with the legitimacy of the master and the slave.
[0003] In addition, the host pre-stores verification information for verifying the slave. After the slave receives the detection signal from the host, it responds to the detection signal and generates verified information in combination with the algorithm. The slave sends the verified information to the host. The host compares the verification information with the verified information to determine the legitimacy of the slave. If it is legitimate, the slave can communicate with the host through the bus. However, the above-mentioned legal verification method is relatively simple. If a third party uses unconventional means such as FIB (Focused Ionbeam) technology, reverse technology, etc., it is easy to reverse crack the verification rules of the verification information in the host, write the cracked verification information into the illegal slave, and make the illegal slave pass the host's legal verification. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art.
[0005] To this end, an object of the present invention is to propose a verification method for a communication device, which performs a double check on the legitimacy of a slave through the time parameters and power consumption parameters of the slave, thereby preventing a single legitimacy verification method from being easily reverse cracked, and improving the security and accuracy of the legitimacy verification.
[0006] Therefore, a second object of the present invention is to provide a verification device for a communication device.
[0007] To this end, a third object of the present invention is to provide a computer-readable storage medium.
[0008] In order to achieve the above-mentioned purpose, an embodiment of the first aspect of the present invention proposes a verification method for a communication device, wherein the communication device includes a host and a slave, and the host and the slave are connected via a bus communication. The verification method of the communication device includes: obtaining a time parameter and a power consumption parameter of the slave; and determining the legitimacy of the slave according to the time parameter and / or the power consumption parameter.
[0009] According to the verification method of the communication device of the embodiment of the present invention, by obtaining the time parameters of the slave, determining the communication time of the algorithm enabled when the host and the slave communicate according to the time parameters, judging the size relationship between the communication time and the preset time, thereby judging whether the slave is legal, and / or obtaining the power consumption parameters of the slave, randomly detecting the current operating state of the slave according to the power consumption parameters, judging whether the current operating state of the slave satisfies the preset state, thereby judging whether the slave is legal, and performing a double check on the legitimacy of the slave through the time parameters and power consumption parameters of the slave, thereby preventing a single legal verification method from being easily reverse cracked, and improving the security and accuracy of the legality verification.
[0010] In some embodiments, obtaining the time parameters of the slave machine includes: enabling a first algorithm when the host sends a communication instruction to the slave machine, obtaining first time parameters of the first algorithm, including running time, waiting time and return time, and / or obtaining second time parameters when the slave machine is powered on, including power-on time.
[0011] In some embodiments, the legitimacy of the slave machine is determined according to the time parameter and / or the power consumption parameter, including: calculating the time and value of the running time and the waiting time; if the time and value are equal to the return time, determining that the slave machine is legal; if the time and value are not equal to the return time, determining that the slave machine is illegal.
[0012] In some embodiments, obtaining the power consumption parameters of the slave machine includes: obtaining the preset power consumption of the slave machine; and determining the operating power consumption according to the power-on time.
[0013] In some embodiments, the legitimacy of the slave machine is determined based on the time parameter and / or the power consumption parameter, including: if the operating power consumption is less than or equal to the preset power consumption, determining that the slave machine is legal; if the operating power consumption is greater than the preset power consumption, determining that the slave machine is illegal.
[0014] In some embodiments, after determining that the slave is illegal, the method includes: obtaining allocation parameters of the slave; determining power supply parameters of the bus according to the type of the host; and determining the legitimacy of the slave according to the allocation parameters and the power supply parameters.
[0015] In some embodiments, the legitimacy of the slave is determined based on the allocation parameters and the power supply parameters, including: if the allocation parameters and the power supply parameters meet the allocation conditions, determining that the slave is legal; if the allocation parameters and the power supply parameters do not meet the allocation conditions, determining that the slave is illegal.
[0016] In some embodiments, after determining that the slave is illegal, the method further includes: the host sending a second algorithm to the slave to erase the private key, the time parameter and the power consumption parameter in the slave.
[0017] In some embodiments, after determining that the slave is legal, the method includes: acquiring a power consumption sequence of the slave, and adjusting the power consumption of the slave according to the power consumption sequence.
[0018] In some embodiments, obtaining the power consumption sequence of the slave machine includes: determining the time stage and the stage power consumption of the slave machine; determining an encryption code according to the time stage and the stage power consumption; and converting the encryption code into a power consumption sequence.
[0019] In some embodiments, adjusting the power consumption of the slave machine according to the power consumption sequence includes: encrypting the power consumption sequence to determine the power consumption ciphertext; decrypting the power consumption ciphertext according to a private key in the slave machine to determine the power consumption plaintext; and adjusting the power consumption of the slave machine according to the power consumption plaintext.
[0020] In order to achieve the above-mentioned purpose, an embodiment of the second aspect of the present invention proposes a verification device for a communication device, and the verification device for the communication device includes: an acquisition module, used to obtain the time parameters and power consumption parameters of the slave machine; a determination module, used to determine the legitimacy of the slave machine based on the time parameters and / or the power consumption parameters.
[0021] According to the verification device of the communication device of the embodiment of the present invention, by obtaining the time parameters of the slave, determining the communication time of enabling the algorithm when the host and the slave communicate according to the time parameters, judging the size relationship between the communication time and the preset time, thereby judging whether the slave is legal, and / or obtaining the power consumption parameters of the slave, randomly detecting the current operating state of the slave according to the power consumption parameters, judging whether the current operating state of the slave satisfies the preset state, thereby judging whether the slave is legal, and performing a double check on the legitimacy of the slave through the time parameters and power consumption parameters of the slave, thereby preventing a single legal verification method from being easily reverse cracked, and improving the security and accuracy of the legality verification.
[0022] In order to achieve the above-mentioned purpose, an embodiment of the third aspect of the present invention proposes a computer-readable storage medium, on which a verification program of a communication device is stored. When the verification program of the communication device is executed by a processor, the verification method of the communication device described in the above-mentioned embodiment is implemented.
[0023] According to the computer-readable storage medium of the embodiment of the present invention, by obtaining the time parameters of the slave, determining the communication time of the algorithm enabled when the host and the slave communicate according to the time parameters, judging the size relationship between the communication time and the preset time, thereby judging whether the slave is legal, and / or obtaining the power consumption parameters of the slave, randomly detecting the current operating state of the slave according to the power consumption parameters, judging whether the current operating state of the slave satisfies the preset state, thereby judging whether the slave is legal, and performing a double check on the legitimacy of the slave through the time parameters and the power consumption parameters of the slave, thereby preventing a single legal verification method from being easily reverse cracked, and improving the security and accuracy of the legality verification.
[0024] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which: Figure 1 is a flow chart of a method for verifying a communication device according to an embodiment of the present invention; Figure 2 is a flow chart of a verification method for a communication device according to a specific embodiment of the present invention; Figure 3 is a structural block diagram of a verification device for a communication device according to an embodiment of the present invention.
[0026] Reference numerals: Verification device 2 of the communication device; Acquisition module 21; Determination module 22. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] In the description of the present invention, it should be understood that the terms "center", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0029] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "plurality" means two or more.
[0030] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0031] Combine the following Figure 1-Figure 2 An example of a verification method for a communication device according to an embodiment of the present invention is given. The communication device includes a host and a slave. The host and the slave are connected via a bus.
[0032] like Figure 1 As shown, the verification method of the communication device of the embodiment of the present invention at least includes step S1 and step S2.
[0033] Step S1, obtaining the time parameters and power consumption parameters of the slave.
[0034] In an embodiment, the time parameter is a communication time parameter corresponding to an algorithm such as a custom hardware algorithm Fun added for a certain communication instruction between the master and the slave. It should be noted that the custom hardware algorithm Fun can customize the limit time according to the needs of the host. Because the host uses a hardware circuit, the corresponding time parameter is a fixed value and controllable, as well as the power-on time parameter corresponding to the slave after the host is powered on; the power consumption parameter is the operating parameter at different times after the slave is powered on. By obtaining the above parameters, the current stage of the slave and the operating status of this stage can be determined.
[0035] Step S2, determining the legitimacy of the slave according to the time parameter and / or the power consumption parameter.
[0036] In an embodiment, after obtaining the time parameters, the communication time for enabling the algorithm when the host and the slave communicate is determined according to the time parameters, the relationship between the communication time and the preset time is judged, and it is determined whether the algorithm is received at the preset time, thereby determining the legitimacy of the slave, and / or after obtaining the power consumption parameters, the power consumption parameters are randomly detected at different times, the relationship between the power consumption parameters and the preset power consumption is judged, and it is determined whether the current operating state of the slave meets the preset state, thereby determining the legitimacy of the slave.
[0037] According to the verification method of the communication device of the embodiment of the present invention, by obtaining the time parameters of the slave, determining the communication time of the algorithm enabled when the host and the slave communicate according to the time parameters, judging the size relationship between the communication time and the preset time, thereby judging whether the slave is legal, and / or obtaining the power consumption parameters of the slave, randomly detecting the current operating state of the slave according to the power consumption parameters, judging whether the current operating state of the slave satisfies the preset state, thereby judging whether the slave is legal, and performing a double check on the legitimacy of the slave through the time parameters and power consumption parameters of the slave, thereby preventing a single legal verification method from being easily reverse cracked, and improving the security and accuracy of the legality verification.
[0038] In some embodiments, obtaining the time parameters of the slave machine includes: enabling a first algorithm when the host sends a communication instruction to the slave machine, obtaining first time parameters of the first algorithm, including running time, waiting time and return time, and / or obtaining second time parameters when the slave machine is powered on, including power-on time.
[0039] In an embodiment, after the host sends a communication instruction to the slave, the slave enables the first algorithm, obtains the running time of the slave enabling the first algorithm, for example, recorded as tt, the waiting time, for example, recorded as ww, and the return time, for example, recorded as WW. By obtaining the above-mentioned first algorithm parameters, compatible consumable chips can be identified according to the first algorithm parameters to avoid the compatible consumable chips from copying the first algorithm parameters.
[0040] It is understandable that the first algorithm can be designed to be bound to the version and model, and the binding relationship can be converted into an asymmetric encryption sequence. Even if the cracker can crack a model, since each model is different, the security and cracking difficulty are greatly improved.
[0041] And / or after the host is powered on, obtain the second time parameter when the slave is powered on, including the power-on time, wherein the power-on time can be set to different values according to different versions and models of machines to increase the difficulty of implementing compatible chips; and the host manufacturer can, as needed, not only when the host is powered on, but also in any communication instruction, that is, the power-on time can be any value.
[0042] In some embodiments, the legitimacy of the slave is determined based on time parameters and / or power consumption parameters, including: calculating the time and value of the running time and the waiting time; if the time and value are equal to the return time, determining that the slave is legal; if the time and value are not equal to the return time, determining that the slave is illegal.
[0043] In an embodiment, after obtaining the first time parameters of the first algorithm including the running time tt, the waiting time ww and the return time WW, the time and value of the running time tt and the waiting time ww are calculated, that is, tt+ww. If the time and value are equal to the return time WW, that is, tt+ww=WW, it is considered that in normal communication instructions, the host sends the first algorithm instruction and can receive the algorithm result at the WW time, and the slave is determined to be legal and is an original consumable chip; if the time and value are not equal to the return time WW, that is, tt+ww≠WW, it is considered that in normal communication instructions, the host sends the first algorithm instruction and cannot receive the algorithm result at the WW time. It may be that the running of the first algorithm is too long or too short, and the slave is determined to be illegal and is a compatible consumable chip. The above method can identify compatible consumable chips and prevent compatible consumable chips from copying the first algorithm parameters.
[0044] In some embodiments, obtaining the power consumption parameters of the slave machine includes: obtaining the preset power consumption of the slave machine; and determining the operating power consumption according to the power-on time.
[0045] In an embodiment, after the host is powered on, the preset power consumption of the slave is obtained, and the operating power consumption corresponding to the power-on time is determined, wherein the preset power consumption can be set to different values according to different versions and models of machines to increase the difficulty of implementing compatible chips.
[0046] Host manufacturers can, as needed, not only detect the running power consumption randomly when the host is powered on, but also in any communication instruction, that is, the power-on time can be any value, and the preset power consumption can be set to different values. In order to increase the difficulty, the preset power consumption can be set lower at power-on, and then suddenly increased in the later links.
[0047] In some embodiments, the legitimacy of the slave is determined based on time parameters and / or power consumption parameters, including: if the operating power consumption is less than or equal to the preset power consumption, determining that the slave is legal; if the operating power consumption is greater than the preset power consumption, determining that the slave is illegal.
[0048] In an embodiment, after determining the operating power consumption, the relationship between the operating power consumption and the preset power consumption is judged. If the operating power consumption is less than or equal to the preset power consumption, it is considered that the current operating state of the slave meets the preset state, and the slave is determined to be legal; if the operating power consumption is greater than the preset power consumption, it is considered that the current operating state of the slave does not meet the preset state, and the slave is determined to be illegal.
[0049] In some embodiments, after determining that the slave is illegal, the steps include: obtaining allocation parameters of the slave; determining power supply parameters of the bus according to the type of the host; and determining the legitimacy of the slave according to the allocation parameters and the power supply parameters.
[0050] In an embodiment, after determining that a slave is illegal, the allocation relationship between the master and the slaves is determined, that is, the power supply parameters provided to the bus by a certain type of host and the allocation parameters allocated to a certain slave connected to the bus. Based on the size relationship between the above parameters, it is determined whether the power supply capacity of the host is normally distributed to multiple slaves and whether the slaves consume electrical energy normally, thereby determining whether the slave is legal, wherein the allocation parameters and power supply parameters include but are not limited to current, voltage, resistance and other parameters.
[0051] For example, the host type is Model. The power supply parameter of the power supply bus between the Model host and the slave is recorded as P (mA). When the slave is powered on, the slave collects the distribution parameter on the power supply bus through the analog to digital converter (ADC), for example, recorded as P1 (mA). By obtaining the above parameters, the power consumption of the slave can be detected, thereby determining the legitimacy of the slave again.
[0052] In some embodiments, determining the legitimacy of the slave based on the allocation parameters and the power supply parameters includes: if the allocation parameters and the power supply parameters meet the allocation conditions, determining that the slave is legal; if the allocation parameters and the power supply parameters do not meet the allocation conditions, determining that the slave is illegal.
[0053] In the embodiment, after obtaining the allocation parameter P1 and the power supply parameter P, it is determined whether the allocation parameter P1 and the power supply parameter P meet the allocation conditions. For example, one host corresponds to four slaves, and the four slaves are connected in parallel to the power supply bus between the host and the slaves. If P1=P / 4, it is considered that the power consumption of the slave is normal, and the slave receives a normal result, then the slave is determined to be legal; if P1≠P / 4, it is considered that the power consumption of the slave is abnormal, and the slave receives an abnormal result, then the slave is determined to be illegal. It may be that the cracker uses a cracking device such as a code generator to simulate communication with the slave, and easily cracks and reads the data in the slave through a reverse circuit. When the above-mentioned power consumption abnormality occurs, the host sends the second algorithm fun6 to the slave to erase its internal private key, time parameters and power consumption parameters to prevent the slave from being used further. It should be noted that the second algorithm fun6 does not exist in the normal computer communication instructions. Generally speaking, the cracker has no way of knowing the algorithm, and cannot legally return the normal algorithm result. Even if the cracker performs subsequent probe cracking, it cannot obtain complete data, thereby achieving protection of its own data.
[0054] It is understandable that the second algorithm can be designed to be bound to the version and model, and the binding relationship can be converted into an asymmetric encryption sequence. Even if the cracker can crack a model, since each model is different, the security and cracking difficulty are greatly improved.
[0055] In some embodiments, after determining that the slave is legitimate, the method includes: obtaining a power consumption sequence of the slave, and adjusting the power consumption of the slave according to the power consumption sequence.
[0056] In an embodiment, after determining that the slave is legitimate, the power consumption sequence corresponding to different time stages of the slave is obtained, and the length of the sequence can be customized to control the slave's own power consumption in subsequent communications at different time stages according to the power consumption sequence.
[0057] In some embodiments, obtaining the power consumption sequence of the slave includes: determining the time stage and stage power consumption of the slave; determining the encryption code according to the time stage and stage power consumption; and converting the encryption code into the power consumption sequence.
[0058] In an embodiment, after determining that the master and slave machines are legal, multiple groups of time stages T and stage power consumption A of the slave machines are obtained. For example, the stage power consumption of the T1 time stage of the Model host is A1, the stage power consumption of the T2 time stage is A2, and the stage power consumption of the T3 time stage is A3. Then the corresponding encryption code can be Model1-(T1, A1)-(T2, A2)-(T3, A3), and then the above ASCII code is converted into the corresponding hexadecimal power consumption sequence.
[0059] Host manufacturers can set different time stages and stage power consumption according to different versions and models of machines, with the aim of increasing the difficulty of implementing compatible consumable chips. They can also set different values for the power consumption A detection, which can be set at a lower level at power-on and then suddenly increased in later stages, not only at power-on, but also in any communication instructions as needed. That is, the time stage T can be any value.
[0060] In some embodiments, adjusting the power consumption of the slave according to the power consumption sequence includes: encrypting the power consumption sequence to determine the power consumption ciphertext; decrypting the power consumption ciphertext according to the private key in the slave to determine the power consumption plaintext; and adjusting the power consumption of the slave according to the power consumption plaintext.
[0061] In an embodiment, after determining the power consumption sequence, the power consumption sequence is encrypted by a non-corresponding encryption algorithm to generate a power consumption ciphertext. After the host and the slave start communicating, the host uses the public key of the corresponding slave to encrypt the power consumption ciphertext and sends it to the corresponding slave. After receiving it, the slave uses its own stored private key to decrypt it to obtain the power consumption plaintext. In subsequent communications, the slave controls its own power consumption according to different opportunities.
[0062] Reference below Figure 2 The verification method of the communication device according to the embodiment of the present invention is described by way of example.
[0063] like Figure 2 As shown, the verification method of the communication device of the embodiment of the present invention at least includes steps S11 to S24.
[0064] Step S11, the host enables the first algorithm when sending a communication instruction to the slave, obtains the first time parameters of the first algorithm, including running time, waiting time and return time, and / or obtains the second time parameters when the slave is powered on, including power-on time.
[0065] Step S12, calculating the time and value of the running time and the waiting time.
[0066] Determine whether the running power consumption is less than the preset power consumption, if so, execute step S16; otherwise, execute step S17.
[0067] Step S13, determine whether the time and value are equal to the return time, if so, execute step S15; otherwise, execute step S14.
[0068] Step S14, determining that the slave is illegal.
[0069] Step S15, determine whether the slave machine is legal.
[0070] Step S16, obtaining the preset power consumption of the slave; and determining the operating power consumption according to the power-on time.
[0071] Step S17, determining whether the operating power consumption is less than or equal to the preset power consumption, if so, executing step S15; otherwise, executing step S14.
[0072] Step S18, obtaining the allocation parameters of the slave; determining the power supply parameters of the bus according to the type of the host.
[0073] Step S19, determine whether the allocation parameters and power supply parameters meet the allocation conditions, if so, execute step S20; otherwise, execute step S21.
[0074] Step S20, determining that the slave machine is legitimate.
[0075] Step S21, determining that the slave is illegal.
[0076] Step S22: the host sends a second algorithm to the slave to erase the private key, time parameter and power consumption parameter in the slave.
[0077] Step S23, determining the time stage and the stage power consumption of the slave; determining the encryption code according to the time stage and the stage power consumption; and converting the encryption code into a power consumption sequence.
[0078] Step S24, encrypting the power consumption sequence to determine the power consumption ciphertext; decrypting the power consumption ciphertext according to the private key in the slave to determine the power consumption plaintext; and adjusting the power consumption of the slave according to the power consumption plaintext.
[0079] According to the verification method of the communication device of the embodiment of the present invention, by obtaining the time parameters of the slave, determining the communication time of the algorithm enabled when the host and the slave communicate according to the time parameters, judging the size relationship between the communication time and the preset time, thereby judging whether the slave is legal, and / or obtaining the power consumption parameters of the slave, randomly detecting the current operating state of the slave according to the power consumption parameters, judging whether the current operating state of the slave satisfies the preset state, thereby judging whether the slave is legal, and performing a double check on the legitimacy of the slave through the time parameters and power consumption parameters of the slave, thereby preventing a single legal verification method from being easily reverse cracked, and improving the security and accuracy of the legality verification.
[0080] Combine the following Figure 3 The verification device 2 of the communication device according to the embodiment of the present invention is described.
[0081] The communication device verification device 2 of the embodiment of the present invention comprises: an acquisition module 21 and a determination module 22, wherein: The acquisition module 21 is used to acquire the time parameters and power consumption parameters of the slave; the determination module 22 is used to determine the legitimacy of the slave according to the time parameters and / or power consumption parameters.
[0082] In an embodiment, the time parameter obtained by the acquisition module 21 is a communication time parameter corresponding to an algorithm such as a custom hardware algorithm Fun added for a certain communication instruction between the master and the slave. It should be noted that the custom hardware algorithm Fun can customize the limit time according to the needs of the host. Because the host uses a hardware circuit, the corresponding time parameter is a fixed value and controllable, as well as the corresponding power-on time parameter of the slave after the host is powered on; the power consumption parameter is the operating parameter at different times after the slave is powered on. By obtaining the above parameters, the current stage of the slave and the operating status of this stage can be determined.
[0083] After the determination module 22 obtains the time parameter, it determines the communication time for enabling the algorithm when the host and the slave communicate according to the time parameter, judges the relationship between the communication time and the preset time, determines whether the algorithm is received at the preset time, thereby determining the legitimacy of the slave, and / or after obtaining the power consumption parameter, randomly detects the power consumption parameter at different times, judges the relationship between the power consumption parameter and the preset power consumption, determines whether the current operating state of the slave meets the preset state, thereby determining the legitimacy of the slave.
[0084] According to the verification device 2 of the communication device of the embodiment of the present invention, by obtaining the time parameters of the slave, determining the communication time of enabling the algorithm when the host and the slave communicate according to the time parameters, judging the size relationship between the communication time and the preset time, thereby judging whether the slave is legal, and / or obtaining the power consumption parameters of the slave, randomly detecting the current operating state of the slave according to the power consumption parameters, judging whether the current operating state of the slave satisfies the preset state, thereby judging whether the slave is legal, and performing a double check on the legitimacy of the slave through the time parameters and power consumption parameters of the slave, thereby preventing a single legal verification method from being easily reverse cracked, thereby improving the security and accuracy of the legality verification.
[0085] In some embodiments, when the acquisition module 21 acquires the time parameters of the slave machine, it is specifically used to: enable the first algorithm when the host sends a communication instruction to the slave machine, acquire the first time parameters of the first algorithm, including the running time, the waiting time and the return time, and / or acquire the second time parameters when the slave machine is powered on, including the power-on time.
[0086] In an embodiment, after the host sends a communication instruction to the slave, the acquisition module 21 enables the first algorithm on the slave, obtains the running time of the slave enabling the first algorithm, for example, recorded as tt, the waiting time, for example, recorded as ww, and the return time, for example, recorded as WW. By obtaining the above-mentioned first algorithm parameters, compatible consumable chips can be identified according to the first algorithm parameters to avoid the compatible consumable chips from copying the first algorithm parameters.
[0087] It is understandable that the first algorithm can be designed to be bound to the version and model, and the binding relationship can be converted into an asymmetric encryption sequence. Even if the cracker can crack a model, since each model is different, the security and cracking difficulty are greatly improved.
[0088] And / or after the host is powered on, obtain the second time parameter when the slave is powered on, including the power-on time, wherein the power-on time can be set to different values according to different versions and models of machines to increase the difficulty of implementing compatible chips; and the host manufacturer can, as needed, not only when the host is powered on, but also in any communication instruction, that is, the power-on time can be any value.
[0089] In some embodiments, when the determination module 22 determines the legitimacy of the slave machine based on the time parameter and / or the power consumption parameter, it is specifically used to: calculate the time and value of the running time and the waiting time; if the time and value are equal to the return time, determine that the slave machine is legal; if the time and value are not equal to the return time, determine that the slave machine is illegal.
[0090] In some embodiments, when the acquisition module 21 acquires the power consumption parameters of the slave, it is specifically used to: acquire the preset power consumption of the slave; and determine the operating power consumption according to the power-on time.
[0091] In some embodiments, when the determination module 22 determines the legitimacy of the slave according to the time parameter and / or the power consumption parameter, it is specifically used to: if the operating power consumption is less than or equal to the preset power consumption, determine that the slave is legal; if the operating power consumption is greater than the preset power consumption, determine that the slave is illegal.
[0092] In some embodiments, after the determination module 22 determines that the slave is illegal, it is specifically used to: obtain the allocation parameters of the slave; determine the power supply parameters of the bus according to the type of the host; and determine the legitimacy of the slave according to the allocation parameters and the power supply parameters.
[0093] In some embodiments, when the determination module 22 determines the legitimacy of the slave according to the allocation parameters and the power supply parameters, it is specifically used to: if the allocation parameters and the power supply parameters meet the allocation conditions, determine that the slave is legal; if the allocation parameters and the power supply parameters do not meet the allocation conditions, determine that the slave is illegal.
[0094] In some embodiments, after the determination module 22 determines that the slave is illegal, it is further specifically configured to: the host sends a second algorithm to the slave to erase the private key, time parameter and power consumption parameter in the slave.
[0095] In some embodiments, after the determination module 22 determines that the slave is legal, it is specifically used to: obtain the power consumption sequence of the slave, and adjust the power consumption of the slave according to the power consumption sequence.
[0096] In some embodiments, when the determination module 22 obtains the power consumption sequence of the slave, it is specifically used to: determine the time stage and stage power consumption of the slave; determine the encryption code according to the time stage and stage power consumption; and convert the encryption code into a power consumption sequence.
[0097] In some embodiments, when the determination module 22 adjusts the power consumption of the slave according to the power consumption sequence, it is specifically used to: encrypt the power consumption sequence to determine the power consumption ciphertext; decrypt the power consumption ciphertext according to the private key in the slave to determine the power consumption plaintext; adjust the power consumption of the slave according to the power consumption plaintext.
[0098] According to the verification device 2 of the communication device of the embodiment of the present invention, by obtaining the time parameters of the slave, determining the communication time of enabling the algorithm when the host and the slave communicate according to the time parameters, judging the size relationship between the communication time and the preset time, thereby judging whether the slave is legal, and / or obtaining the power consumption parameters of the slave, randomly detecting the current operating state of the slave according to the power consumption parameters, judging whether the current operating state of the slave satisfies the preset state, thereby judging whether the slave is legal, and performing a double check on the legitimacy of the slave through the time parameters and power consumption parameters of the slave, thereby preventing a single legal verification method from being easily reverse cracked, thereby improving the security and accuracy of the legality verification.
[0099] The following describes a computer-readable storage medium according to an embodiment of the present invention.
[0100] The computer-readable storage medium of the embodiment of the present invention stores a verification program for a communication device, and when the verification program for the communication device is executed by a processor, the verification method for the communication device of the above embodiment is implemented.
[0101] According to the computer-readable storage medium of the embodiment of the present invention, by obtaining the time parameters of the slave, determining the communication time of the algorithm enabled when the host and the slave communicate according to the time parameters, judging the size relationship between the communication time and the preset time, thereby judging whether the slave is legal, and / or obtaining the power consumption parameters of the slave, randomly detecting the current operating state of the slave according to the power consumption parameters, judging whether the current operating state of the slave satisfies the preset state, thereby judging whether the slave is legal, and performing a double check on the legitimacy of the slave through the time parameters and the power consumption parameters of the slave, thereby preventing a single legal verification method from being easily reverse cracked, and improving the security and accuracy of the legality verification.
[0102] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example.
[0103] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A method for verifying a communication device, characterized in that: The communication device comprises a host and a slave, the host and the slave are connected via a bus communication, and the method comprises: Obtaining time parameters and power consumption parameters of the slave; The legitimacy of the slave is determined according to the time parameter and / or the power consumption parameter.
2. The communication device verification method according to claim 1, characterized in that: Obtaining the time parameters of the slave, including: The host starts a first algorithm when sending a communication instruction to the slave, obtains a first time parameter of the first algorithm, including a running time, a waiting time and a return time, and / or A second time parameter when the slave is powered on is obtained, including a power-on time.
3. The communication device verification method according to claim 2, characterized in that: Determining the legitimacy of the slave according to the time parameter and / or the power consumption parameter includes: Calculate the time and value of the running time and the waiting time; If the time and value are equal to the return time, determining that the slave is legal; If the time and value are not equal to the return time, it is determined that the slave is illegal.
4. The communication device verification method according to claim 1, characterized in that: Obtaining the power consumption parameters of the slave device, including: Obtaining a preset power consumption of the slave device; Determine the operating power consumption based on the power-on time.
5. The communication device verification method according to claim 4, characterized in that: Determining the legitimacy of the slave according to the time parameter and / or the power consumption parameter includes: If the operating power consumption is less than or equal to the preset power consumption, determining that the slave is legal; If the operating power consumption is greater than the preset power consumption, it is determined that the slave is illegal.
6. The communication device verification method according to claim 3 or 5, characterized in that: After determining that the slave is illegal, the following steps are performed: Obtaining allocation parameters of the slave; Determining power supply parameters of the bus according to the type of the host; The legitimacy of the slave is determined according to the allocation parameter and the power supply parameter.
7. The communication device verification method according to claim 6, characterized in that: Determining the legitimacy of the slave according to the allocation parameter and the power supply parameter includes: If the allocation parameter and the power supply parameter meet the allocation condition, determining that the slave is legal; If the allocation parameter and the power supply parameter do not satisfy the allocation condition, it is determined that the slave is illegal.
8. The communication device verification method according to claim 7, characterized in that: After determining that the slave is illegal, the method further includes: The host sends a second algorithm to the slave to erase the private key, the time parameter and the power consumption parameter in the slave.
9. The communication device verification method according to claim 7, characterized in that: After determining that the slave is legitimate, the method includes: A power consumption sequence of the slave device is acquired, and the power consumption of the slave device is adjusted according to the power consumption sequence.
10. The communication device verification method according to claim 9, characterized in that: Obtaining the power consumption sequence of the slave device, including: Determining the time phase and phase power consumption of the slave; Determine the encryption code according to the time stage and the power consumption of the stage; The encrypted code is converted into a power consumption sequence.
11. The communication device verification method according to claim 10, characterized in that: Adjusting the power consumption of the slave according to the power consumption sequence includes: Encrypting the power consumption sequence to determine the power consumption ciphertext; Decrypt the power consumption ciphertext according to the private key in the slave machine to determine the power consumption plaintext; The power consumption of the slave device is adjusted according to the power consumption plaintext.
12. A communication device verification device, characterized in that: include: An acquisition module, used to acquire the time parameters and power consumption parameters of the slave; A determination module is used to determine the legitimacy of the slave machine according to the time parameter and / or the power consumption parameter.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a verification program for a communication device, and when the verification program for the communication device is executed by a processor, the verification method for the communication device according to any one of claims 1 to 11 is implemented.