A method and system for off-line software license encryption and decryption based on limited random encryption

By using a limited random encryption method in the software license system, configuring the key and encrypting and decrypting square matrix, and using a two-dimensional random path planning method for decryption verification during the verification cycle, the contradiction between the difficulty of software license cracking and development cost in the existing technology is solved, and efficient and secure licensing verification is achieved.

CN119004409BActive Publication Date: 2025-03-04BEIJING ZHONGHENG LIHUA PETROLEUM TECH RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411484113.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-03-04
Estimated Expiration
2044-10-23

AI Technical Summary

Technical Problem

When the prior art realizes offline encryption and decryption of software licenses, it is difficult to balance the cracking difficulty with development and maintenance costs, while retaining convenient license issuance characteristics.

Method used

Using a method based on finite random encryption, a license encryption configuration table and a decryption configuration table are generated by configuring the key square matrix and the encrypted and decrypted square matrix, and the software license information is encrypted and distributed on the server side, and decrypted and verified periodically on the verification software side, and the two-dimensional random path planning method is used to increase the randomness of decryption.

Benefits of technology

It significantly improves the difficulty of cracking software licenses, while reducing the time-consuming per verification, improving user login experience, and reducing the cost of software development and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119004409B_ABST
    Figure CN119004409B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of computer software, and discloses an offline software license encryption and decryption method and system based on limited random encryption. By configuring a key matrix and an encryption and decryption matrix, using a generated license encryption configuration table built into a target encryption server and a license decryption configuration table built into a target verification software, the software license information encryption and distribution performed on the server side and the software license information decryption and verification performed periodically on the verification software side are realized. Thus, by expanding the traditional symmetric encryption into a symmetric encryption matrix to form an encryption cluster, when verifying the license information on the licensed software side, a two-dimensional random path planning method is used to perform a small-proportion random basic license unit list decryption of the license and information verification within a limited area, thereby increasing a certain degree of randomness while ensuring the efficiency of decryption and verification, and significantly increasing the difficulty of cracking the license.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer software, and in particular to an offline software license encryption and decryption method and system based on limited random encryption. Background Art

[0002] So far, a large number of powerful stand-alone application software are running on personal computers, professional workstations and other computers. The licenses for these software are generally distributed to users offline after being encrypted with keys. Although this brings convenience in software acquisition and application, it also brings the risk of software being easily cracked.

[0003] Software licenses can be encrypted using symmetric encryption or asymmetric encryption. Symmetric encryption is an encryption method that uses a single key system. The same key can be used for both encryption and decryption of information, and there is no need to manage the key, which is conducive to meeting flexible and changeable software license issuance strategies, but it is easy to be cracked; asymmetric encryption mainly uses the key to sign the original information, and transmits it to the user end together with the original information (the signature can only be used for verification purposes, and the original information cannot be restored, so the original information must be attached). The user end uses the public key to verify the signature and the original information. If the verification passes, it means that the information is authentic and valid. This mainly ensures that the information will not be tampered with, because only those who have the key can create a valid signature to achieve consistency with the tampered information, otherwise the tampered information cannot pass the public key verification. The security of asymmetric encryption depends on the management of the key. If the public key is replaced by the attacker, or the private key is leaked, the encrypted message will be stolen by the attacker, and the key management is difficult, which is not conducive to meeting flexible and changeable software license issuance strategies.

[0004] If the offline license of the software is designed to be complex enough, it will increase the difficulty of cracking without losing the convenience of issuing offline licenses, and at the same time greatly reduce the risk of application software being cracked. However, blindly increasing the complexity of offline licensing solutions may bring huge costs in software development and maintenance. Designing a software license confidentiality solution that geometrically increases the difficulty of cracking without significantly increasing the cost of development and maintenance, while retaining the convenience of issuing offline licenses, will greatly reduce the risk of commercial application software being cracked, further protect the interests of software suppliers, and promote the stability and development of the software ecological environment. Summary of the invention

[0005] The present invention provides an offline software license encryption and decryption method and system based on limited random encryption, aiming to solve at least one of the above technical problems.

[0006] To achieve the above object, the present invention provides an offline software license encryption and decryption method based on limited random encryption, comprising the following steps:

