File import method and system based on security device

By using security devices and encryption technology during file import, we ensure the security and integrity of the file transfer process, solving the problem of security threats during file import in mobile devices, and achieving the dual improvement of information security.

CN119089464APending Publication Date: 2024-12-06AITIWEIER ELECTRONICS TECH BEIJING
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411113257.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

There are security threats during the import process of files in mobile devices, such as viruses, Trojans and spyware threats. The existing technology is difficult to effectively distinguish between secure files and potential threats, and it is difficult to ensure file integrity and security during data transmission.

Method used

Using the file import method based on security equipment, the encryption technology and hashing are used through steps such as initialization and authentication, generation and exchange of random numbers, generation of DES keys, encryption and sending passwords, file selection and signature preparation, and security equipment processing and signature. The algorithm ensures security and integrity during file transfer.

Benefits of technology

Significantly improve the level of information security, isolate potential threats in the network environment, ensure the security of private key operations, enhance the ciphertext status during data transmission, simplify the security management process, reduce the cumbersome security inspection burden, and realize The dual improvement of convenience and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089464A_ABST
    Figure CN119089464A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of tool software products, and discloses the following steps: S1, initialization and authentication; S2, generation and exchange of random numbers; S3, mutual verification of the random numbers; S4, generation of a DES secret key; through an innovative private key management scheme, the information security level is remarkably improved, the private key is advocated to be imported into a completely off-line security room, potential threats in a network environment are effectively isolated, the security of private key operation is ensured, a private key certificate is strictly limited to be stored in security equipment, and strict access control is assisted, so that the security of the private key is greatly improved. The method greatly reduces the risk of artificial leakage, employs an encryption communication mechanism when interacting with a safety device, guarantees the ciphertext state in the data transmission process, further enhances the data leakage prevention capability, and also strengthens the legality verification and data integrity verification of files flowing into the device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of tool software products, and specifically relates to a file import method and system based on security equipment. Background Art

[0002] With the popularity of mobile devices, user information faces unprecedented security challenges, malicious attacks occur frequently, and unknown applications and files contain potential threats of viruses, Trojans and spyware. Therefore, the security of file import has become a focus that cannot be ignored. During the file update or download process, it is crucial to implement a strict information verification mechanism. By verifying the integrity of the file and the reliability of the source, it is effective to distinguish between safe files and potential threats. At the same time, the introduction of encryption technology adds a layer of protection barrier for file transmission to ensure that data is not tampered with or stolen during the transmission process. These measures jointly build a more solid file security line of defense, escort user information, and improve the overall security performance of mobile devices. Summary of the invention

[0003] The object of the present invention is to provide a file import method and system based on a security device to solve the problems raised in the above background technology.

[0004] In order to achieve the above object, the present invention provides the following technical solution: a file import method based on a security device, the specific steps of the import method are:

[0005] S1: Initialization and authentication: The customer starts the software and enters the UKey password. After the system verifies the password, the operation continues. If the verification fails, an error message is displayed and the operation is retried.

[0006] S2: Generate and exchange random numbers: The tool generates a 4-byte random number, encrypts it, and sends it to the security device together with the public key, which verifies the decryption and verification;

[0007] S3: Mutual verification of random numbers: The security device generates a random number R2 and encrypts it to the tool, which then verifies and decrypts R2;

[0008] S4: Generate DES key: The tool uses the result of XOR of R1 and R2 and concatenates R1 to generate DES key;

[0009] S5: Encrypt and send password: The password is encrypted and sent, and the security device decrypts and verifies it. If it is wrong, re-enter it, otherwise continue;

[0010] S6: File selection and signature preparation: The customer selects the file, the tool calculates the SHA256 hash, encrypts the file and concatenates the hash, and sends it to the security device;

[0011] S7: Security device processing and signature: The security device decrypts and verifies the file. If it is correct, the private key is encrypted and an MD5 signature is generated. The encrypted file, hash and signature are sent to the tool. The tool saves the file and reports that the signature is successful.

[0012] Preferably, the specific steps of initialization and authentication in S1 are as follows:

[0013] Step 1: The customer starts the tool and enters the password: The customer first starts the target tool software and enters the UKey password as prompted;

[0014] Step 2: System Verification of UKey Password: Then, the system verifies the validity of the entered UKey password;

