Host-based password ciphertext storage and use method and device
By decrypting and generating logical data files before the main program reads the encrypted file, the problem of deep coupling between the main program and the encrypted file is solved, and the main program and encrypted file is decoupled, reducing the development and testing workload.
Patent Information
- Application Number
- CN202210615177.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2042-05-31
AI Technical Summary
In the prior art, the main program has deep coupling with the encrypted file, resulting in a large number of changes required for the main program when the encryption algorithm changes, which increases the development and testing workload.
Before the main program of the system reads the encrypted file, it decrypts and generates a logical data file. This file only contains the general information required by the main program and does not contain confidential information. The main program uses this logical data file to operate, decouple the dependence between the main program and the encrypted file.
By decrypting the file, the main program and the encrypted file are decoupled. When the encrypted file information changes or the encryption algorithm changes, the encrypted file only needs to be adjusted without affecting the main program, reducing the development and testing workload.
Smart Images

Figure CN114969789B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to a host-based password ciphertext storage and use method and device. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.
[0003] In the system, there are often some data such as passwords that need to be encrypted and stored. The existing implementation solutions are as follows: Figure 1 As shown:
[0004] 1. The system main program calls the tool subroutine to decrypt the encrypted file.
[0005] 2. Read the decrypted information and generate FTP statements / login statements in the main program's memory.
[0006] 3. The main program reads the FTP statement / login statement for subsequent login operations.
[0007] This implementation has the following disadvantages:
[0008] 1. Deep coupling. Although the tool program is a subroutine, when the encryption algorithm changes, the interface, reference, library function, etc. of the main program calling the subroutine may need to be changed, resulting in indirect deep coupling between the main program and the encrypted file.
[0009] 2. Increase development and testing work. Since encrypted files are generally widely used and used by many applications, it will bring a lot of extra work in development and testing. Summary of the invention
[0010] The embodiment of the present invention provides a host-based password ciphertext storage and use method for removing the deep coupling between the main program and the encrypted file. The method includes:
[0011] Before the system main program reads the encrypted file, the encrypted file is read and decrypted to obtain the decrypted file;
[0012] Generate a logic data file based on the decrypted file according to the requirements of the system main program, wherein the logic data file includes general information used by the system main program and does not include confidential information;
[0013] The logic data file is provided to a system main program, and the system main program uses the logic data file to perform corresponding logic operations.
[0014] The embodiment of the present invention further provides a host-based password ciphertext storage and use device for removing the deep coupling between the main program and the encrypted file, the device comprising:
[0015] A decryption module is used to read the encrypted file and decrypt it before the main program of the system reads the encrypted file to obtain a decrypted file;
[0016] A logic data file generation module, used to generate a logic data file based on the decrypted file according to the requirements of the system main program, wherein the logic data file includes general information used by the system main program and does not contain confidential information;
[0017] The application module is used to provide the logic data file to the system main program, and the system main program uses the logic data file to perform corresponding logic operations.
[0018] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the host-based password ciphertext storage and use method when executing the computer program.
[0019] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the host-based password ciphertext storage and use method is implemented.
[0020] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the host-based password ciphertext storage and use method is implemented.
[0021] In the embodiment of the present invention, compared with the technical solution in the prior art in which the system main program calls a tool subroutine to decrypt the encrypted file, resulting in indirect deep coupling between the main program and the encrypted file, the encrypted file is read and decrypted before the system main program reads the encrypted file to obtain a decrypted file; a logical data file is generated based on the decrypted file according to the needs of the system main program, and the logical data file includes general information used by the system main program and does not contain confidential information; the logical data file is provided to the system main program, and the system main program uses the logical data file to perform corresponding logical operations. The present invention generates a logical file that only includes the required information of the system main program after decrypting the encrypted file. Through this logical file, when the information of the encrypted file needs to be changed, or the encryption algorithm needs to be changed, the entire system only needs to adjust the encrypted file without changing the main program, so that the main program and the encrypted file can be decoupled. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0023] Figure 1 A flow chart of the login function of the main program in the prior art;
[0024] Figure 2 The process of a host-based password ciphertext storage and use method in an embodiment of the present invention is as follows Figure 1 ;
[0025] Figure 3 The process of a host-based password ciphertext storage and use method in an embodiment of the present invention is as follows Figure 2 ;
[0026] Figure 4 The process of a host-based password ciphertext storage and use method in an embodiment of the present invention is as follows Figure 3 ;
[0027] Figure 5 The present invention is a block diagram of a host-based password ciphertext storage and use device in an embodiment of the present invention. DETAILED DESCRIPTION
[0028] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0029] Based on the problems existing in the prior art, the present invention proposes a host-based password ciphertext storage and use method, the process of which is as follows: Figure 2 As shown, including:
[0030] Step 201: before the system main program reads the encrypted file, the encrypted file is read and decrypted to obtain a decrypted file;
[0031] Step 202: Generate a logic data file based on the decrypted file according to the requirements of the system main program, wherein the logic data file includes general information used by the system main program and does not include confidential information;
[0032] Step 203: providing the logic data file to the system main program, and the system main program uses the logic data file to perform corresponding logic operations.
[0033] Specifically, the above method can be applied to a developed tool program, and the specific method flow can be as follows: Figure 3 As shown. Before the main program reads, the tool program reads the encrypted file, which may contain core information such as usernames / passwords that need to be kept confidential. The tool program decrypts the information in the encrypted file. After the tool program obtains the core information in the encrypted file, it uses the decrypted information and other data (non-encrypted auxiliary information, decrypted information and these auxiliary information are combined to generate a logical data file, where the auxiliary information can be some information related to the subsequent login operation of the FTP statement / login statement, such as IP address, etc.) to generate the logical data file required by the main program according to the needs of the main program. The logical data file is no longer an encrypted file and can be used directly by the main program. The logical name of the logical data file is fixed (using the logical name to communicate with the main program), but the actual generated physical file name is random (only the main program and the tool program know the physical file name, which has a confidentiality effect). The logical data file does not contain encrypted information, but only contains general information used by the main program, including FTP login statements, database login statements, etc. After the logical data file is generated, the main program uses the logical data file for login and other functions. Later, when the information of the encrypted file needs to be changed, or the encryption algorithm needs to be changed, the entire system only needs to adjust the encrypted file or the tool program without changing the main program.
[0034] In an embodiment of the present invention, reading the encrypted file for decryption includes:
[0035] Before decryption, obtain the authorized key;
[0036] The encrypted file is decrypted using the authorized key and the corresponding decryption algorithm.
[0037] Specifically, the tool program needs to be authorized to use the key and use the corresponding decryption algorithm to decrypt the information in the encrypted file.
[0038] In the embodiment of the present invention, Figure 4 As shown, the method also includes:
[0039] Step 401: After the system main program uses the logic data file, the logic data file is deleted.
[0040] Specifically, the device decouples the main program from the encrypted file / tool program. No matter how the encryption / decryption part (tool program) changes, it will not affect the changes in the program logic of the main program. Moreover, the logical data file is temporarily generated by the third-party tool program when the main program is running. Its physical file name is random. It is used exclusively when the main program is used (users cannot read it) and is deleted immediately after use. This makes the logical data file impossible to find, and it stays on the disk for a short time, which has the characteristics of confidentiality.
[0041] "The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations."
[0042] The present invention also provides a host-based password ciphertext storage and use device, as described in the following embodiments. Since the principle of the device to solve the problem is similar to the host-based password ciphertext storage and use method, the implementation of the device can refer to the implementation of the host-based password ciphertext storage and use method, and the repeated parts will not be repeated.
[0043] Figure 5 FIG. 1 is a structural block diagram of a host-based password ciphertext storage and use device in an embodiment of the present invention, such as Figure 5 As shown, the device comprises:
[0044] Decryption module 02, used to read the encrypted file and decrypt it before the system main program reads the encrypted file to obtain the decrypted file;
[0045] A logic data file generating module 04, used to generate a logic data file based on the decrypted file according to the requirements of the system main program, wherein the logic data file includes general information used by the system main program and does not include confidential information;
[0046] The application module 06 is used to provide the logic data file to the system main program, and the system main program uses the logic data file to perform corresponding logic operations.
[0047] In the embodiment of the present invention, the decryption module is specifically used for:
[0048] Before decryption, obtain the authorized key;
[0049] The encrypted file is decrypted using the authorized key and the corresponding decryption algorithm.
[0050] In the embodiment of the present invention, the logic data file generation module is specifically used for:
[0051] According to the requirements of the main program of the system, a logical data file is generated based on the decryption information and the non-encrypted auxiliary information in the decryption file.
[0052] In the embodiment of the present invention, the logical name of the logical data file is fixed, and the physical file name is random.
[0053] In the embodiment of the present invention, the application module is also used for:
[0054] After the system main program uses the logic data file, the logic data file is deleted.
[0055] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the host-based password ciphertext storage and use method when executing the computer program.
[0056] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the host-based password ciphertext storage and use method is implemented.
[0057] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the host-based password ciphertext storage and use method is implemented.
[0058] In the embodiment of the present invention, in the embodiment of the present invention, compared with the technical solution in the prior art that the system main program calls the tool subroutine to decrypt the encrypted file, resulting in indirect deep coupling between the main program and the encrypted file, the encrypted file is read and decrypted before the system main program reads the encrypted file to obtain the decrypted file; according to the requirements of the system main program, a logical data file is generated based on the decrypted file, and the logical data file includes general information used by the system main program and does not contain confidential information; the logical data file is provided to the system main program, and the system main program uses the logical data file to perform corresponding logical operations. The present invention generates a logical file that only includes the required information of the system main program after decrypting the encrypted file. Through this logical file, when the information of the encrypted file needs to be changed, or the encryption algorithm needs to be changed, the entire system only needs to adjust the encrypted file without changing the main program, so that the main program and the encrypted file can be decoupled. Moreover, the logical data file is generated at runtime, and its physical file name is random. It is used in an exclusive manner (users cannot read it) and is deleted immediately after use. It also has the characteristics of confidentiality.
[0059] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0060] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0061] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0062] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0063] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A host-based password ciphertext storage and use method, characterized in that: include: Before the system main program reads the encrypted file, the encrypted file is read and decrypted to obtain the decrypted file; Generate a logic data file based on the decrypted file according to the requirements of the system main program, wherein the logic data file includes general information used by the system main program and does not include confidential information; Providing the logic data file to a system main program, and the system main program uses the logic data file to perform corresponding logic operations; Before the system main program reads the encrypted file, the encrypted file is read and decrypted to obtain the decrypted file, including: before the system main program reads, the tool program reads the encrypted file, and the tool program decrypts the information in the encrypted file; According to the requirements of the main program of the system, a logical data file is generated based on the decrypted file, including: after the tool program obtains the core information in the encrypted file, according to the requirements of the main program of the system, the decrypted information and the non-encrypted auxiliary information are used to generate the logical data file required by the main program; After the system main program uses the logical data file, the logical data file is deleted; the logical data file is temporarily generated by a third-party tool program when the system main program is running, and its physical file name is random, and is used exclusively when the main program uses it; the logical name of the logical data file is fixed, and the physical file name is random.
2. The host-based password ciphertext storage and use method according to claim 1, characterized in that: Reading the encrypted file for decryption includes: Before decryption, obtain the authorized key; The encrypted file is decrypted using the authorized key and the corresponding decryption algorithm.
3. A host-based password ciphertext storage and use device, characterized in that: include: A decryption module is used to read the encrypted file and decrypt it before the main program of the system reads the encrypted file to obtain a decrypted file; A logic data file generation module, used to generate a logic data file based on the decrypted file according to the requirements of the system main program, wherein the logic data file includes general information used by the system main program and does not contain confidential information; An application module, used for providing the logic data file to a system main program, and the system main program uses the logic data file to perform corresponding logic operations; The decryption module is specifically used for: before the system main program reads, the tool program reads the encrypted file, and the tool program decrypts the information in the encrypted file; The logic data file generation module is specifically used for: after the tool program obtains the core information in the encrypted file, according to the requirements of the system main program, using the decrypted information and the non-encrypted auxiliary information, to generate the logic data file required by the main program; The application module is also used to: delete the logical data file after the system main program uses the logical data file; the logical data file is temporarily generated by a third-party tool program when the system main program is running, and its physical file name is random, and is used exclusively when the main program uses it; the logical name of the logical data file is fixed, and the physical file name is random.
4. The host-based password ciphertext storage and use device as claimed in claim 3, characterized in that: The decryption module is specifically used for: Before decryption, obtain the authorized key; The encrypted file is decrypted using the authorized key and the corresponding decryption algorithm.
5. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the host-based password ciphertext storage and use method described in any one of claims 1 to 2 is implemented.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the host-based password ciphertext storage and use method according to any one of claims 1 to 2 is implemented.
7. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, the host-based password ciphertext storage and use method according to any one of claims 1 to 2 is implemented.
Citation Information
Patent Citations
Account information acquisition method and device of application programs
CN107451441A