[0007] Configure the key matrix and the encryption and decryption matrix, generate the permission encryption configuration table and the permission decryption configuration table, and embed them in the target encryption server and the target verification software respectively;

[0008] The target encryption server encrypts the software license information using a built-in license encryption configuration table to generate a composite license, and sends the composite license to the user;

[0009] During each verification cycle of use, the target verification software extracts the software license information encrypted in the composite license, decrypts the software license information using the license decryption configuration table, and determines whether the license verification of the target verification software has passed based on the decrypted software license information.

[0010] Optionally, configure the encryption and decryption matrix and key matrix steps, including:

[0011] Prepare N×N keys and put them into a key matrix with N rows and N columns to form a key matrix;

[0012] According to the key at each position in the key matrix, a basic encryptor and a basic decryptor corresponding to each key are configured to generate a basic encryption matrix and a basic decryption matrix;

[0013] Elements at the same position in the key matrix, the basic encryption matrix and the basic decryption matrix are extracted to form basic encryption and decryption units, and an encryption and decryption matrix is ​​constructed based on all basic encryption and decryption units and the position of each basic encryption and decryption unit.

[0014] Optionally, when N is less than the first target value, N×N keys are generated by manual assignment; when N is not less than the first target value, N×N keys are generated in batches using a key generation program.

[0015] Optionally, when N is less than the second target value, an encryption algorithm is set for the encryption and decryption unit corresponding to each key in the key matrix by manual selection; when N is not less than the second target value, an encryption setting program is used to batch set the encryption algorithm for the encryption and decryption unit corresponding to each key in the key matrix.

[0016] Optionally, a license encryption configuration table and a license decryption configuration table are generated and built into a target encryption server and a target verification software step, respectively, including:

[0017] Extracting encryption and decryption related information from the encryption and decryption matrix; wherein the encryption and decryption related information includes the size of the encryption and decryption matrix, the encryption algorithm of each encryption and decryption unit, the key matrix and the key length;

[0018] The encryption / decryption association information is written into a permission encryption configuration table and built into a target encryption server; the encryption / decryption association information is transcoded by Base64 and written into a permission decryption configuration table and built into a target verification software.

[0019] Optionally, the target encryption server encrypts the software license information using a built-in license encryption configuration table to generate a composite license, and sends the composite license to the user, specifically including:

[0020] The target encryption server uses the built-in license encryption configuration table to establish a basic encryptor matrix, and uses each basic encryptor in the basic encryptor matrix to encrypt the software license information in turn to obtain N×N encrypted software licenses;

[0021] The software license information includes a plurality of license software installation features, wherein the license software installation features include at least one of a user email address, an expiration date, and a MAC address of an installation computer;

[0022] The obtained N×N encryption software licenses are used to construct an encryption license matrix according to the positions of the corresponding basic encryptors in the basic encryptor matrix, and the encryption license matrix is ​​sent to the user as a composite license.

[0023] Optionally, the compound license is configured as a compound license file in binary form, and the compound license file includes a file header and encrypted license matrix data;

[0024] Wherein, the file header includes an EBCDIC file header for recording the text of the license contract and a binary file header for recording key information of the composite license file;

[0025] The encrypted license matrix data includes a plurality of encrypted license tracks consisting of a license track header and license track data, wherein the license track header is configured to record the row number, column number, and size information of each encrypted license in the encrypted license matrix, and the encrypted license track is configured to record the data of each encrypted license in the encrypted license matrix.

[0026] Optionally, in each verification cycle of use of the target verification software, the steps of extracting the software license information encrypted in the composite license, decrypting the software license information using the license decryption configuration table, and determining whether the license verification of the target verification software has passed according to the decrypted software license information specifically include:

[0027] The target verification software plans a path using a random path planner during each verification cycle in use, extracts the coordinates of each node in the path, and matches the encrypted license information corresponding to each node based on the coordinates and the composite license;

[0028] The target verification software uses the built-in license encryption configuration table to establish a basic decryptor matrix, and uses the basic decryptors in the basic decryptor matrix to decrypt the encrypted license information at the corresponding position to obtain a number of decrypted software license information;