[0015] Step 3: Continue or report an error based on the verification result: If the verification fails, the tool will report an error and prompt the customer to re-enter the password; if the verification is successful, the customer is allowed to proceed to the next step.

[0016] Preferably, the specific steps of generating and exchanging random numbers in S2 are as follows:

[0017] Step 1: Generate and encrypt a random number: The tool first generates a 4-byte random number R1, and then encrypts R1 using its own private key;

[0018] Step 2: Send the public key and encrypted random number: After completing the encryption, the tool sends its own public key and the encrypted random number R1 to the security device;

[0019] Step 3: Security device verification and decryption: After receiving the public key and encrypted random number, the security device first verifies the validity of the tool's public key certificate. After the verification is passed, it uses the private key corresponding to the public key (or decrypts through the public key encryption feature if asymmetric encryption is used) to decrypt R1 and verify whether the decrypted random number R1 meets expectations.

[0020] Preferably, the mutual verification random number in S3 means that in order to enhance the security of communication, the security device will generate an additional 4-byte random number R2 and encrypt it using the public key of the tool. Subsequently, the encrypted R2 is sent to the tool. After receiving the encrypted R2, the tool will first verify the validity of the public key certificate of the security device. After the verification is passed, the tool uses its own private key (or in some cases, uses the characteristics of public key encryption for decryption) to decrypt R2 and verify whether the decrypted random number R2 meets expectations.

[0021] Preferably, the tool for generating the DES key in S4 generates the DES key ingeniously by performing an XOR operation on the random numbers R1 and R2, and then concatenating the result with R1, thereby utilizing the randomness of R1 and R2, and increasing the complexity and security of the key through XOR and concatenation operations, thereby providing strong protection for the subsequent encryption process.

[0022] Preferably, the specific steps of encrypting and sending the password in S5 are as follows:

[0023] Step 1: Enter the password and encrypt it: The customer enters the password on the security device, and the tool immediately encrypts the password using the DES key previously generated by XORing R1 and R2 to ensure the security of the password during transmission, and then sends the encrypted password to the security device;

[0024] Step 2: The security device verifies the password: After receiving the encrypted password, the security device uses the same DES key (calculated based on the shared R1 and R2) to decrypt it and verify whether the decrypted password is correct. If the password is incorrect, the customer is prompted to re-enter it; if the password is correct, the subsequent operation process continues.

[0025] Preferably, the file selection and signature preparation in S6 includes the following two steps:

[0026] Step 1: Select the file and calculate the hash: The customer selects the file to be signed on the security device, and the tool then performs a SHA256 hash calculation on the file to generate a unique digital fingerprint of the file;

[0027] Step 2: Send the encrypted file and hash concatenation: Next, the tool uses the previously generated DES key to encrypt the file content to ensure the security of the file during transmission. Subsequently, the encrypted file ciphertext is concatenated with the calculated SHA256 hash value.

[0028] Preferably, the specific steps of security device processing and signing in S7 are as follows:

[0029] Step 1: Security device decryption and verification: The security device first uses the previously shared DES key to decrypt the received file ciphertext and restore the file content. Then, it recalculates the SHA256 hash of the decrypted file content and compares the calculation result with the received hash value. If the two match, it is confirmed that the file has not been tampered with during transmission and the verification is successful.

[0030] Step 2: File encryption and signature generation: After confirming the integrity of the file, the security device uses its dedicated private key to encrypt the plain text of the file to ensure the security of the file. At the same time, it calculates the MD5 hash value of the plain text of the file and signs the hash value with the private key to generate an MD5 signature as a digital proof of the authenticity and integrity of the file.

[0031] Step 3: Send signature data: The security device sends the encrypted file ciphertext, plaintext MD5 hash value and corresponding MD5 signature to the tool;

[0032] Step 4: Tool storage and reporting: After receiving the signature data from the security device, the tool will properly save it and then report to the customer that the signing operation has been successfully completed, including that the file has been securely encrypted, the hash value has been verified to match, and the MD5 signature has been generated and sent.

[0033] Preferably, the system consists of a security preparation and authentication module, a file selection and signature module, a file transmission and verification module, and a communication and interface management module.

[0034] The beneficial effects of the present invention are as follows:

