Authentication method and device of security chip, electronic equipment and readable storage medium
By performing default operation authentication and temporary firmware authentication based on random numbers on the security chip, the problem of rampant counterfeit chips is solved, ensuring the legality of the chips and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU ZHONO ELECTRONICS TECH CO LTD
- Filing Date
- 2022-12-28
- Publication Date
- 2026-04-10
AI Technical Summary
In the existing technology, counterfeit and non-original security chips are installed in printing consumables after the firmware of the original chips is tampered with, resulting in a flood of counterfeit and substandard products on the market and causing users to have a bad experience.
After performing default operation authentication on the security chip, temporary firmware is generated based on random numbers and burned into the chip for temporary operation authentication to ensure that the chip is an original chip.
Effectively verify whether the security chip is an original chip, prevent counterfeit chips from being disguised as original chips, and improve the user experience.
Smart Images

Figure CN116150821B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of printing consumables, in particular to a security chip authentication method and device, electronic equipment and a readable storage medium. BACKGROUND
[0002] Security chips are widely used in various industries. Essentially, a security chip is a trusted platform module, which is a device that can independently generate keys, encrypt and decrypt. It has an independent processor and storage unit, can store keys and feature data, and can provide encryption and security authentication services.
[0003] The firmware (program machine source code) on which the security chip runs is mainly stored in the on-chip FLASH (flash memory). If someone extracts the FLASH data of the original security chip and then performs adaptive processing on the FLASH data and burns it into a fake non-original security chip, this will cause fake non-original security chips to flood the market, causing users to have a poor user experience. SUMMARY
[0004] The purpose of the present application is to provide a security chip authentication method, device, electronic equipment and readable storage medium to improve the problems existing in the prior art.
[0005] Embodiments of the present application can be implemented as follows:
[0006] In a first aspect, the present application provides a security chip authentication method applied to an electronic device, wherein the electronic device is in communication connection with a security chip; the method comprises:
[0007] Based on the default firmware of the security chip, the security chip is subjected to default running authentication; when the default running authentication is passed, a temporary firmware is obtained based on the random number and the default firmware, and the temporary firmware is burned into the security chip;
[0008] The security chip is subjected to temporary running authentication, and after the temporary running authentication is passed, the default firmware is burned into the security chip.
[0009] In an optional embodiment, before the step of authenticating the security chip based on the default firmware of the security chip, the method further comprises:
[0010] The default firmware of the security chip is read and data verification is performed on the default firmware;
[0011] When the data verification is passed, the step of authenticating the security chip based on the default firmware of the security chip is performed.
[0012] In an optional embodiment, the step of performing the default operation authentication on the secure chip comprises:
[0013] receiving a default operation result sent by the secure chip; the default operation result is obtained by the secure chip running the default firmware;
[0014] obtaining a first comparison operation result based on a pre-stored default authentication program;
[0015] determining whether the default operation result is consistent with the first comparison operation result;
[0016] if yes, determining that the default operation authentication is passed.
[0017] In an optional embodiment, the temporary firmware comprises a temporary authentication program, and the temporary authentication program is obtained based on the random number; the step of performing the temporary operation authentication on the secure chip comprises:
[0018] receiving a temporary operation result sent by the secure chip; the temporary operation result is obtained by the secure chip running the temporary firmware;
[0019] obtaining a second comparison operation result based on the temporary authentication program;
[0020] determining whether the temporary operation result is consistent with the second comparison operation result;
[0021] if yes, determining that the temporary operation authentication is passed.
[0022] In an optional embodiment, the electronic device is a printer installed with a printing consumable, and the printing consumable carries the secure chip; before the step of performing the default operation authentication on the secure chip based on the default firmware of the secure chip, the method further comprises:
[0023] when a printing operation of a user is sensed, entering a printing cycle of the printing operation.
[0024] In an optional embodiment, before the step of obtaining the temporary firmware based on the random number and the default firmware, the method further comprises:
[0025] sending a consumable reading command to the secure chip, so that the secure chip returns consumable data based on the consumable reading command; the consumable data comprises a consumable remaining amount of the printing consumable;
[0026] determining whether the consumable remaining amount meets the consumable replacement condition;
[0027] when the consumable remaining amount does not meet the consumable replacement condition, determining that the printing operation is executable.
[0028] In an optional embodiment, before the step of burning the default firmware into the secure chip, the method further comprises:
[0029] performing a print task in response to the print operation;
[0030] updating the consumable remaining amount of the secure chip after the print task is completed; wherein the updating of the consumable remaining amount of the secure chip is indicative of the end of the print cycle. In a second aspect, the present application further provides an authentication device of a secure chip, applied to an electronic device, wherein the electronic device is in communication connection with the secure chip; the method comprises:
[0031] an authentication module, configured to perform a default operation authentication on the secure chip based on the default firmware of the secure chip;
[0032] a processing module, configured to obtain a temporary firmware based on the random number and the default firmware when the default operation authentication is passed, and burn the temporary firmware into the secure chip;
[0033] the authentication module is further configured to perform a temporary operation authentication on the secure chip;
[0034] a burning module, configured to burn the default firmware into the secure chip after the temporary operation authentication is passed.
[0035] In a third aspect, the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores machine readable instructions executable by the processor, and the processor executes the machine readable instructions to implement the authentication method of the secure chip according to any one of the above embodiments.
[0036] In a fourth aspect, the present application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the authentication method of the secure chip according to any one of the above embodiments.
[0037] Compared with the prior art, the embodiment of the application provides an authentication method, device, electronic equipment and readable storage medium of a security chip, the method is applied to an electronic equipment connected with the security chip, first, the security chip is authenticated for default running based on a default firmware of the security chip; then, when the default running authentication passes, a temporary firmware is obtained based on a random number and the default firmware, and the temporary firmware is burned into the security chip; finally, the security chip is authenticated for temporary running, and the default firmware is burned into the security chip after the temporary running authentication passes. The scheme generates a temporary firmware based on a random number to increase the temporary running authentication process, and since the non-original factory chip cannot run the temporary firmware, the temporary running authentication passing indicates that the security chip is the original factory chip homologous to the electronic equipment, so the temporary running authentication process can be used to verify whether the security chip is the original factory chip homologous to the electronic equipment, thereby avoiding that the fake non-original factory chip is rampant in the market as the original factory chip, and bringing a bad use experience to the user. BRIEF DESCRIPTION OF DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the application, and therefore should not be regarded as a limitation to the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0039] Figure 1 One of the flowcharts of the authentication method of the security chip provided by the embodiment of the application.
[0040] Figure 2 The second flowchart of the authentication method of the security chip provided by the embodiment of the application.
[0041] Figure 3 The relationship diagram of the default firmware and the temporary firmware provided by the embodiment of the application.
[0042] Figure 4 The structural diagram of the authentication device of the security chip provided by the embodiment of the application.
[0043] Figure 5 The structural diagram of the printer provided by the embodiment of the application. DETAILED DESCRIPTION
[0044] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the accompanying drawings can be arranged and designed in various different configurations.
[0045] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative labor are within the scope of protection of the present application.
[0046] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0047] It should be noted that: the features in the embodiments of the present application can be combined with each other without conflict.
[0048] Taking the application of a security chip to a printer printing consumable as an example, the printer printing consumable includes a printing imaging cartridge, an ink cartridge, a toner cartridge, a photosensitive drum, etc. Generally, the printing consumable is equipped with a security chip (also referred to as a consumable chip), which records the factory information of the printing consumable and the use condition of the printing consumable, etc. The printer can perform authentication based on the security chip to verify whether the printing consumable is a same factory product matched with the printer.
[0049] In the prior art, the authentication process of the security chip is generally that the printing consumable sends authentication data to the printer. Then the printer performs authentication, if the authentication is passed, the security chip can be normally communicated and normal printing can be performed; if the authentication fails, the printer will display the words "non-original printing consumable cannot print".
[0050] Similarly, if someone extracts the firmware from the original security chip of the printer, burns it to a non-original security chip to run, and configures the non-original security chip to a non-original printing consumable, many low-quality non-original printing consumables will be disguised as original printing consumables and will be rampant in the market, which will bring bad printing experience to users.
[0051] Please refer to Figure 1 , Figure 1 A flowchart of a security chip authentication method provided by the embodiments of the present application is provided. The execution subject of the method can be an electronic device in communication connection with the security chip. The security chip authentication method includes the following steps:
[0052] S130, based on the default firmware of the security chip, performing default running authentication on the security chip.
[0053] In the embodiment, the security chip can include two storage spaces, one for storing firmware data and the other for storing related data involved in the operation of the security chip. For example, the default firmware can be stored in the FLASH of the security chip, and the default firmware can include related programs required for the operation of the security chip. It can be understood that when the security chip runs the default firmware, the default running authentication on the security chip can be performed.
[0054] S180, when the default running authentication passes, obtaining a temporary firmware based on the random number and the default firmware, and burning the temporary firmware into the security chip.
[0055] It can be understood that the temporary firmware is generated in real time based on the random number and the default firmware, and only the original security chip can run the temporary firmware. If it is a non-original security chip, it cannot directly run the temporary firmware, and thus cannot complete the temporary running authentication.
[0056] S190, performing temporary running authentication on the security chip, and burning the default firmware into the security chip after the temporary running authentication passes.
[0057] In the embodiment, the passing of the temporary running authentication can represent that the security chip is a legal chip and is available, for example, the security chip is an original chip homologous to the electronic device.
[0058] The authentication method of the security chip provided by the embodiment of the application includes the following steps: based on the default firmware of the security chip, performing default running authentication on the security chip; then when the default running authentication passes, obtaining a temporary firmware based on a random number and the default firmware, and burning the temporary firmware into the security chip; finally, performing temporary running authentication on the security chip, and burning the default firmware into the security chip after the temporary running authentication passes. The scheme generates the temporary firmware based on the random number to increase the temporary running authentication process. Since the illegal non-original chip cannot run the temporary firmware, the passing of the temporary running authentication represents that the security chip is an original chip homologous to the electronic device. Therefore, the temporary running authentication process can be used to verify whether the security chip is an original chip homologous to the electronic device, so as to avoid the flooding of fake non-original chips in the market, and to bring a bad user experience to users.
[0059] In an optional embodiment, before the default running authentication is performed, data verification on the default firmware of the security chip is also required to ensure that the default firmware is an original firmware. Before the step S130, the following step can also be included:
[0060] S120, read the default firmware of the secure chip and perform data verification on the default firmware.
[0061] In this embodiment, the default firmware can be read directly from the storage space in which the secure chip stores the firmware data.
[0062] It can be understood that the data verification on the default firmware passes, indicating that the default firmware is the original firmware and has not been tampered with, and the step S130 can be continued. The data verification on the default firmware fails, indicating that the default firmware is not the original firmware and may have been tampered with, and it can be indicated that the secure chip is not available.
[0063] In an optional implementation, the default running authentication can be based on a default authentication program included in the default firmware. The process of performing the default running authentication on the secure chip based on the default firmware of the secure chip in the step S130 can include the following sub-steps:
[0064] S131, receiving the default operation result sent by the secure chip.
[0065] In this embodiment, the default operation result can be obtained by running the default authentication program included in the default firmware when the secure chip runs the default firmware.
[0066] S132, obtaining a first comparison operation result based on the pre-stored default authentication program.
[0067] It can be understood that the electronic device can pre-store the original default authentication program, and running the original default authentication program can obtain the first comparison operation result.
[0068] S133, judging whether the default operation result is consistent with the first comparison operation result.
[0069] S134, if the default operation result is consistent with the first comparison operation result, determining that the default running authentication passes.
[0070] S135, if the default operation result is not consistent with the first comparison operation result, determining that the default running authentication fails.
[0071] It can be understood that the default running authentication passing indicates that the secure chip is not a factory chip; and the default running authentication passing indicates that the secure chip is likely to be a factory chip, but it cannot be ruled out that the default firmware in the secure chip is obtained from the factory chip and reprogrammed. Therefore, the subsequent temporary running authentication is needed for further judgment.
[0072] In an optional embodiment, the temporary firmware can be obtained by replacing the default authentication program of the default firmware with a temporary authentication program, and the temporary authentication program can be obtained based on a random number. The process of temporarily running the authentication on the security chip in step S190 can include the following sub-steps:
[0073] S191, receiving the temporary operation result sent by the security chip.
[0074] In this embodiment, the temporary operation result is obtained by running the temporary authentication program when the security chip runs the temporary firmware.
[0075] S192, obtaining a second comparison operation result based on the temporary authentication program.
[0076] S193, determining whether the temporary operation result and the second comparison operation result are consistent.
[0077] S194, if the temporary operation result and the second comparison operation result are consistent, determining that the temporary running authentication is passed.
[0078] S195, if the temporary operation result and the second comparison operation result are inconsistent, determining that the temporary running authentication is not passed.
[0079] Similar to the process of the default running authentication, running the temporary authentication program obtained based on the random number can obtain the second comparison operation result.
[0080] It can be understood that if the temporary running authentication is passed, it means that the security chip can run the temporary firmware to work, and then the security chip must be an original chip. If the temporary operation result sent by the security chip cannot be received, it is also considered that the temporary running authentication is not passed, and the temporary running authentication is not passed, which means that the security chip cannot run the temporary firmware, and the security chip belongs to a non-original chip.
[0081] The following takes the security chip applied to the printing consumables of the printer as an example to further introduce the authentication method of the security chip of the present scheme.
[0082] In an optional embodiment, the electronic device can be a printer installed with a printing consumable, and the printing consumable carries a security chip. The printer is in communication connection with the security chip. Before step S120 of reading the default firmware of the security chip, the method further includes:
[0083] S110, when the printing operation of the user is sensed, entering a printing cycle of the printing operation.
[0084] It can be understood that the printing operation can be generated by a user on a control panel of the printer or generated by a user on a personal computer connected to the printer. When the printer perceives the printing operation of the user, that is, the printer enters the printing cycle of the printing operation, the default firmware of the security chip is then read, and the default firmware can also include the factory information of the printing consumable.
[0085] If the data verification of the default firmware fails, it means that the default firmware of the security chip is not the original factory default firmware, and the printer cannot use the printing consumable.
[0086] Optionally, before the step of obtaining the temporary firmware based on the random number and the default firmware in step S180, the method can further include:
[0087] S140, sending a consumable reading command to the security chip when the default running authentication passes, so that the security chip returns consumable data based on the consumable reading command.
[0088] The consumable data includes the consumable remaining amount of the printing consumable. The consumable data can be stored in the storage space of the security chip.
[0089] S150, judging whether the consumable remaining amount meets the consumable replacement condition.
[0090] In an optional example, the printer can compare the consumable remaining amount with a preset threshold value. If the consumable remaining amount is greater than the preset threshold value, it is considered that the consumable remaining amount does not meet the consumable replacement condition. If the consumable remaining amount is less than the preset threshold value, it is considered that the consumable remaining amount meets the consumable replacement condition.
[0091] In this embodiment, when the consumable remaining amount meets the consumable replacement condition, the following step S160 is executed, and the consumable replacement prompt is displayed on the display panel of the printer to remind the user to replace the printing consumable. When the consumable remaining amount does not meet the consumable replacement condition, the following step S180 is executed to obtain the temporary firmware and burn the temporary firmware to the security chip after step S170 is executed.
[0092] S160, generating a consumable replacement prompt.
[0093] S170, determining that the printing operation is executable.
[0094] In this embodiment, a temporary running authentication is added before the actual printing operation is executed. If the temporary running authentication fails, it means that the security chip of the printing consumable is a non-factory chip, and the printing consumable installed in the printer is also a non-factory consumable. If the temporary running authentication passes, it means that the security chip of the printing consumable is a factory chip, and the printing consumable installed in the printer is also a factory consumable.
[0095] In an optional embodiment, please refer toFigure 2 After the temporary operation authentication of the security chip, the method can further include the following steps:
[0096] S200, after the temporary operation authentication passes, performing a print task in response to a print operation;
[0097] S210, updating the consumable remaining amount of the security chip after the print task is completed; wherein the update of the consumable remaining amount of the consumable chip is completed to represent the end of a print cycle.
[0098] It can be understood that when the printer finishes the print task, the consumable consumption of the print consumable for this print task can be calculated, and then the new consumable remaining amount can be obtained by subtracting the consumable consumption from the previously obtained consumable remaining amount, and then the new consumable remaining amount can be written into the security chip.
[0099] S220, when the print cycle ends, the default firmware is burned into the security chip.
[0100] It can be understood that after the default firmware is burned into the security chip, the temporary firmware in the security chip will be overwritten by the default firmware, and the firmware of the security chip will be restored to the initial version.
[0101] In an optional embodiment, the security chip can include a mode control interface, when the printer provides a low level to the mode control interface, the security chip does not run in a programming mode, at this time the printer can read the firmware data of the security chip or burn the firmware data into the security chip.
[0102] When the printer provides a high level to the mode control interface, the security chip starts to run in a running mode, at this time the printer can authenticate the security chip, and can read the consumable data after the authentication passes.
[0103] By default, the printer will provide a high level to the mode control interface, that is, the security chip is in the running mode by default.
[0104] Assuming that the storage space for storing the consumable data in the security chip is EEPROM (Electric Erasable Programmable Read-Only Memory), correspondingly, please combine Figure 3 The default firmware can include factory information, communication interface program, default authentication program, EEPROM reading program, etc.
[0105] Correspondingly, the process of obtaining the temporary firmware based on the random number and the default firmware can be: the printer uses the consumable remaining amount as a random number to form a temporary authentication program, and then replaces the default authentication program in the default firmware with the temporary authentication program to obtain the temporary firmware.
[0106] It should be noted that in the security chip, the storage device for storing the consumable data can also be other storage devices, which are not limited herein.
[0107] It should be noted that the execution order of each step in the above method embodiment is not limited to the drawing shown, and the execution order of each step is subject to the actual application situation.
[0108] In order to execute the corresponding steps in the above method embodiment and each possible implementation, an implementation of a security chip authentication device is given below.
[0109] Please refer to Figure 4 , Figure 4 A structure diagram of a security chip authentication device provided by an embodiment of the application is shown. The security chip authentication device 200 is applied to an electronic device in communication connection with a security chip. The security chip authentication device 200 includes an authentication module 220, a processing module 230, and a burning module 240.
[0110] The authentication module 220 is configured to perform default running authentication on the security chip based on a default firmware of the security chip.
[0111] The processing module 230 is configured to obtain a temporary firmware based on the random number and the default firmware when the default running authentication passes, and burn the temporary firmware to the security chip.
[0112] The authentication module 220 is further configured to perform temporary running authentication on the security chip.
[0113] The burning module 240 is configured to burn the default firmware to the security chip after the temporary running authentication passes. The temporary running authentication passing indicates that the security chip is a same-origin original chip for the electronic device.
[0114] In an optional implementation, the security chip authentication device 200 can further include a reading module 210, which is configured to read the default firmware of the security chip and perform data verification on the default firmware. When the data verification passes, the authentication module 220 is configured to perform default running authentication on the security chip based on the default firmware of the security chip.
[0115] In an optional implementation, the authentication module 220 is configured to perform default operation authentication on the secure chip based on the default firmware of the secure chip, and specifically can be configured to: receive a default operation result sent by the secure chip; the default operation result is obtained by the secure chip running the default firmware; obtain a first comparison operation result based on a pre-stored default authentication program; determine whether the default operation result is consistent with the first comparison operation result; if yes, determine that the default operation authentication is passed.
[0116] In an optional implementation, the temporary firmware includes a temporary authentication program, and the temporary authentication program is obtained based on the random number; the authentication module 220 is configured to perform temporary operation authentication on the secure chip, and specifically can be configured to: receive a temporary operation result sent by the secure chip; the temporary operation result is obtained by the secure chip running the temporary firmware; obtain a second comparison operation result based on the temporary authentication program; determine whether the temporary operation result is consistent with the second comparison operation result; if yes, determine that the temporary operation authentication is passed.
[0117] In an optional implementation, the electronic device is a printer installed with a printing consumable, and the printing consumable carries the secure chip; before the reading module 210 is configured to read the default firmware of the secure chip, the processing module 230 is further configured to: when a printing operation of a user is sensed, enter a printing period of the printing operation.
[0118] Before the processing module 230 is configured to obtain the temporary firmware based on the random number and the default firmware, the processing module 230 can be further configured to: send a consumable reading command to the secure chip, so that the secure chip returns consumable data based on the consumable reading command; the consumable data includes a consumable remaining amount of the printing consumable; determine whether the consumable remaining amount meets the consumable replacement condition; when the consumable remaining amount meets the consumable replacement condition, generate a consumable replacement prompt. When the consumable remaining amount does not meet the consumable replacement condition, determine that the printing operation is executable.
[0119] In an optional implementation, the authentication device 200 of the secure chip can further include a printing module 250; before the burning module is configured to burn the default firmware to the secure chip, the printing module 250 can be configured to: perform a printing task in response to the printing operation; update a consumable remaining amount of the secure chip after the printing task is completed; wherein the consumable remaining amount update of the consumable chip is completed, which indicates that the printing period is ended.
[0120] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the authentication device 200 of the security chip described above can refer to the corresponding process in the foregoing method embodiments, and will not be described here.
[0121] Please refer to Figure 5 , Figure 5 A structural schematic diagram of an electronic device is provided for an embodiment of the present application. The electronic device 300 includes a processor 310, a memory 320, and a bus 330, and the processor 310 is connected with the memory 320 through the bus 330.
[0122] The memory 320 can be used to store software programs, for example, Figure 4 The authentication device 200 of the security chip is shown. Among them, the memory 320 can be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a flash memory, a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory, etc.
[0123] The processor 310 can be an integrated circuit chip with signal processing capability. The processor 310 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0124] The memory 320 stores machine-readable instructions executable by the processor 310. When the processor 310 executes the machine-readable instructions, the authentication method of the security chip disclosed in the above embodiments is implemented.
[0125] It can be understood that Figure 5 The structure shown is only schematic, and the electronic device 300 can also include more or fewer components than those shown in Figure 5 , or have a different configuration from Figure 5 the structure shown.Figure 5 The components shown in the above embodiments can be implemented in hardware, software, or a combination thereof.
[0126] The application also provides a computer readable storage medium, which stores a computer program. The computer program is run by a processor to implement the authentication method of the security chip disclosed in the above embodiments. The computer readable storage medium can be, but is not limited to, a U disk, a mobile hard disk, a ROM, a RAM, a PROM, an EPROM, an EEPROM, a FLASH disk, or an optical disk, and various storage media that can store program codes.
[0127] In summary, the application provides an authentication method, device, electronic device, and readable storage medium of a security chip. The method is applied to an electronic device connected with the security chip. First, the security chip is authenticated based on a default firmware of the security chip. Then, when the default authentication is passed, a temporary firmware is obtained based on a random number and the default firmware, and the temporary firmware is burned into the security chip. Finally, the security chip is authenticated based on the temporary firmware, and the default firmware is burned into the security chip after the temporary authentication is passed. The temporary firmware is generated based on the random number to increase the temporary authentication process. Since the non-original chip cannot run the temporary firmware, the temporary authentication passing indicates that the security chip is the original chip of the electronic device. Therefore, the temporary authentication process can be used to verify whether the security chip is the original chip of the electronic device, so as to avoid the flooding of fake non-original chips in the market, and to bring a bad user experience to users.
[0128] The above description is only a specific implementation of the application, but the protection scope of the application is not limited thereto. Any changes or replacements within the technical range disclosed in the application can be easily thought by those skilled in the art, and should be covered in the protection scope of the application. Therefore, the protection scope of the application should be subject to the protection scope of the claims.
Claims
1. A method of authenticating a secure chip, characterized by, The application is applied to a printer which is installed with a printing consumable and is communicatively connected with a security chip carried by the printing consumable; the method comprises: When a printing operation of a user is sensed, entering a printing cycle of the printing operation; Based on a default firmware of the security chip, performing default running authentication on the security chip; When the default running authentication passes, sending a consumable reading command to the security chip to make the security chip return consumable data based on the consumable reading command; the consumable data comprises a consumable remaining amount of the printing consumable; Judging whether the consumable remaining amount meets a consumable replacement condition; When the consumable remaining amount does not meet the consumable replacement condition, determining that the printing operation is executable; Based on the consumable remaining amount and the default firmware, obtaining a temporary firmware, and burning the temporary firmware to the security chip; wherein the temporary firmware is obtained by replacing a default authentication program in the default firmware with a temporary authentication program, and the temporary authentication program is obtained based on the consumable remaining amount; Performing temporary running authentication on the security chip, and after the temporary running authentication passes, performing a printing task in response to the printing operation; After the printing task is completed, updating the consumable remaining amount of the security chip, and burning the default firmware to the security chip, wherein the updating of the consumable remaining amount of the security chip is completed to represent the end of the printing cycle.
2. The method of claim 1, wherein, Before the step of performing default running authentication on the security chip based on the default firmware of the security chip, the method further comprises: Reading the default firmware of the security chip, and performing data verification on the default firmware; When the data verification passes, performing the step of performing default running authentication on the security chip based on the default firmware of the security chip.
3. The method of claim 2, wherein, The step of performing default running authentication on the security chip comprises: Receiving a default calculation result sent by the security chip; the default calculation result is obtained by running the default firmware by the security chip; Based on a pre-stored default authentication program, obtaining a first comparison calculation result; Judging whether the default calculation result is consistent with the first comparison calculation result; If yes, determining that the default running authentication passes.
4. The method of claim 1, wherein, The temporary firmware comprises a temporary authentication program, and the temporary authentication program is obtained based on the consumable remaining amount; the step of performing temporary running authentication on the security chip comprises: Receiving a temporary calculation result sent by the security chip; the temporary calculation result is obtained by running the temporary firmware by the security chip; Based on the temporary authentication program, obtaining a second comparison calculation result; Judging whether the temporary calculation result is consistent with the second comparison calculation result; If yes, determining that the temporary running authentication passes.
5. An authentication apparatus of a security chip, characterized by comprising: The application is applied to a printer which is installed with a printing consumable and is communicatively connected with a security chip carried by the printing consumable; the device comprises: A processing module, configured to enter a printing cycle of a printing operation of a user when the printing operation is sensed; An authentication module, configured to perform default running authentication on a security chip based on a default firmware of the security chip; The processing module is further configured to send a consumable reading command to the secure chip to cause the secure chip to return consumable data based on the consumable reading command when the default operation authentication is passed, wherein the consumable data comprises a consumable remaining amount of the printing consumable; The processing module is further configured to determine whether the consumable remaining amount meets a consumable replacement condition; The processing module is further configured to determine that the printing operation is executable when the consumable remaining amount does not meet the consumable replacement condition; The processing module is further configured to obtain a temporary firmware based on the consumable remaining amount and the default firmware, and to burn the temporary firmware to the secure chip, wherein the temporary firmware is obtained by replacing a default authentication program in the default firmware with a temporary authentication program, and the temporary authentication program is obtained based on the consumable remaining amount; The authentication module is further configured to perform a temporary operation authentication on the secure chip; The printing module is configured to perform a printing task in response to the printing operation after the temporary operation authentication is passed; The printing module is further configured to update the consumable remaining amount of the secure chip after the printing task is completed, wherein completion of the updating of the consumable remaining amount of the secure chip indicates that the printing cycle is ended; The burning module is configured to burn the default firmware to the secure chip.
6. An electronic device, comprising: The electronic device comprises: a memory and a processor, wherein the memory stores machine readable instructions executable by the processor, and the processor executes the machine readable instructions to implement the authentication method of the secure chip according to any one of claims 1-4 when the electronic device is running.
7. A computer readable storage medium characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the authentication method of the secure chip according to any one of claims 1-4.
Citation Information
Patent Citations
Consumable chip as well as identification method and device for serial number of consumable chip
CN104553384A
Method for verifying chip of imaging box of printing device and printing device
CN105058997A