[0029] Determine whether each licensed software installation feature in each decrypted software license information completely matches each actual software installation feature of the target verification software; if so, the license verification of the target verification software in the current verification cycle passes; if not, the license verification of the target verification software in the current verification cycle fails.

[0030] Optionally, in each verification cycle used by the target verification software, a random path planner is used to plan a path, coordinates of each node in the path are extracted, and the steps of matching the encrypted license information corresponding to each node based on the coordinates and the composite license specifically include:

[0031] The target verification software generates a map of size N×N using a random path planner during each verification cycle, and generates obstacles in the map using a random algorithm; wherein the random algorithm includes a random point generation algorithm or a random grid algorithm;

[0032] Randomly select a starting point and an end point at different locations on a map, and use a path planning algorithm to calculate the shortest path from the starting point to the end point; wherein the path planning algorithm includes a breadth-first search algorithm or a Dijkstra algorithm;

[0033] The coordinates of each node in the path in the map are extracted, and the encrypted license information corresponding to each node is matched in the encrypted license matrix of the composite license based on the coordinates.

[0034] In addition, in order to achieve the above-mentioned purpose, the present invention also provides an offline software license encryption and decryption system based on limited random encryption, comprising:

[0035] Configure the terminal, configure the key matrix and the encryption and decryption matrix, generate the permission encryption configuration table and the permission decryption configuration table, and embed them into the target encryption server and the target verification software respectively;

[0036] The target encryption server encrypts the software license information using a built-in license encryption configuration table to generate a composite license, and sends the composite license to the user;

[0037] The target verification software extracts the software license information encrypted in the composite license during each verification cycle, decrypts the software license information using the license decryption configuration table, and determines whether the license verification of the target verification software has passed based on the decrypted software license information.

[0038] The beneficial effect of the present invention is that: an offline software license encryption and decryption method and system based on limited random encryption is proposed, by configuring a key matrix and an encryption and decryption matrix, using a generated license encryption configuration table built into a target encryption server and a license decryption configuration table built into a target verification software, the software license information encryption and distribution performed on the server side and the software license information decryption and verification performed periodically on the verification software side are realized. Compared with the traditional symmetric encryption of software license information, it is expanded into a symmetric encryption matrix to form an encryption cluster. When verifying the license information on the licensed software side, a two-dimensional random path planning method is used to perform a small-proportion random basic license unit list decryption and information verification within a limited area, while ensuring the efficiency of decryption and verification, a certain degree of randomness is increased, and the difficulty of cracking the license is significantly increased. At the same time, by performing a number of software license information decryption and verification with random matrix coordinates in each verification cycle, the continuity of license verification can be achieved, the difficulty of cracking can be further increased, and the time consumption of each verification can be reduced, and the user login experience can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a flowchart of an offline software license encryption and decryption method based on limited random encryption in an embodiment of the present invention;

[0040] Figure 2 The present invention is a schematic diagram of the structure of an offline software license encryption and decryption system based on limited random encryption in an embodiment of the present invention.

[0041] Description of reference numerals:

[0042] 10-Configuration terminal; 20-Target encryption server; 30-Target verification software.

[0043] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0045] The embodiment of the present invention provides an offline software license encryption and decryption method based on limited random encryption, referring to Figure 1 , Figure 1 The figure is a flow chart of an offline software license encryption and decryption method based on limited random encryption in an embodiment of the present invention.

[0046] In this embodiment, an offline software license encryption and decryption method based on limited random encryption includes the following steps:

[0047] S100: configuring a key matrix and an encryption and decryption matrix, generating a permission encryption configuration table and a permission decryption configuration table, and embedding them in a target encryption server and a target verification software respectively;

[0048] S200: The target encryption server encrypts the software license information using the built-in license encryption configuration table to generate a composite license, and sends the composite license to the user;

[0049] S300: In each verification cycle in which the target verification software is used, the software license information encrypted in the composite license is extracted, the software license information is decrypted using the license decryption configuration table, and whether the license verification of the target verification software has passed is determined based on the decrypted software license information.

