Software license code generation method, analysis method, device, equipment, storage medium and product

By encrypting the binary string of software license information into multiple groups and using a combination of asymmetric and symmetric encryption, a software license code is generated, which solves the problem that software license codes are easily cracked in existing technologies and achieves higher security.

CN121009529BActive Publication Date: 2026-05-15BEIJING HONGTENG INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING HONGTENG INTELLIGENT TECH CO LTD
Filing Date
2025-08-13
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing software license code encryption methods are ineffective against sophisticated cracking techniques, making software license codes vulnerable to cracking.

Method used

The software license information binary string is encrypted using multiple block encryption methods to generate a software license code, including a combination of asymmetric and symmetric encryption, which increases the difficulty of cracking.

Benefits of technology

The software license code has been improved in its resistance to cracking. Through multi-layered encryption, it is difficult for attackers to crack it, thus enhancing the security of the software license code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121009529B_ABST
    Figure CN121009529B_ABST
Patent Text Reader

Abstract

The application discloses a software authorization code generation method and device, a software authorization code analysis method and device, equipment, a storage medium and a product, relates to the technical field of data security, and discloses the following steps: obtaining a binary string corresponding to software authorization information; performing multiple times of group encryption on the binary string, and the encryption mode used in each time of group encryption is different; and generating a software authorization code based on the ciphertext obtained after the multiple times of group encryption. The method can effectively improve the anti-cracking capability of the software authorization code.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data security technology, and in particular to a method for generating and parsing software license codes, an apparatus, a device, a storage medium, and a product. Background Technology

[0002] A software license code is a specific sequence of characters assigned to a user by the software developer to ensure the legal use of the software. Users enter the license code when installing or activating the software; only after the software verifies the code can the user use the software's functions normally.

[0003] Given the importance of software license codes, they need to be encrypted to prevent unauthorized use of the software. However, existing encryption methods are ineffective against increasingly sophisticated cracking techniques, making software license codes highly vulnerable to attack in practical applications. Therefore, there is an urgent need to provide a method to improve the anti-cracking capabilities of software license codes.

