Nozzle identification method and device for printer, equipment and medium
By storing encrypted text in the printer printhead and comparing the manufacturer ID with a dynamic authentication key, the problem of low printhead identification security in existing technologies is solved, enabling brand authorization and unique authentication of the printhead, thereby improving the security and print quality of the printer system.
Patent Information
- Application Number
- CN202511392272.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-26
- Publication Date
- 2026-01-27
AI Technical Summary
Existing printer printhead identification methods are insecure, easily copied or cracked, and cannot effectively prevent counterfeit printheads, resulting in poor print quality and equipment damage.
By storing encrypted ciphertext in the printhead, a dynamic authentication key is generated using the key generation rules within the printer and the printhead's unique identifier. After decryption, the key is compared with the manufacturer ID to confirm the printhead's legitimacy and compatibility.
It improves the security of the printer system, ensures the brand authorization and uniqueness of the printhead, prevents unauthorized counterfeiting, guarantees print quality, reduces equipment failures, and maintains the brand image.
Smart Images

Figure CN121418129A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of printer equipment security and consumables authentication technology, and in particular to a method, apparatus, device and medium for printer printhead identification. Background Technology
[0002] After replacing a printer printhead, it's necessary to identify the printhead to avoid equipment damage and poor print quality caused by using a substandard printhead. Current printhead identification methods generally rely on simple ID comparison. This involves embedding a memory chip in the printhead to store a fixed ID code. The printer reads this ID and compares it to a built-in whitelist. This method has extremely low security; the ID code is easily copied or cracked, and it cannot effectively prevent counterfeit printheads.
[0003] Therefore, there is an urgent need for a method, device, equipment, and medium for printer printhead identification. Summary of the Invention
[0004] The purpose of this invention is to provide a printhead identification method, apparatus, device, and medium for printers, which solves the problem of low security caused by existing printhead identification methods relying solely on comparing plaintext IDs.
[0005] To achieve the above objectives, the present invention provides the following technical solution: In a first aspect, the present invention provides a printhead identification method for a printer, comprising: Obtain the manufacturer ID and key generation rules stored in the printer, as well as the ciphertext, encryption auxiliary parameters, and unique identifier stored in the printhead installed on the printer; Based on the unique identifier, a first key is generated according to the key generation rules; The ciphertext is decrypted based on the encryption auxiliary parameters and the first key to obtain the decryption result; Extract the manufacturer ID to be identified from the decryption result, and determine whether the manufacturer ID to be identified is the same as the manufacturer ID. If they are the same, the printhead is matched with the printer, and the printer executes the printing task.
[0006] Optionally, the encryption auxiliary parameters include an initialization vector and a random number; obtaining the manufacturer ID and key generation rules stored in the printer, as well as the ciphertext, encryption auxiliary parameters, and unique identifier stored in the printhead installed on the printer, further includes: Obtain the raw plaintext data, initialization vector, and nozzle unique identifier; the raw plaintext data includes a first byte block and a second byte block; the second byte block consists of a manufacturer ID and a random number; Based on the unique identifier, a second key is generated according to the key generation rules; Based on the initial vector and the second key, the first byte block and the second byte block are encrypted using the DES function to obtain the ciphertext. The ciphertext, initial vector, and random number are stored in the printhead, and the key generation rule is stored in the printer.
[0007] Optionally, based on the initial vector and the second key, the first byte block and the second byte block are encrypted using the DES function respectively to obtain the ciphertext, which includes: The first byte block and the initial vector are XORed to obtain the first XOR data. The first XOR data and the second key are encrypted using the DES function to obtain the first encryption result. The first encryption result and the second byte block are XORed to obtain the second XOR data. The second XOR data and the second key are encrypted using the DES function to obtain the second encryption result. The second encryption result is appended to the end of the first encryption result to obtain the ciphertext.
[0008] Optionally, the ciphertext includes a third byte block and a fourth byte block; the decryption operation based on the encryption auxiliary parameters and the first key to obtain the decryption result includes: The first key and the third byte block are decrypted using the DES function to obtain the first decrypted data; The first decrypted data is XORed with the initial vector to obtain the first plaintext data. The first key and the fourth byte block are decrypted using the DES function to obtain the second decrypted data; The second decrypted data is XORed with the third byte block to obtain the second plaintext data. The second plaintext data is appended to the end of the first plaintext data to obtain the decryption result.
[0009] Optionally, extracting the vendor ID to be identified from the decryption result includes: The first two bytes of the second plaintext data are extracted to obtain the manufacturer ID to be identified.
[0010] Optionally, the step of performing decryption operations on the ciphertext based on the encryption auxiliary parameters and the first key to obtain the decryption result further includes: Determine whether the length of the ciphertext is 16 bytes; If not, the ciphertext is adjusted by adding random bytes or deleting data at the end of the ciphertext so that the length of the adjusted ciphertext is 16 bytes. If so, the ciphertext is decrypted based on the encryption auxiliary parameters and the first key to obtain the decryption result.
[0011] Optionally, if the manufacturer ID to be identified is different from the manufacturer ID, an error message is sent, the printer status is set to not ready, and the printer's printing function is locked.
[0012] Compared with existing technologies, the present invention provides a printhead identification method for printers, comprising: acquiring the manufacturer ID and key generation rules stored in the printer, and the ciphertext, encryption auxiliary parameters, and unique identifier stored in the printhead installed on the printer; generating a first key based on the unique identifier according to the key generation rules; performing a decryption operation on the ciphertext based on the encryption auxiliary parameters and the first key to obtain a decryption result; extracting the manufacturer ID to be identified from the decryption result, and determining whether the manufacturer ID to be identified is the same as the manufacturer ID; if they are the same, the printhead matches the printer, and the printer executes a printing task. This application, by storing the ciphertext in the printhead and comparing the manufacturer ID to be identified with the manufacturer ID stored in the printer through the ciphertext decryption method, determines whether the printhead is an authorized printhead of the printer manufacturer, thus ensuring the matching between the printer and the printhead. This application abandons simple static ID comparison, combining the manufacturer ID and the printhead's unique identifier into a dynamic, unique authentication ciphertext generated through an encryption algorithm. This significantly enhances the security of the printer system, ensuring both the brand authorization of the printhead and the uniqueness of each printhead. It effectively prevents unauthorized manufacturers from counterfeiting printheads and users from mixing different brands, guaranteeing print quality, reducing equipment malfunctions caused by printhead issues, lowering maintenance costs, and protecting the printer manufacturer's brand image, thus preventing damage to the manufacturer's reputation caused by counterfeit or inferior printheads. Storing key generation rules in the printer and generating a key during the identification process based on these rules and the printhead's unique identifier prevents unauthorized access and further improves security.
[0013] Secondly, the present invention also provides a printhead recognition device for a printer, comprising: The data acquisition module is used to acquire the manufacturer ID and key generation rules stored in the printer, as well as the ciphertext, encryption auxiliary parameters, and unique identifiers stored in the printhead installed on the printer. The first key generation module is used to generate a first key based on the unique identifier and according to the key generation rules; The decryption module is used to perform decryption operations on the ciphertext based on the encryption auxiliary parameters and the first key to obtain the decryption result; The identification module is used to extract the manufacturer ID to be identified from the decryption result and determine whether the manufacturer ID to be identified is the same as the manufacturer ID. If they are the same, the printhead is matched with the printer and the printer performs the printing task.
[0014] Thirdly, the present invention provides a printhead recognition device for a printer, comprising: The communication unit / communication interface is used to obtain the manufacturer ID and key generation rules stored in the printer, as well as the ciphertext, encryption auxiliary parameters, and unique identifiers stored in the printhead installed on the printer. A processing unit / processor is configured to generate a first key based on the unique identifier and according to the key generation rules; The ciphertext is decrypted based on the encryption auxiliary parameters and the first key to obtain the decryption result; Extract the manufacturer ID to be identified from the decryption result, and determine whether the manufacturer ID to be identified is the same as the manufacturer ID. If they are the same, the printhead is matched with the printer, and the printer executes the printing task.
[0015] Fourthly, the present invention provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the printhead recognition method for a printer.
[0016] Compared with the prior art, the beneficial effects of the second aspect device solution, the third aspect equipment solution, and the fourth aspect computer-readable storage medium solution provided by the present invention are the same as the beneficial effects of the printhead recognition method for printers described in the above technical solutions, and will not be repeated here. Attached Figure Description
[0017] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a schematic diagram of the printer system provided by the present invention; Figure 2 A flowchart of a printhead recognition method for a printer provided by the present invention; Figure 3 The encryption flowchart provided for this invention; Figure 4 The decryption flowchart provided for this invention; Figure 5 A schematic diagram of the structure of a printhead recognition device for a printer provided by the present invention; Figure 6This is a schematic diagram of the structure of a printhead recognition device for a printer provided by the present invention. Detailed Implementation
[0018] To facilitate a clear description of the technical solutions in the embodiments of the present invention, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. For example, the first threshold and the second threshold are merely used to distinguish different thresholds and do not limit their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" are not necessarily different.
[0019] It should be noted that in this invention, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0020] In this invention, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, a combination of a and b, a combination of a and c, a combination of b and c, or a, b, and c, where a, b, and c can be single or multiple.
[0021] Before introducing the embodiments of the present invention, the relevant terms involved in the embodiments of the present invention are first defined as follows: A DES function is a code module that implements DES encryption or decryption logic. Its core function is to receive input data and a key, and output the corresponding result through a pre-defined algorithm. The implementation of DES functions varies across different programming languages, but the mainstream approach is to call mature encryption libraries to ensure both efficiency and security.
[0022] In the current printer market, most printer printheads or ink cartridges containing printheads lack effective authentication mechanisms. This leads to the following problems: Widespread compatibility and inferior printhead proliferation: Users can use non-original or uncertified third-party printheads. These printheads may not meet standards in manufacturing processes, material quality, and precision control. Degraded print quality: Inferior printheads are prone to clogging, misaligned printing, and ink dripping, resulting in defects such as stripes, inaccurate colors, and blurry printouts. This severely impacts user experience, shortens printhead lifespan, and may even damage the printer's internal tubing, circuit boards, and other core components, increasing maintenance costs and failure rates. Equipment damage risk: Incompatible or inferior printheads may cause wear or permanent damage to the printer's precision structures (such as the printing platform and drive components) due to electrical incompatibility or physical structural deviations. Damage to intellectual property and business models: Printer manufacturers' R&D investment and consumable profits are impacted by the third-party compatibility market.
[0023] Current manufacturers typically use a simple ID comparison scheme, which involves embedding a memory chip in the printhead to store a fixed ID code. The printer reads this ID and compares it with a built-in whitelist. This method has extremely low security, as the ID code can be easily copied or cracked, and it cannot effectively prevent counterfeit printheads.
[0024] To address the aforementioned problems, this invention provides a printhead identification method, apparatus, device, and medium for printers. It focuses on the corresponding detection and encrypted matching between the printhead and the printer body, aiming to achieve dedicated use of the printhead through an encrypted authentication mechanism, ensuring stable operation and print quality of the printer. The invention mainly includes two core processes: writing encrypted information to the printhead and decrypting and authenticating the printer. By storing encrypted identity information internally in the printhead, the printer automatically reads and decrypts this information upon power-on, comparing it with preset authorization information. Only when the comparison matches is the printer allowed to start normally and enter the printing-ready state; if the comparison does not match, an error mechanism is triggered, preventing the printer from working normally, thereby achieving dedicated matching between the printhead and the printer. The following description is in conjunction with the accompanying drawings.
[0025] See Figure 1This invention provides a printhead identification method, apparatus, device, and medium for printers, applicable to a printer system. The printer system includes a printer body and a printhead assembly, which communicate via a physical communication bus. The printer body includes an authentication control module and a printhead interface circuit, which is connected to the printhead assembly. The printhead assembly includes a non-volatile memory chip and a printhead ROM chip. The non-volatile memory chip stores encrypted text and encryption auxiliary parameters, while the printhead ROM chip stores a unique ROM ID. During the printhead manufacturing process, a unique ROM ID is integrated internally. This ID is fixed into the printhead's ROM chip by the printhead manufacturer during production. The ROM ID is a unique identifier for the printhead.
[0026] In practical implementation, when the printer is at critical points such as power-on startup or restart after printhead replacement, the authentication control module in the printer body sends a read command to the printhead interface circuit. The printhead interface circuit reads the encrypted text, encrypted auxiliary parameters, unique identifiers, and other data stored in the printhead and sends the data to the authentication control module. The authentication control module performs a printhead identification process based on the read data, ensuring that only printheads authorized by the manufacturer and compatible with the printer can be used normally. This avoids problems such as printing color deviation, printhead clogging, and equipment failure caused by the use of unauthorized or inferior printheads. It is suitable for scenarios such as quick print shops, advertising production companies, and label printing in industrial production.
[0027] See Figure 2 The present invention provides a printhead identification method for printers, which is executed by the authentication control module in the printer system. The method includes the following steps: Step 100: Obtain the manufacturer ID and key generation rules stored in the printer, as well as the ciphertext, encryption auxiliary parameters, and unique identifier stored in the printhead installed on the printer; The unique identifier can be the printhead ROM ID or other symbols representing the uniqueness of the printhead. The encryption auxiliary parameters are a random number and an initialization vector.
[0028] The encryption process for the ciphertext stored inside the printhead is typically completed at the end of the printhead production line using specialized encryption tools. The steps are as follows: Figure 3 As shown, the printhead's unique ROM ID and manufacturer ID are first read. The manufacturer ID is a manufacturer identifier representing the brand or printer model. Then, the manufacturer ID and ROM ID are combined with a specific encryption calculation to generate encrypted ciphertext. The encryption algorithm can be symmetric, asymmetric, etc. To enhance security, random numbers or timestamps can be added to the calculation. Finally, the ciphertext is written to the storage chip inside the printhead. The storage chip can be a non-volatile memory chip. At this point, the printhead initialization is complete.
[0029] Step 200: Generate a first key based on the unique identifier and according to the key generation rules; The key generation rule is custom-defined.
[0030] Step 300: Perform a decryption operation on the ciphertext based on the encryption auxiliary parameters and the first key to obtain the decryption result; like Figure 4 As shown, the decryption process is automatically triggered every time the printer is powered on or when a printhead replacement is detected. It is used to verify the legitimacy and matching of the printhead. First, the ciphertext in the printhead's storage chip is read. The printer then uses the generated key to decrypt the read ciphertext and restore the original identity data, i.e., the manufacturer ID.
[0031] Step 400: Extract the manufacturer ID to be identified from the decryption result, and determine whether the manufacturer ID to be identified is the same as the manufacturer ID. If they are the same, the printhead is matched with the printer, and the printer executes the printing task.
[0032] If the manufacturer ID to be identified matches the manufacturer ID, authentication is successful, the printer is ready, and printing is allowed. If the manufacturer ID to be identified does not match the manufacturer ID, authentication fails, and the printer sends an error message via the control panel or software, such as "Unable to recognize printhead" or "Please use genuine printhead," and sets the printer status to "Not Ready," locking the printer's printing function.
[0033] This application stores ciphertext in the printhead and compares the manufacturer ID to be identified with the printer's stored manufacturer ID by decrypting the ciphertext to determine whether the printhead is authorized by the printer manufacturer, thus ensuring printer-printhead compatibility. This application abandons simple static ID comparison, combining the manufacturer ID and the printhead's unique identifier. A dynamic and unique authentication ciphertext is generated through an encryption algorithm, greatly enhancing the security of the printer system. This ensures both the brand authorization of the printhead and the uniqueness of each printhead, effectively preventing unauthorized manufacturers from counterfeiting printheads and users from mixing different brands of printheads. It guarantees print quality, reduces equipment failures caused by printhead problems, lowers maintenance costs, and protects the printer manufacturer's brand image, preventing damage to the manufacturer's reputation caused by counterfeit inferior printheads. Storing key generation rules in the printer and generating a key during the identification process based on these rules and the printhead's unique identifier prevents the key from being read and cracked, further improving security.
[0034] based on Figure 2 In addition to the method described herein, this specification also provides some specific implementation methods of this method, which will be described below.
[0035] As an optional method, the acquisition of encrypted information stored in the printhead installed on the printer may be preceded by: Step 001: Obtain the original plaintext data, initialization vector, and nozzle unique identifier; the original plaintext data includes a first byte block and a second byte block; the second byte block consists of a manufacturer ID and a random number; The initial vector and random numbers are generated randomly.
[0036] For example, the original plaintext data is: First byte block (P1): {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}.
[0037] Second byte block (P2): {0x55, 0xAA, 0x87, 0x65, 0x43, 0x21, 0x99, 0x88}.
[0038] In the second byte block, the first two bytes are the manufacturer ID, and the last six bytes are a random number.
[0039] Step 002: Based on the unique identifier, generate a second key according to the key generation rules; For example, the unique identifier of the nozzle is: {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}. The key generation rule is: {nId[7], nId[6], 0xd1, 0xfb, 0x06, nId[1], nId[3], 0x14}; thus, the key is: {0x08, 0x07, 0xD1, 0xFB, 0x06, 0x02, 0x04, 0x14}.
[0040] Step 003: Based on the initial vector and the second key, the first byte block and the second byte block are encrypted using the DES function to obtain the ciphertext; Specifically, it includes the following steps: Step 0031: Perform an XOR operation on the first byte block and the initial vector to obtain the first XOR data; For example, the initial vector is: {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88}. The first byte block and the initial vector are XORed as follows: {0x01^0x11, 0x02^0x22, 0x03^0x33, 0x04^0x44, 0x05^0x55, 0x06^0x66, 0x07^0x77, 0x08^0x88}, and the first XORed data is {0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80}.
[0041] Step 0032: Use the DES function to encrypt the first XOR data and the second key to obtain the first encryption result; For example, the first encryption result is: {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88}.
[0042] Step 0033: Perform an XOR operation on the first encryption result and the second byte block to obtain the second XOR data; For example, the XOR process of the first encryption result and the second byte block is as follows: {0x55^0x11, 0xAA^0x22, 0x87^0x33, 0x65^0x44, 0x43^0x55, 0x21^0x66, 0x99^0x77, 0x88^0x88}, and the second XOR data is as follows: {0x44, 0x88, 0xB4, 0x21, 0x16, 0x47, 0xEE, 0x00}.
[0043] Step 0034: Use the DES function to encrypt the second XOR data and the second key to obtain the second encryption result; For example, the second encryption result is: {0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF,0x00}.
[0044] Step 0035: Patch the second encryption result to the end of the first encryption result to obtain the ciphertext.
[0045] For example, the ciphertext is: {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x00}.
[0046] Among them, {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88} is the third byte block; {0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x00} is the fourth byte block.
[0047] Step 004: Store the ciphertext, initial vector, and random number in the printhead, and store the key generation rule in the printer.
[0048] In the above steps, the random number is part of the second byte block. Because the random number is random, even if the manufacturer ID remains the same, the second byte block will be different each time encryption is performed, resulting in completely different ciphertexts. This effectively prevents attackers from cracking the system by analyzing multiple encryption results. After decryption at the printer end, the manufacturer ID and random number can be obtained from the recovered second byte block for verification.
[0049] As an optional approach, the step of performing a decryption operation on the ciphertext based on the encryption auxiliary parameters and the first key to obtain the decryption result further includes: Determine whether the length of the ciphertext is 16 bytes; If not, the ciphertext is adjusted by adding random bytes or deleting data at the end of the ciphertext so that the length of the adjusted ciphertext is 16 bytes. If so, the ciphertext is decrypted based on the encryption auxiliary parameters and the first key to obtain the decryption result.
[0050] For example, a formula can be used. Process the entire data. Here, len is the length of the read ciphertext. This formula adjusts for a ciphertext length of 16.
[0051] As an optional approach, step 300 can be implemented based on the following steps: Step 310: Use the DES function to decrypt the first key and the third byte block to obtain the first decrypted data; For example, when the key generation rule is: { nId[7], nId[6], 0xd1, 0xfb, 0x06, nId[1], nId[3], 0x14}; the unique identifier to be read is: {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}; the key bits to be read are: {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x00}. Where {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88} is the third byte block; {0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x00} is the fourth byte block. Therefore, the first key generated in step 200 is: {0x08, 0x07, 0xD1, 0xFB, 0x06, 0x02, 0x04, 0x14}. Calling the DES function to decrypt the third byte, using the first key and flg=0, the first decrypted data is: {0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80}.
[0052] Step 320: Perform an XOR operation between the first decrypted data and the initial vector to obtain the first plaintext data; For example, the XOR operation between the first decrypted data and the initial vector is as follows: {0x10^0x11, 0x20^0x22, 0x30^0x33, 0x40^0x44, 0x50^0x55, 0x60^0x66, 0x70^0x77, 0x80^0x88}; the resulting first plaintext data is: {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}. The first plaintext data is then written to pDest. The PSrc and pDest pointers each advance by 8 bytes.
[0053] Step 330: Use the DES function to decrypt the first key and the fourth byte block to obtain the second decrypted data; For example, the remaining length of the current ciphertext is curlen=8, which is greater than 0. The DES function is called to decrypt the fourth byte block using the first key and flg=0. The second decrypted data is: {0x44, 0x88, 0xB4, 0x21, 0x16, 0x47, 0xEE,0x00}.
[0054] Step 340: Perform an XOR operation between the second decrypted data and the third byte block to obtain the second plaintext data; For example, the XOR operation between the second decrypted data and the third byte block is as follows: {0x44^0x11,0x88^0x22, 0xB4^0x33, 0x21^0x44, 0x16^0x55,0x47^0x66, 0xEE^0x77, 0x00^0x88}. The second plaintext data is: {0x55, 0xAA, 0x87, 0x65, 0x43, 0x21, 0x99, 0x88}. The second plaintext data is then written to pDest.
[0055] Step 350: Patch the second plaintext data to the end of the first plaintext data to obtain the decryption result.
[0056] For example, the decryption result is: {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}, {0x55, 0xAA, 0x87, 0x65, 0x43, 0x21, 0x99, 0x88}. The first two bytes of the second plaintext data are extracted to obtain the manufacturer ID to be identified. The manufacturer ID to be identified is: 0x55, 0xAA, which is compared with the manufacturer ID stored in the printer. A random number stored in the printhead is read and compared with the last six bytes of the decrypted second plaintext data to verify data integrity.
[0057] As can be seen from the above structure and method, this application establishes a secure handshake protocol between the printer and the printhead. The printhead provides its unique encrypted proof, and the end device is responsible for verifying the validity of this proof, thus realizing proactive identity authentication of consumables. The process is clearly divided into initialization in the production stage and authentication in the usage stage, clarifying the responsibilities and system behaviors of different links in the industry chain (manufacturers and users), making the solution easy to implement and integrate, while ensuring a good user experience (seamless and fast authentication process). A closed-loop authentication process of "encryption, decryption, comparison, and error reporting" is constructed to achieve automated and intelligent authentication: existing technologies can only detect the physical installation status of the printhead. This invention designs a complete closed-loop process from printer power-on to authentication result feedback. All authentication steps are automatically completed by the device without manual operation, which not only improves authentication efficiency but also avoids errors from manual judgment. At the same time, a clear error reporting mechanism can promptly remind users of the problem, improving the user experience and solving the drawback of existing technologies that cannot detect unauthorized printheads in a timely manner. This invention makes full use of the nozzle's existing hardware resources (ROM ID) and endows them with new security value through software algorithms (encryption / decryption). It is an excellent example of combining low-cost hardware upgrades with high-value software innovation.
[0058] The embodiments of the present invention can divide functional modules according to the above method examples. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in the embodiments of the present invention is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0059] When dividing each function into modules according to its corresponding function. Figure 5 A schematic diagram of the structure of a printhead recognition device for a printer provided by the present invention is shown. Figure 5 As shown, the device includes: The data acquisition module 501 is used to acquire the manufacturer ID and key generation rules stored in the printer, as well as the ciphertext, encryption auxiliary parameters, and unique identifiers stored in the printhead installed on the printer. The first key generation module 502 is used to generate a first key based on the unique identifier and according to the key generation rules; Decryption module 503 is used to perform decryption operation on the ciphertext based on the encryption auxiliary parameters and the first key to obtain the decryption result; The identification module 504 is used to extract the manufacturer ID to be identified from the decryption result and determine whether the manufacturer ID to be identified is the same as the manufacturer ID. If they are the same, the printhead is matched with the printer and the printer performs the printing task.
[0060] Optionally, the encryption auxiliary parameters include an initialization vector and a random number; the device further includes an encryption module, which may specifically include: The data acquisition unit is used to acquire raw plaintext data, an initialization vector, and a unique identifier for the nozzle; the raw plaintext data includes a first byte block and a second byte block; the second byte block consists of a manufacturer ID and a random number. The second key generation unit is used to generate a second key based on the unique identifier and according to the key generation rules; An encryption unit is used to encrypt the first byte block and the second byte block respectively using the DES function based on the initial vector and the second key to obtain ciphertext; Storage unit. Used to store the ciphertext, initialization vector, and random number in the printhead, and to store the key generation rule in the printer.
[0061] Optionally, the encryption unit may specifically be used for: The first byte block and the initial vector are XORed to obtain the first XOR data. The first XOR data and the second key are encrypted using the DES function to obtain the first encryption result. The first encryption result and the second byte block are XORed to obtain the second XOR data. The second XOR data and the second key are encrypted using the DES function to obtain the second encryption result. The second encryption result is appended to the end of the first encryption result to obtain the ciphertext.
[0062] Optionally, the ciphertext includes a third byte block and a fourth byte block; the decryption module 503 may specifically include: The first decryption unit is used to decrypt the first key and the third byte block using the DES function to obtain the first decrypted data; The first XOR unit is used to perform an XOR operation between the first decrypted data and the initial vector to obtain the first plaintext data. The second decryption unit is used to decrypt the first key and the fourth byte block using the DES function to obtain the second decrypted data; The second XOR processing unit is used to perform XOR processing on the second decrypted data and the third byte block to obtain the second plaintext data. The splicing unit is used to splice the second plaintext data to the end of the first plaintext data to obtain the decryption result.
[0063] Optionally, the identification module 504 can be specifically used to: extract the first two bytes from the second plaintext data to obtain the manufacturer ID to be identified.
[0064] Optionally, the device further includes a ciphertext length adjustment module for determining whether the length of the ciphertext is 16 bytes; If not, the ciphertext is adjusted by adding random bytes or deleting data at the end of the ciphertext so that the length of the adjusted ciphertext is 16 bytes. If so, the ciphertext is decrypted based on the encryption auxiliary parameters and the first key to obtain the decryption result.
[0065] Optionally, if the manufacturer ID to be identified is different from the manufacturer ID, an error message is sent, the printer status is set to not ready, and the printer's printing function is locked.
[0066] The above mainly describes the solutions provided by the embodiments of the present invention from the perspective of the interaction between various modules. It is understood that, in order to achieve the above functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the present invention can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0067] When using the corresponding integrated unit Figure 6 This diagram illustrates the structure of a printhead recognition device for printers provided by the present invention. Figure 6 As shown, the device includes: The communication unit / communication interface is used to obtain the manufacturer ID and key generation rules stored in the printer, as well as the ciphertext, encryption auxiliary parameters, and unique identifiers stored in the printhead installed on the printer. A processing unit / processor is configured to generate a first key based on the unique identifier and according to the key generation rules; The ciphertext is decrypted based on the encryption auxiliary parameters and the first key to obtain the decryption result; Extract the manufacturer ID to be identified from the decryption result, and determine whether the manufacturer ID to be identified is the same as the manufacturer ID. If they are the same, the printhead is matched with the printer, and the printer executes the printing task.
[0068] The processing unit can be a processor or controller, such as a Central Processing Unit (CPU), a general-purpose processor, a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. The communication module can be a transceiver, transceiver circuitry, or communication interface, etc. The storage module can be a memory.
[0069] like Figure 6 As shown, the processor described above can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present invention. The communication interface described above can be one or more. The communication interface can use any transceiver-like device for communicating with other devices or communication networks.
[0070] like Figure 6 As shown, the terminal device described above may also include a communication line. The communication line may include a path for transmitting information between the components described above.
[0071] Optional, such as Figure 6 As shown, the terminal device may further include a memory. The memory stores computer execution instructions for implementing the present invention, and the execution is controlled by a processor. The processor executes the computer execution instructions stored in the memory, thereby implementing the method provided in the embodiments of the present invention.
[0072] like Figure 6As shown, the memory can be read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited to these. The memory can exist independently and be connected to the processor via communication lines. The memory can also be integrated with the processor.
[0073] In a specific implementation, as one example, such as Figure 6 As shown, a processor may include one or more CPUs, such as Figure 6 CPU0 and CPU1 in the CPU.
[0074] In a specific implementation, as one example, such as Figure 6 As shown, the terminal device may include multiple processors, such as Figure 6 The processors in the system. Each of these processors can be a single-core processor or a multi-core processor.
[0075] On the one hand, a computer-readable storage medium is provided, which stores instructions that, when executed, implement the aforementioned printhead recognition method for a printer.
[0076] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD).
[0077] Although the invention has been described herein in conjunction with various embodiments, those skilled in the art will understand and implement other variations of the disclosed embodiments by reviewing the accompanying drawings, the disclosure, and the appended claims in carrying out the claimed invention. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0078] Although the invention has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made therein without departing from the spirit and scope of the invention. Accordingly, this specification and drawings are merely exemplary descriptions of the invention as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if such modifications and modifications of the invention fall within the scope of the claims and their equivalents, the invention is also intended to include such modifications and modifications.
Claims
1. A printhead recognition method for a printer, characterized in that, include: Obtain the manufacturer ID and key generation rules stored in the printer, as well as the ciphertext, encryption auxiliary parameters, and unique identifier stored in the printhead installed on the printer; Based on the unique identifier, a first key is generated according to the key generation rules; The ciphertext is decrypted based on the encryption auxiliary parameters and the first key to obtain the decryption result; Extract the manufacturer ID to be identified from the decryption result, and determine whether the manufacturer ID to be identified is the same as the manufacturer ID. If they are the same, the printhead is matched with the printer, and the printer executes the printing task.
2. The printhead recognition method for a printer according to claim 1, characterized in that, The encryption auxiliary parameters include an initial vector and a random number; The process includes retrieving the manufacturer ID and key generation rules stored within the printer, as well as the ciphertext, encryption auxiliary parameters, and unique identifier stored within the printhead installed on the printer. Prior to this, it also includes: Obtain the raw plaintext data, initialization vector, and nozzle unique identifier; the raw plaintext data includes a first byte block and a second byte block; the second byte block consists of a manufacturer ID and a random number; Based on the unique identifier, a second key is generated according to the key generation rules; Based on the initial vector and the second key, the first byte block and the second byte block are encrypted using the DES function to obtain the ciphertext. The ciphertext, initial vector, and random number are stored in the printhead, and the key generation rule is stored in the printer.
3. The printhead recognition method for a printer according to claim 2, characterized in that, Based on the initial vector and the second key, the first byte block and the second byte block are encrypted using the DES function respectively, resulting in ciphertext including: The first byte block and the initial vector are XORed to obtain the first XOR data. The first XOR data and the second key are encrypted using the DES function to obtain the first encryption result. The first encryption result and the second byte block are XORed to obtain the second XOR data. The second XOR data and the second key are encrypted using the DES function to obtain the second encryption result. The second encryption result is appended to the end of the first encryption result to obtain the ciphertext.
4. The printhead identification method for a printer according to claim 2, characterized in that, The ciphertext includes a third byte block and a fourth byte block; the decryption operation based on the encryption auxiliary parameters and the first key to obtain the decryption result includes: The first key and the third byte block are decrypted using the DES function to obtain the first decrypted data; The first decrypted data is XORed with the initial vector to obtain the first plaintext data. The first key and the fourth byte block are decrypted using the DES function to obtain the second decrypted data; The second decrypted data is XORed with the third byte block to obtain the second plaintext data. The second plaintext data is appended to the end of the first plaintext data to obtain the decryption result.
5. The printhead identification method for a printer according to claim 4, characterized in that, The vendor ID to be identified can be extracted from the decryption result, including: The first two bytes of the second plaintext data are extracted to obtain the manufacturer ID to be identified.
6. The printhead identification method for a printer according to claim 1, characterized in that, The step of performing a decryption operation on the ciphertext based on the encryption auxiliary parameters and the first key to obtain the decryption result includes, prior to: Determine whether the length of the ciphertext is 16 bytes; If not, the ciphertext is adjusted by adding random bytes or deleting data at the end of the ciphertext so that the length of the adjusted ciphertext is 16 bytes. If so, the ciphertext is decrypted based on the encryption auxiliary parameters and the first key to obtain the decryption result.
7. The printhead recognition method for a printer according to claim 1, characterized in that, If the manufacturer ID to be identified is different from the manufacturer ID, an error message is sent, the printer status is set to not ready, and the printer's printing function is locked.
8. A printhead recognition device for a printer, characterized in that, include: The data acquisition module is used to acquire the manufacturer ID and key generation rules stored in the printer, as well as the ciphertext, encryption auxiliary parameters, and unique identifiers stored in the printhead installed on the printer. The first key generation module is used to generate a first key based on the unique identifier and according to the key generation rules; The decryption module is used to perform decryption operations on the ciphertext based on the encryption auxiliary parameters and the first key to obtain the decryption result; The identification module is used to extract the manufacturer ID to be identified from the decryption result and determine whether the manufacturer ID to be identified is the same as the manufacturer ID. If they are the same, the printhead is matched with the printer and the printer performs the printing task.
9. A printhead recognition device for a printer, characterized in that, include: The communication unit / communication interface is used to obtain the manufacturer ID and key generation rules stored in the printer, as well as the ciphertext, encryption auxiliary parameters, and unique identifiers stored in the printhead installed on the printer. A processing unit / processor is configured to generate a first key based on the unique identifier and according to the key generation rules; The ciphertext is decrypted based on the encryption auxiliary parameters and the first key to obtain the decryption result; Extract the manufacturer ID to be identified from the decryption result, and determine whether the manufacturer ID to be identified is the same as the manufacturer ID. If they are the same, the printhead is matched with the printer, and the printer executes the printing task.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a processor, implement the printhead identification method for a printer as described in any one of claims 1-7.
Citation Information
Patent Citations
Replaceable printing component with factory identity code
CN104582968A
Ink cartridge chip, ink cartridge and ink cartridge recognition system and method
CN105398225A
3D remote printing control system and method based on Internet of Things
CN110989945A
Printer consumable identification method and system based on security chip and security authentication technology
CN116992497A
Printer consumable identification method and system based on double security chips
CN117021770A
Cited By
Digital printer product quality inspection management system based on data encryption
CN122087874A