[0050] It should be noted that the existing software offline licensing technology has contradictions such as verification convenience, cracking risk and maintenance difficulty. If the offline license of the software is designed to be complex enough, the difficulty of cracking will be increased without losing the convenience of issuing offline licenses, and the risk of application software being cracked will be greatly reduced. However, blindly increasing the complexity of offline licensing solutions may bring huge costs in software development and maintenance. In order to solve the above problems, this embodiment configures the key matrix and the encryption and decryption matrix, and uses the generated license encryption configuration table built into the target encryption server and the license decryption configuration table built into the target verification software to realize the encryption and distribution of software license information on the server side and the decryption and verification of software license information periodically performed on the verification software side. Compared with the traditional symmetric encryption of software license information, it is expanded into a symmetric encryption matrix to form an encryption cluster. When verifying the license information on the licensed software side, a two-dimensional random path planning method is used to perform a small-proportion random basic license unit list decryption and information verification within a limited area. While ensuring the efficiency of decryption and verification, a certain degree of randomness is added, which significantly increases the difficulty of cracking the license. At the same time, by performing decryption and verification of several software license information with random matrix coordinates in each verification cycle, it can not only achieve the continuity of license verification and further increase the difficulty of cracking, but also reduce the time consumption of each verification and improve the user login experience.

[0051] In a preferred embodiment, the steps of configuring the encryption and decryption matrix and the key matrix specifically include:

[0052] S110: Prepare N×N keys and put them into a key matrix with N rows and N columns to form a key matrix;

[0053] S120: According to the key at each position in the key matrix, configure a basic encryptor and a basic decryptor corresponding to each key to generate a basic encryption matrix and a basic decryption matrix;

[0054] S130: extracting the elements at the same position in the key matrix, the basic encryption matrix and the basic decryption matrix to form a basic encryption and decryption unit, and constructing an encryption and decryption matrix based on all the basic encryption and decryption units and the position of each basic encryption and decryption unit.

[0055] In a feasible embodiment, when N is less than the first target value, N×N keys are generated by manual assignment; when N is not less than the first target value, N×N keys are generated in batches using a key generation program.

[0056] In another feasible embodiment, when N is less than the second target value, an encryption algorithm is set for the encryption and decryption unit corresponding to each key in the key matrix by manual selection; when N is not less than the second target value, an encryption setting program is used to batch set the encryption algorithm for the encryption and decryption unit corresponding to each key in the key matrix.

[0057] On this basis, a license encryption configuration table and a license decryption configuration table are generated and built into the target encryption server and target verification software steps respectively, including:

[0058] S140: extracting encryption and decryption related information from the encryption and decryption matrix; wherein the encryption and decryption related information includes the size of the encryption and decryption matrix, the encryption algorithm of each encryption and decryption unit, the key matrix and the key length;

[0059] S150: writing the encryption / decryption association information into a permission encryption configuration table and embedding it in a target encryption server, and transcoding the encryption / decryption association information through Base64 and writing it into a permission decryption configuration table and embedding it in a target verification software.

[0060] In this embodiment, when constructing an encryption environment, N×N keys and a basic encryptor and a basic decryptor corresponding to each key are configured. One basic encryptor corresponds to one basic decryptor, and they have the same key. The basic encryptor is responsible for encrypting the original information to obtain the encrypted information, and the basic decryptor is responsible for decrypting the encrypted information to obtain the original information. This pair of basic encryptors and the corresponding basic decryptors are combined together to form a basic encryptor-decryptor pair.

[0061] Therefore, this embodiment uses a basic encryptor-decryptor pair as a basic encryption and decryption unit for encrypting and decrypting information. In the preparation stage of encryption and decryption, it is necessary to prepare N times N keys in advance to form a key matrix with a side length of N. According to the level of confidentiality, the size of N can be set arbitrarily, where N is an integer greater than 0. If N is 1, it means that there is only one key in the entire key matrix, which is equivalent to the ordinary symmetric encryption method; if N is relatively large, it becomes extremely difficult to manually set the key, and a program can be used to batch generate keys to form a key matrix.