[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main objective of this application is to provide a method, parsing method, apparatus, device, storage medium, and product for generating software license codes, which can effectively improve the anti-cracking capability of software license codes.

[0006] To achieve the above objectives, this application proposes a software license code generation method, executed by a server, the method comprising:

[0007] Obtain the binary string corresponding to the software license information;

[0008] The binary string is encrypted in multiple blocks, with each block using a different encryption method.

[0009] A software license code is generated based on the ciphertext obtained after multiple group encryptions.

[0010] Optionally, each block encryption includes:

[0011] Group the strings to obtain multiple partial strings;

[0012] Encrypt the target portion of the multiple partial strings to obtain an encrypted string;

[0013] The encrypted string is concatenated with the unencrypted portion of the plurality of partial strings to obtain the ciphertext.

[0014] Optionally, the step of performing multiple block encryptions on the binary string includes:

[0015] The binary string is grouped to obtain a first part string and a second part string;

[0016] The first part of the string is asymmetrically encrypted, and the resulting first encrypted string is concatenated with the second part of the string to obtain the first ciphertext;

[0017] The first ciphertext is divided into groups to obtain the third and fourth part strings;

[0018] The fourth part of the string is symmetrically encrypted, and the resulting second encrypted string is concatenated with the third part of the string to obtain the second ciphertext.

[0019] Optionally, the asymmetric encryption of the first part of the string includes:

[0020] The first part of the string is divided into multiple unit strings, each unit string containing N characters, where N is an integer greater than 1;

[0021] Asymmetric encryption is performed on each unit string to obtain the first encrypted string corresponding to each unit string. The first encrypted string corresponding to each unit string contains N characters.

[0022] Optionally, the step of grouping the binary string to obtain a first part string and a second part string includes:

[0023] The first part of the string is formed by the first target number of characters in the binary string, where the target number is a multiple of N;

[0024] The characters in the binary string other than the first part of the string are used to form the second part of the string.

[0025] Optionally, the asymmetric encryption of the first part of the string includes:

[0026] The first part of the string is encrypted using a private key, which is stored in the server.

[0027] Optionally, the symmetric encryption of the fourth part of the string includes:

[0028] Convert the fourth part of the string into a decimal integer;

[0029] The decimal integer is symmetrically encrypted to obtain an encrypted integer;

[0030] The encrypted integer is converted into a binary string with the same number of bits as the fourth part of the string to obtain the second encrypted string.

[0031] Optionally, the step of grouping the first ciphertext to obtain a third string and a fourth string includes:

[0032] The last M characters in the first ciphertext are used to form the fourth part of the string, where M is the number of binary digits that the server can process at one time.

[0033] The characters in the first ciphertext other than the fourth part of the string are used to form the third part of the string.

[0034] Optionally, the symmetric encryption of the fourth part of the string includes:

[0035] Determine the version number of the software license code to be generated;

[0036] The fourth part of the string is symmetrically encrypted using a key corresponding to the version number.

[0037] Optionally, the step of obtaining the binary string corresponding to the software license information includes:

[0038] Determine the set of authorized target functions;

[0039] The target function set is encoded to obtain a function string;

[0040] Based on the function string, a binary string corresponding to the software authorization information is generated, wherein the binary string corresponding to the software authorization information contains the function string.

[0041] Optionally, the step of encoding the target function set to obtain a function string includes:

[0042] Obtain a first function list, which contains the correspondence between software functions and binary bits in the function string;

[0043] Query the target bit in the function string for each software function in the target function set from the first function list;

[0044] The function string is generated based on the target bit, wherein the character corresponding to the target bit in the function string is 1, and the characters corresponding to the binary bits other than the target bit in the function string are 0.

[0045] Optionally, the step of encoding the target function set to obtain a function string includes:

[0046] Obtain the second function list, which contains the correspondence between decimal integers and function sets;

[0047] Query the target integer corresponding to the target function set from the second function list;

[0048] Convert the target integer into a binary function string.

[0049] Optionally, generating a software license code based on the ciphertext obtained after multiple group encryptions includes:

[0050] Obtain a target character table, wherein each target character in the target character table corresponds to a decimal integer, and the target character table does not contain easily confused characters;

[0051] The ciphertext obtained after multiple group encryptions is divided into multiple unit strings, each unit string containing X binary characters, where X is an integer greater than 1;

[0052] The unit strings in the ciphertext obtained after multiple group encryptions are mapped to the target characters in the target character table to obtain the software authorization code.

[0053] Optionally, the step of mapping each unit string in the ciphertext obtained after multiple group encryptions to the target characters in the target character table to obtain the software authorization code includes:

[0054] The mapped ciphertext is divided into multiple character segments, each segment containing the same number of characters;

[0055] The multiple character fragments are connected by a connector to obtain the software license code.

[0056] Optionally, the key used for the block encryption is a key corresponding to the version number of the software license code, and the step of concatenating the multiple character fragments with a connector to obtain the software license code includes:

[0057] The software license code is obtained by concatenating the multiple character fragments and the version number using the connecting character.

[0058] Optionally, the step of obtaining the binary string corresponding to the software license information includes:

[0059] The software authorization information is encoded to obtain a valid information string;

[0060] Generate a verification string corresponding to the valid information string;

[0061] The verification string is appended to the end of the valid information string to obtain the binary string corresponding to the software authorization information.

[0062] Optionally, the binary string corresponding to the software license information includes:

[0063] At least one of the following: random number encoding, region encoding, platform encoding, function encoding, validity period encoding, authorization type encoding, activation time encoding, usage type encoding, extended field encoding, and check code.

[0064] Furthermore, to achieve the above objectives, this application also proposes a software license code parsing method, executed by the client, the method comprising:

[0065] In response to the input software license code, decode the ciphertext from the software license code;

[0066] The ciphertext is decrypted in multiple groups, with a different decryption method used for each group.

[0067] Software license information is obtained from the binary string that does not contain the encrypted string after multiple decryption steps.

[0068] Optionally, each block decryption includes:

[0069] Group the strings to obtain multiple partial strings;

[0070] Decrypt the target portion of the multiple partial strings to obtain the decrypted string;

[0071] The decrypted string is concatenated with the undecrypted portion of the plurality of partial strings.

[0072] Optionally, the step of decrypting the ciphertext in multiple blocks includes:

[0073] The second ciphertext decoded from the software license code is divided into groups to obtain a second encrypted string and a third string;

[0074] The second encrypted string is symmetrically decrypted, and the resulting fourth part string is concatenated with the third part string to obtain the first ciphertext.

[0075] The first ciphertext is divided into groups to obtain a first encrypted string and a second part of the string;

[0076] The first encrypted string is decrypted asymmetrically, and the resulting first part of the string is concatenated with the second part of the string to obtain the binary string that does not contain the encrypted string.

[0077] Optionally, the asymmetric decryption of the first encrypted string includes:

[0078] The first encrypted string is divided into multiple unit strings, each unit string containing N characters, where N is an integer greater than 1;

[0079] Asymmetric decryption is performed on each unit string to obtain the first part string corresponding to each unit string, and the first part string corresponding to each unit string contains N characters.

[0080] Optionally, the step of grouping the first ciphertext to obtain a first encrypted string and a second string includes:

[0081] The first encrypted string is formed by the first target number of characters in the first ciphertext, where the target number is a multiple of N;

[0082] The characters in the first ciphertext other than the first encrypted string are used to form the second part of the string.

[0083] Optionally, the asymmetric decryption of the first encrypted string includes:

[0084] The first encrypted string is decrypted using the public key in asymmetric decryption, wherein the public key is stored in the client.

[0085] Optionally, the symmetric decryption of the second encrypted string includes:

[0086] Convert the second encrypted string into a decimal integer;

[0087] The decimal integer is symmetrically decrypted to obtain the decrypted integer;

[0088] The decrypted integer is converted into a binary string with the same number of bits as the second encrypted string to obtain the fourth part of the string.

[0089] Optionally, the step of grouping the second ciphertext decoded from the software license code includes:

[0090] The last M characters of the second ciphertext are used to form the second encrypted string, where M is the number of binary digits that the server that generates the software license code can process at one time.

[0091] The characters in the second ciphertext other than the second encrypted string are used to form the third part of the string.

[0092] Optionally, the symmetric decryption of the second encrypted string includes:

[0093] Extract the version number of the software license code from the software license code;

[0094] The second encrypted string is symmetrically decrypted using the key corresponding to the version number.

[0095] Optionally, obtaining software license information based on the binary string (excluding the encrypted string) obtained after multiple group decryptions includes:

[0096] Extract the functional string from the binary string;

[0097] The function string is decoded to obtain the authorized target function set, and the software authorization information contains the authorized target function set.

[0098] Optionally, the step of decoding the function string to obtain the authorized target function set includes:

[0099] Obtain a first function list, which contains the correspondence between software functions and binary bits in the function string;

[0100] Query the software function corresponding to the target bit where the character is 1 in the function string from the first function list;

[0101] The retrieved software functions are used to construct the target function set.

[0102] Optionally, the step of decoding the function string to obtain the authorized target function set includes:

[0103] Obtain the second function list, which contains the correspondence between decimal integers and function sets;

[0104] Convert the function string to a decimal integer;

[0105] Query the set of target functions corresponding to the converted decimal integer from the second function list.

[0106] Optionally, the step of decoding the ciphertext from the input software license code in response to the input software license code includes:

[0107] Obtain a target character table, wherein each target character in the target character table corresponds to a decimal integer, and the target character table does not contain easily confused characters;

[0108] Based on the target character table, each target character in the software license code is mapped to a decimal integer and converted into an X-bit binary character to obtain the ciphertext, where X is an integer greater than 1.

[0109] Optionally, the software license code includes multiple character segments and connecting characters between the multiple character segments;

[0110] Before mapping each target character in the software license code to a decimal integer based on the target character table and converting it to an X-bit binary character to obtain the ciphertext, the method further includes:

[0111] Remove the connection characters from the software license code.

[0112] Optionally, before decoding the ciphertext from the input software license code, the method further includes:

[0113] The software license code is formatted and validated.

[0114] If multiple character segments contained in the software license code are connected by the connecting character, and all characters in the software license code belong to the characters in the target character table, then the software license code is determined to pass the format verification.

[0115] Optionally, before obtaining software authorization information based on the binary string (not containing the encrypted string) obtained after multiple group decryption steps, the method further includes:

[0116] Determine the valid information string and the check string in the binary string;

[0117] Regenerate the verification string corresponding to the valid information string;

[0118] If the regenerated verification string matches the verification string carried in the binary string, the software license code is determined to have passed the integrity check.

[0119] Optionally, after obtaining the software authorization information based on the binary string (which does not contain the encrypted string) obtained after multiple group decryption steps, the method further includes:

[0120] Select and display preset core information from multiple software license information entries.

[0121] Furthermore, to achieve the above objectives, this application also proposes a software license code generation device, configured on a server, the device comprising:

[0122] The string retrieval module is used to retrieve the binary string corresponding to the software license information;

[0123] The block encryption module is used to perform multiple block encryptions on the binary string, with each block encryption using a different encryption method.

[0124] The authorization code generation module is used to generate software authorization codes based on the ciphertext obtained after multiple group encryptions.

[0125] Optionally, the group encryption module is used to group strings to obtain multiple partial strings; encrypt a target partial string among the multiple partial strings to obtain an encrypted string; and concatenate the encrypted string with the unencrypted partial strings among the multiple partial strings to obtain ciphertext.

[0126] Optionally, the block encryption module includes:

[0127] The first grouping unit is used to group the binary string to obtain a first part string and a second part string;

[0128] The first encryption unit is used to perform asymmetric encryption on the first part of the string and concatenate the obtained first encrypted string with the second part of the string to obtain the first ciphertext.

[0129] The second grouping unit is used to group the first ciphertext to obtain the third part string and the fourth part string;

[0130] The second encryption unit is used to perform symmetric encryption on the fourth part of the string, and concatenate the resulting second encrypted string with the third part of the string to obtain the second ciphertext.

[0131] Optionally, the first encryption unit is used to divide the first part of the string into multiple unit strings, each unit string containing N characters, where N is an integer greater than 1; and to perform asymmetric encryption on each unit string to obtain the first encrypted string corresponding to each unit string, wherein the first encrypted string corresponding to each unit string contains N characters.

[0132] Optionally, the first grouping unit is configured to form the first part string from the first target number of characters in the binary string, where the target number is a multiple of N; and to form the second part string from the characters in the binary string other than the first part string.

[0133] Optionally, the first encryption unit is used to encrypt the first part of the string using a private key in asymmetric encryption, wherein the private key is stored in the server.

[0134] Optionally, the second encryption unit is used to convert the fourth part of the string into a decimal integer; perform symmetric encryption on the decimal integer to obtain an encrypted integer; and convert the encrypted integer into a binary string with the same number of bits as the fourth part of the string to obtain the second encrypted string.

[0135] Optionally, the second grouping unit is used to form the fourth part string from the last M characters of the first ciphertext, where M is the number of binary digits that the server can process at one time; and to form the third part string from the characters in the first ciphertext other than the fourth part string.

[0136] Optionally, the second encryption unit is used to determine the version number of the software license code to be generated; and to perform symmetric encryption on the fourth part of the string using a key corresponding to the version number.

[0137] Optionally, the string acquisition module includes:

[0138] Function determination unit, used to determine the authorized set of target functions;

[0139] A function encoding unit is used to encode information in the target function set to obtain a function string;

[0140] A string generation unit is used to generate a binary string corresponding to the software authorization information based on the function string, wherein the binary string corresponding to the software authorization information contains the function string.

[0141] Optionally, the function encoding unit is configured to obtain a first function list, the first function list containing the correspondence between software functions and binary bits in the function string; query the target bit in the function string corresponding to each software function in the target function set from the first function list; generate the function string based on the target bit, wherein the character corresponding to the target bit in the function string is 1, and the characters corresponding to the binary bits other than the target bit in the function string are 0.

[0142] Optionally, the function encoding unit is configured to obtain a second function list, the second function list containing a correspondence between decimal integers and function sets; query the target integer corresponding to the target function set from the second function list; and convert the target integer into a binary function string.

[0143] Optionally, the authorization code generation module includes:

[0144] A character table acquisition unit is used to acquire a target character table, wherein each target character in the target character table corresponds to a decimal integer, and the target character table does not contain easily confused characters;

[0145] A string partitioning unit is used to divide the ciphertext obtained after multiple group encryptions into multiple unit strings. Each unit string contains X binary characters, where X is an integer greater than 1.

[0146] The character mapping unit is used to map each unit string in the ciphertext obtained after multiple group encryptions to the target character in the target character table, thereby obtaining the software authorization code.

[0147] Optionally, the character mapping unit is used to divide the mapped ciphertext into multiple character segments, each character segment including the same number of characters; and to connect the multiple character segments with connecting characters to obtain the software license code.

[0148] Optionally, the key used for the block encryption is a key corresponding to the version number of the software license code.

[0149] The character mapping unit is used to connect the plurality of character fragments and the version number using the connecting character to obtain the software license code.

[0150] Optionally, the string acquisition module is used to encode the software authorization information to obtain a valid information string; generate a verification string corresponding to the valid information string; and add the verification string to the end of the valid information string to obtain a binary string corresponding to the software authorization information.

[0151] Optionally, the binary string corresponding to the software license information includes:

[0152] At least one of the following: random number encoding, region encoding, platform encoding, function encoding, validity period encoding, authorization type encoding, activation time encoding, usage type encoding, extended field encoding, and check code.

[0153] Furthermore, to achieve the above objectives, this application also proposes a software license code parsing device, configured on a client, the device comprising:

[0154] The authorization code decoding module is used to decode ciphertext from the input software authorization code in response to the input software authorization code;

[0155] The block decryption module is used to decrypt the ciphertext into multiple blocks, with each block decryption using a different decryption method.

[0156] The information acquisition module is used to obtain software license information based on the binary string that does not contain the encrypted string obtained after multiple group decryption.

[0157] Optionally, the grouping and decryption module is used to group strings to obtain multiple partial strings; decrypt the target partial string among the multiple partial strings to obtain a decrypted string; and concatenate the decrypted string with the undecrypted partial string among the multiple partial strings.

[0158] Optionally, the block decryption module includes:

[0159] The first grouping unit is used to group the second ciphertext decoded from the software license code to obtain a second encrypted string and a third part string;

[0160] The first decryption unit is used to perform symmetric decryption on the second encrypted string, and concatenate the obtained fourth part string with the third part string to obtain the first ciphertext.

[0161] The second grouping unit is used to group the first ciphertext to obtain a first encrypted string and a second part string;

[0162] The second decryption unit is used to perform asymmetric decryption on the first encrypted string, and concatenate the obtained first part string with the second part string to obtain the binary string that does not contain the encrypted string.

[0163] Optionally, the second decryption unit is used to divide the first encrypted string into multiple unit strings, each unit string containing N characters, where N is an integer greater than 1; and to perform asymmetric decryption on each unit string to obtain the first part string corresponding to each unit string, wherein the first part string corresponding to each unit string contains N characters.

[0164] Optionally, the second grouping unit is used to form the first encrypted string from the first ciphertext up to a target number of characters, where the target number is a multiple of N; and to form the second part string from the first ciphertext other than the first encrypted string.

[0165] Optionally, the second decryption unit is used to decrypt the first encrypted string using a public key in asymmetric decryption, wherein the public key is stored in the client.

[0166] Optionally, the first decryption unit is used to convert the second encrypted string into a decimal integer; perform symmetric decryption on the decimal integer to obtain a decrypted integer; and convert the decrypted integer into a binary string with the same number of bits as the second encrypted string to obtain the fourth part of the string.

[0167] Optionally, the first grouping unit is used to form the second encrypted string from the last M characters of the second ciphertext, where M is the number of binary digits that the server generating the software license code can process at one time; and to form the third part string from the characters in the second ciphertext other than the second encrypted string.

[0168] Optionally, the first decryption unit is used to extract the version number of the software license code from the software license code; and to perform symmetric decryption of the second encrypted string using a key corresponding to the version number.

[0169] Optionally, the information acquisition module includes:

[0170] A string extraction unit is used to extract a functional string from the binary string;

[0171] A string decoding unit is used to decode the function string to obtain the authorized target function set, wherein the software authorization information includes the authorized target function set.

[0172] Optionally, the string decoding unit is configured to obtain a first function list, the first function list containing the correspondence between software functions and binary bits in the function string; query the software function corresponding to the target bit in the function string where the character is 1 from the first function list; and construct the target function set from the queried software functions.

[0173] Optionally, the string decoding unit is configured to obtain a second function list, the second function list containing the correspondence between decimal integers and function sets; convert the function string into a decimal integer; and query the target function set corresponding to the converted decimal integer from the second function list.

[0174] Optionally, the authorization code decoding module includes:

[0175] A character table acquisition unit is used to acquire a target character table, wherein each target character in the target character table corresponds to a decimal integer, and the target character table does not contain easily confused characters;

[0176] The character mapping unit is used to map each target character in the software license code to a decimal integer based on the target character table, and then convert it into an X-bit binary character to obtain the ciphertext, where X is an integer greater than 1.

[0177] Optionally, the software license code includes multiple character segments and connecting characters between the multiple character segments;

[0178] The character mapping unit is also used to remove connection characters from the software license code.

[0179] Optionally, the device further includes:

[0180] The format verification module is used to perform format verification on the software license code; if multiple character segments contained in the software license code are connected by the connecting character, and all characters in the software license code belong to the characters in the target character table, then the software license code is determined to pass the format verification.

[0181] Optionally, the device further includes:

[0182] The integrity verification module is used to determine the valid information string and the verification string in the binary string; regenerate the verification string corresponding to the valid information string; and determine that the software license code passes the integrity verification if the regenerated verification string is consistent with the verification string carried in the binary string.

[0183] Optionally, the device further includes:

[0184] The information display module is used to select and display preset core information from multiple software license information obtained.

[0185] In addition, to achieve the above objectives, this application also proposes an electronic device, the electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the software license code generation method described above, or the computer program being configured to implement the steps of the software license code parsing method described above.

[0186] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the software license code generation method described above, or, when the computer program is executed by a processor, it implements the steps of the software license code parsing method described above.

[0187] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the software license code generation method described above, or, when executed by a processor, implements the steps of the software license code parsing method described above.

[0188] One or more technical solutions proposed in this application have at least the following technical effects:

[0189] The software license code generation scheme provided in this application obtains the binary string corresponding to the software license information and then performs multiple group encryptions on the binary string, each using a different encryption method. This provides multiple layers of protection for the software license code, making it difficult for attackers to crack the software license code using a single method, effectively improving the security of the software license code. Furthermore, the string is regrouped before each encryption, and the grouped data is encrypted. This adds a complex obfuscation layer to the encryption mechanism, causing attackers to encounter more interference when attempting to parse the encryption logic, further increasing the difficulty of cracking. Therefore, the software license code is generated based on the ciphertext produced by multiple group encryptions. The multiple group encryption steps work together to comprehensively enhance the anti-cracking capability of the software license code. Attached Figure Description

[0190] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0191] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0192] Figure 1 This is a schematic diagram of an implementation environment for the software license code generation and parsing method of this application;

