A method and system for verifying the legality of offline container environment software
By using asymmetric encryption algorithms and hash chaining technology in an offline container environment, the problem of traditional verification methods being easily tampered with is solved, and the legality verification and binding of licenses are realized, preventing unauthorized reuse caused by system time modification and restart.
Patent Information
- Application Number
- CN202310130725.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-17
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2043-02-17
AI Technical Summary
In offline container environments, traditional software legitimacy verification methods are easily tampered with. Especially with the widespread application of container technology, users can easily modify the system time or reinstall the operating system, leading to the risk of license reuse.
Asymmetric encryption algorithms are used to generate public and private keys, a one-way hash function is used to generate signature information, and a hash chain and a timed task are combined to verify the legality of the license file and bind host machine information to prevent tampering.
It effectively prevents the license from being reused in offline container environments, avoids unauthorized use issues caused by system time modification and machine restart, and ensures the accuracy of license validity verification.
Smart Images

Figure CN116225923B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data security, and in particular to a method and system for verifying the legality of software in an offline container environment. BACKGROUND
[0002] Existing methods for verifying the legality of software are basically based on public network communication to verify and authorize legality, but in many cases, due to security requirements or network environment isolation, software is not allowed to access external networks, and in this case, offline methods must be used to verify and authorize legality. With the maturity of container technology, new challenges have been posed for legality verification and authorization in offline container environments. Containers have features such as easy portability, replication, reuse, and restart.
[0003] Traditional offline software legality verification methods involve importing the signature and date of the license to verify and authorize the license after the offline software is deployed. However, in the traditional technology in offline container environments, users can easily change the system time and reinstall the operating system. With the development of virtual machine technology, more and more users use containers as the deployment and running environment for software. Container technology can easily replicate, restart, and modify system time, which poses a risk of license reuse.
[0004] It should be noted that the information disclosed in the above background section is only used to enhance the understanding of the background of the present disclosure, and therefore can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY
[0005] The present application aims to overcome the shortcomings of the prior art and provides a method and system for verifying the legality of software in an offline container environment, which solves the deficiencies of traditional offline software legality verification methods.
[0006] The present application is achieved by the following technical solution: a method for verifying the legality of software in an offline container environment, the verification method comprising:
[0007] S1, license application step; the customer submits information including customer enterprise information, number of users, start and end effective period, and client machine environment to apply for a license;
[0008] S2, license generation step: sorting and arranging the customer input information according to the public key to generate a digital signature, assembling the input information and public key into an xml format, and exporting the license file to the customer;
[0009] S3, import the generated license file into the application for verification, and determine whether the license is tampered with;
[0010] S4, activate the system after verification, and generate a HASH value according to the signature, public key and date information to form a HASH chain table;
[0011] S5, the authentication service starts a timing task, communicates with the host microservice at a certain time interval, obtains the host time and compares it with the HASH chain table to determine whether the system time has been changed and whether the host mac address has been changed;
[0012] S6, the host microservice regularly obtains the host mac address or hostid information, date and public key, and generates a check fingerprint value using a one-way hash function and stores it in the disk sector to realize the binding of the application and the machine and avoid the modification of the machine time.
[0013] The license generation step specifically includes: using an asymmetric encryption algorithm to generate a public key and a private key, arranging the data in step S1 according to the rules, generating signature information according to the generated public key through a one-way hash function, and writing the signature information into an xml file and exporting it to the customer.
[0014] The generated license file is imported into the application for verification, and whether the license is tampered with specifically includes:
[0015] S31, provide the generated public key image to the customer, and deploy the application software and the application host client according to the customer container environment to ensure that the machine information of the host can be obtained in the container;
[0016] S32, upload the generated license file to the application through the application interface, start verification, and verify the license data according to the uploaded license file, arrange the obtained data according to the rules, then generate a HASH sequence through a one-way hash function and a public key information and compare it with the signature, so as to verify the legality of the license file and determine whether the license is tampered with.
[0017] The step S32 specifically includes the following contents:
[0018] The user imports the obtained license file, imports the file into the installed application, and the license verification program in the application parses the imported license file and obtains the license information;
[0019] According to the license information arrangement and the public key + salt value information filled in during the mirror download, the signature information is verified again whether it matches, if it does not match, the license is abnormal, if the signature information verification is successful, the license signature and the customer host information are continuously verified, after the verification is successful, a fingerprint HASH is generated according to the date + a string generated according to the rule + machine information + hash digest algorithm and stored in the database;
[0020] At the same time, the authentication service is started to check the host information and perform verification.
[0021] The step S5 specifically includes the following contents:
[0022] S51, compare the obtained host time with the date in the HASH chain table, if the obtained host time is greater than the maximum date in the HASH chain table, record the latest time in the HASH chain table, and generate a check value 1 according to the latest three HASH values in the HASH chain table + re-HASH;
[0023] S52, according to the generated check value 1, when the next timing task is performed, generate a check value 2 from the latest three HASH values in the HASH chain table, and compare the two check values to avoid data tampering at the database level.
[0024] A verification system for the legality of offline container environment software, comprising a license application module, a license generation module, a license management module, an authentication service module and a host micro-service module;
[0025] The license application module is used for applying for a license according to the information submitted by the customer, including customer enterprise information, number of users, start and end valid period and customer machine environment;
[0026] The license generation step is used for sorting and arranging according to the customer input information, generating a digital signature according to the public key, assembling the input information and the public key into an xml format, and exporting the license file to provide the customer;
[0027] The license management module is used for importing the generated license file into an application for verification, judging whether the license is tampered with, activating the system after the verification is passed, and then generating a HASH value according to the signature, public key and date information to form a HASH chain table;
[0028] The authentication service module is used to start a timing task, communicate with the host micro-service at a certain time interval, obtain the host time and compare it with the HASH chain table, judge whether the system time is changed and whether the host mac address is changed;
[0029] The host computer micro-service module is used for obtaining host mac address or hostid information, date and public key at regular time intervals, and generating a check fingerprint value distribution in a disk sector by using a one-way hash function, so as to realize the binding of the application and the machine and avoid the modification of the machine time.
[0030] The specific implementation process of the license management module for importing the generated license file into the application for checking and judging whether the license is tampered with is as follows:
[0031] The generated public key image is provided to the customer, and the application software and the application host client are deployed according to the image customer container environment, and it is necessary to ensure that the machine information of the host computer can be obtained in the container.
[0032] The generated license file is uploaded to the application through the application interface, and the check is started. The check rule obtains license data according to the uploaded license file, arranges the obtained data according to the rule, then generates a HASH sequence by using a one-way hash function and public key information and compares it with the signature, so as to check the legality of the license file and judge whether the license is tampered with.
[0033] The generated license file is uploaded to the application through the application interface, and the check is started. The check rule obtains license data according to the uploaded license file, arranges the obtained data according to the rule, then generates a HASH sequence by using a one-way hash function and public key information and compares it with the signature, so as to check the legality of the license file and judge whether the license is tampered with. Specifically, the following contents are included:
[0034] The user imports the obtained license file, and the license file is imported into the installed application. The license check program in the application parses the imported license file and obtains license information;
[0035] According to the license information arrangement and sorting, and the public key + salt value information filled in during image download, the signature information is checked again to see if it matches. If it does not match, the license is abnormal. If the signature information check is successful, the license signature and the customer host information are checked. After the check is successful, a fingerprint HASH is generated according to the date + the string generated according to the rule + the machine information + the hash digest algorithm and stored in the database;
[0036] The check task of the authentication service is started at the same time to obtain the host computer information and perform the check.
[0037] The authentication service specifically includes the following contents:
[0038] The acquired host computer time is compared with the date in the HASH chain table, if the acquired host computer time is greater than the maximum date in the HASH chain table, the latest time is recorded in the HASH chain table, and a check value 1 is generated according to the latest three HASH values in the HASH chain table + HASH again;
[0039] According to the generated check value 1, when the next timing task is performed, the latest three HASH generation check values 2 in the HASH chain table are acquired, and the two check values are compared to avoid the data at the database level being tampered.
[0040] The present application has the following advantages: a check method and system for the legality of offline container environment software solves the license check problem in the offline container environment, since the license file is bound with the host computer hardware information and enterprise information, the problem of multiple uses of the same license is avoided, since the license date-based chain fingerprint information is stored, the problem that the license can be used beyond the actual validity period by adjusting the system time is prevented, and the problem of container environment application restart and long non-use recovery is also prevented. BRIEF DESCRIPTION OF DRAWINGS
[0041] Figure 1 It is a flowchart of the method of the present application;
[0042] Figure 2 It is a flowchart of the license application generation of the present application;
[0043] Figure 3 It is a direction diagram of the data flow of the present application. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme of the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in combination with the drawings is not intended to limit the protection scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application. The present application will be further described below in combination with the drawings.
[0045] The application aims to provide a software license legality verification method and system in an offline environment, which can verify the legality of an authorized license and prevent the license from being illegally reused due to container replication, restart, and machine time tampering.
[0046] As shown in Figure 1 One embodiment of the application relates to a software legality verification method for an offline container environment, which comprises the following steps:
[0047] S1, license application step; a customer submits information including customer enterprise information, number of users, start and end dates, and customer machine environment to apply for a license;
[0048] S2, license generation step: sort the customer-entered information and generate a digital signature according to the public key, assemble the entered information and the public key into an xml format, and export the license file to the customer;
[0049] Further, a public key and a private key are generated using an asymmetric encryption algorithm, the data in step S1 is arranged according to the rules, the signature information is generated according to the generated public key through a one-way hash function, and the signature information is written into an xml file and exported to the customer; wherein the one-way hash function has one input and one output, wherein the input is called message, and the output is called hash value. The one-way hash function can calculate the hash value according to the content of the message, and the hash value can be used to check the integrity of the message. In simple terms, it converts the content of any length into a fixed-length output string, and it is difficult to restore the original content through the output string. Common one-way hash functions include MD4, MD5, SHA1, SHA-224, SHA-256, SHA-384, and SHA-512. The calculation formula is signature = h(m) d mod n, wherein h is the one-way hash function, m is the message, and signature is the signature information.
[0050] Further, as shown in Figure 2 It includes making a license, calculating a HASH value to generate a SIGN, generating a license, and distributing the license. The license includes the start date / expiration date, server hostid, number of users, version information, etc. In the license generation software, the customer-provided environment installation information and the authorized use period are entered, the authorized use version number information is entered, and a relational database is used for storage. At the same time, a public key and a private key are generated using an asymmetric encryption algorithm, and an application installation image is packaged for the customer to download;
[0051] According to the customer entry information sorting and according to the public key generation digital signature, the entry information and public key are assembled into xml format export as license file to provide for the customer.
[0052] S3, the generated license file is imported into the application for verification, and whether the license is tampered with is judged; specifically including the following contents:
[0053] The generated public key image is provided to the customer, and the application software and application host client are deployed according to the customer container environment, and the host machine information in the container can be obtained;
[0054] The generated license file is uploaded to the application through the application interface, and the verification is started. The verification rule obtains the license data according to the uploaded license file, arranges the obtained data according to the rule, then generates a HASH sequence through a one-way hash function and public key information and compares it with the signature, so as to verify the legality of the license file and judge whether the license is tampered with.
[0055] Further, the user imports the obtained license file, and the license file is imported into the installed application. The license verification program in the application parses the imported license file and obtains license information; according to the license information arranged and sorted, and the public key + salt value information filled in during image download, the signature information is verified again whether it matches. If it does not match, the license is abnormal. If the signature information verification is successful, the license signature and the client host information are further verified. After the verification is successful, a fingerprint HASH is generated according to the date + string generated according to the rule + machine information + hash digest algorithm and stored in the database. The fingerprint hash in this way has the characteristics of simple algorithm and irreversible restoration, and has good security characteristics. If the user deletes part of the historical data, it will not affect the verification. If the recently used data is deleted or the fingerprint hash value is tampered with, it will cause the verification to be unsuccessful and the license to be invalid. At the same time, the verification task of the authentication service is started to obtain the host machine information and do the verification at regular intervals.
[0056] S4, after the verification is passed, the system is activated, and a HASH value is generated according to the signature, public key and date information to form a HASH chain table;
[0057] S5, the authentication service starts a timing task, communicates with the host micro service at a certain time interval, obtains the host time and compares it with the HASH chain table, judges whether the system time is changed and whether the host mac address is changed;
[0058] S51, compare the obtained host time with the date in the HASH chain table, if the obtained host time is greater than the maximum date in the HASH chain table, record the latest time in the HASH chain table, and generate a check value 1 according to the latest three HASH values in the HASH chain table + re-HASH;
[0059] S52, according to the generated check value 1, when the next timing task is performed, the latest three HASH generation check values in the HASH chain table are obtained, and the two check values are compared to avoid data tampering at the database level.
[0060] As shown in Figure 3 The check task of the authentication service first performs self-checking and then exchanges information with the host client, which specifically includes the following contents:
[0061] The method adopted in the figure is to first check the latest three data generation check values, and in actual use, the data generation check values can be combined according to different strategies. The check value generation itself is related to time and machine information, and if one of them changes, the check value will be abnormal, thereby avoiding information tampering. Check value generation examples, such as: get the latest three data in the data storage 20220102Hash fingerprint BBB123B89C 20220109Hash fingerprint CCC123B89C 20220110Hash fingerprint DDD123B89C, check value = ((BBB123B89C+CCC123B89C+DDD123B89C)*salt = > calculation result: YYYY123d, get the check value and the last check value, if they match, it is correct, otherwise the stored data is tampered.
[0062] Further, after the check is successful, the host client exchanges information, and the timing task period length can be set to a minute level, such as 5 minutes, 10 minutes, etc. If communication is not found after two period lengths, it can be considered that the check is abnormal, and the overall application should be in an unusable state, and the timing check task saves the last information exchanged with the host. After the host client and the timing task resume communication, check the exchange again, and if it passes, the application is restored to a usable state. After the exchange information is successful, check the exchange time, and if the exchange time is longer than the last one by more than one task period length, it is considered to be a normal check. After the check is passed, the date + the string generated according to the rule + the machine information + the hash digest algorithm to generate the fingerprint hash is stored in the database.
[0063] The check program exchanges information with the host client service through ciphertext transmission: since interactive information is required, encryption and decryption of the information are involved, and here, a symmetric encryption algorithm is adopted, and the data sender sends out the encrypted ciphertext after processing the date + host information + check state (original data) and the encryption key (public key) together through a special encryption algorithm, so that the encrypted ciphertext is complex. The receiver uses the encryption key and the inverse algorithm of the same algorithm to decrypt the ciphertext, corresponding to the date, hostId and check state.
[0064] S6, the host microservice acquires the host mac address or hostid information, date and public key at regular intervals, and generates a check fingerprint value using a one-way hash function and stores it in a disk sector, realizing the binding of the application and the machine and avoiding the modification of the machine time.
[0065] Further, the host client program collects host information at regular intervals, mainly the date and host hostId information, and compares the information date collected each time with the date information collected last time. The new date cannot be smaller than the last collected date, and must be at least greater than one collection period, for example, the last collection time is 2022\12\28\12\00\00, and the collection period is 1 hour, so the next collection time needs to be equal to or greater than 2022\12\28\13\00\00. After the date and host information check is successful, a string of characters is generated as a fingerprint information according to the Hash digest algorithm according to the salt information and the string generated according to the rule, and the fingerprint information is stored on the host disk. In order to avoid being deliberately deleted, multiple files can be stored.
[0066] Another embodiment of the application specifically relates to a check system for the legality of offline container environment software, which comprises a license application module, a license generation module, a license management module, an authentication service module and a host microservice module.
[0067] The license application module is used for applying for a license according to the information submitted by the customer, including customer enterprise information, number of users, start and end valid period and client machine environment;
[0068] The license generation step is used for sorting and arranging the entered information according to the customer and generating a digital signature according to the public key, assembling the entered information and the public key into an xml format, and exporting the license file to provide the customer;
[0069] The license management module is used for importing the generated license file into the application for checking, judging whether the license is tampered with, activating the system after the check is passed, and then generating a HASH value according to the signature, public key and date information to form a HASH chain table.
[0070] The authentication service module is configured to start a timing task, communicate with the host microservice at intervals, obtain the host time and compare it with the HASH chain table, and determine whether the system time has been changed and whether the host mac address has been changed.
[0071] The host microservice module is configured to obtain the host mac address or hostid information, date, and public key at intervals, generate a check fingerprint value using a one-way hash function, and store the value in a disk sector, thereby realizing the binding of the application and the machine and avoiding the modification of the machine time.
[0072] The license management module imports the generated license file into the application for verification, and determines whether the license has been tampered with according to the following specific implementation process:
[0073] The generated public key image is provided to the customer, and the application software and application host client are deployed according to the customer container environment to ensure that the machine information of the host can be obtained in the container.
[0074] The generated license file is uploaded to the application through the application interface, and verification is started. The verification rule obtains license data according to the uploaded license file, arranges the obtained data according to the rule, then generates a HASH sequence using a one-way hash function and public key information and compares it with the signature, thereby verifying the legality of the license file and determining whether the license has been tampered with.
[0075] The generated license file is uploaded to the application through the application interface, and verification is started. The verification rule obtains license data according to the uploaded license file, arranges the obtained data according to the rule, then generates a HASH sequence using a one-way hash function and public key information and compares it with the signature, thereby verifying the legality of the license file and determining whether the license has been tampered with.
[0076] The user imports the obtained license file, and imports the file into the installed application. The license verification program in the application parses the imported license file and obtains license information.
[0077] According to the license information arrangement and the public key + salt value information filled in during the mirror downloading, the signature information is checked again whether it matches, if not, the license is abnormal, if the signature information is checked successfully, the license signature and the customer host information are checked, after the checking is successful, according to the date + the string generated according to the rule + the machine information + the hash digest algorithm, a fingerprint HASH is generated and stored in the database;
[0078] At the same time, the authentication service is started to check the host information and perform the checking.
[0079] The authentication service specifically includes the following contents:
[0080] The obtained host time is compared with the date in the HASH chain table, if the obtained host time is greater than the maximum date in the HASH chain table, the latest time is recorded in the HASH chain table, and according to the HASH chain table, the latest three HASH values + the generated checking value 1 are generated again;
[0081] According to the generated checking value 1, when the next timing task is performed, the latest three HASH checking values 2 are generated according to the HASH chain table, and the two checking values are compared to avoid the data in the database being tampered.
[0082] The above is only the preferred embodiment of the present application, it should be understood that the present application is not limited to the form disclosed herein, should not be considered as excluding other embodiments, and can be used in various other combinations, modifications and environments, and can be changed within the scope of the concept described herein, by the above teaching or related technical or knowledge. The changes and variations made by the person skilled in the art do not deviate from the spirit and scope of the present application, and should be within the protection scope of the appended claims of the present application.
Claims
1. A method for verifying the legitimacy of software in an offline container environment, characterized in that: The verification method includes: S1. License application steps: The customer submits information including customer company information, number of users, start and end validity period, and customer machine environment to apply for a license. S2, License Generation Steps: Organize and sort the information entered by the customer, generate a digital signature based on the public key, assemble the entered information and public key into an XML format, export it as a license file, and provide it to the customer. S3. Import the generated license file into the application for verification and determine whether the license has been tampered with; S4. After successful verification, the system is activated, and a hash value is generated based on the signature, public key, and date information, forming a hash linked list. S5. The authentication service starts a scheduled task to communicate with the host machine microservice at regular intervals to obtain the host machine time and compare it with the HASH chain to determine whether the system time has been changed and whether the host machine MAC address has been changed. The verification program exchanges information with the host client service and transmits it in encrypted form. If no communication is found after more than two time periods, the verification is considered abnormal and the entire application is in an unusable state. At the same time, the scheduled task saves the last information exchanged with the host. After the host client and the scheduled task resume communication, the exchange is verified again and it passes. The application is then restored to a usable state. After the information exchange is successful, the exchange time is verified. If the exchange time is more than one task period longer than the previous one, the verification is considered normal. S6. The host microservice periodically obtains the host machine's MAC address or hostid information, date, and public key, and uses a one-way hash function to generate verification fingerprint values, which are distributed and stored in disk sectors to bind the application to the machine and prevent modification of the machine time. The date of each collected information is compared with the date of the previous collection. The new collection date cannot be earlier than the previous collection date and must be at least one collection cycle longer. Step S5 specifically includes the following: S51. Compare the obtained host machine time with the date in the HASH chain. If the obtained host machine time is greater than the maximum date in the HASH chain, record the latest time in the HASH chain and generate a check value of 1 again based on the three most recent HASH values in the HASH chain. S52. Based on the generated verification value 1, when performing the next scheduled task, obtain the three most recent HASH entries in the HASH chain to generate verification value 2, and compare the two verification values to prevent data at the database level from being tampered with.
2. The method for verifying the legality of software in an offline container environment according to claim 1, characterized in that: The license generation steps specifically include: generating a public key and a private key using an asymmetric encryption algorithm, arranging the data in step S1 according to rules, generating signature information using a one-way hash function based on the generated public key, and writing the signature information into an XML file for export to the client.
3. The method for verifying the legality of software in an offline container environment according to claim 1, characterized in that: The step of importing the generated license file into the application for verification and determining whether the license has been tampered with specifically includes: S31. Provide the image containing the generated public key to the customer and deploy the application image according to the customer's container environment. The application host machine client needs to ensure that the machine information of the host machine can be obtained in the container. S32. Upload the generated license file to the application through the application interface, enable verification, and obtain the license data according to the uploaded license file. Arrange the obtained data according to the rules, and then generate a HASH sequence through a one-way hash function and public key information and compare it with the signature to verify the legality of the license file and determine whether the license has been tampered with.
4. The method for verifying the legality of software in an offline container environment according to claim 3, characterized in that: Step S32 specifically includes the following: The user imports the obtained license file and imports it into the installed application. The license verification program in the application parses the imported license file and obtains the license information. The signature information is re-verified based on the license information, the public key and salt information injected during image download. If they do not match, the license is abnormal. If the signature information is verified successfully, the license signature and the client host information are verified again. After the verification is successful, a fingerprint HASH is generated based on the date, the string generated according to the rules, the machine information and the hash digest algorithm and stored in the database. At the same time, the authentication service starts a verification task to periodically obtain host machine information and perform verification.
5. A system for verifying the legitimacy of software in an offline container environment, characterized in that: It includes a license application module, a license generation module, a license management module, an authentication service module, and a host machine microservice module; The license application module is used to apply for a license based on information submitted by the customer, including customer company information, number of users, start and end validity period, and customer machine environment. The license generation step is used to sort and organize the information entered by the customer and generate a digital signature based on the public key. The entered information and the public key are then assembled into an XML format and exported as a license file for the customer. The license management module is used to import the generated license file into the application for verification, determine whether the license has been tampered with, activate the system after the verification is passed, and then generate a HASH value based on the signature, public key and date information to form a HASH linked list. The authentication service module is used to start a scheduled task, communicate with the host microservice at certain intervals, obtain the host time and compare it with the HASH chain to determine whether the system time has been changed and whether the host MAC address has been changed. The verification program exchanges information with the host client service and transmits it in encrypted form. If no communication is found after more than two time periods, the verification is considered abnormal and the entire application is in an unusable state. At the same time, the scheduled task saves the last information exchanged with the host. After the host client and the scheduled task resume communication, the exchange is verified again and it passes. The application is then restored to a usable state. After the information exchange is successful, the exchange time is verified. If the exchange time is more than one task period longer than the previous one, the verification is considered normal. The host microservice module is used to periodically obtain the host machine's MAC address or hostid information, date, and public key, and use a one-way hash function to generate verification fingerprint values and distribute them in disk sectors to achieve application binding with the machine and prevent modification of the machine time. The date of each collected information is compared with the date of the previous collection. The new collection date cannot be earlier than the previous collection date and must be at least one collection cycle longer. The authentication service specifically includes the following: The obtained host machine time is compared with the date in the HASH chain. If the obtained host machine time is greater than the maximum date in the HASH chain, the latest time is recorded in the HASH chain. Based on the three most recent HASH values in the HASH chain, the check value 1 is generated again by HASH. Based on the generated verification value 1, when performing the next scheduled task, the three most recent hashes in the hash chain are retrieved to generate verification value 2, and the two verification values are compared to prevent data tampering at the database level.
6. The system for verifying the legality of software in an offline container environment according to claim 5, characterized in that: The specific implementation process of importing the generated license file into the application for verification and determining whether the license has been tampered with in the license management module is as follows: Provide the generated public key image to the customer and deploy the application image according to the customer's container environment. The application host machine client needs to ensure that the machine information of the host machine can be obtained in the container. The generated license file is uploaded to the application through the application interface. Verification is then enabled. The verification rules retrieve the license data based on the uploaded license file, arrange the retrieved data according to the rules, and then generate a HASH sequence using a one-way hash function and public key information. This sequence is then compared with the signature to verify the legality of the license file and determine whether the license has been tampered with.
7. The system for verifying the legality of software in an offline container environment according to claim 6, characterized in that: The process of uploading the generated license file to the application via the application interface, enabling verification, and obtaining license data based on the uploaded license file according to the verification rules, arranging the obtained data according to the rules, generating a HASH sequence using a one-way hash function and public key information, and comparing it with the signature to verify the legality of the license file and determine whether the license has been tampered with, specifically includes the following: The user imports the obtained license file and imports it into the installed application. The license verification program in the application parses the imported license file and obtains the license information. The signature information is re-verified based on the license information, the public key and salt information injected during image download. If they do not match, the license is abnormal. If the signature information is verified successfully, the license signature and the client host information are verified again. After the verification is successful, a fingerprint HASH is generated based on the date, the string generated according to the rules, the machine information and the hash digest algorithm and stored in the database. At the same time, the authentication service starts a verification task to periodically obtain host machine information and perform verification.
Citation Information
Patent Citations
Software License verification method capable of preventing time tampering
CN110825639A
Authorization management and control method and system based on software completion
CN115357870A
Software authorization method and system compatible with different deployment environments
CN115391753A