[0035] The present invention significantly improves the level of information security through an innovative private key management solution, advocates importing private keys in a completely offline safe house, effectively isolates potential threats in the network environment, ensures the security of private key operations, and strictly limits the storage of private key certificates to the internal storage of security devices, supplemented by strict access control, which greatly reduces the risk of human leakage. When interacting with security devices, an encrypted communication mechanism is adopted to ensure the ciphertext state during data transmission, further enhancing the data leakage prevention capability. In addition, the solution also strengthens the legitimacy verification and data integrity verification of files flowing into the device, ensures the reliability of the data source, builds a solid line of defense for information security, simplifies the security management process, enables users to manage device files more conveniently, and greatly reduces the burden of cumbersome security checks. At the same time, it also optimizes the update process of applications and systems, realizes software upgrades in a more efficient and secure manner, protects users' information security, and achieves a dual improvement in convenience and security. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a complete interactive process diagram of the tool of the present invention and the safety device;

[0037] Figure 2 This is a flow chart of importing the private key into a security device of the present invention;

[0038] Figure 3 This is a flowchart for downloading files of the present invention. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0040] like Figures 1 to 3 As shown, an embodiment of the present invention provides a file import method based on a security device, and the specific steps of the import method are:

[0041] S1: Initialization and authentication: The customer starts the software and enters the UKey password. After the system verifies the password, the operation continues. If the verification fails, an error message is displayed and the operation is retried.

[0042] S2: Generate and exchange random numbers: The tool generates a 4-byte random number, encrypts it, and sends it to the security device together with the public key, which verifies the decryption and verification;

[0043] S3: Mutual verification of random numbers: The security device generates a random number R2 and encrypts it to the tool, which then verifies and decrypts R2;

[0044] S4: Generate DES key: The tool uses the result of XOR of R1 and R2 and concatenates R1 to generate DES key;

[0045] S5: Encrypt and send password: The password is encrypted and sent, and the security device decrypts and verifies it. If it is wrong, re-enter it, otherwise continue;

[0046] S6: File selection and signature preparation: The customer selects the file, the tool calculates the SHA256 hash, encrypts the file and concatenates the hash, and sends it to the security device;

[0047] S7: Security device processing and signature: The security device decrypts and verifies the file. If it is correct, the private key is encrypted and an MD5 signature is generated. The encrypted file, hash and signature are sent to the tool. The tool saves the file and reports that the signature is successful.

[0048] The specific steps of initialization and authentication in S1 are as follows:

[0049] Step 1: The customer starts the tool and enters the password: The customer first starts the target tool software and enters the UKey password as prompted;

[0050] Step 2: System Verification of UKey Password: Then, the system verifies the validity of the entered UKey password;

[0051] Step 3: Continue or report an error based on the verification result: If the verification fails, the tool will report an error and prompt the customer to re-enter the password; if the verification is successful, the customer is allowed to proceed to the next step.

[0052] The above three steps not only ensure the security of customers when using the tool software, but also improve the user experience. First, by clearly instructing customers to enter passwords, the standardization and security of operations are enhanced. Secondly, the system instantly verifies the validity of the password, effectively preventing unauthorized access and ensuring data security. Finally, clear feedback is given based on the verification results, whether it is an error retry or a smooth continuation, so that customers can quickly understand the current status, reduce operational confusion, and improve the smoothness and satisfaction of the overall use process.

[0053] The specific steps of generating and exchanging random numbers in S2 are as follows:

[0054] Step 1: Generate and encrypt a random number: The tool first generates a 4-byte random number R1, and then encrypts R1 using its own private key to ensure data security;

[0055] Step 2: Send the public key and encrypted random number: After completing the encryption, the tool sends its own public key and the encrypted random number R1 to the security device for subsequent verification and decryption operations.

[0056] Step 3: Security device verification and decryption: After receiving the public key and encrypted random number, the security device first verifies the validity of the tool's public key certificate. After verification, it uses the private key corresponding to the public key (or decrypts through the public key encryption feature if asymmetric encryption is used) to decrypt R1 and verify whether the decrypted random number R1 meets expectations to confirm the integrity and correctness of the data.

[0057] The adoption of these three steps not only strengthens the security of data transmission, but also ensures the trust verification of both communicating parties. First, the random number R1 is generated and encrypted, which effectively prevents the data from being tampered with or stolen during transmission. Secondly, the sending of the public key and the encrypted random number provides the necessary verification and decryption materials for the security device. Finally, the security device ensures the integrity and correctness of the data by verifying the public key certificate and decrypting the random number, thereby enhancing the security and reliability of the entire communication process. This series of operations improves the security of the system and protects the secure transmission of user data.