[0193] Figure 2 This is a flowchart illustrating the first embodiment of the software license code generation method of this application.

[0194] Figure 3 This is a detailed step diagram of step S120 in the second embodiment of the software license code generation method of this application;

[0195] Figure 4 This is a detailed step diagram of step S110 in the third embodiment of the software license code generation method of this application;

[0196] Figure 5 This is a detailed step diagram of step S130 in the fourth embodiment of the software license code generation method of this application;

[0197] Figure 6 This is a flowchart illustrating the first embodiment of the software license code parsing method of this application.

[0198] Figure 7 This is a detailed step diagram of step S220 in the second embodiment of the software license code parsing method of this application;

[0199] Figure 8 This is a detailed step diagram of step S230 in the third embodiment of the software license code parsing method of this application;

[0200] Figure 9 This is a detailed step diagram of step S210 in the fourth embodiment of the software license code parsing method of this application;

[0201] Figure 10 A schematic diagram illustrating the format of a data packet for a software license code provided in an embodiment of this application;

[0202] Figure 11 A timing diagram for encrypting a binary string corresponding to a software license code, provided in an embodiment of this application;

[0203] Figure 12 A timing diagram for decrypting a software license code provided in an embodiment of this application;

[0204] Figure 13 A timing diagram for parsing software license codes is provided as an embodiment of this application;

[0205] Figure 14 This is a schematic diagram of the module structure of the software license code generation device according to an embodiment of this application;

[0206] Figure 15 This is a schematic diagram of the module structure of the software license code parsing device according to an embodiment of this application;

[0207] Figure 16 This is a schematic diagram of the device structure of the hardware operating environment involved in the software license code generation method or software license code parsing method in the embodiments of this application.

[0208] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0209] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0210] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0211] Figure 1 This is a schematic diagram illustrating an implementation environment provided by an embodiment of this disclosure. See also... Figure 1The implementation environment includes a terminal 101 and a server 102. The terminal 101 and server 102 are connected via a wireless or wired network. For example, the terminal 101 has a client installed on it, which provides software authentication services through the server 102. The terminal 101 can use this client to perform functions such as data transmission and message interaction. For example, the terminal 101 can be a computer, mobile phone, tablet computer, or other terminal. For example, the client can be a client within the operating system of the terminal 101, or a client provided by a third party.

[0212] In this application, server 102 is used to obtain the binary string corresponding to software license information. The binary string is then encrypted in multiple blocks. Based on the ciphertext obtained after multiple block encryption, a software license code is generated. After this software license code is delivered to the user in any way, the user can enter the software license code when installing, updating, or using specific functions of the client on terminal 101, as prompted by the client. Correspondingly, the client installed on terminal 101 is used to decode the ciphertext from the entered software license code in response to the input software license code. The ciphertext is then decrypted in multiple blocks. Based on the binary string (excluding the encrypted string) obtained after multiple block decryption, the software license information is obtained. Afterwards, the client can be activated based on this software license information, allowing the user to use the client's functions normally.

[0213] Figure 2 This is a flowchart illustrating the first embodiment of the software license code generation method of this application. (Refer to...) Figure 2 Taking the server as the executing entity as an example, the software license code generation method includes the following steps S110 to S130:

[0214] Step S110: Obtain the binary string corresponding to the software license information.

[0215] Software license information refers to a series of data related to software usage rights, used to determine the legal scope and conditions of a user's use of the software. A binary string is a form of data representation in a computer, a sequence of 0s and 1s. Software license information is converted into a binary string for storage, processing, and transmission by the computer. This binary string is not encrypted and is in plaintext.

[0216] Optionally, the binary string corresponding to the software license information includes at least one of the following: random number encoding, region encoding, platform encoding, function encoding, validity period encoding, license type encoding, activation time encoding, usage type encoding, extended field encoding, and checksum. That is, the binary string corresponding to the software license information can contain multiple types of information encoding simultaneously, or it can contain only some of these information encodings.

[0217] The software license code is comprised of several key components. The random number code is a binary code converted from randomly generated numbers. It increases the diversity and unpredictability of the software license. The region code identifies the geographical area to which the software license applies. The platform code represents the operating system or hardware platform used by the licensed software. The function code specifies the specific functional modules or levels that the licensed user can access. The validity period code defines the validity period of the software license. The license type code distinguishes different types of licenses. The activation time code records the specific time the software license was activated. The type code indicates the method of software use. The extended field code is a reserved, expandable field for future additions of software license-related information. As software business develops and needs change, new content may need to be added to the license information. The extended field code provides a flexible expansion mechanism, preventing the inability to meet new business needs due to the fixed format of the license information. The checksum is a code generated by calculating other license information fields using a specific algorithm, used to verify the completeness and accuracy of the license information.

[0218] The encoding of multi-dimensional authorization information is integrated into the binary string corresponding to the software authorization information, which can increase the information density of the software authorization code, improve the flexibility of the software authorization code, and facilitate the application of the software authorization code to more authorization scenarios.

[0219] It's important to note that if the binary string corresponding to the software license information contains a random number encoding, the specific value of this random number encoding may affect the length of the encrypted ciphertext. To ensure consistent ciphertext length, if the ciphertext obtained by encrypting the binary string does not meet the requirements, such as insufficient length, a new random number encoding must be generated, and the binary string corresponding to the software license information must be retrieved again based on the regenerated random number encoding. This ensures the validity of the subsequently generated software license code.