[0062] After the key matrix is ​​generated, the corresponding basic encryptor matrix and basic decryptor matrix are established for the key matrix. The corresponding elements of the three matrices form a basic encryption and decryption unit. All basic encryption and decryption units follow the arrangement of the corresponding key matrix elements to form an encryption and decryption matrix of size N times N. If N is small, a unique encryption algorithm can be set for each basic encryption and decryption unit. If N is large, it becomes extremely difficult to manually set the encryption method. The encryption method can be uniformly set by the program. The encryption algorithms supported by the encryption and decryption unit include DES, AES, IDEA, etc.

[0063] It should be noted that after the encryption and decryption matrix is ​​prepared, two encryption and decryption matrix configuration tables are generated: the license encryption configuration table and the license decryption configuration table. The license encryption configuration table is built into the server that generates the software license to encrypt the software license file, and the license decryption configuration table is built into the authorized software to decrypt the software license file. The content of the license encryption configuration table includes the size of the matrix, the encryption algorithm settings of each encryption and decryption unit, the key matrix, and the length of each key. The content of the license decryption configuration table is the same as the license encryption configuration table, but because it is to be built into the authorized software, it is transcoded through Base64 for security.

[0064] In a preferred embodiment, the target encryption server encrypts the software license information using a built-in license encryption configuration table to generate a composite license, and sends the composite license to the user, specifically including:

[0065] S210: The target encryption server uses the built-in license encryption configuration table to establish a basic encryptor matrix, and uses each basic encryptor in the basic encryptor matrix to encrypt the software license information in turn to obtain N×N encrypted software licenses;

[0066] The software license information includes a plurality of license software installation features, wherein the license software installation features include at least one of a user email address, an expiration date, and a MAC address of an installation computer;

[0067] S220: construct an encryption license matrix based on the positions of the corresponding basic encryptors in the basic encryptor matrix for the obtained N×N encryption software licenses, and send the encryption license matrix to the user as a composite license.

[0068] In a feasible embodiment, the compound license is configured as a compound license file in binary form, and the compound license file includes a file header and encrypted license matrix data;

[0069] Wherein, the file header includes an EBCDIC file header for recording the text of the license contract and a binary file header for recording key information of the composite license file;

[0070] The encrypted license matrix data includes a plurality of encrypted license tracks consisting of a license track header and license track data, wherein the license track header is configured to record the row number, column number, and size information of each encrypted license in the encrypted license matrix, and the encrypted license track is configured to record the data of each encrypted license in the encrypted license matrix.

[0071] In this embodiment, the software license information is composed of information such as the user's email address, the software's expiration date, and the MAC address of the computer on which the software is installed. The server that generates the software license information has a built-in license encryption configuration table. A basic encryptor matrix is ​​established according to the license encryption configuration table, and the basic encryptors in the basic encryptor matrix are used in turn to encrypt the software license information, forming an encrypted license matrix with N times N elements obtained by independently encrypting the original information of the software license N times N times, called a compound license. The function of generating a compound license together with the encryption configuration table constitutes a compound license generator. The compound license needs to be distributed to users in the form of a binary file, and the format of the compound license file can be customized according to requirements. The format of a sample compound license file is exemplarily described as follows:

[0072] The composite license file consists of three parts. The first part is the EBCDIC (Generalized Binary Coded Decimal Interchange Code) file header (3200 bytes), which is used to store some license contract texts. The second part is the binary file header (40 bytes), which is used to store some key information describing the composite license file, including the data format of the binary file header, the number of rows of the license matrix, the number of license matrixes, and other information. This information is stored in a fixed position in the binary file header. The third part is the actual encrypted license matrix. Each encrypted license contains 40 bytes of license header information and encrypted license data. The license header data generally stores information such as the row number, column number, and size corresponding to the encrypted license data. The size of the encrypted license data is determined by the size in the license header. The size of the encrypted license data of most composite license files is consistent, but there are also cases where the sizes of different encrypted license data are different. This composite license file is called a composite license file with a variable encrypted license size format.

[0073] Specifically, the format of a sample composite license file consists of a file header and a data body:

[0074] 1. The total length of the file header is 3240 bytes and is divided into two parts.

[0075] (1) The first part of the file header

[0076] Length: 3200 bytes; Composition: License contract text; Features: EBCDIC character set, needs to be converted to ASCII code before display.

[0077] (2) The second part of the file header

[0078] Length: 40 bytes; Data type: 32 bits; Features: Binary header, records data body information.