[0058] Among them, the mutual verification random number in S3 means that in order to enhance the security of communication, the security device will generate an additional 4-byte random number R2, and encrypt it with the public key of the tool to ensure the security of data transmission. Subsequently, the encrypted R2 is sent to the tool. After receiving the encrypted R2, the tool will first verify the validity of the public key certificate of the security device to ensure that the identity of the sender is authentic. After the verification is passed, the tool uses its own private key (or in some cases, uses the characteristics of public key encryption for decryption) to decrypt R2 and verify whether the decrypted random number R2 meets expectations.

[0059] The process of mutual verification of random numbers greatly improves the security and trust of both parties in communication. R2 is generated and encrypted by a security device, and then decrypted and verified by the tool. This process not only ensures the security of data transmission, but also verifies the validity of the public key certificates of both parties, effectively preventing man-in-the-middle attacks. The tool decrypts and verifies the correctness of R2, further confirming the integrity and authenticity of the communication data. This mutual verification mechanism establishes a solid security barrier for communication between the two parties, protects sensitive information from being leaked or tampered with, and improves the security and reliability of overall communication.

[0060] Among them, the tool for generating the DES key in S4 cleverly generates the DES key by performing an XOR operation on the random numbers R1 and R2, and then concatenating the result with R1. It utilizes the randomness of R1 and R2, and also increases the complexity and security of the key through XOR and concatenation operations, providing strong protection for the subsequent encryption process.

[0061] The specific steps of encrypting and sending the password in S5 are as follows:

[0062] Step 1: Enter the password and encrypt it: The customer enters the password on the security device, and the tool immediately encrypts the password using the DES key previously generated by XORing R1 and R2 to ensure the security of the password during transmission, and then sends the encrypted password to the security device;

[0063] Step 2: The security device verifies the password: After receiving the encrypted password, the security device uses the same DES key (calculated based on the shared R1 and R2) to decrypt it and verify whether the decrypted password is correct. If the password is incorrect, the customer is prompted to re-enter it; if the password is correct, the subsequent operation process continues.

[0064] Through the above two steps, not only the security of password transmission is guaranteed, but also the rigor of the user authentication process is enhanced. The password entered by the customer is encrypted with the DES key, which effectively prevents the password from being stolen or tampered with during transmission, thereby improving the security of data transmission. The security device uses the same key to decrypt and verify the password, ensuring that only legitimate users can pass the verification, thus enhancing the system's protection capabilities. At the same time, the instant feedback mechanism for password errors improves the convenience of user operations, avoids invalid attempts, and optimizes the user experience. This process not only protects user privacy, but also promotes the stability and security of the system.

[0065] The file selection and signature preparation in S6 includes the following two steps:

[0066] Step 1: Select the file and calculate the hash: The customer selects the file to be signed on the security device, and the tool then performs a SHA256 hash calculation on the file to generate a unique digital fingerprint of the file.

[0067] Step 2: Send the encrypted file and hash concatenation: Next, the tool uses the previously generated DES key to encrypt the file content to ensure the security of the file during transmission. Subsequently, the encrypted file ciphertext is concatenated with the calculated SHA256 hash value to form a complete data packet, which is sent to the security device for subsequent verification and storage operations.

[0068] The specific steps of the security device processing and signing in S7 are as follows:

[0069] Step 1: Security device decryption and verification: The security device first uses the previously shared DES key to decrypt the received file ciphertext and restore the file content. Then, it recalculates the SHA256 hash of the decrypted file content and compares the calculation result with the received hash value. If the two match, it confirms that the file has not been tampered with during transmission and the verification is successful.

[0070] Step 2: File encryption and signature generation: After confirming the integrity of the file, the security device uses its dedicated private key to encrypt the plain text of the file to ensure the security of the file. At the same time, the MD5 hash value of the plain text of the file is calculated, and the hash value is signed with the private key to generate an MD5 signature as a digital proof of the authenticity and integrity of the file;

[0071] Step 3: Send signature data: The security device sends the encrypted file ciphertext, plaintext MD5 hash value and corresponding MD5 signature to the tool. These data provide necessary information for the secure transmission and subsequent verification of the file;

[0072] Step 4: Tool storage and reporting: After receiving the signature data from the security device, the tool will store it properly and then report to the customer that the signing operation has been successfully completed, including that the file has been securely encrypted, the hash value has been verified to match, and the MD5 signature has been generated and sent. This step ensures that the customer understands and trusts the signing process.