[0220] Step S120: Encrypt the binary string into multiple groups, with each group using a different encryption method.

[0221] Encryption methods are the specific algorithms used to encrypt data, such as AES (Advanced Encryption Standard), RSA (Rivest–Shamir–Adleman encryption algorithm), and DES (Data Encryption Standard). AES and DES are symmetric encryption algorithms, while RSA is an asymmetric encryption algorithm.

[0222] Optionally, each block encryption step includes: dividing the string into multiple partial strings, and then encrypting each partial string separately. Because each partial string has an independent encryption process, even if an attacker obtains a portion of the ciphertext, due to the independence of encryption between the parts, it is very difficult for them to deduce information from the partial ciphertext, let alone crack the complete plaintext information. This significantly improves the security of software license codes.

[0223] Optionally, each group encryption step includes: grouping the string into multiple partial strings; encrypting the target partial string within these partial strings to obtain an encrypted string; and concatenating the encrypted string with the unencrypted partial strings to obtain the ciphertext. Encrypting only the target partial string, rather than all partial strings, reduces the amount of data encrypted. This method can significantly improve encryption speed when processing large amounts of data. Furthermore, concatenating the encrypted string with the unencrypted partial strings to obtain the ciphertext not only preserves the original data structure and format to some extent, ensuring that the encrypted data can still be processed and recognized by the system, but also adds an additional obfuscation layer to the encryption mechanism, further increasing the difficulty of cracking.

[0224] String grouping methods can be flexible and varied. For example, you can group the strings evenly according to their length. Alternatively, you can preset the number of groups and randomly determine the length of the portion of the string corresponding to each group. Or, you can preset the target portion of the string to be encrypted, group the target portion of the string into one group, and group the rest of the string into another.

[0225] The target string can be preset to any part of the string as needed. For example, in the first block encryption, the target string is the first 80 binary characters. In the second block encryption, the target string is the last 64 binary characters. In the third block encryption, the target string is the first 120 binary characters.

[0226] Furthermore, when concatenating the encrypted string with the unencrypted portion of the string to obtain the ciphertext, the grouping method must be considered to ensure that the encoded positions of various authorization information within the concatenated binary characters remain unchanged. For example, if the binary string is 125 bits, it can be divided into the first 120 bits and the last 5 bits. After encrypting the first 120 bits to obtain the encrypted string, the last 5 bits of the unencrypted string are appended to the end of the encrypted string to obtain the ciphertext.

[0227] It's important to note that the multiple block encryptions form a cyclic encryption process. Except for the first block encryption, each subsequent block encryption is performed on the ciphertext obtained from the previous block encryption.

[0228] Step S130: Generate a software license code based on the ciphertext obtained after multiple group encryptions.

[0229] The ciphertext is the result of encrypting the binary string corresponding to the software license information. The software license code is an identifier used by software developers to verify whether a user has the right to use the software. Users need to enter this license code for verification when installing or using the software; only after successful verification can the user use the corresponding functions of the software.

[0230] For example, the ciphertext obtained after multiple block encryptions can be directly used as the software license code. Alternatively, the ciphertext can be encoded to obtain the software license code, thus shortening its length. For instance, the ciphertext can be Base32 or Base64 encoded to obtain the software license code.

[0231] The software license code generation scheme provided in this application obtains the binary string corresponding to the software license information and then performs multiple group encryptions on the binary string, each using a different encryption method. This provides multiple layers of protection for the software license code, making it difficult for attackers to crack the software license code using a single method, effectively improving the security of the software license code. Furthermore, the string is regrouped before each encryption, and the grouped data is encrypted. This adds a complex obfuscation layer to the encryption mechanism, causing attackers to encounter more interference when attempting to parse the encryption logic, further increasing the difficulty of cracking. Therefore, the software license code is generated based on the ciphertext produced by multiple group encryptions. The multiple group encryption steps work together to comprehensively enhance the anti-cracking capability of the software license code.

[0232] Based on the first embodiment described above, a second embodiment of this application is proposed. Contents that are the same as or similar to the first embodiment can be referred to the above description and will not be repeated hereafter. (Refer to...) Figure 3 In the second embodiment, step S120 includes steps S1201 to S1204:

[0233] Step S1201: Group the binary string to obtain the first part string and the second part string.

[0234] Optionally, this step can be implemented as follows: the first part of the binary string is formed by taking the first target number of characters, where the target number is a multiple of N and N is an integer greater than 1; the second part of the binary string is formed by taking the characters other than the first part of the binary string.

[0235] Considering that the subsequent encryption algorithm is performed on strings containing N characters, the first part of the string is fixed to a multiple of N. This ensures that the data length is relatively regular during encryption, which helps the encryption algorithm run more efficiently.

[0236] For example, N is 8, meaning the target number is a multiple of 8. Considering that the underlying data processing mechanism of computers is based on bytes, and one byte consists of 8 bits, setting the target number to a multiple of 8 allows data blocks to be precisely aligned with byte boundaries, reducing the additional conversion overhead during data processing and thus significantly improving encryption speed.

[0237] Step S1202: Perform asymmetric encryption on the first part of the string, and concatenate the resulting first encrypted string with the second part of the string to obtain the first ciphertext.

[0238] Asymmetric encryption is an encryption method that uses two keys: a public key and a private key. Its key characteristic is that data encrypted with the public key can only be decrypted with the corresponding private key, and vice versa.

[0239] Optionally, asymmetric encryption is performed on the first part of the string, including: dividing the first part of the string into multiple unit strings, each unit string containing N characters, where N is an integer greater than 1; performing asymmetric encryption on each unit string to obtain a first encrypted string corresponding to each unit string, each first encrypted string containing N characters. Subsequently, the first encrypted string corresponding to each unit string is concatenated with the unencrypted part of the string to obtain the first ciphertext.

[0240] In this embodiment, dividing the first part of the string into fixed-length unit strings allows the encryption algorithm to process this data more efficiently, avoiding the additional overhead caused by processing data of varying lengths and improving the utilization efficiency of system resources. Furthermore, dividing the first part of the string into multiple unit strings for separate asymmetric encryption effectively disperses encryption risks. Even if an attacker obtains the encrypted information of one unit string, because the other unit strings are encrypted independently, it is difficult for the attacker to decipher the complete content of the first part of the string, thus significantly improving the overall data security.

[0241] Optionally, the first part of the string is subjected to asymmetric encryption, including encrypting the first part of the string using a private key, which is stored on the server. Considering that client devices are vulnerable to various security threats, such as virus infections and malware attacks, if the private key is stored on the client, it could be stolen if the client device is compromised, thus compromising the security of the encrypted data. Servers typically have higher levels of security measures, such as firewalls, intrusion detection systems, and access controls. Storing the private key on the server effectively prevents its unauthorized acquisition. Compared to distributing the private key across multiple client devices, this significantly reduces the risk of private key leakage.

[0242] The formula for asymmetric encryption is: Ciphertext = (Plaintext)^Private key modulo. Here, plaintext refers to the first part of the string.

[0243] For example, to prioritize the security of core information in software licensing information, the first part of the string can contain encodings corresponding to the core information. For instance, it could include function encoding, validity period encoding, licensing type encoding, activation time encoding, etc. Using asymmetric encryption on this first part of the string ensures that the core information is not tampered with or stolen during transmission.

[0244] Step S1203: Divide the first ciphertext into groups to obtain the third and fourth part strings.

[0245] Optionally, this step can be implemented as follows: the last M characters of the first ciphertext are used to form the fourth part of the string, where M is the number of binary digits that the server can process at one time; the characters in the first ciphertext other than the fourth part of the string are used to form the third part of the string. For example, M is 32 or 64.

[0246] In this embodiment, considering the differences in processing capabilities among different servers, by setting the length of the fourth part of the string to the number of binary bits M that the server can process at one time, subsequent encryption of the fourth part of the string can better adapt the encryption operation to the server's performance. This allows the server to encrypt this part of the data in the optimal processing method, fully utilizes the server's computing power, reduces encryption time and resource consumption, and thus improves the overall encryption efficiency.

[0247] Step S1204: Perform symmetric encryption on the fourth part of the string, and concatenate the resulting second encrypted string with the third part of the string to obtain the second ciphertext.

[0248] Symmetric encryption refers to encryption methods that use the same key for both encryption and decryption. Symmetric encryption algorithms are characterized by fast encryption speed and high efficiency, making them suitable for encrypting large amounts of data.

[0249] Optionally, the fourth part of the string is symmetrically encrypted, including: converting the fourth part of the string into a decimal integer; performing symmetric encryption on the decimal integer to obtain an encrypted integer; and converting the encrypted integer into a binary string with the same number of bits as the fourth part of the string to obtain a second encrypted string.

[0250] Considering that many symmetric encryption algorithms are better suited to handling numerical data, converting the fourth part of the string to a decimal integer allows the encryption algorithm to perform mathematical operations on integers more naturally. This avoids complex bitwise operations on binary strings, thus improving encryption speed.

[0251] Optionally, the fourth part of the string is symmetrically encrypted, including: determining the version number of the software license code to be generated; and using a key corresponding to the version number to symmetrically encrypt the fourth part of the string.

[0252] In this embodiment, different versions of the software license code are encrypted using different keys. This means that even if the key for one version is unfortunately leaked, an attacker cannot use that key to crack other versions of the license code. This effectively avoids the situation where the security of all versions of the license code is threatened due to the leakage of a single key, greatly enhancing the overall security of the software licensing system. Furthermore, when it is necessary to upgrade the security policy, only a new license code version number and the corresponding encryption key need to be generated, without redesigning the encryption logic. When the client parses the software license code, it only needs to use the key corresponding to the new version number, without changing the decryption logic, greatly improving the convenience of security policy upgrades.

