Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The following describes the technical solutions of the present disclosure and how the technical solutions of the present disclosure solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
The following explains the application scenario of the embodiment of the present application:
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application, as shown in fig. 1, an image forming apparatus 100 includes a detachable imaging box 110, a chip 111 is generally disposed on the imaging box 110 and is used for data communication with a main control device 120 of the image forming apparatus 100, and a plurality of authentication data, such as authentication data 1 to authentication data N, are stored in the chip 111 and are used for performing security authentication, such as authentication on the imaging box 110. Specifically, when it is required to authenticate imaging cartridge 110, master device 120 generates an authentication instruction and sends the authentication instruction to chip 111, where the authentication instruction generally corresponds to specific authentication data on one or more chips 111, such as authentication data N-1, so that chip 111 sends the one or more specific authentication data, such as authentication data N-1, to master device 120 based on the authentication instruction, thereby implementing authentication of imaging cartridge 110.
When the third party device 20 issues an authentication instruction to the chip 111 to obtain authentication data, in order to avoid that all the authentication data stored in the chip 111 are easily known, in the prior art, when the number of authentication data returned to the third party device 200 by the chip 111 reaches a preset number, the authentication instruction responding to the third party device 20 is refused, that is, the authentication data is not sent to the third party device 20 any more.
However, in the above manner, the authentication mechanism of the chip 111 is relatively simple and is easily broken by a third party. Since the authentication data in the chips 111 used on the same model of the imaging cartridge 110 are all the same, a third party can learn about all the authentication data stored in the chips 111 by means of the third party device 20 transmitting different authentication instructions to a plurality of different chips 111, so that the third party imaging cartridge can reduce the use security of the image forming apparatus 100 by applying the broken authentication data to the image forming apparatus 100.
In order to improve the complexity of the authentication mechanism of the chip 111 and the security of data communication, the main concept of the authentication mechanism of the chip provided by the embodiment of the application is that after receiving the authentication instruction sent by the host device, for the case that the authentication data sent by the chip 111 to the host device reaches the preset number, one authentication data is selected from a plurality of authentication data stored in the chip 111 to be sent to the host device, so that the authentication data can still be replied to the host device when the sent authentication data reaches the preset number, and the replied authentication data and the authentication instruction may not be matched at the moment, thereby increasing the complexity of the chip authentication mechanism, avoiding that a third party device easily learns the corresponding relation between all the authentication data stored in the chip 111 and the authentication instruction, improving the security of the data communication of the chip 111, avoiding that a non-authentication device is applied to the image forming apparatus 100, and improving the security and service life of the image forming apparatus 100.
Fig. 2 is a schematic diagram of a chip according to an embodiment of the present application, as shown in fig. 2, a chip 200 stores a plurality of authentication data, the chip 200 is disposed in an imaging box 110 of an image forming apparatus 100, and the chip 200 is used for receiving an authentication instruction of a host device 300, so as to perform an authentication method to send target authentication data to the host device 300.
Wherein each authentication data is different, a data identifier can be set for each authentication data in order to distinguish different authentication data. The host device 300 may be the main control device 120 of the image forming apparatus 100, or may be a third party device 20, such as a user terminal. The authentication instruction may specify a particular authentication data that needs to be returned.
Specifically, the chip 200 is configured to receive an authentication instruction of the host device 300, where the authentication instruction instructs the chip 200 to send corresponding specific authentication data, select one authentication data from the plurality of authentication data to send to the host device 300 as target authentication data if the number of different authentication data sent to the host device 300 reaches a preset number, where the target authentication data does not necessarily match the authentication instruction, and select specific authentication data corresponding to the authentication instruction from the plurality of authentication data to send to the host device if the number of different authentication data sent to the host device 300 does not reach the preset number.
The preset number is smaller than the total number of the authentication data stored in the chip, and may be 1/2, 3/4 or other values of the total number of the authentication data stored in the chip.
Specifically, the authentication instruction transmitted from the host device 300 may be received through a preset communication interface of the chip 200. The authentication instructions may correspond to authentication data stored on one or more chips 200.
Specifically, when the number of authentication data that has been transmitted to the host device 300 reaches a preset number, one authentication data may be randomly selected as the above-described target authentication data from among the plurality of authentication data stored in the chip 200 to transmit the target authentication data to the host device 300.
Further, the number of different authentication data that have been transmitted to the host device 300 may be the number of different authentication data that have been transmitted to the host device 300, or the number of types of authentication data that have been transmitted to the host device 300, the repeated authentication data that have been transmitted does not increase the number of authentication data that have been transmitted to the host device 300.
By way of example, assuming that the 6 authentication data that have been transmitted to the host device 300 are a1, a2, a3, and a4 in order, the number of different authentication data that have been transmitted to the host device 300 is 4.
Further, when the number of different authentication data that has been transmitted to the host device 300 reaches the preset number, if a next authentication instruction transmitted by the host device 300 is received, one authentication number may be randomly determined as the above-described target authentication data from among the plurality of authentication data that have not been transmitted to the host device 300, or one authentication data return may be selected in the order of the data identifications of the plurality of authentication data that have not been transmitted to the host device 300, for example, sequentially from the direction in which the data identification is the minimum value or inversely from the direction in which the data identification is the maximum value.
For example, assuming that the preset number is 4, the plurality of authentication data stored on the chip 200 is data 1 to data 16, and the authentication data that the chip 200 has transmitted to the host device 300 is data 1, data 3, data 6, data 2, data 1, and data 6 in order, the number of different authentication data that has been transmitted is 4, and the repeated authentication data, i.e., data 1 and data 6, is recorded only 1 time. When the chip 200 receives the authentication instruction, since the number of authentications that have been transmitted to the host device 300 reaches the preset number, the chip 200 selects one authentication data that has not been transmitted or returned, such as data 12, from among the respective authentication data stored therein, that is, data 1 to data 16, to be transmitted to the host device 300.
According to the chip provided by the embodiment of the application, when the chip receives the authentication instruction sent by the host equipment, whether the number of different authentication data which are currently sent to the host equipment reaches the preset number is judged, if yes, one authentication data is selected from a plurality of authentication data stored by the chip and is used as target authentication data to be sent to the host equipment, the target authentication data can be the sent authentication data or the not-sent authentication data, the complex program of the authentication data communication logic is improved, the safety of data communication is improved, the host equipment is prevented from easily learning all the authentication data and authentication modes in the chip, the safety of data stored in the chip is improved, and the reliability of equipment safety authentication is improved.
Fig. 3 is a schematic structural diagram of a chip according to another embodiment of the present application, and as can be seen from fig. 2 and 3, the chip 200 further includes an instruction receiving module 210, an sent number judging module 220, and a data sending module 230.
The device comprises an instruction receiving module 210, a sent quantity judging module 220 and a data sending module 230, wherein the instruction receiving module 210 is used for receiving an authentication instruction of the host device 300, the sent quantity judging module 220 is used for judging whether the quantity of different authentication data sent to the host device 300 reaches a preset quantity, and the data sending module 230 is used for selecting one authentication data from the plurality of authentication data to be used as target authentication data to be sent to the host device 300 if the quantity of the sent different authentication data reaches the preset quantity.
Optionally, the chip 200 is further configured to send specific authentication data corresponding to the authentication instruction to the host device 300 if the number of sent different authentication data does not reach the preset number.
Wherein the specific authentication data may be one or more of a plurality of authentication data.
Specifically, the chip 200 may store an authentication relationship table, where the stored authentication relationship table is used to describe a correspondence between data in the authentication instruction and specific authentication data, so that when the chip 200 receives the authentication instruction, the specific authentication data corresponding to the authentication instruction is determined based on the authentication relationship table.
For example, table 1 is a schematic diagram of an authentication relationship table according to an embodiment of the present application, as shown in table 1, when the data in the authentication command is A, B, C, D, E, F, G and H respectively, the specific authentication data is a, b, c, d, e, f, g and H respectively. I.e. when the data in the authentication instruction is E, the corresponding specific authentication data is E, when the data in the authentication instruction is G, the corresponding specific authentication data is G, and so on.
Table 1 authentication relationship table
| Authentication instructions |
A |
B |
C |
D |
E |
F |
G |
H |
| Specific authentication data |
a |
b |
c |
d |
e |
f |
g |
h |
Specifically, the data sending module 230 is further configured to send specific authentication data corresponding to the authentication instruction to the host device 300 when the number of sent different authentication data does not reach the preset number.
Optionally, the chip 200 is further configured to obtain a first flag for each authentication data. Accordingly, determining whether the number of different authentication data transmitted to the host device 300 reaches the preset number includes determining whether the number of different authentication data transmitted to the host device 300 reaches the preset number according to the number of the first marks.
Wherein the first flag is used to identify each authentication data transmitted to the host device 300 when the number of authentication data transmitted to the host device 300 does not reach a preset number. The first mark may take any form, for example, may be a preset flag bit or a preset character, etc. The first flag may also be generated based on a device identification and/or a preset number of host devices 300.
For example, a preset flag bit may be set for each authentication data, when the preset flag bit is 0, it indicates that the authentication data is not set with the first flag, i.e., is not returned to the host device 300, and when the preset flag bit is 1, it indicates that the authentication data is set with the first flag, i.e., the authentication data has been returned to the host device 300.
Specifically, the first flag may be set by a processor inside the chip 200 or may be set by the main control device 120 of the image forming apparatus 100.
Optionally, the chip 200 is further configured to set the first flag for the specific authentication data after transmitting the specific authentication data to the host device 300.
Illustratively, after the specific authentication data corresponding to the authentication instruction is transmitted to the host device 300, the processor of the chip 200 or the main control device 120 of the image forming apparatus 100 rewrites the preset flag bit of the specific authentication data to 1, that is, sets the first flag for the specific authentication data.
Specifically, fig. 4 is a schematic structural diagram of a chip according to another embodiment of the present application, and as can be seen in fig. 3 and 4, the chip 200 further includes a first flag setting module 240. Wherein the first flag setting module 240 is configured to set the first flag for the specific authentication data after transmitting the specific authentication data to the host device 300.
Specifically, when the chip 200 receives the authentication instruction and the number of authentication data that the chip 200 has transmitted to the host device 300 does not reach the preset number, the chip 200 transmits specific authentication data corresponding to the authentication instruction to the host device 300, and the first flag setting module 240 sets a first flag for the specific authentication data stored in the chip 200.
For example, assuming that the preset number is 8, the authentication data that the chip 200 has transmitted to the host device 300 is data 5 and data 7, it is known that the number of different authentication data that has been transmitted is 2, when the chip 200 receives the authentication command O1, the specific authentication data corresponding to the authentication command O1 is data 12, the chip 200 transmits the data 12 to the host device 300, and sets a first flag for the data 12 stored in the chip 200 to flag the transmitted authentication data when the number of different authentication data that has been transmitted does not reach the preset number.
In this embodiment, when the chip 200 receives the authentication instruction, if the number of different sent authentication data does not reach the preset number, a specific authentication instruction corresponding to the authentication instruction is sent to the host device 300, a first flag is set for the specific authentication data, so as to realize security authentication of the imaging box, and based on the first flag, whether the number of different sent authentications reaches the preset number can be quickly judged, when the preset number is reached, the chip 200 returns one authentication data to the host device at random, so that the complexity of an authentication method or an authentication mechanism running in the chip 200 is improved, so that a third party device cannot easily obtain all authentication data, the security of the authentication data is improved, the authentication mechanism of the chip 200 and the image forming device is further protected, misauthentication is avoided, and the security of the image forming device is improved.
Optionally, the chip 200 is further configured to:
judging whether the specific authentication data corresponding to the authentication instruction is set with a first mark, and if so, sending the specific authentication data to the host equipment.
Specifically, if the specific authentication data corresponding to the authentication instruction is set or added with the first flag, it indicates that the specific authentication data requested by the authentication instruction has been sent to the host device 300, and the specific authentication data is directly sent to the host device 300 without performing a preset number of related judgment processes, so as to improve the efficiency of data authentication.
For example, assuming that 3 pieces of authentication data that the chip 200 has transmitted to the host device 300 are data 8, data 10, and data 17, if the specific authentication data corresponding to the authentication instruction O2 currently transmitted by the host device 300 is data 10 and the data 10 has been previously transmitted to the host device 300, the data 10 may be directly transmitted to the host device 300 without determining whether the number of authentication data that has been transmitted to the host device 300 reaches the preset number.
Alternatively, when the different authentication data that has been transmitted to the host device 300 reaches the preset number, the target authentication data should preferably be each authentication data to which the first flag is not set, that is, each authentication data that is preferably not transmitted to the host device. Because the conventional authentication mechanism applied to the chip in the field generally corresponds to and matches authentication data and authentication instructions one by one, the sent different authentication data preferably does not send the authentication data after reaching the preset number, so that the probability of one-to-one correspondence between the authentication data and the authentication instructions is increased, but the authentication data and the authentication data may not match, a third party can be better confused, the difficulty of cracking the correspondence between the authentication data and the authentication instructions is increased, the application of the counterfeit chip to the image forming device 100 is avoided, and the use safety and service life of the image forming device 100 are improved.
Optionally, the chip 200 is further configured to:
after the target authentication data is transmitted to the host device 300, a second flag is set for the target authentication data.
Wherein the second flag is different from the first flag, and the second flag is used to identify each authentication data sent to the host device 300 when the number of different authentication data sent to the host device 300 reaches a preset number. The second mark may take any form, for example, may be a preset flag bit or a preset character, etc. The second flag may also be generated based on a device identification and/or a preset number of host devices 300.
Specifically, when the number of authentication data that have been transmitted to the host device 300 reaches a preset number, the chip 200 determines one target authentication data from among the plurality of authentication data, transmits the target authentication data to the host device 300, and sets a second flag for the target authentication data stored in the chip 200.
In some embodiments, the second flag may be set by a processor internal to the chip 200 or may be set by the main control device 120 of the image forming apparatus 100.
In some embodiments, the chip 200 further comprises a second flag setting module for setting a second flag for the target authentication data after the target authentication data is transmitted to the host device 300.
Specifically, the target authentication data may preferably be authentication data in which the first flag and the second flag are not set.
Optionally, the chip 200 is further configured to:
And if the number of the sent authentication data reaches the preset number, determining the authentication data which is not provided with the first mark or the second mark as the target authentication data.
In some embodiments, the data transmission module 230 of the chip 200 is specifically configured to:
If the number of transmitted authentication data has reached a predetermined number, authentication data to which the first flag or the second flag is not set is determined as the target authentication data, and the target authentication data is transmitted to the host device 300.
Preferably, the authentication data which is not provided with the first mark or the second mark is sent as target authentication data, so that the probability of one-to-one correspondence between the authentication data and the authentication instruction is further increased, and the difficulty of cracking the correspondence between the authentication data and the authentication instruction is further increased.
Optionally, the chip 200 is further configured to:
After receiving the authentication instruction, if each authentication data stored by the chip is set with a first mark or a second mark, randomly selecting one authentication data to be sent to the host device.
In some embodiments, the chip 200 is further configured to record a historical authentication instruction sent by the host device 300 and target authentication data returned corresponding to the historical authentication instruction after the number of different sent authentication data reaches the preset number, where the historical authentication instruction is different from an authentication instruction received before the number of sent authentication data reaches the preset number. When the chip 200 receives the authentication instruction from the host device 300, it is first determined whether each history authentication instruction stored in the chip 200 includes the same history authentication instruction as the authentication instruction, and if so, the target authentication data corresponding to the history authentication instruction is sent to the host device 300. Specifically, the history authentication instructions transmitted by the host device 300 at each time node may be recorded by a recording module or a memory of the chip 200.
After the number of different sent authentication data reaches the preset number, the chip 200 records the historical authentication instruction and the target authentication data returned corresponding to the historical authentication instruction, and then sends the same historical authentication instruction to reply the same target authentication data as the first time. By the method, the condition that different target authentication data are received by sending the same instruction after the quantity of the sent authentication data reaches the preset quantity is avoided, the authentication data and the authentication instruction are guaranteed to be in one-to-one correspondence, and even if the authentication data and the authentication instruction are not matched, a third party cannot perceive the authentication mechanism of the chip 200, so that the third party is prevented from manufacturing a counterfeit chip and being applied to the image forming device 100, and the use safety and service life of the image forming device 100 are improved.
In some embodiments, the data sending module 230 of the chip 200 is further configured to, after receiving the authentication instruction, randomly select one authentication data to send to the host device if each authentication data stored in the chip has been set with the first flag or the second flag.
Fig. 5 is a flowchart of an authentication method for chip operation in the embodiment shown in fig. 2, and as shown in fig. 5, the authentication method includes the following steps:
In step S501, an authentication instruction of the host apparatus 300 is received.
Wherein the authentication instruction instructs the chip 200 to transmit corresponding specific authentication data to the host device 300.
In step S502, it is determined whether the number of different authentication data transmitted to the host device 300 reaches a preset number.
Wherein the preset number is smaller than the total number of authentication data stored by the chip.
Optionally, after receiving the authentication instruction of the host device 300, the authentication method further includes:
a first tag of each authentication data is acquired.
Accordingly, determining whether the number of different authentication data that have been transmitted to the host device 300 reaches a preset number includes:
According to the number of the first marks, or according to the count value of the number of the returned authentication data, that is, the processor which returns the different authentication data chips once before the preset number is not reached, the processor executes accumulation counting once, so as to judge whether the number of the different authentication data sent to the host device 300 reaches the preset number.
In step S503, if yes, one authentication data is selected from the plurality of authentication data as target authentication data and sent to the host device 300.
Optionally, after the target authentication data is sent to the host device 300, the authentication method further includes:
a second flag is set for the target authentication data.
Optionally, selecting one authentication data from the plurality of authentication data as the target authentication data to be transmitted to the host device 300 includes:
the authentication data not set with the first flag or the second flag is determined as the target authentication data, and the target authentication data is transmitted to the host device 300.
Step S504, if not, the specific authentication data corresponding to the authentication instruction is sent to the host device 300.
Optionally, after the specific authentication data is sent to the host device 300, the authentication method further includes:
The first flag is set for the specific authentication data.
Optionally, after receiving the authentication instruction of the host device 300, the authentication method further includes:
judging whether the specific authentication data corresponding to the authentication instruction is set with a first mark, and if so, sending the specific authentication data to the host equipment.
Optionally, after receiving the authentication instruction, if each authentication data stored in the chip has been set with a first flag or a second flag, the authentication method further includes:
an authentication data is randomly selected and transmitted to the host device.
Fig. 6 is a schematic structural diagram of a chip according to another embodiment of the present application, and as can be seen from fig. 2 and fig. 6, the chip 200 further includes a memory 21 and at least one processor 22, wherein the memory 21 stores a computer program, so that the at least one processor 22 executes the computer program to implement the authentication method according to any embodiment of the present application.
In some embodiments, authentication data may be stored in memory 21.
The predetermined number may be stored in the memory 21 of the chip 200, may be in program code, or may be solidified in a logic circuit. The authentication data may be a password, a key, signature data, or the like, and can be related data for identity authentication. The authentication data itself may perform the authentication function of the printing system, or may perform the authentication function in cooperation with other data. The authentication data may be separate data, may be part of other data, or may be associated with other data.
Fig. 7 is a schematic diagram of an imaging cartridge according to an embodiment of the present application, and as shown in fig. 7, the imaging cartridge 800 includes a body 810 and a chip 820.
The chip 820 is provided in any of the embodiments shown in fig. 2 to 4 and 6.
The imaging cartridge 100 provided in the present embodiment is detachably mounted to the image forming apparatus 100.
An embodiment of the present application provides a computer-readable storage medium having stored thereon a computer program that is executed by a processor to implement the authentication method provided by the embodiment of the present application corresponding to fig. 5.
The computer readable storage medium may be, among other things, ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
An embodiment of the present application provides a computer program product comprising a computer program that is executed by a processor to implement the authentication method provided by the embodiment of the present application corresponding to fig. 5.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules is merely a logical function division, and there may be additional divisions of actual implementation, e.g., multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.