[0073] The security device verifies the integrity of the file through DES decryption. After verification, it uses the private key to encrypt the file and generate an MD5 signature to ensure the security and authenticity of the file. Subsequently, the security device sends the encrypted file, MD5 hash value and signature to the tool, which saves the data and notifies the customer that the signature is successful. This process effectively ensures the security of file transmission and the authenticity verification of the file.

[0074] The system consists of a security preparation and authentication module, a file selection and signature module, a file transmission and verification module, and a communication and interface management module.

[0075] Security Preparation and Certification Module

[0076] Function description: Certificate generation: Generate public key certificates and private key certificates in the system. Private key certificates are used for encryption and signing, and public key certificates are used for signature verification and decryption.

[0077] Private key protection: The private key certificate needs to be imported into a secure device in a safe house environment. The safe house ensures security through facial recognition and UKey double verification. UKey needs to be operated offline to prevent private key leakage.

[0078] Device authentication: Customers need to manage their own private key certificates and import them into security devices. The tool only obtains the customer's public key certificate for subsequent verification.

[0079] Double password verification: When the user enters the tool, he must first enter the UKey password, and then enter the security device password after verification. The password ciphertext is sent to the security device for verification to ensure the security of the operating environment.

[0080] File selection and signature module

[0081] Function description: File selection: The customer selects the file that needs to be signed in the tool.

[0082] File encryption and hash calculation: The tool calculates the SHA256 hash value of the file and encrypts the file content using the DES key.

[0083] Send to security device: The encrypted file ciphertext is concatenated with the SHA256 hash value and sent to the security device for further processing.

[0084] Security device signature: The security device decrypts the file, recalculates the hash value for verification, and then uses the private key to encrypt the plain text of the file, calculates the MD5 hash value and generates a signature.

[0085] Return signed data: The security device sends the encrypted file, the plaintext MD5 hash value, and the MD5 signature back to the tool.

[0086] File transfer and verification module

[0087] Functional description: Data transmission: The tool receives signature data from security devices and supports transmission through multiple communication methods such as Wi-Fi, 4G, Bluetooth, and serial ports.

[0088] Data preservation and reporting: The tool saves the received signature data and reports the signature success to the customer.

[0089] Import file into device: Update the signed file to the target device through the network or serial port.

[0090] File decryption and verification: The device uses the public key to decrypt the file data, calculates the MD5 hash value and compares it with the received MD5 hash value to verify the data integrity. At the same time, it verifies the signature data to ensure the security of the file source.

[0091] Communication and interface management module

[0092] Function description: Communication mode support: Provide support for multiple communication modes such as Wi-Fi, 4G, Bluetooth, serial port, etc. to ensure flexible configuration under different environments and requirements.

[0093] Interface standardization: Define the communication protocols and interface standards between tools, safety devices, and target devices to ensure the consistency and security of data transmission.

[0094] Error handling and logging: handle errors and exceptions during communication and record detailed operation logs to facilitate problem troubleshooting and system maintenance.

[0095] Configuration and update: Allows users to configure communication parameters and interface settings according to actual needs, and supports online update and upgrade of the system.

[0096] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0097] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A file import method based on a security device, Features: The specific steps of this import method are: S1: Initialization and authentication: The customer starts the software and enters the UKey password. After the system verifies the password, the operation continues. If the verification fails, an error message is displayed and the operation is retried. S2: Generate and exchange random numbers: The tool generates a 4-byte random number, encrypts it, and sends it to the security device together with the public key, which verifies the decryption and verification; S3: Mutual verification of random numbers: The security device generates a random number R2 and encrypts it to the tool, which then verifies and decrypts R2; S4: Generate DES key: The tool uses the result of XOR of R1 and R2 and concatenates R1 to generate DES key; S5: Encrypt and send password: The password is encrypted and sent, and the security device decrypts and verifies it. If it is wrong, re-enter it, otherwise continue; S6: File selection and signature preparation: The customer selects the file, the tool calculates the SHA256 hash, encrypts the file and concatenates the hash, and sends it to the security device; S7: Security device processing and signature: The security device decrypts and verifies the file. If it is correct, the private key is encrypted and an MD5 signature is generated. The encrypted file, hash and signature are sent to the tool. The tool saves the file and reports that the signature is successful.