[0253] It's important to note that the software license code used in the above scheme can be the software version number, i.e., the client version number. This versioned key isolation eliminates the need for enterprises to design separate encryption algorithms for each new software version, thus reducing key management complexity. For example, traditional schemes require redesigning the encryption algorithm for each new software version, while this scheme only requires updating the key version used for symmetric encryption.

[0254] In this embodiment, the binary string is encrypted twice via block encryption—asymmetric and symmetric encryption—making the encryption process more complex. Attackers need to crack both asymmetric and symmetric encryption simultaneously, and must contend with the complex structure of the two block encryptions, significantly increasing the difficulty of cracking. Even if an attacker obtains part of the ciphertext, it is very difficult to extract valuable information because different parts of the data employ different encryption methods and block encryption strategies.

[0255] Based on the first embodiment of this application described above, a third embodiment of this application is proposed. Contents that are the same as or similar to the first embodiment can be referred to the above description, and will not be repeated hereafter. See also... Figure 4 In the third embodiment, step S110 includes steps S1101 to S1103.

[0256] Step S1101: Determine the set of authorized target functions.

[0257] The target functionality set refers to the set of specific functions that a software license allows the user to use. For example, an office software may have functions such as word processing, spreadsheet creation, and PowerPoint presentation. If a user's software license only allows the use of word processing and spreadsheet creation functions, then these two functions constitute the target functionality set.

[0258] Step S1102: Encode the target function set to obtain the function string.

[0259] Information encoding is the process of converting information in a target function set into a binary string according to certain rules. The function string in the embodiments of this application can also be called function encoding.

[0260] Optionally, the target function set is encoded to obtain a function string, including the following two methods:

[0261] The first method involves obtaining a first function list, which contains the correspondence between software functions and their corresponding binary bits in the function string. Then, the target bit in the function string is retrieved from the first function list for each software function in the target function set. Based on the target bit, a function string is generated, where the character corresponding to the target bit in the function string is 1, and the characters corresponding to all other binary bits in the function string are 0. This method of generating function strings is simple and efficient. Furthermore, the generated function string clearly shows the scope of software function authorization by indicating that 1 represents an authorized function and 0 represents an unauthorized function.

[0262] The second method involves obtaining a second function list, which contains the correspondence between decimal integers and function sets. The target integer corresponding to the desired function set is then retrieved from this second function list. Finally, the target integer is converted into a binary function string. By storing the correspondence between decimal integers and function sets in the second function list, and using integers to represent complex function sets, it's easy to quickly retrieve the target integer corresponding to the desired function set from the second function list. Combined with simple data conversion operations, the function string can be obtained. The entire solution is simple and efficient, improving the efficiency of generating function strings.

[0263] The number of bits in the function string is preset. When converting the target integer into a binary function string, if the number of bits in the function string is insufficient, the higher bits need to be padded with 0.

[0264] It should be noted that if the number of functions that the software needs to authorize is no greater than the preset number of bits for the function code, the first method can be used to encode the authorized functions. If the number of functions that the software needs to authorize is greater than the preset number of bits for the function code, the second method can be used to encode the authorized functions.

[0265] Step S1103: Based on the function string, generate a binary string corresponding to the software license information. The binary string corresponding to the software license information contains the function string.

[0266] The software license information also includes other license information besides the licensed function information. Accordingly, the other license information is also converted into binary strings. The binary strings corresponding to the various license information are concatenated according to the preset position order to obtain the binary string corresponding to the software license information.

[0267] For example, software license information also includes information such as the licensed platform, usage type, and license type. Correspondingly, the same principle as the license function can be used to encode the licensed platform, usage type, and license type to obtain the corresponding information encoding. For example, software license information also includes time information, which can be converted from decimal data to binary data to obtain the time information encoding.

[0268] Optionally, obtaining the binary string corresponding to the software license information includes: encoding the software license information to obtain a valid information string; generating a verification string corresponding to the valid information string; and appending the verification string to the end of the valid information string to obtain the binary string corresponding to the software license information. This allows the client to determine whether the software license information has been tampered with or corrupted during transmission based on the verification string after receiving the software license code. This is crucial for ensuring the accuracy and reliability of the software license information, preventing license verification failures or software malfunctions due to data errors.

[0269] The check string can also be called a check code. For example, the CCITT algorithm (an algorithm name) is used to calculate the valid information string to obtain the CRC16 check code (a 16-bit binary check code).

[0270] In this embodiment, the authorized target function set is encoded to obtain a function string, which is then merged into the binary string corresponding to the software authorization information. This achieves the integration of authorized function information into the software authorization code, further improving the information density of the software authorization code. Thus, even in offline scenarios, the client can activate the software solely based on the software authorization code to parse the authorized function information, without relying on the network to obtain authorized function information from a server. This further enhances the autonomy and convenience of the software activation process. It effectively reduces the risk of software activation failure due to network issues, significantly enhancing user experience and software usability.

[0271] Based on the first embodiment of this application described above, a fourth embodiment of this application is proposed. Contents that are the same as or similar to the first embodiment can be referred to the above description, and will not be repeated hereafter. See also... Figure 5 In the fourth embodiment, step S130 includes steps S1301 to S1303.

[0272] Step S1301: Obtain the target character table. Each target character in the target character table corresponds to a decimal integer, and the target character table does not contain easily confused characters.

[0273] For example, the target character table contains 32 characters: M, T, C, L, 7, B, X, G, 3, D, H, A, F, 8, 5, N, P, W, S, U, K, 4, V, 2, E, 9, J, Y, Z, 6, R, and Q. M corresponds to the decimal integer 0, T corresponds to the decimal integer 1, C corresponds to the decimal integer 2, and so on. It is important to emphasize that the target character table does not contain easily confused characters such as I, 1, 0, and O.

[0274] Step S1302: Divide the ciphertext obtained after multiple group encryptions into multiple unit strings. Each unit string contains X binary characters, where X is an integer greater than 1.

[0275] For example, X is 5, meaning that every 5 binary characters in the ciphertext obtained after block encryption are divided into a unit string. In this way, the decimal integer corresponding to each unit string is less than 32, and each unit string can find its corresponding target character in the target character table.

[0276] Step S1303: Map each unit string in the ciphertext obtained after multiple group encryptions to the target character in the target character table to obtain the software license code.

[0277] For any unit string in the ciphertext, convert it to a decimal integer and determine the target character corresponding to that decimal integer in the target character table. This gives you the target character mapped to that unit string. By performing this mapping operation on each unit string in the ciphertext, you can obtain the software license code.

[0278] Optionally, after mapping each unit string in the ciphertext obtained by multiple group encryptions to the target characters in the target character table, the ciphertext is divided into multiple character segments, each containing the same number of characters; the multiple character segments are then connected with a concatenation character to obtain the software license code.

[0279] For example, if the mapped ciphertext contains 25 target characters, dividing it into segments of 5 target characters results in 5 character segments. Concatenating these 5 character segments with a connector yields the software license code.

[0280] For example, the connecting characters are "-", "~", "*" or other characters, and this application embodiment does not limit this.

[0281] In this embodiment, the characters in the software license code are divided into multiple character segments, each containing the same number of characters and connected by connectors. This allows the license code to present a regular and neat format, making it visually clearer and significantly improving efficiency and accuracy in both reading and inputting the software license code.

[0282] Optionally, the key used for block encryption is the key corresponding to the version number of the software license code. Accordingly, multiple character segments are concatenated using connectors to obtain the software license code, including concatenating multiple character segments and the version number using connectors. For example, the software license code is 3D7A2-4B9XC-8PQR5-2W3MN-FG7H9-V2, where V2 is the version number.

[0283] By incorporating the version number as part of the software license code and concatenating it with character fragments to form a complete software license code, the client can match the key used to decrypt the software license code based on the version number, thereby successfully obtaining the software license information within the software license code.

[0284] In this embodiment, the target character table does not contain easily confused characters, such as O and 0, I and 1, which are easily misread. This greatly reduces the probability of errors caused by character confusion when the software license code is manually entered, viewed, or recorded, making it easier for users to accurately activate the software using the license code.

[0285] Figure 6 This is a flowchart illustrating the first embodiment of the software license code parsing method of this application. (Refer to...) Figure 6 Taking the client as the executing entity as an example, the software license code parsing method includes the following steps S210 to S230:

[0286] Step S210: In response to the input software license code, decode the ciphertext from the software license code.

[0287] Step S220: Decrypt the ciphertext in multiple groups, with each group using a different decryption method.

[0288] Optionally, each group decryption includes: grouping the strings to obtain multiple partial strings; decrypting the target partial string among the multiple partial strings to obtain a decrypted string; and concatenating the decrypted string with the undecrypted partial strings among the multiple partial strings.

[0289] Optionally, each group decryption includes: grouping the string to obtain multiple partial strings; decrypting each partial string separately to obtain a decrypted string; and concatenating the decrypted strings corresponding to each partial string.

[0290] Step S230: Obtain software authorization information based on the binary string that does not contain the encrypted string obtained after multiple group decryption.

[0291] In this embodiment, the software license code is generated based on ciphertext obtained by repeatedly encrypting the binary string corresponding to the software license information into groups, with each encryption using a different encryption method. Therefore, by performing the reverse operation of this encryption—that is, decoding the ciphertext from the software license code and then repeatedly decrypting it into groups using different decryption methods—the software license information can be successfully obtained. Since the parsing process of the software license code involves multiple layers of different decryption methods, and each decryption requires correct grouping, attackers encounter numerous obstacles when attempting to parse the encryption logic, greatly improving the software license code's resistance to cracking and thus enhancing software security.