[0079]

[0080] 2. The encrypted permission matrix is ​​composed of multiple encrypted permission channels. Each channel data is divided into two parts: permission channel header and permission channel data.

[0081] (1) License header

[0082] Length: 40 bytes; Data type: 32-bit or 16-bit integer; Features: records encryption permission row number, column number, size information, etc.

[0083]

[0084] (2) License data

[0085] Length: Encryption permission size;

[0086] Contents: An encrypted license.

[0087] In a preferred embodiment, the target verification software extracts the software license information encrypted in the composite license during each verification cycle, decrypts the software license information using the license decryption configuration table, and determines whether the license verification of the target verification software has passed according to the decrypted software license information, which specifically includes:

[0088] S310: In each verification cycle used by the target verification software, a random path planner is used to plan a path, coordinates of each node in the path are extracted, and encrypted license information corresponding to each node is matched based on the coordinates and the composite license;

[0089] S320: The target verification software uses the built-in license encryption configuration table to establish a basic decryptor matrix, and uses the basic decryptors in the basic decryptor matrix to decrypt the encrypted license information at the corresponding position to obtain a plurality of decrypted software license information;

[0090] S330: Determine whether each licensed software installation feature in each decrypted software license information completely matches each current actual software installation feature of the target verification software; if so, the target verification software passes the license verification in the current verification cycle; if not, the target verification software fails the license verification in the current verification cycle.

[0091] Furthermore, in each verification cycle used by the target verification software, a random path planner is used to plan a path, coordinates of each node in the path are extracted, and the steps of matching the encrypted license information corresponding to each node based on the coordinates and the composite license specifically include:

[0092] S311: In each verification cycle of the target verification software, a random path planner is used to generate a map of size N×N, and obstacles are generated in the map using a random algorithm; wherein the random algorithm includes a random point generation algorithm or a random grid algorithm;

[0093] S312: randomly selecting a starting point and an end point at different locations on the map, and using a path planning algorithm to calculate the shortest path from the starting point to the end point; wherein the path planning algorithm includes a breadth-first search algorithm or a Dijkstra algorithm;

[0094] S313: Extracting the coordinates of each node in the path in the map, and matching the encrypted license information corresponding to each node in the encrypted license matrix of the composite license based on the coordinates.

[0095] In this embodiment, the authorized software has a built-in license decryption configuration table, which establishes a basic decryptor matrix according to the license decryption configuration table. The authorized software needs to decrypt the license file to verify the license information during use by the user. First, a random path planner is used to plan a path. The path planning process is: 1. Define the map size and the number of obstacles. The map size is N times N, which is consistent with the size of the basic encryptor matrix; 2. Generate the map and obstacles: Use a random algorithm to generate obstacles on the map, and you can use a random point generation algorithm or a random grid algorithm; 3. Select the starting point and the end point: Randomly select the starting point and the end point, and the starting point and the end point should be at different positions on the map; 4. Calculate the path: Use the path planning algorithm to calculate the shortest path from the starting point to the end point, and you can use a path planning algorithm such as breadth-first search or Dijkstra algorithm. The node coordinates of the path are the coordinate list of the selected license list in the license matrix. The encrypted license information in the license matrix is ​​retrieved in turn using the coordinates in the coordinate list, and the corresponding decryptor in the decryptor matrix is ​​used to decrypt the license information. If any license information does not match, the license verification fails and the software exit process is entered.

[0096] Therefore, compared with the traditional symmetric encryption of software license information, this embodiment expands it into a symmetric encryption matrix to form an encryption cluster. When verifying the license information on the licensed software side, a two-dimensional random path planning method is used to perform a small-proportion random basic license unit list decryption and information verification within a limited area. While ensuring the efficiency of decryption and verification, a certain degree of randomness is added, which significantly increases the difficulty of cracking the license. At the same time, by performing decryption and verification of several software license information with random matrix coordinates in each verification cycle, it can not only achieve the continuity of license verification and further increase the difficulty of cracking, but also reduce the time consumption of each verification and improve the user login experience.

[0097] Reference Figure 2 , Figure 2 The present invention is a schematic diagram of the structure of an offline software license encryption and decryption system based on limited random encryption in an embodiment of the present invention.