2. A file import method based on a security device according to claim 1, Features: The specific steps of initialization and authentication in S1 are as follows: Step 1: The customer starts the tool and enters the password: The customer first starts the target tool software and enters the UKey password as prompted; Step 2: System Verification of UKey Password: Then, the system verifies the validity of the entered UKey password; Step 3: Continue or report an error based on the verification result: If the verification fails, the tool will report an error and prompt the customer to re-enter the password; if the verification is successful, the customer is allowed to proceed to the next step.

3. A file import method based on a security device according to claim 1, Features: The specific steps of generating and exchanging random numbers in S2 are as follows: Step 1: Generate and encrypt a random number: The tool first generates a 4-byte random number R1, and then encrypts R1 using its own private key; Step 2: Send the public key and encrypted random number: After completing the encryption, the tool sends its own public key and the encrypted random number R1 to the security device; Step 3: Security device verification and decryption: After receiving the public key and encrypted random number, the security device first verifies the validity of the tool's public key certificate. After the verification is passed, it uses the private key corresponding to the public key to decrypt R1 and verify whether the decrypted random number R1 meets expectations.

4. A file import method based on a security device according to claim 1, Features: The mutual verification random number in S3 refers to the security device generating an additional 4-byte random number R2 in order to enhance the security of communication, and encrypting it with the public key of the tool. Subsequently, the encrypted R2 is sent to the tool. After receiving the encrypted R2, the tool first verifies the validity of the public key certificate of the security device. After the verification is passed, the tool uses its own private key to decrypt R2 and verify whether the decrypted random number R2 meets expectations.

5. A file import method based on a security device according to claim 1, Features: The tool for generating the DES key in S4 cleverly generates the DES key by performing an XOR operation on the random numbers R1 and R2, and then concatenating the result with R1. This utilizes the randomness of R1 and R2, and increases the complexity and security of the key through XOR and concatenation operations, providing strong protection for the subsequent encryption process.

6. A file import method based on a security device according to claim 1, Features: The specific steps of encrypting and sending the password in S5 are as follows: Step 1: Enter the password and encrypt it: The customer enters the password on the security device, and the tool immediately encrypts the password using the DES key previously generated by XORing R1 and R2 to ensure the security of the password during transmission, and then sends the encrypted password to the security device; Step 2: The security device verifies the password: After receiving the encrypted password, the security device uses the same DES key to decrypt it and verify whether the decrypted password is correct. If the password is incorrect, the customer is prompted to re-enter it; If the password is correct, continue with the subsequent operation process.

7. A file import method based on a security device according to claim 1, Features: The file selection and signature preparation in S6 has the following two steps: Step 1: Select the file and calculate the hash: The customer selects the file to be signed on the security device, and the tool then performs a SHA256 hash calculation on the file to generate a unique digital fingerprint of the file; Step 2: Send the encrypted file and hash concatenation: Next, the tool uses the previously generated DES key to encrypt the file content to ensure the security of the file during transmission. Subsequently, the encrypted file ciphertext is concatenated with the calculated SHA256 hash value.

8. A method for importing files based on a security device according to claim 1, Features: The specific steps of security device processing and signing in S7 are as follows: Step 1: Security device decryption and verification: The security device first uses the previously shared DES key to decrypt the received file ciphertext and restore the file content. Then, it recalculates the SHA256 hash of the decrypted file content and compares the calculation result with the received hash value. If the two match, it confirms that the file has not been tampered with during transmission and the verification is successful; Step 2: File encryption and signature generation: After confirming the integrity of the file, the security device uses its dedicated private key to encrypt the plain text of the file to ensure the security of the file. At the same time, it calculates the MD5 hash value of the plain text of the file and signs the hash value with the private key to generate an MD5 signature as a digital proof of the authenticity and integrity of the file. Step 3: Send signature data: The security device sends the encrypted file ciphertext, plaintext MD5 hash value and corresponding MD5 signature to the tool; Step 4: Tool storage and reporting: After receiving the signature data from the security device, the tool will properly save it and then report to the customer that the signing operation has been successfully completed, including that the file has been securely encrypted, the hash value has been verified to match, and the MD5 signature has been generated and sent.

9. A file import system based on security equipment, Features: The system consists of a security preparation and authentication module, a file selection and signature module, a file transmission and verification module, and a communication and interface management module.