[0292] Based on the first embodiment of the authorization code parsing method of this application described above, a second embodiment of the authorization code parsing method of this application is proposed. Content that is the same as or similar to the first embodiment can be referred to the above description, and will not be repeated hereafter. (Refer to...) Figure 7 In the second embodiment, step S220 includes steps S2201 to S2204.

[0293] Step S2201: Divide the second ciphertext decoded from the software license code into groups to obtain the second encrypted string and the third part string.

[0294] Optionally, the second ciphertext decoded from the software license code is grouped, including: forming a second encrypted string from the last M characters of the second ciphertext, where M is the number of binary digits that the server that generated the software license code can process at one time; and forming a third string from the characters in the second ciphertext other than the second encrypted string.

[0295] Step S2202: Perform symmetric decryption on the second encrypted string, and concatenate the resulting fourth part string with the third part string to obtain the first ciphertext.

[0296] Optionally, symmetric decryption of the second encrypted string includes: converting the second encrypted string into a decimal integer; performing symmetric decryption on the decimal integer to obtain a decrypted integer; and converting the decrypted integer into a binary string with the same number of bits as the second encrypted string to obtain the fourth part of the string.

[0297] Optionally, symmetric decryption of the second encrypted string includes: extracting the version number of the software license code from the software license code; and using a key corresponding to the version number to perform symmetric decryption of the second encrypted string. For example, the version number of the software license code is located at the end of the software license code; accordingly, the version number at the end of the software license code can be directly extracted.

[0298] Step S2203: Divide the first ciphertext into groups to obtain the first encrypted string and the second part of the string.

[0299] Optionally, the first ciphertext is divided into groups to obtain a first encrypted string and a second part string, including: forming the first encrypted string from the first ciphertext with the first target number of characters, where the target number is a multiple of N; and forming the second part string from the first ciphertext with the characters other than the first encrypted string.

[0300] Step S2204: Perform asymmetric decryption on the first encrypted string, and concatenate the first part of the string with the second part of the string to obtain a binary string that does not contain the encrypted string.

[0301] Optionally, asymmetric decryption of the first encrypted string includes: dividing the first encrypted string into multiple unit strings, each unit string containing N characters, where N is an integer greater than 1; and performing asymmetric decryption on each unit string to obtain the first part string corresponding to each unit string, where the first part string corresponding to each unit string contains N characters.

[0302] Optionally, the first encrypted string is decrypted asymmetrically, including: decrypting the first encrypted string using the public key in asymmetric decryption, wherein the public key is stored in the client.

[0303] The formula for asymmetric decryption is: Plaintext = (Ciphertext)^Public Key modulo. Here, the ciphertext is the first encrypted string.

[0304] Based on the first embodiment of the authorization code parsing method of this application described above, a third embodiment of the authorization code parsing method of this application is proposed. Content that is the same as or similar to the first embodiment can be referred to the above description, and will not be repeated hereafter. (Refer to...) Figure 8 In the third embodiment, step S230 includes steps S2301 to S2302.

[0305] Step S2301: Extract the function string from the binary string.

[0306] In the binary string corresponding to the software license information, the encoding of each binary character to which type of license information is represented is predefined. The client can obtain the function string at the corresponding position according to the definition.

[0307] Step S2302: Decode the function string to obtain the authorized target function set. The software license information contains the authorized target function set.

[0308] Optionally, the function string is decoded to obtain the authorized target function set, including: obtaining a first function list, which contains the correspondence between software functions and binary bits in the function string; querying the software function corresponding to the target bit in the function string where the character is 1 from the first function list; and constructing the target function set from the queried software functions.

[0309] Optionally, the function string is decoded to obtain the authorized target function set, including: obtaining a second function list, which contains the correspondence between decimal integers and function sets; converting the function string into a decimal integer; and querying the target function set corresponding to the converted decimal integer from the second function list.

[0310] Optionally, after obtaining the software license information based on the binary string (excluding the encrypted string) obtained through multiple group decryption steps, the method further includes: selecting and displaying preset core information from the obtained multiple software license information sets. This allows users to clearly understand the scope and main permissions of the software license they have obtained.

[0311] The specific types of preset core information are set according to the application scenario. For example, preset core information includes seven types of core authorization information: authorized region, platform architecture, validity period, function combination, authorization type, activation time, and usage type.

[0312] For example, after selecting preset core information from multiple software licensing information, the client encapsulates the preset core information into a visual license data object and displays the visual license data object.

[0313] Based on the first embodiment of the authorization code parsing method of this application described above, a fourth embodiment of the authorization code parsing method of this application is proposed. Content that is the same as or similar to the first embodiment can be referred to the above description, and will not be repeated hereafter. (Refer to...) Figure 9 In the fourth embodiment, step S210 includes steps S2101 to S2102.

[0314] Step S2101: Obtain the target character table. Each target character in the target character table corresponds to a decimal integer, and the target character table does not contain easily confused characters.

[0315] Step S2102: Based on the target character table, map each target character in the software license code to a decimal integer and convert it into an X-bit binary character to obtain the ciphertext, where X is an integer greater than 1.

[0316] Optionally, the software license code includes multiple character segments and connecting characters between these character segments. Accordingly, before obtaining the ciphertext, the client maps each target character in the software license code to a decimal integer based on a target character table, and then converts it to an X-bit binary character. The method further includes removing connecting characters from the software license code.

[0317] Optionally, in response to the input software license code, before decoding the ciphertext from the software license code, the method further includes: performing a format validation on the software license code; and determining that the software license code passes the format validation if multiple character segments contained in the software license code are connected by concatenating characters and all characters in the software license code belong to characters in a target character table. For example, a regular expression can be used to perform format validation on the software license code. This can prevent malicious users from attempting to obtain unauthorized access rights by constructing software license codes with invalid formats, thereby improving the security of the software system.

[0318] Optionally, before obtaining software license information based on the binary string (excluding the encrypted string) obtained after multiple group decryption steps, the method further includes: determining the valid information string and the verification string in the binary string; regenerating the verification string corresponding to the valid information string; and determining that the software license code passes the integrity check if the regenerated verification string matches the verification string carried in the binary string. This integrity check scheme ensures the accuracy and integrity of the software license information, providing a reliable guarantee for the software system to correctly authorize users to use the software based on the software license information.

[0319] The valid information string refers to the portion of the binary string that contains the actual content related to software licensing, such as the license period and functional permissions. This information is crucial data used by the software system to determine the scope of the user's software license and usage rights. The verification string is a string generated from the valid information string using a specific algorithm. It is used to verify whether the valid information string has been erroneous or tampered with during transmission or storage.

[0320] It should be noted that the embodiments of this application can provide a three-tier verification process. The first tier is format verification. The second tier is integrity verification. The third tier is data matching verification, which verifies whether the decrypted binary string (excluding the encrypted string) can correctly map authorization information such as authorization functions and authorization types. If it can, the software authorization code is determined to be valid; otherwise, the software authorization code is determined to be invalid.

[0321] It is understood that the software license code generation process and the parsing process are completely inverse processes. Therefore, the implementation methods of the schemes not described in detail in the above software license code parsing method embodiments can be understood by referring to the corresponding schemes in the software license code generation method embodiments, and will not be elaborated here.

[0322] The following uses a specific binary string corresponding to software license information as an example to illustrate the software license code generation and parsing methods in this application. Table 1 below illustrates the type, encoding bit length, and encoding rules of each information field in the binary string corresponding to the software license information. Windows stands for Microsoft Windows Operating System. Linux stands for Linux Operating System. Mac stands for Macintosh Operating System. In the license types, the basic type requires a software license code and the machine code of the installed device to apply for a license certificate; the extended type refers to a license type for renewal or adding features; the standalone type requires only a software license code for offline activation; and the combined type licenses multiple products simultaneously. In the usage types, the test type refers to a software trial license; the formal type refers to a formal license after purchasing the software; and the virtual type refers to a license for SaaS (Software as a Service) products based on an account and API key (Application Programming Interface key).

[0323]

[0324]

[0325] Table 1

[0326] Figure 10 This is a schematic diagram illustrating the format of the data packet for the software license code provided in this application embodiment. (Reference) Figure 10 The random number code, region code, platform code, function code, valid time code, authorization type code, activation year code, activation month code, activation date code, usage type code, extended field code, and check code are arranged in that order.

[0327] Figure 11 This is a sequence diagram showing the encryption of the binary string corresponding to the software license code. (Reference) Figure 11The process includes the following steps: Inputting plaintext data corresponding to the software license information, i.e., a 125-bit binary string, into the server. Dividing the 125-bit data into the first 120 bits and the last 5 bits. Performing asymmetric encryption on the first 120 bits to obtain a 120-bit encrypted string. Concatenating this encrypted string with the last 5 bits to form 125-bit data. Then, dividing the data into the first 61 bits and the last 64 bits, performing symmetric encryption on the last 64 bits to obtain a 64-bit encrypted string. Concatenating the first 61 bits and the encrypted string to form 125-bit data. Finally, encoding this 125-bit data into a 25-character string; that is, mapping each 5-bit binary character in the 125-bit data to a target character in the target character table to obtain a string containing 25 characters. Next, the 25-character string is divided into 5 character segments, each containing 5 characters. These 5 character segments are connected with a concatenation character, and the version number of the software license code is added to the end to obtain the final SN (Serial Number), which is the final software license code.