[0098] like Figure 2 As shown, an offline software license encryption and decryption system based on limited random encryption proposed in an embodiment of the present invention includes:

[0099] The terminal 10 is configured to configure the key matrix and the encryption and decryption matrix, generate a permission encryption configuration table and a permission decryption configuration table, and respectively embed them in the target encryption server and the target verification software;

[0100] The target encryption server 20 encrypts the software license information using the built-in license encryption configuration table, generates a composite license, and sends the composite license to the user;

[0101] The target verification software 30 extracts the software license information encrypted in the composite license during each verification cycle, decrypts the software license information using the license decryption configuration table, and determines whether the license verification of the target verification software has passed based on the decrypted software license information.

[0102] Other embodiments or specific implementations of the offline software license encryption and decryption system based on limited random encryption of the present invention can refer to the above-mentioned method embodiments, which will not be described in detail here.

[0103] It is understood that, in the description of this specification, the description with reference to the terms "one embodiment", "another embodiment", "other embodiments", or "first to Nth embodiments" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0104] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system 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 system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0105] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An offline software license encryption and decryption method based on limited random encryption, characterized in that: The following steps are involved: Configure the key matrix and the encryption and decryption matrix, generate the permission encryption configuration table and the permission decryption configuration table, and embed them in the target encryption server and the target verification software respectively; The step of configuring an encryption and decryption matrix and a key matrix specifically includes: preparing N×N keys and putting them into a key matrix of N rows and N columns to form a key matrix; configuring a basic encryptor and a basic decryptor corresponding to each key according to the key at each position in the key matrix to generate a basic encryption matrix and a basic decryption matrix; extracting elements at the same position in the key matrix, the basic encryption matrix and the basic decryption matrix to form a basic encryption and decryption unit, and constructing an encryption and decryption matrix based on all the basic encryption and decryption units and the position of each basic encryption and decryption unit; Generate a license encryption configuration table and a license decryption configuration table, and respectively embed them in a target encryption server and a target verification software step, specifically including: extracting encryption and decryption association information in an encryption and decryption matrix; wherein the encryption and decryption association information includes the size of the encryption and decryption matrix, the encryption algorithm of each encryption and decryption unit, the key matrix and the key length; write the encryption and decryption association information into the license encryption configuration table and embed it in the target encryption server, and write the encryption and decryption association information into the license decryption configuration table after Base64 transcoding and embed it in the target verification software; The target encryption server encrypts the software license information using a built-in license encryption configuration table to generate a composite license, and sends the composite license to the user; During each verification cycle of use, the target verification software extracts the software license information encrypted in the composite license, decrypts the software license information using the license decryption configuration table, and determines whether the license verification of the target verification software has passed based on the decrypted software license information.

2. The offline software license encryption and decryption method based on limited random encryption according to claim 1, characterized in that: When N is less than the first target value, N×N keys are generated by manual assignment; when N is not less than the first target value, N×N keys are generated in batches using a key generation program.

3. The offline software license encryption and decryption method based on limited random encryption according to claim 1, characterized in that: When N is less than the second target value, an encryption algorithm is set for the encryption and decryption unit corresponding to each key in the key matrix by manual selection; when N is not less than the second target value, an encryption setting program is used to batch set the encryption algorithm for the encryption and decryption unit corresponding to each key in the key matrix.

4. The offline software license encryption and decryption method based on limited random encryption according to claim 1, characterized in that: The target encryption server encrypts the software license information using the built-in license encryption configuration table to generate a composite license, and sends the composite license to the user, specifically including: The target encryption server uses the built-in license encryption configuration table to establish a basic encryptor matrix, and uses each basic encryptor in the basic encryptor matrix to encrypt the software license information in turn to obtain N×N encrypted software licenses; The software license information includes a plurality of license software installation features, wherein the license software installation features include at least one of a user email address, an expiration date, and a MAC address of an installation computer; The obtained N×N encryption software licenses are used to construct an encryption license matrix according to the positions of the corresponding basic encryptors in the basic encryptor matrix, and the encryption license matrix is ​​sent to the user as a composite license.