[0328] Figure 12 This is a sequence diagram for decrypting the software license code. (Reference) Figure 12The process includes the following steps: The user submits a software license code. The parsing service in the client calls the format verification service to check the format validity and receives the verification result returned by the format verification service. Then, the decoding service is called to remove the connection characters in the software license code and decode 125 bits of data, receiving the 125 bits of data returned by the decoding service. Next, the grouping and concatenation service is called to split the 125 bits of data into the first 61 bits and the last 64 bits, receiving the grouping result returned by the grouping and concatenation service. Then, the decryption service is called to perform symmetric decryption on the last 64 bits, receiving the 64 bits of decrypted string returned by the decryption service. Next, the grouping and concatenation service is called to concatenate the first 61 bits and the decrypted string, receiving the concatenated 125 bits returned by the grouping and concatenation service. The grouping and concatenation service splits the concatenated 125 bits of data into the first 120 bits and the last 5 bits, returning the grouping result. Then, the parsing service calls the decryption service to perform asymmetric decryption on the first 120 bits, receiving the 120 bits of decrypted string returned by the decryption service. Then, the block concatenation service is invoked to concatenate the decrypted string with the last 5 bits, and the concatenated 125-bit data returned by the block concatenation service is received. Next, the integrity verification service is invoked to calculate the checksum of the first 101 bits of the concatenated 125-bit data, and the calculated checksum is compared with the checksum of the last 16 bits of the 125-bit data. The comparison verification result returned by the integrity verification service is received. If the verification passes, the parsing service retrieves the software license information based on the decrypted 125 bits and returns the software license information to the user.

[0329] Figure 13 This is a sequence diagram for parsing the software license code. (Reference) Figure 13 The process includes the following steps: The client receives the input software license code and calls the parsing service. The parsing service then decrypts the software license code to obtain 125-bit plaintext data. Next, the parsing service decomposes the binary bits in the 125-bit plaintext data to obtain information codes such as platform code, time information code, and function code. Then, based on the platform code, platform information is parsed out, and based on the time information code, time information is parsed out. Then, based on the function list and function code, function permissions are matched to obtain authorized function information. Finally, the parsed preset core information is encapsulated to obtain a visualized license data object. After receiving the license data object returned by the parsing service, the client can display the license data object to allow the user to understand the scope of their application permissions on the client. It should be noted that the parsing service not only parses platform, time, and function information, but also other software license information, which is not shown in this diagram.

[0330] Through the design of the above scheme, a software license code with high information density, multi-level encryption protection, and flexible scalability is achieved within a length of 25 characters, while also considering ease of use and security. The 25-character length is 60% shorter than traditional software license codes, effectively reducing the error rate of manual input. Simulation tests show that this software license code reduces the user input error rate from the industry average of 15% to below 5%. Simultaneously, the shorter software license code is suitable for multi-scenario delivery. For example, the shorter software license code can be easily delivered through various methods such as paper licenses, SMS, and QR codes, reducing enterprise delivery costs. For example, traditional software license codes need to be printed on two lines, while the software license code in this solution can be displayed on a single line. Furthermore, because the binary string corresponding to the software license information contains a 32-bit random number encoding field, the software license code generation method provided in this application can support the generation of massive amounts of license codes. That is, it supports the generation of 2... 32 There are approximately 4.3 billion unique software license codes, enough to meet the needs of large-scale commercial applications.

[0331] This application employs asymmetric encryption to ensure key security and symmetric encryption to improve data processing efficiency; this hybrid encryption scheme forms a multi-layered protection. Furthermore, the software license code integrates multi-dimensional authorization information such as authorized region, authorized platform, authorized function, validity period, authorization type, activation time, and usage type. This allows the software license code to be used as a unique index and also to parse the information needed for software activation even when offline, thus supporting offline software activation. Moreover, different versions of the software license code use different keys, enabling seamless upgrades to security policies. Additionally, a custom target character table is used to encode the software license code, avoiding easily confused characters and improving its usability and resistance to mis-input.

[0332] Another point to note is that the above examples are only for understanding this application and do not constitute a limitation on the software license code generation method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0333] This application also provides a software license code generation device; please refer to [reference needed]. Figure 14 The software license code generation device, configured on the server, includes:

[0334] The string acquisition module 110 is used to acquire the binary string corresponding to the software license information;

[0335] The block encryption module 120 is used to perform multiple block encryptions on a binary string, with each block encryption using a different encryption method.

[0336] The authorization code generation module 130 is used to generate a software authorization code based on the ciphertext obtained after multiple group encryptions.

[0337] Optionally, the block encryption module 120 is used to group strings to obtain multiple partial strings; encrypt the target partial string among the multiple partial strings to obtain an encrypted string; and concatenate the encrypted string with the unencrypted partial strings among the multiple partial strings to obtain ciphertext.

[0338] Optionally, the block encryption module 120 includes:

[0339] The first grouping unit is used to group the binary string into a first part string and a second part string;

[0340] The first encryption unit is used to perform asymmetric encryption on the first part of the string, and concatenate the resulting first encrypted string with the second part of the string to obtain the first ciphertext.

[0341] The second grouping unit is used to group the first ciphertext into the third and fourth parts of the string;

[0342] The second encryption unit is used to perform symmetric encryption on the fourth part of the string, and then concatenates the resulting second encrypted string with the third part of the string to obtain the second ciphertext.

[0343] Optionally, the first encryption unit is used to divide the first part of the string into multiple unit strings, each unit string containing N characters, where N is an integer greater than 1; and to perform asymmetric encryption on each unit string to obtain the first encrypted string corresponding to each unit string, wherein the first encrypted string corresponding to each unit string contains N characters.

[0344] Optionally, the first grouping unit is used to form a first part string from the first target number of characters in the binary string, where the target number is a multiple of N; and to form a second part string from the characters in the binary string other than the first part string.

[0345] Optionally, the first encryption unit is used to encrypt the first part of the string using a private key in asymmetric encryption, wherein the private key is stored in the server.

[0346] Optionally, the second encryption unit is used to convert the fourth part of the string into a decimal integer; perform symmetric encryption on the decimal integer to obtain an encrypted integer; and convert the encrypted integer into a binary string with the same number of bits as the fourth part of the string to obtain a second encrypted string.

[0347] Optionally, the second grouping unit is used to form a fourth part string from the last M characters of the first ciphertext, where M is the number of binary digits that the server can process at one time; and to form a third part string from the characters in the first ciphertext other than the fourth part string.

[0348] Optionally, the second encryption unit is used to determine the version number of the software license code to be generated; and to perform symmetric encryption on the fourth part of the string using a key corresponding to the version number.

[0349] Optionally, the string acquisition module 110 includes:

[0350] Function determination unit, used to determine the authorized set of target functions;

[0351] The function encoding unit is used to encode information from the target function set to obtain a function string;

[0352] The string generation unit is used to generate a binary string corresponding to the software license information based on the function string. The binary string corresponding to the software license information contains the function string.

[0353] Optionally, the function encoding unit is used to obtain a first function list, which contains the correspondence between software functions and binary bits in a function string; query the target bits in the function string corresponding to each software function in the target function set from the first function list; generate a function string based on the target bits, wherein the character corresponding to the target bit in the function string is 1, and the characters corresponding to the binary bits other than the target bit in the function string are 0.

[0354] Optionally, the function encoding unit is used to obtain a second function list, which contains the correspondence between decimal integers and function sets; query the target integer corresponding to the target function set from the second function list; and convert the target integer into a binary function string.

[0355] Optionally, the authorization code generation module 130 includes:

[0356] The character table acquisition unit is used to acquire the target character table. Each target character in the target character table corresponds to a decimal integer, and the target character table does not contain easily confused characters.

[0357] A string partitioning unit is used to divide the ciphertext obtained after multiple group encryptions into multiple unit strings. Each unit string contains X binary characters, where X is an integer greater than 1.

[0358] The character mapping unit is used to map each unit string in the ciphertext obtained after multiple group encryptions to the target character in the target character table, thereby obtaining the software license code.

[0359] Optionally, a character mapping unit is used to divide the mapped ciphertext into multiple character segments, each character segment including the same number of characters; and to connect the multiple character segments with a connecting character to obtain a software license code.

[0360] Optionally, the key used for block encryption is a key corresponding to the version number of the software license code.

[0361] The character mapping unit is used to connect multiple character fragments and version numbers with a connecting character to obtain the software license code.

[0362] Optionally, the string acquisition module 110 is used to encode the software authorization information to obtain a valid information string; generate a verification string corresponding to the valid information string; and append the verification string to the end of the valid information string to obtain a binary string corresponding to the software authorization information.

[0363] Optionally, the binary string corresponding to the software license information includes:

[0364] At least one of the following: random number encoding, region encoding, platform encoding, function encoding, validity period encoding, authorization type encoding, activation time encoding, usage type encoding, extended field encoding, and check code.

[0365] The software license code generation device provided in this application, employing the software license code generation method in the above embodiments, can solve the technical problems of insufficient anti-cracking capability and low security of software license codes in related technologies. Compared with the prior art, the beneficial effects of the software license code generation device provided in this application are the same as those of the software license code generation method provided in the above embodiments, and other technical features in the software license code generation device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0366] This application also provides a software license code parsing device; please refer to [reference needed]. Figure 15 Configured on the client, the software license code parsing device includes:

[0367] The authorization code decoding module 210 is used to decode the ciphertext from the input software authorization code in response to the input software authorization code;

[0368] The block decryption module 220 is used to decrypt the ciphertext into multiple blocks, with each block using a different decryption method.

[0369] The information acquisition module 230 is used to obtain software authorization information based on the binary string that does not contain the encrypted string obtained after multiple group decryption.

[0370] Optionally, the grouping and decryption module 220 is used to group strings to obtain multiple partial strings; decrypt the target partial string among the multiple partial strings to obtain a decrypted string; and concatenate the decrypted string with the undecrypted partial strings among the multiple partial strings.

[0371] Optionally, the block decryption module 220 includes:

[0372] The first grouping unit is used to group the second ciphertext decoded from the software license code to obtain the second encrypted string and the third part string;

[0373] The first decryption unit is used to perform symmetric decryption on the second encrypted string, and concatenates the resulting fourth part string with the third part string to obtain the first ciphertext.

[0374] The second grouping unit is used to group the first ciphertext to obtain the first encrypted string and the second part of the string;

[0375] The second decryption unit is used to perform asymmetric decryption on the first encrypted string, and concatenates the first part of the string with the second part of the string to obtain a binary string that does not contain the encrypted string.

[0376] Optionally, the second decryption unit is used to divide the first encrypted string into multiple unit strings, each unit string containing N characters, where N is an integer greater than 1; and to perform asymmetric decryption on each unit string to obtain the first part string corresponding to each unit string, the first part string corresponding to each unit string containing N characters.

[0377] Optionally, the second grouping unit is used to form a first encrypted string from the first ciphertext up to the target number of characters, where the target number is a multiple of N; and to form a second string from the first ciphertext excluding the first encrypted string.

[0378] Optionally, the second decryption unit is used to decrypt the first encrypted string using the public key in asymmetric decryption, wherein the public key is stored in the client.

[0379] Optionally, the first decryption unit is used to convert the second encrypted string into a decimal integer; perform symmetric decryption on the decimal integer to obtain the decrypted integer; and convert the decrypted integer into a binary string with the same number of bits as the second encrypted string to obtain the fourth part of the string.

[0380] Optionally, the first grouping unit is used to form a second encrypted string from the last M characters of the second ciphertext, where M is the number of binary digits that the server generating the software license code can process at one time; and to form a third string from the characters in the second ciphertext other than the second encrypted string.

[0381] Optionally, the first decryption unit is used to extract the version number of the software license code from the software license code; and to symmetrically decrypt the second encrypted string using a key corresponding to the version number.

[0382] Optionally, the information acquisition module 230 includes:

[0383] The string extraction unit is used to extract the functional string from the binary string;

[0384] The string decoding unit is used to decode the function string to obtain the authorized target function set. The software license information contains the authorized target function set.

[0385] Optionally, the string decoding unit is used to obtain a first function list, which contains the correspondence between software functions and binary bits in the function string; to query the software function corresponding to the target bit in the function string where the character is 1 from the first function list; and to form a target function set by the queryed software functions.

[0386] Optionally, the string decoding unit is used to obtain a second function list, which contains the correspondence between decimal integers and function sets; convert function strings into decimal integers; and query the target function set corresponding to the converted decimal integer from the second function list.

[0387] Optionally, the authorization code decoding module 210 includes:

[0388] The character table acquisition unit is used to acquire the target character table. Each target character in the target character table corresponds to a decimal integer, and the target character table does not contain easily confused characters.

[0389] The character mapping unit is used to map each target character in the software license code to a decimal integer based on the target character table, and then convert it into an X-bit binary character to obtain ciphertext, where X is an integer greater than 1.

[0390] Optionally, the software license code includes multiple character segments and connecting characters between the character segments;

[0391] The character mapping unit is also used to remove connection characters from software license codes.

[0392] Optionally, the device further includes:

[0393] The format verification module is used to verify the format of the software license code. If multiple character segments contained in the software license code are connected by a concatenation character, and all characters in the software license code belong to the target character table, the software license code is determined to pass the format verification.

[0394] Optionally, the device further includes:

[0395] The integrity verification module is used to determine the valid information string and the verification string in the binary string; regenerate the verification string corresponding to the valid information string; and determine that the software license code passes the integrity verification if the regenerated verification string matches the verification string carried in the binary string.

[0396] Optionally, the device further includes:

[0397] The information display module is used to select and display preset core information from multiple software license information obtained.

[0398] The software license code parsing device provided in this application, employing the software license code parsing method in the above embodiments, can solve the technical problems of insufficient anti-cracking capability and low security of software license codes in related technologies. Compared with the prior art, the beneficial effects of the software license code parsing device provided in this application are the same as those of the software license code parsing method provided in the above embodiments, and other technical features in the software license code parsing device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0399] This application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the software license code generation method or the software license code parsing method in the above embodiments.

[0400] The following is for reference. Figure 16 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of this application. This electronic device can function as a software license code generation device, i.e., a server, to generate software license codes, or as a software license code parsing device, i.e., a terminal, to parse the software license codes through an installed client. The electronic devices in the embodiments of this application may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 16 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0401] like Figure 16 As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. While electronic devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0402] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0403] The electronic device provided in this application, employing the method described in the above embodiments, can solve the technical problems of insufficient anti-cracking capability and low security of software license codes in related technologies. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the method provided in the above embodiments, and other technical features of the electronic device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0404] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0405] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0406] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the software license code generation method or the software license code parsing method in the above embodiments.

[0407] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0408] The aforementioned computer-readable storage medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the aforementioned electronic device.

[0409] The aforementioned computer-readable storage medium carries one or more programs that, when executed by a software license code generation device, enable the software license code generation device to perform the aforementioned software license code generation method. Similarly, when executed by a software license code parsing device, the software license code parsing device is enabled to perform the aforementioned software license code parsing method.

[0410] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0411] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0412] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0413] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., computer programs) for executing the above-described software license code generation method or software license code parsing method. This addresses the technical problems of insufficient anti-cracking capability and low security of software license codes in related technologies. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the methods provided in the above embodiments, and will not be elaborated upon here.

[0414] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the software license code generation method or the software license code parsing method described above.

[0415] The computer program product provided in this application can solve the technical problems of insufficient anti-cracking capability and low security of software license codes in related technologies. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the methods provided in the above embodiments, and will not be repeated here.

[0416] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for generating a software license code, characterized in that, The method, executed by the server, includes: Obtain the binary string corresponding to the software license information; The binary string is encrypted in multiple blocks, with each block using a different encryption method. A software license code is generated based on the ciphertext obtained after multiple group encryptions. The step of performing multiple group encryptions on the binary string includes: The binary string is grouped to obtain a first part string and a second part string; The first part of the string is asymmetrically encrypted, and the resulting first encrypted string is concatenated with the second part of the string to obtain the first ciphertext; The first ciphertext is divided into groups to obtain the third and fourth part strings; The fourth part of the string is symmetrically encrypted, and the resulting second encrypted string is concatenated with the third part of the string to obtain the second ciphertext.

2. A method for parsing software license codes, characterized in that, The method, executed by the client, includes: In response to the input software license code, decode the ciphertext from the software license code; The ciphertext is decrypted in multiple groups, with a different decryption method used for each group. Obtain software license information based on the binary string that does not contain the encrypted string obtained after multiple group decryption processes; The step of performing multiple group decryption operations on the ciphertext includes: The second ciphertext decoded from the software license code is divided into groups to obtain a second encrypted string and a third string; The second encrypted string is symmetrically decrypted, and the resulting fourth part string is concatenated with the third part string to obtain the first ciphertext. The first ciphertext is divided into groups to obtain a first encrypted string and a second part of the string; The first encrypted string is decrypted asymmetrically, and the resulting first part of the string is concatenated with the second part of the string to obtain the binary string that does not contain the encrypted string.

3. A software license code generation device, characterized in that, Configured on a server, the device includes: The string retrieval module is used to retrieve the binary string corresponding to the software license information; The block encryption module is used to perform multiple block encryptions on the binary string, with each block encryption using a different encryption method. The authorization code generation module is used to generate a software authorization code based on the ciphertext obtained after multiple group encryptions. The block encryption module includes: The first grouping unit is used to group the binary string to obtain a first part string and a second part string; The first encryption unit is used to perform asymmetric encryption on the first part of the string and concatenate the obtained first encrypted string with the second part of the string to obtain the first ciphertext. The second grouping unit is used to group the first ciphertext to obtain the third part string and the fourth part string; The second encryption unit is used to perform symmetric encryption on the fourth part of the string, and concatenate the resulting second encrypted string with the third part of the string to obtain the second ciphertext.

4. A software license code parsing device, characterized in that, Configured on a client, the device includes: The authorization code decoding module is used to decode ciphertext from the input software authorization code in response to the input software authorization code; The block decryption module is used to decrypt the ciphertext into multiple blocks, with each block using a different decryption method. The information acquisition module is used to obtain software authorization information based on the binary string that does not contain the encrypted string obtained after multiple group decryption. The group decryption module includes: The first grouping unit is used to group the second ciphertext decoded from the software license code to obtain a second encrypted string and a third part string; The first decryption unit is used to perform symmetric decryption on the second encrypted string, and concatenate the obtained fourth part string with the third part string to obtain the first ciphertext. The second grouping unit is used to group the first ciphertext to obtain a first encrypted string and a second part string; The second decryption unit is used to perform asymmetric decryption on the first encrypted string, and concatenate the obtained first part string with the second part string to obtain the binary string that does not contain the encrypted string.

5. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the software license code generation method as described in claim 1, or the computer program being configured to implement the steps of the software license code parsing method as described in claim 2.

6. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the software license code generation method as described in claim 1, or when the computer program is executed by a processor, it implements the steps of the software license code parsing method as described in claim 2.

7. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the software license code generation method as described in claim 1, or, when executed by a processor, implements the steps of the software license code parsing method as described in claim 2.