5. The offline software license encryption and decryption method based on limited random encryption as claimed in claim 4, characterized in that: The composite license is configured as a composite license file in binary form, and the composite license file includes a file header and encrypted license matrix data; Wherein, the file header includes an EBCDIC file header for recording the text of the license contract and a binary file header for recording key information of the composite license file; The encrypted license matrix data includes a plurality of encrypted license tracks consisting of a license track header and license track data, wherein the license track header is configured to record the row number, column number, and size information of each encrypted license in the encrypted license matrix, and the encrypted license track is configured to record the data of each encrypted license in the encrypted license matrix.

6. The offline software license encryption and decryption method based on limited random encryption as claimed in claim 4, characterized in that: In each verification cycle used by the target verification software, the software license information encrypted in the composite license is extracted, the software license information is decrypted using the license decryption configuration table, and the steps of determining whether the license verification of the target verification software has passed are determined based on the decrypted software license information, including: The target verification software plans a path using a random path planner during each verification cycle in use, extracts the coordinates of each node in the path, and matches the encrypted license information corresponding to each node based on the coordinates and the composite license; The target verification software uses the built-in license encryption configuration table to establish a basic decryptor matrix, and uses the basic decryptors in the basic decryptor matrix to decrypt the encrypted license information at the corresponding position to obtain a number of decrypted software license information; Determine whether each licensed software installation feature in each decrypted software license information completely matches each actual software installation feature of the target verification software; if so, the target verification software passes the license verification in the current verification cycle; if not, the target verification software fails the license verification in the current verification cycle.

7. The offline software license encryption and decryption method based on limited random encryption according to claim 6, characterized in that: In each verification cycle used by the target verification software, a random path planner is used to plan a path, the coordinates of each node in the path are extracted, and the steps of matching the encrypted license information corresponding to each node based on the coordinates and the composite license specifically include: The target verification software generates a map of size N×N using a random path planner during each verification cycle, and generates obstacles in the map using a random algorithm; wherein the random algorithm includes a random point generation algorithm or a random grid algorithm; Randomly select a starting point and an end point at different locations on a map, and use a path planning algorithm to calculate the shortest path from the starting point to the end point; wherein the path planning algorithm includes a breadth-first search algorithm or a Dijkstra algorithm; The coordinates of each node in the path in the map are extracted, and the encrypted license information corresponding to each node is matched in the encrypted license matrix of the composite license based on the coordinates.

8. An offline software license encryption and decryption system based on limited random encryption, characterized in that: include: Configure the terminal, configure the key matrix and the encryption and decryption matrix, generate the permission encryption configuration table and the permission decryption configuration table, and embed them into the target encryption server and the target verification software respectively; Configuring an encryption and decryption matrix and a key matrix specifically includes: preparing N×N keys and putting them into a key matrix of N rows and N columns to form a key matrix; configuring a basic encryptor and a basic decryptor corresponding to each key according to the key at each position in the key matrix to generate a basic encryption matrix and a basic decryption matrix; extracting elements at the same position in the key matrix, the basic encryption matrix, and the basic decryption matrix to form a basic encryption and decryption unit, and constructing an encryption and decryption matrix based on all the basic encryption and decryption units and the position of each basic encryption and decryption unit; Generate a license encryption configuration table and a license decryption configuration table, and respectively embed them in the target encryption server and the target verification software, specifically including: extracting encryption and decryption association information in the encryption and decryption matrix; wherein the encryption and decryption association information includes the size of the encryption and decryption matrix, the encryption algorithm of each encryption and decryption unit, the key matrix and the key length; write the encryption and decryption association information into the license encryption configuration table and embed it in the target encryption server, and write the encryption and decryption association information into the license decryption configuration table after Base64 transcoding and embed it in the target verification software; The target encryption server encrypts the software license information using a built-in license encryption configuration table to generate a composite license, and sends the composite license to the user; The target verification software extracts the software license information encrypted in the composite license during each verification cycle, decrypts the software license information using the license decryption configuration table, and determines whether the license verification of the target verification software has passed based on the decrypted software license information.

Citation Information

Patent Citations

  • Public key cipher encrypting and decrypting method based on neural network chaotic attractor

    CN101977112A

  • Software licensing protection method

    CN107391971A