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

By encrypting the binary string of software authorization information into multiple blocks and using different encryption algorithms to generate software authorization codes, the problem of easy cracking of authorization codes in existing technologies is solved, achieving higher security and anti-cracking capabilities.

CN121009529AActive Publication Date: 2025-11-25BEIJING HONGTENG INTELLIGENT TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202511134490.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-13
Publication Date
2025-11-25
Estimated Expiration
2045-08-13

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 binary string of software authorization information is encrypted using multiple block encryption methods and different encryption algorithms to generate a software authorization code.

Benefits of technology

It improves the anti-cracking ability of software license codes, increases the difficulty of cracking and security, and makes it difficult for attackers to crack through multiple layers of protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121009529A_ABST
    Figure CN121009529A_ABST
Patent Text Reader

Abstract

The invention discloses a software authorization code generation method and device, an analysis method and device, equipment, a storage medium and a product, relates to the technical field of data security, and discloses a binary character string corresponding to software authorization information; carrying out multiple times of block encryption on the binary character string, wherein the encryption modes adopted by the block encryption are different; and generating a software authorization code based on the ciphertext obtained after multiple times of block encryption. According to the method, the anti-cracking capability of the software authorization code can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data security, and particularly relates to a software authorization code generation method and analysis method, device, equipment, storage medium and product. BACKGROUND

[0002] A software authorization code is a specific character sequence given to a user by a software developer to protect the legal use of the software. The user inputs the software authorization code when installing or activating the software, and after the software verifies that the software authorization code is correct, the user can normally use the software functions.

[0003] Due to the importance of the software authorization code, the software authorization code needs to be encrypted to prevent illegal use of the software. However, the existing encryption method cannot effectively resist increasingly complex cracking methods, so that the software authorization code is extremely vulnerable to cracking in actual application. Therefore, it is urgent to provide a method to improve the cracking resistance of the software authorization code.

[0004] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0005] The main purpose of the present application is to provide a software authorization code generation method, analysis method, device, equipment, storage medium and product, which can effectively improve the cracking resistance of the software authorization code.

[0006] To achieve the above purpose, the present application provides a software authorization code generation method, which is executed by a server, and the method comprises:

[0007] Obtaining a binary string corresponding to software authorization information;

[0008] Encrypting the binary string multiple times, and the encryption method used each time is different;

[0009] Generating a software authorization code based on the ciphertext obtained after multiple times of grouping encryption.

[0010] Optionally, each time of grouping encryption comprises:

[0011] Grouping the string to obtain multiple partial strings;

[0012] Encrypting a target partial string in the multiple partial strings to obtain an encrypted string;

[0013] Concatenating the encrypted string with the partial strings that have not been encrypted in the multiple partial strings to obtain the ciphertext.

[0014] Optionally, the multiple times of grouping encryption of the binary string comprise:

[0015] grouping the binary string to obtain a first partial string and a second partial string;

[0016] asymmetrically encrypting the first partial string to obtain a first encrypted string, and concatenating the first encrypted string with the second partial string to obtain a first ciphertext;

[0017] grouping the first ciphertext to obtain a third partial string and a fourth partial string;

[0018] symmetrically encrypting the fourth partial string to obtain a second encrypted string, and concatenating the second encrypted string with the third partial string to obtain a second ciphertext.

[0019] Optionally, the asymmetrically encrypting the first partial string comprises:

[0020] dividing the first partial string into a plurality of unit strings, each unit string containing N characters, N being an integer greater than 1;

[0021] asymmetrically encrypting each unit string to obtain a first encrypted string corresponding to each unit string, the first encrypted string corresponding to each unit string containing N characters.

[0022] Optionally, the grouping the binary string to obtain a first partial string and a second partial string comprises:

[0023] constructing the first partial string from a target number of characters in the binary string, the target number being a multiple of N;

[0024] constructing the second partial string from characters in the binary string other than the first partial string.

[0025] Optionally, the asymmetrically encrypting the first partial string comprises:

[0026] encrypting the first partial string using a private key in asymmetric encryption, wherein the private key is stored in the server.

[0027] Optionally, the symmetrically encrypting the fourth partial string comprises:

[0028] converting the fourth partial string into a decimal integer;

[0029] symmetrically encrypting the decimal integer to obtain an encrypted integer;

[0030] converting the encrypted integer into a binary string having the same number of bits as the fourth partial string to obtain the second encrypted string.

[0031] Optionally, the grouping of the first ciphertext obtains a third partial string and a fourth partial string, and the grouping of the first ciphertext comprises:

[0032] The characters of the last M bits in the first ciphertext form the fourth partial string, and M is the number of binary bits supported by the server for one-time processing.

[0033] The characters of the first ciphertext except the fourth partial string form the third partial string.

[0034] Optionally, the symmetric encryption of the fourth partial string comprises:

[0035] Determine the version number of the software authorization code to be generated.

[0036] Symmetrically encrypt the fourth partial string by using a key corresponding to the version number.

[0037] Optionally, the obtaining of the binary string corresponding to the software authorization information comprises:

[0038] Determine the target function set authorized.

[0039] Informationally encode the target function set to obtain a function string.

[0040] Based on the function string, generate the binary string corresponding to the software authorization information, and the binary string corresponding to the software authorization information contains the function string.

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

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

[0043] Query the target bits corresponding to each software function in the target function set in the function string from the first function list.

[0044] Based on the target bits, generate the function string, wherein the characters corresponding to the target bits in the function string are 1, and the characters corresponding to the binary bits other than the target bits in the function string are 0.

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

[0046] Obtain a second function list, and the second function list 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 random number code, the region code, the platform code, the function code, the valid time code, the authorization type code, the opening time code, the use type code, the extension field code, and the check code.

[0064] Further, to achieve the above object, the application further provides a software authorization code analysis method, executed by a client, comprising:

[0065] In response to an input software authorization code, decoding a ciphertext from the software authorization code;

[0066] Grouping and decrypting the ciphertext for multiple times, each time using a different decryption method;

[0067] Based on the binary string obtained after the multiple times of grouping and decrypting, which does not contain an encrypted string, obtaining software authorization information.

[0068] Optionally, each time of grouping and decrypting comprises:

[0069] Grouping strings to obtain multiple partial strings;

[0070] Decrypting a target partial string in the multiple partial strings to obtain a decrypted string;

[0071] Concatenating the decrypted string with a partial string that has not been decrypted in the multiple partial strings.

[0072] Optionally, the grouping and decrypting the ciphertext for multiple times comprises:

[0073] Grouping a second ciphertext decoded from the software authorization code to obtain a second encrypted string and a third partial string;

[0074] Symmetrically decrypting the second encrypted string, concatenating a fourth partial string obtained with the third partial string to obtain a first ciphertext;

[0075] Grouping the first ciphertext to obtain a first encrypted string and a second partial string;

[0076] Asymmetrically decrypting the first encrypted string, concatenating a first partial string obtained with the second partial string to obtain the binary string that does not contain the encrypted string.

[0077] Optionally, the asymmetrically decrypting the first encrypted string comprises:

[0078] Dividing the first encrypted string into multiple unit strings, each unit string containing N characters, N being an integer greater than 1;

[0079] Asymmetrically decrypt each unit string to obtain a first partial string corresponding to each unit string, the first partial string corresponding to each unit string containing N characters.

[0080] Optionally, the grouping of the first ciphertext to obtain the first encrypted string and the second partial string comprises:

[0081] The first encrypted string is composed of a target number of characters in the first ciphertext, the target number being a multiple of N.

[0082] The second partial string is composed of characters other than the first encrypted string in the first ciphertext.

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

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

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

[0086] The second encrypted string is converted into a decimal integer.

[0087] The decimal integer is symmetrically decrypted to obtain a 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 partial string.

[0089] Optionally, the grouping of the second ciphertext decoded from the software authorization code comprises:

[0090] The second encrypted string is composed of the last M characters in the second ciphertext, M being the number of binary bits supported by a server generating the software authorization code for one-time processing.

[0091] The third partial string is composed of characters other than the second encrypted string in the second ciphertext.

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

[0093] The version number of the software authorization code is extracted from the software authorization code.

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

[0095] Optionally, the binary string obtained after the multiple times of packet decryption and not containing the encrypted string is used to obtain software authorization information, including:

[0096] a function string is extracted from the binary string;

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

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

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

[0100] a software function corresponding to a target bit with a character of 1 in the function string is queried from the first function list;

[0101] the queried software function is used to constitute the target function set.

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

[0103] a second function list is obtained, and the second function list contains a correspondence between decimal integers and function sets;

[0104] the function string is converted into a decimal integer;

[0105] a target function set corresponding to the converted decimal integer is queried from the second function list.

[0106] Optionally, the cipher text is decoded from the input software authorization code in response to the input software authorization code, including:

[0107] a target character table is obtained, each target character in the target character table corresponds to a decimal integer, and the target character table does not contain an easily-confused character;

[0108] each target character in the software authorization code is mapped into a decimal integer based on the target character table, and is converted into an X-bit binary character to obtain the cipher text, X being an integer greater than 1.

[0109] Optionally, the software authorization code includes multiple character segments and connection characters between the multiple character segments.

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

[0111] Removing the connection character in the software authorization code.

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

[0113] Performing format verification on the software authorization code.

[0114] In a case where a plurality of character segments included in the software authorization code are connected by the connection character, and the characters in the software authorization code all belong to the characters in the target character table, it is determined that the software authorization code passes the format verification.

[0115] Optionally, before the obtaining the software authorization information based on the binary string obtained after the multiple times of group decryption and not containing the encrypted string, the method further comprises:

[0116] Determining an effective information string and a verification string in the binary string.

[0117] Regenerating the verification string corresponding to the effective information string.

[0118] In a case where the regenerated verification string is consistent with the verification string carried in the binary string, it is determined that the software authorization code passes the integrity verification.

[0119] Optionally, after the obtaining the software authorization information based on the binary string obtained after the multiple times of group decryption and not containing the encrypted string, the method further comprises:

[0120] Selecting preset core information from the obtained multiple items of software authorization information to display.

[0121] In addition, to achieve the above object, the application further provides a software authorization code generation device configured in a server, the device comprising:

[0122] A character string obtaining module configured to obtain a binary string corresponding to software authorization information.

[0123] A group encryption module configured to perform multiple times of group encryption on the binary string, and different encryption modes are used in each time of group encryption.

[0124] An authorization code generation module configured to generate a software authorization code based on the ciphertext obtained after the multiple times of group encryption.

[0125] Optionally, the grouping encryption module is configured to group the string to obtain a plurality of partial strings; encrypt a target partial string in the plurality of partial strings to obtain an encrypted string; and concatenate the encrypted string and a non-encrypted partial string in the plurality of partial strings to obtain the ciphertext.

[0126] Optionally, the grouping encryption module comprises:

[0127] a first grouping unit configured to group the binary string to obtain a first partial string and a second partial string;

[0128] a first encryption unit configured to asymmetrically encrypt the first partial string, concatenate a first encrypted string obtained by the first encryption unit and the second partial string to obtain first ciphertext;

[0129] a second grouping unit configured to group the first ciphertext to obtain a third partial string and a fourth partial string;

[0130] a second encryption unit configured to symmetrically encrypt the fourth partial string, and concatenate a second encrypted string obtained by the second encryption unit and the third partial string to obtain second ciphertext.

[0131] Optionally, the first encryption unit is configured to divide the first partial string into a plurality of unit strings, each unit string containing N characters, N being an integer greater than 1; and asymmetrically encrypt each unit string to obtain the first encrypted string corresponding to each unit string, the first encrypted string corresponding to each unit string containing N characters.

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

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

[0134] Optionally, the second encryption unit is configured to convert the fourth partial string into a decimal integer; symmetrically encrypt the decimal integer to obtain an encrypted integer; and convert the encrypted integer into a binary string having the same number of bits as the fourth partial string to obtain the second encrypted string.

[0135] Optionally, the second grouping unit is configured to: form characters of the last M bits in the first ciphertext into the fourth partial string, M being a number of binary bits supported by the server for one-time processing; and form characters other than the fourth partial string in the first ciphertext into the third partial string.

[0136] Optionally, the second encryption unit is configured to: determine a version number of the software authorization code to be generated; and perform symmetric encryption on the fourth partial string by using a key corresponding to the version number.

[0137] Optionally, the string obtaining module comprises:

[0138] a function determining unit configured to determine a target function set authorized;

[0139] a function encoding unit configured to perform information encoding on the target function set to obtain a function string;

[0140] a string generating unit configured to generate a binary string corresponding to the software authorization information based on the function string, the binary string corresponding to the software authorization information containing the function string.

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

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

[0143] Optionally, the authorization code generating module comprises:

[0144] a character table obtaining unit configured to obtain a target character table, each target character in the target character table corresponding to a decimal integer, and the target character table not containing easily-confusable characters;

[0145] a string dividing unit configured to divide ciphertext obtained after multiple times of grouping encryption into multiple unit strings, each unit string containing X-bit binary characters, X being an integer greater than 1;

[0146] A character mapping unit is configured to map each unit character string in the ciphertext obtained after the multiple times of group encryption into a target character in the target character table, so as to obtain the software authorization code.

[0147] Optionally, the character mapping unit is configured to divide the mapped ciphertext into a plurality of character segments, each of which includes the same number of characters; and connect the plurality of character segments with a connection character to obtain the software authorization code.

[0148] Optionally, the key used in the group encryption is a key corresponding to a version number of the software authorization code.

[0149] The character mapping unit is configured to connect the plurality of character segments and the version number with the connection character to obtain the software authorization code.

[0150] Optionally, the string obtaining module is configured to encode the software authorization information to obtain an effective information character string; generate a check character string corresponding to the effective information character string; and add the check character string to the end of the effective information character string to obtain a binary character string corresponding to the software authorization information.

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

[0152] at least one of a random number code, a region code, a platform code, a function code, an effective time code, an authorization type code, an opening time code, a use type code, an extension field code, and a check code.

[0153] In addition, to achieve the above object, the application further provides a software authorization code analysis device configured in a client, which comprises:

[0154] An authorization code decoding module is configured to decode ciphertext from an input software authorization code.

[0155] A group decryption module is configured to perform multiple times of group decryption on the ciphertext, and each time of group decryption uses a different decryption mode.

[0156] An information obtaining module is configured to obtain software authorization information based on a binary character string obtained after the multiple times of group decryption and not containing an encrypted character string.

[0157] Optionally, the group decryption module is configured to group character strings to obtain a plurality of partial character strings; decrypt a target partial character string in the plurality of partial character strings to obtain a decrypted character string; and splice the decrypted character string with a partial character string that has not been decrypted in the plurality of partial character strings.

[0158] Optionally, the packet decryption module comprises:

[0159] a first grouping unit, configured to group the second ciphertext decoded from the software authorization code to obtain a second encrypted string and a third partial string;

[0160] a first decryption unit, configured to perform symmetric decryption on the second encrypted string, and splice the obtained fourth partial string with the third partial string to obtain a first ciphertext;

[0161] a second grouping unit, configured to group the first ciphertext to obtain a first encrypted string and a second partial string;

[0162] a second decryption unit, configured to perform asymmetric decryption on the first encrypted string, and splice the obtained first partial string with the second partial string to obtain the binary string not containing the encrypted string.

[0163] Optionally, the second decryption unit is configured to divide the first encrypted string into a plurality of unit strings, each unit string containing N characters, N being an integer greater than 1; and perform asymmetric decryption on each unit string to obtain the first partial string corresponding to each unit string, the first partial string corresponding to each unit string containing N characters.

[0164] Optionally, the second grouping unit is configured to form the first encrypted string by using a target number of characters in the first ciphertext, the target number being a multiple of N; and form the second partial string by using the characters in the first ciphertext other than the first encrypted string.

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

[0166] Optionally, the first decryption unit is configured 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 partial string.

[0167] Optionally, the first grouping unit is configured to form the second encrypted string by using the last M characters in the second ciphertext, M being the number of binary bits supported by a server generating the software authorization code for one-time processing; and form the third partial string by using the characters in the second ciphertext other than the second encrypted string.

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

[0169] Optionally, the information obtaining module comprises:

[0170] a string extraction unit configured to extract a function string from the binary string;

[0171] a string decoding unit configured to perform information decoding on the function string to obtain a target function set authorized by the software authorization information, wherein the software authorization information comprises the target function set authorized.

[0172] Optionally, the string decoding unit is configured to obtain a first function list comprising a correspondence between software functions and binary bits in the function string, query a software function corresponding to a target bit with a character of 1 in the function string from the first function list, and form the target function set by using the queried software function.

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

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

[0175] a character table obtaining unit configured to 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 comprise easily-confusable characters;

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

[0177] Optionally, the software authorization code comprises a plurality of character segments and connection characters between the character segments.

[0178] The character mapping unit is further configured to remove the connection characters in the software authorization code.

[0179] Optionally, the apparatus further comprises:

[0180] The format checking module is configured to check the format of the software authorization code; in a case where a plurality of character segments included in the software authorization code are connected by the connection character and all characters in the software authorization code belong to the target character table, it is determined that the software authorization code passes the format check.

[0181] Optionally, the apparatus further comprises:

[0182] The integrity checking module is configured to determine an effective information string and a checking string in the binary string; regenerate the checking string corresponding to the effective information string; and in a case where the regenerated checking string is consistent with the checking string carried in the binary string, it is determined that the software authorization code passes the integrity check.

[0183] Optionally, the apparatus further comprises:

[0184] The information display module is configured to select preset core information from the obtained plurality of software authorization information and display the core information.

[0185] In addition, to achieve the above object, the present application further provides an electronic device, which comprises 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 authorization code generation method as described above, or the computer program being configured to implement the steps of the software authorization code analysis method as described above.

[0186] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer-readable storage medium, and the storage medium stores a computer program, the computer program being executed by a processor to implement the steps of the software authorization code generation method as described above, or the computer program being executed by a processor to implement the steps of the software authorization code analysis method as described above.

[0187] In addition, to achieve the above object, the present application further provides a computer program product, which comprises a computer program, the computer program being executed by a processor to implement the steps of the software authorization code generation method as described above, or the computer program being executed by a processor to implement the steps of the software authorization code analysis method as described above.

[0188] The one or more technical solutions proposed in the present application have at least the following technical effects:

[0189] The software authorization code generation scheme provided in the application obtains a binary string corresponding to software authorization information, and then performs multiple group encryptions on the binary string, each time using a different encryption mode, thereby providing multiple layers of protection for the software authorization code, making it difficult for attackers to crack the software authorization code through a single means, and effectively improving the security of the software authorization code. Moreover, the string is re-grouped before each encryption, and the data after grouping is encrypted, which adds a complex confusion layer to the encryption mechanism, and attackers will encounter more interference when trying to analyze the encryption logic, further increasing the cracking difficulty. Therefore, the software authorization code is generated based on the ciphertext generated by multiple group encryptions, and the multiple group encryption steps work together to comprehensively enhance the anti-cracking ability of the software authorization code. BRIEF DESCRIPTION OF DRAWINGS

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

[0191] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without creative labor.

[0192] Figure 1 A schematic diagram of an implementation environment of the software authorization code generation method and analysis method of the application;

[0193] Figure 2 A flowchart provided by the first embodiment of the software authorization code generation method of the application;

[0194] Figure 3 A detailed step diagram of step S120 in the second embodiment of the software authorization code generation method of the application;

[0195] Figure 4 A detailed step diagram of step S110 in the third embodiment of the software authorization code generation method of the application;

[0196] Figure 5 A detailed step diagram of step S130 in the fourth embodiment of the software authorization code generation method of the application;

[0197] Figure 6 A flowchart provided by the first embodiment of the software authorization code analysis method of the application;

[0198] Figure 7 A detailed step diagram of step S220 in the second embodiment of the software authorization code analysis method of the application;

[0199] Figure 8 A detailed step diagram for step S230 in the third embodiment of the software authorization code parsing method of the present application;

[0200] Figure 9 A detailed step diagram for step S210 in the fourth embodiment of the software authorization code parsing method of the present application;

[0201] Figure 10 A format diagram of a data packet of a software authorization code provided by the embodiments of the present application;

[0202] Figure 11 A timing diagram for encrypting a binary string corresponding to a software authorization code provided by the embodiments of the present application;

[0203] Figure 12 A timing diagram for decrypting a software authorization code provided by the embodiments of the present application;

[0204] Figure 13 A timing diagram for parsing a software authorization code provided by the embodiments of the present application;

[0205] Figure 14 A module structure diagram of a software authorization code generation device provided by the embodiments of the present application;

[0206] Figure 15 A module structure diagram of a software authorization code parsing device provided by the embodiments of the present application;

[0207] Figure 16 A device structure diagram of a hardware running environment involved in the software authorization code generation method or the software authorization code parsing method in the embodiments of the present application.

[0208] The object implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0209] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.

[0210] In order to better understand the technical solutions of the present application, the following will be described in detail in combination with the drawings and specific embodiments of the specification.

[0211] Figure 1 is a schematic diagram of an implementation environment provided by the embodiments of the present application. Referring to Figure 1The implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 are connected through a wireless or wired network. For example, the terminal 101 is installed with a client of the server 102 providing a software authentication service, and the terminal 101 can implement functions such as data transmission and message interaction through the client. For example, the terminal 101 is a computer, a mobile phone, a tablet computer, or other terminals. For example, the client is a client in the operating system of the terminal 101, or a client provided by a third party.

[0212] In this application, the server 102 is configured to obtain a binary string corresponding to software authorization information. The binary string is encrypted multiple times. Based on the ciphertext obtained after multiple times of encryption, a software authorization code is generated. After the software authorization code is delivered to the user in any way, the user can input the software authorization code when installing the client in the terminal 101, updating the client, or using a specific function of the client, under the prompt of the client. Correspondingly, the client installed in the terminal 101 is configured to decode the ciphertext from the software authorization code in response to the input software authorization code. The ciphertext is decrypted multiple times. Based on the binary string obtained after multiple times of decryption, which does not contain the encrypted string, the software authorization information is obtained. Then, the client can be activated based on the software authorization information, so that the user can normally use the functions of the client.

[0213] Figure 2 The flowchart of the first embodiment of the software authorization code generation method of this application is shown in FIG. 1. For reference Figure 2 Taking the server as an example, the software authorization code generation method includes the following steps S110-S130:

[0214] Step S110, obtaining a binary string corresponding to software authorization information.

[0215] The software authorization information refers to a series of data related to the software usage permission, which is used to determine the legal use range and conditions of the software by the user. The binary string is a representation form of data in a computer, which is a sequence composed of 0 and 1. The software authorization information will be converted into a binary string for storage, processing and transmission by the computer. The binary string here has not been encrypted and is in plaintext.

[0216] Optionally, the binary string corresponding to the software authorization information includes at least one of random number encoding, region encoding, platform encoding, function encoding, valid time encoding, authorization type encoding, opening time encoding, use type encoding, extension field encoding, and check code. That is, the binary string corresponding to the software authorization information can contain multiple types of information encoding, or only contain part of the information encoding.

[0217] The random number code is a binary code converted from a randomly generated number. It is used to increase the diversity and unpredictability of the software authorization code. The region code is used to identify the geographical area to which the software authorization applies. The platform code represents the operating system or hardware platform, etc. on which the software is authorized to use. The function code specifies the specific function module or function level that the software authorization user can use. The valid time code specifies the validity period of the software authorization. The authorization type code is used to distinguish different types of authorization methods. The opening time code records the specific time when the software authorization is opened. The use type code represents the use mode of the software. The extension field code is a reserved expandable field for possible future additions of software authorization related information. As the software business develops and needs change, new content may need to be added to the authorization information, and the extension field code provides a flexible extension mechanism to avoid the inability to meet new business needs due to the fixed format of the authorization information. The check code is a code generated by a specific algorithm for the calculation of other authorization information fields, used to verify the integrity and accuracy of the authorization information.

[0218] The binary string corresponding to the software authorization information fuses the encoding of multi-dimensional 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 should be noted that in the case where the binary string corresponding to the software authorization information contains a random number code, the specific value of the random number code may affect the length of the ciphertext after data encryption. In order to ensure the consistency of the ciphertext length, if the ciphertext obtained by encrypting the binary string does not meet the conditions, such as insufficient ciphertext length, a random number code is generated again, and the binary string corresponding to the software authorization information is obtained based on the newly generated random number code. This can ensure the validity of the software authorization code generated subsequently.

[0220] Step S120, the binary string is encrypted multiple times, and different encryption methods are used for each time of grouping encryption.

[0221] The encryption method is a specific algorithm used to encrypt data, such as AES (Advanced Encryption Standard), RSA (Rivest-Shamir-Adleman encryption algorithm), DES (Data Encryption Standard), etc. Among them, AES and DES are symmetric encryption algorithms, and RSA is an asymmetric encryption algorithm.

[0222] Optionally, each time of the group encryption comprises: grouping the string to obtain a plurality of partial strings, and then encrypting each partial string respectively. Since each partial string has an independent encryption process, even if an attacker obtains partial ciphertext, due to the independence of the encryption of each partial string, it is difficult for them to infer the information of other partial strings from the partial ciphertext, and it is even more difficult to crack the complete plaintext information. In this way, the security of the software authorization code can be significantly improved.

[0223] Optionally, each time of the group encryption comprises: grouping the string to obtain a plurality of partial strings; encrypting a target partial string in the plurality of partial strings to obtain an encrypted string; and splicing the encrypted string and the partial string which is not encrypted in the plurality of partial strings to obtain the ciphertext. Only the target partial string is encrypted, rather than all partial strings, thereby reducing the amount of encrypted data. In the processing of a large amount of data, this way can significantly improve the encryption speed. And the encrypted string and the unencrypted partial string are spliced to obtain the ciphertext, which not only can maintain the structure and format of the original data to a certain extent, ensure that the encrypted data can still be normally processed and recognized by the system, but also can add an additional confusion layer to the encryption mechanism, further increasing the cracking difficulty.

[0224] The grouping manner of the string can be flexible. For example, the string is evenly grouped according to the number of bits. Or, a preset number of groups is determined, and the length of the partial string corresponding to each group is randomly determined. Or, a target partial string to be encrypted is preset, and the target partial string in the string is divided into a group, and the remaining strings are divided into a group.

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

[0226] In addition, when the encrypted string and the unencrypted partial string are spliced to obtain the ciphertext, the grouping manner should be considered to ensure that the encoding position of various authorization information in the spliced binary characters does not change. For example, the binary string is 125 bits, which is divided into 120 bits and 5 bits. After encrypting the first 120 bits to obtain an encrypted string, the unencrypted string of the last 5 bits is spliced to the end of the encrypted string to obtain the ciphertext.

[0227] It should be noted that the multiple group encryption is a cyclic encryption process. Except for the first group encryption, each subsequent group encryption is performed on the ciphertext obtained by the previous group encryption.

[0228] Step S130, generating the software authorization code based on the ciphertext obtained after the multiple times of group encryption.

[0229] The ciphertext is a result of encrypting the binary string corresponding to the software authorization information. The software authorization code is an identification used by the software developer to verify whether the user has the software use right. When installing or using the software, the user needs to input the software authorization code for verification. Only after the verification is passed, the user can normally use the corresponding functions of the software.

[0230] For example, the ciphertext can be directly used as the software authorization code after multiple times of group encryption. Alternatively, the ciphertext is encoded to obtain the software authorization code, so as to shorten the length of the software authorization code. For example, the ciphertext is encoded by Base32 or Base64 to obtain the software authorization code.

[0231] The software authorization code generation scheme provided in the present application obtains the binary string corresponding to the software authorization information, and encrypts the binary string multiple times. Different encryption methods are used each time, which provides multiple layers of protection for the software authorization code, making it difficult for attackers to crack the software authorization code by a single means, and effectively improving the security of the software authorization code. Moreover, the string is re-grouped before each encryption, and the data after grouping is encrypted. This way adds a complex confusion layer to the encryption mechanism, and attackers will encounter more interference when trying to analyze the encryption logic, further increasing the cracking difficulty. Therefore, the ciphertext generated based on multiple times of group encryption is used to generate the software authorization code, and the multiple group encryption steps work together to comprehensively enhance the anti-cracking ability of the software authorization code.

[0232] Based on the above first embodiment, the second embodiment of the present application is proposed. The same or similar contents as the first embodiment can be referred to the above description, and will not be described in detail hereinafter. For reference Figure 3 In the second embodiment, the step S120 includes steps S1201-S1204:

[0233] Step S1201, grouping the binary string to obtain a first part string and a second part string.

[0234] Optionally, the implementation manner of this step is that the first part string is composed of the first target number of characters in the binary string, and the target number is a multiple of N, and N is an integer greater than 1; the second part string is composed of the characters in the binary string except the first part string.

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

[0236] For example, N is 8, i.e., the target number is a multiple of 8. Considering that the underlying data processing mechanism of a computer is based on bytes, one byte is composed of 8 bits. Setting the target number as a multiple of 8 can make the data packet accurately aligned with the byte boundary, reduce the additional conversion overhead in the data processing process, and thus significantly improve the encryption speed.

[0237] In step S1202, the first part of the string is asymmetrically encrypted, and the obtained first encrypted string is spliced with the second part of the string to obtain the first ciphertext.

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

[0239] Optionally, the asymmetric encryption of the first part of the string includes: dividing the first part of the string into a plurality of unit strings, each unit string containing N characters, N being an integer greater than 1; and asymmetrically encrypting each unit string to obtain a first encrypted string corresponding to each unit string, each unit string corresponding to the first encrypted string containing N characters. Subsequently, the first encrypted string corresponding to each unit string and the unencrypted part of the string are spliced to obtain the first ciphertext.

[0240] In the embodiments of the present application, after the first part of the string is divided into unit strings of fixed length, the encryption algorithm can more efficiently process these data, avoiding additional overhead caused by processing data of different lengths and improving the utilization efficiency of system resources. Moreover, dividing the first part of the string into a plurality of unit strings for asymmetric encryption can effectively disperse the encryption risk. Even if the encryption information of a certain unit string is obtained by an attacker, since the other unit strings are independently encrypted, the attacker is also difficult to crack the complete content of the first part of the string, thereby significantly improving the security of the overall data.

[0241] Optionally, the asymmetric encryption of the first part of the string includes: encrypting the first part of the string using a private key in asymmetric encryption, wherein the private key is stored in a server. Considering that client devices are vulnerable to various security threats, such as virus infection, malicious software attack, etc. If the private key is stored in the client, once the client device is compromised, the private key may be stolen, thereby threatening the security of the encrypted data. The server usually has higher level security protection measures, such as firewall, intrusion detection system, access control, etc. Storing the private key in the server can effectively prevent the private key from being illegally obtained. Compared with dispersing the private key on multiple client devices, the risk of private key leakage is greatly reduced.

[0242] The formula of asymmetric encryption is ciphertext = (plaintext) ^ private key mod modulus. Here, the plaintext is the first part of the string.

[0243] For example, in order to give priority to the security of the core information in the software authorization information, the first part of the string can contain the encoding corresponding to the core information. For example, it can contain function encoding, valid time encoding, authorization type encoding, and opening time encoding. In this way, asymmetric encryption is used for the first part of the string, which can ensure that the core information is not tampered with or stolen during transmission.

[0244] In step S1203, the first ciphertext is grouped to obtain a third part of the string and a fourth part of the string.

[0245] Optionally, the implementation of this step is that the characters in the last M bits of the first ciphertext form the fourth part of the string, and M is the number of binary bits that the server supports for one-time processing. The characters in the first ciphertext except for the fourth part of the string form the third part of the string. For example, M is 32 or 64.

[0246] In the embodiments of the present application, considering that different servers have different processing capabilities, by setting the length of the fourth part of the string to be the number of binary bits M that the server supports for one-time processing, and subsequently encrypting the fourth part of the string, the encryption operation can better adapt to the performance of the server. The server can encrypt this part of data in the most optimal processing mode, fully utilize the computing power of the server, reduce the encryption time and resource consumption, and thus improve the overall encryption efficiency.

[0247] In step S1204, the fourth part of the string is symmetrically encrypted, and the obtained second encrypted string is spliced with the third part of the string to obtain a second ciphertext.

[0248] Symmetric encryption refers to an encryption method that uses the same key for encryption and decryption. Symmetric encryption algorithms have the characteristics of fast encryption speed and high efficiency, and are suitable for the encryption of a large amount of data.

[0249] Optionally, symmetrically encrypting the fourth part of the string includes: converting the fourth part of the string into a decimal integer; symmetrically encrypting 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 more suitable for processing numerical type data in design. After converting the fourth part of the string into a decimal integer, the encryption algorithm can naturally perform mathematical operations on the integer. This avoids complex bit operations on binary strings, thereby improving the encryption speed.

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

[0252] In the embodiments of the present application, different versions of the software authorization code are encrypted by using different keys, which means that even if a key of a version is unfortunately leaked, an attacker cannot use the key to crack authorization codes of other versions. This effectively avoids the situation that the security of authorization codes of all versions is threatened due to the leakage of a single key, greatly enhancing the overall security of the software authorization system. Moreover, when it is necessary to upgrade the security strategy, only a new version number of the authorization code and a corresponding encryption key need to be generated, without the need to redesign the encryption logic. When the client parses the software authorization code, only the key corresponding to the new version number needs to be used, without the need to change the decryption logic, greatly improving the convenience of security strategy upgrade.

[0253] It should be noted that the version number of the software authorization code used in the above scheme can be the version number of the software, i.e., the version number of the client. This versioned key isolation enables the enterprise to not need to design an encryption algorithm for each new version of software, thereby reducing the complexity of key management. For example, the traditional scheme needs to redesign the encryption algorithm when a new version of software is added, while the present scheme only needs to update the key version used for symmetric encryption.

[0254] In the embodiments of the present application, the binary string is encrypted twice by grouping, i.e., asymmetric encryption and symmetric encryption, so that the encryption process is more complex. An attacker needs to crack both asymmetric encryption and symmetric encryption, and needs to face the complex structure of twice grouping encryption, greatly increasing the difficulty of cracking. Even if the attacker obtains part of the ciphertext, it is also difficult to crack valuable information from the part of the ciphertext due to the different encryption methods and grouping strategies used for different parts of the data.

[0255] Based on the first embodiment of the present application, the third embodiment of the present application is proposed. The same or similar contents as the first embodiment can be referred to the foregoing description, and will not be described hereinafter. Refer to Figure 4 In the third embodiment, the step S110 includes steps S1101-S1103.

[0256] In step S1101, the set of target functions authorized is determined.

[0257] The set of target functions refers to a set of specific functions that the software is authorized to use. For example, an office software can have functions such as word editing, table making, and slide presentation. If the software authorization purchased by a user only allows the use of the word editing and table making functions, then these two functions constitute the set of target functions.

[0258] Step S1102, encode information in the target function set to obtain a function string.

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

[0260] Optionally, the information encoding of the target function set to obtain the function string includes the following two ways.

[0261] Firstly, a first function list containing the correspondence between software functions and binary bits in the function string is obtained; the corresponding target bits of each software function in the target function set in the function string are queried from the first function list; and the function string is generated based on the target bits, wherein the character corresponding to the target bits in the function string is 1, and the character corresponding to the binary bits other than the target bits in the function string is 0. This way of generating the function string is simple and efficient. Moreover, 1 in the generated function string represents authorized functions, and 0 represents unauthorized functions, which can clearly present the authorized function range of the software.

[0262] Secondly, a second function list containing the correspondence between decimal integers and function sets is obtained; the target integer corresponding to the target function set is queried from the second function list; and the function string in binary is converted from the target integer. By storing the correspondence between the decimal integer and the function set in the second function list, the integer is used to represent the complex function set, which facilitates and quickens the query of the target integer corresponding to the target function set from the second function list. In combination with simple data conversion operation, the function string can be obtained. The whole scheme is simple and efficient, and improves the efficiency of generating the function string.

[0263] The number of bits of the function string is preset, and when the target integer is converted into the function string in binary, if the number of bits of the function string is insufficient, the high bits need to be filled with 0.

[0264] It should be noted that if the number of functions that need to be authorized and configured by the software is not greater than the preset function encoding bit number, the first way can be used to encode the authorized functions. If the number of functions that need to be authorized and configured by the software is greater than the preset function encoding bit number, the second way can be used to encode the authorized functions.

[0265] Step S1103, 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.

[0266] The software authorization information further includes other authorization information in addition to the authorized function information. Correspondingly, the other authorization information is also converted into a binary string, and the binary strings corresponding to the multiple authorization information are spliced according to a preset position sequence, so that the binary string corresponding to the software authorization information is obtained.

[0267] For example, the software authorization information further includes authorization platform information, usage type information, and authorization type information. Correspondingly, the authorization platform information, the usage type information, and the authorization type information can be encoded by using the same principle as that of the authorized function, so that corresponding information codes are obtained. For example, the software authorization information further includes time information. The time information can be converted from decimal data into binary data, so that a code of the time information is obtained.

[0268] Optionally, the binary string corresponding to the software authorization information is obtained by encoding the software authorization information to obtain an effective information string, generating a check string corresponding to the effective information string, and adding the check string to the end of the effective information string to obtain the binary string corresponding to the software authorization information. In this way, the client can determine whether the software authorization information in the software authorization code has been tampered with or damaged in the transmission process based on the check string. This is crucial to ensure the accuracy and reliability of the software authorization information and prevent authorization verification failure or software function abnormality caused by data errors.

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

[0270] In the embodiment of the application, the authorized target function set is encoded to obtain a function string, and the function string is fused into the binary string corresponding to the software authorization information, so that the authorized function information is fused into the software authorization code, and the information density of the software authorization code is further improved. In this way, even in the scenario of network disconnection, the client can parse the authorized function information from the software authorization code to activate the software, without the need to rely on the network to obtain the authorized function information from the server, thereby further improving the autonomy and convenience of the software activation process. The risk of software failure caused by network problems is effectively reduced, and the user experience and the usability of the software are significantly enhanced.

[0271] Based on the first embodiment of the application, the fourth embodiment of the application is provided. The same or similar contents as those of the first embodiment can be referred to the foregoing description, and will not be described hereinafter. Figure 5 In the fourth embodiment, the step S130 includes steps S1301-S1303.

[0272] In step S1301, a target character table is obtained, each target character in the target character table corresponds to a decimal integer, and the target character table does not contain confusing 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, Q. Among them, 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 should be emphasized that the target character table does not contain confusing characters such as I, 1, 0, O, and the like.

[0274] In step S1302, the ciphertext obtained after multiple times of group encryption is divided into multiple unit strings, each unit string contains X binary characters, and X is an integer greater than 1.

[0275] For example, X is 5, that is, every 5 binary characters in the ciphertext obtained after group 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 the corresponding target character in the target character table.

[0276] In step S1303, each unit string in the ciphertext obtained after multiple times of group encryption is mapped to a target character in the target character table to obtain the software authorization code.

[0277] For any unit string in the ciphertext, convert it into a decimal integer, and determine the target character corresponding to the decimal integer in the target character table, and the target character mapped by the unit string is obtained. By performing such mapping operation on each unit string in the ciphertext, the software authorization code can be obtained.

[0278] Optionally, after mapping each unit string in the ciphertext obtained after multiple times of group encryption to a target character in the target character table, the ciphertext is divided into multiple character segments, each character segment includes the same number of characters; the multiple character segments are connected by a connection character to obtain the software authorization code.

[0279] For example, the ciphertext after mapping contains 25 target characters, and every 5 target characters are divided into a character segment to obtain 5 character segments. By connecting the 5 character segments with a connection character, the software authorization code is obtained.

[0280] For example, the connection character is “-”, “~”, “*” or other characters, and the embodiments of the present application do not limit this.

[0281] In the embodiments of the present application, the characters in the software authorization code are divided into multiple character segments, each of which contains the same number of characters and is connected by a connection character, so that the authorization code presents a regular and neat format. The authorization code is more visually clear, and the reading and inputting of the software authorization code can significantly improve the efficiency and accuracy.

[0282] Optionally, the key used in the group encryption is the key corresponding to the version number of the software authorization code. Correspondingly, the connection of the multiple character segments by the connection character obtains the software authorization code, including: connecting the multiple character segments and the version number by the connection character to obtain the software authorization code. For example, the software authorization code is 3D7A2-4B9XC-8PQR5-2W3MN-FG7H9-V2, wherein V2 is the version number.

[0283] By connecting the version number as a part of the software authorization code with the character segments to form a complete software authorization code, the client can match the key used to decrypt the software authorization code based on the version number, so as to successfully obtain the software authorization information in the software authorization code.

[0284] In the embodiments of the present application, the target character table does not contain easily confused characters, for example, there are no characters such as O and 0, I and 1 which are easy to be misread. When the software authorization code is manually input, viewed or recorded, the error probability caused by character confusion is greatly reduced, and the user can accurately use the software authorization code to activate the software.

[0285] Figure 6 The flowchart of the first embodiment of the software authorization code parsing method of the present application is shown. Refer to Figure 6 Taking the client as an execution subject, the software authorization code parsing method includes the following steps S210-S230:

[0286] Step S210, in response to the input software authorization code, decoding the ciphertext from the software authorization code.

[0287] Step S220, multiple group decryption is performed on the ciphertext, and the decryption mode used in each group decryption is different.

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

[0289] Optionally, each time the grouping decryption comprises: performing string grouping to obtain a plurality of partial strings; respectively performing decryption on each of the plurality of partial strings to obtain a decrypted string; and splicing the decrypted strings corresponding to the partial strings.

[0290] At step S230, the software authorization information is obtained based on the binary string obtained after the multiple times of grouping decryption and not containing the encrypted string.

[0291] In the embodiments of the present application, since the software authorization code is generated based on the ciphertext obtained by performing multiple times of grouping encryption on the binary string corresponding to the software authorization information, and different encryption modes are used in each time of encryption, the software authorization information can be successfully obtained by performing the reverse operation of the encryption operation, i.e., decoding the ciphertext from the software authorization code and then performing multiple times of grouping decryption, and different decryption modes are used in each time of grouping decryption. Since the parsing process of the software authorization code contains multiple layers of different decryption modes, and correct grouping is required in each time of decryption, the attacker will encounter a lot of interference when trying to parse the encryption logic, which greatly improves the anti-cracking capability of the software authorization code and further improves the security of the software.

[0292] Based on the first embodiment of the authorization code parsing method of the present application, a second embodiment of the authorization code parsing method of the present application is proposed. The same or similar contents as the first embodiment can be referred to the foregoing description, and will not be described hereinafter. Refer to Figure 7 In the second embodiment, step S220 comprises steps S2201-S2204.

[0293] At step S2201, the second ciphertext decoded from the software authorization code is grouped to obtain a second encrypted string and a third partial string.

[0294] Optionally, grouping the second ciphertext decoded from the software authorization code comprises: constructing a second encrypted string from the characters of the last M bits of the second ciphertext, M being the number of binary bits supported by the server generating the software authorization code for one-time processing; and constructing a third partial string from the characters of the second ciphertext other than the second encrypted string.

[0295] At step S2202, the second encrypted string is symmetrically decrypted, the obtained fourth partial string is spliced with the third partial string, and a first ciphertext is obtained.

[0296] Optionally, symmetrically decrypting the second encrypted string comprises: converting the second encrypted string into a decimal integer; symmetrically decrypting 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 a fourth partial string.

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

[0298] In step S2203, the first ciphertext is grouped to obtain a first encrypted string and a second partial string.

[0299] Optionally, the grouping of the first ciphertext to obtain the first encrypted string and the second partial string comprises: constructing the first encrypted string from a target number of characters in the first ciphertext, the target number being a multiple of N; and constructing the second partial string from the characters in the first ciphertext other than the first encrypted string.

[0300] In step S2204, the first encrypted string is asymmetrically decrypted, and the obtained first partial string is spliced with the second partial string to obtain a binary string not containing an encrypted string.

[0301] Optionally, the asymmetric decryption of the first encrypted string comprises: dividing the first encrypted string into a plurality of unit strings, each unit string containing N characters, N being an integer greater than 1; and performing asymmetric decryption on each unit string to obtain a first partial string corresponding to each unit string, the first partial string corresponding to each unit string containing N characters.

[0302] Optionally, the asymmetric decryption of the first encrypted string comprises: performing decryption of the first encrypted string by using a public key in the asymmetric decryption, wherein the public key is stored in the client.

[0303] The formula of the asymmetric decryption is plaintext=(ciphertext)public key mod modulus. Here, the ciphertext is the first encrypted string.

[0304] Based on the first embodiment of the authorization code parsing method of the present application, a third embodiment of the authorization code parsing method of the present application is proposed. The same or similar contents as the first embodiment can be referred to the foregoing description, and will not be described hereinafter. For reference Figure 8 In the third embodiment, step S230 comprises steps S2301-S2302.

[0305] In step S2301, the function string is extracted from the binary string.

[0306] In the binary string corresponding to the software authorization information, the encoding of each binary character belonging to which authorization information is defined in advance, and the client can obtain the function string at the corresponding position according to the definition.

[0307] In step S2302, the function string is informationally decoded to obtain the authorized target function set, and the software authorization information contains the authorized target function set.

[0308] Optionally, the information decoding of the function string to obtain the authorized target function set comprises: obtaining a first function list containing a correspondence between software functions and binary bits in the function string; querying, from the first function list, a software function corresponding to a target bit with a character of 1 in the function string; and constituting the target function set from the queried software functions.

[0309] Optionally, the information decoding of the function string to obtain the authorized target function set comprises: obtaining a second function list containing a correspondence between decimal integers and function sets; converting the function string into a decimal integer; and querying, from the second function list, a target function set corresponding to the converted decimal integer.

[0310] Optionally, after obtaining the software authorization information based on the binary string obtained after the multiple-group decryption and not containing the encrypted string, the method further comprises: selecting preset core information from the obtained multiple items of software authorization information for display. In this way, the user can clearly know the software authorization range and main permissions obtained by the user.

[0311] The specific type of the preset core information is set according to an application scenario. For example, the preset core information includes seven types of core authorization information, i.e., authorized region, platform architecture, valid time, function combination, authorization type, opening time, and use type.

[0312] Illustratively, after the client selects the preset core information from the multiple items of software authorization information, the client encapsulates the preset core information into a visual authorization data object, and displays the visual authorization data object.

[0313] Based on the first embodiment of the authorization code analysis method of the present application, a fourth embodiment of the authorization code analysis method of the present application is proposed. The same or similar contents as the first embodiment can be referred to the foregoing description, and will not be described in detail hereinafter. For reference Figure 9 In the fourth embodiment, step S210 comprises steps S2101-S2102.

[0314] In step S2101, a target character table is obtained, 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] In step S2102, based on the target character table, each target character in the software authorization code is mapped to a decimal integer and converted into an X-bit binary character to obtain a ciphertext, X being an integer greater than 1.

[0316] Optionally, the software authorization code comprises a plurality of character segments and a connection character between the plurality of character segments. Accordingly, before the client maps each target character in the software authorization code to a decimal integer based on the target character table and converts the decimal integer to a binary character of X bits to obtain the ciphertext, the method further comprises: removing the connection character in the software authorization code.

[0317] Optionally, before the ciphertext is decoded from the input software authorization code, the method further comprises: performing format verification on the software authorization code; in a case where the plurality of character segments included in the software authorization code are connected by the connection character, and the characters in the software authorization code all belong to the characters in the target character table, it is determined that the software authorization code passes the format verification. Illustratively, the format verification on the software authorization code is performed by using a regular expression. In this way, it can be prevented that a malicious user attempts to obtain illegal access rights by constructing a software authorization code of illegal format, and the security of the software system is improved.

[0318] Optionally, before the software authorization information is obtained based on the binary string obtained after the plurality of times of group decryption and not containing the encrypted string, the method further comprises: determining an effective information string and a verification string in the binary string; re-generating the verification string corresponding to the effective information string; and in a case where the re-generated verification string is consistent with the verification string carried in the binary string, it is determined that the software authorization code passes the integrity verification. This integrity verification scheme ensures the accuracy and integrity of the software authorization information, and provides a reliable guarantee for the software system to correctly authorize the user to use the software according to the software authorization information.

[0319] The effective information string refers to a part of the binary string containing actual content related to software authorization, such as authorization period, function permission, and other specific information. These information are key data for the software system to determine the software authorization range and use permission of the user. The verification string is a string generated from the effective information string by a specific algorithm, and is used to verify whether the effective information string is error or tampered during transmission or storage.

[0320] It should be noted that the embodiments of the present application can provide a three-fold verification process. The first fold is format verification. The second fold is integrity verification. The third fold is data matching verification, i.e., whether the decrypted binary string not containing the encrypted string can correctly map the authorization information such as authorization function and authorization type. If yes, it is determined that the software authorization code is valid, otherwise, it is determined that the software authorization code is invalid.

[0321] It can be understood that the generation process and the analysis process of the software authorization code are completely inverse processes, and therefore, the implementation of the schemes not described in detail in the above software authorization code analysis method embodiments can be understood with reference to the corresponding schemes in the software authorization code generation method embodiments, which will not be described here.

[0322] Next, taking a specific binary string corresponding to software authorization information as an example, the software authorization code generation method and the analysis method in the present application are described. Table 1 below describes the type, the number of coding bits and the coding rule of each information field in the binary string corresponding to the software authorization information. Among them, the full name of Windows is Microsoft Windows Operating System, which refers to the Microsoft Windows operating system. The full name of Linux is Linux Operating System, which refers to the Linux operating system. The full name of Mac is Macintosh Operating System, which refers to the Macintosh operating system. In the authorization type, the basic type refers to the authorization type that needs to use the software authorization code and the machine code of the installed device to apply for the authorization certificate, the expansion type refers to the authorization type of the renewal or additional function, the single machine type refers to the authorization type that only needs the software authorization code to realize the offline activation of the software, and the combination type refers to the authorization type of multiple products at the same time.

[0323]

[0324]

[0325] Table 1

[0326] Figure 10 is a format diagram of the data packet of the software authorization code provided by the embodiments of the present application. Referring to Figure 10 , wherein the random number code, the region code, the platform code, the function code, the valid time code, the authorization type code, the opening year code, the opening month code, the opening date code, the use type code, the extension field code and the check code are arranged in turn.

[0327] Figure 11 is a timing diagram for encrypting the binary string corresponding to the software authorization code. Referring to Figure 11The method comprises the following steps: inputting the plaintext data corresponding to the software authorization information, i.e. a 125-bit binary string, in a server. The 125-bit data is grouped into 120 bits in front and 5 bits in back. The 120 bits in front are asymmetrically encrypted to obtain a 120-bit encrypted string. The encrypted string is spliced with the 5 bits in back to obtain 125-bit data. Then, the data is grouped into 61 bits in front and 64 bits in back, and the 64 bits in back are symmetrically encrypted to obtain a 64-bit encrypted string. The 61 bits in front are spliced with the encrypted string to obtain 125-bit data. Then, the 125-bit data is encoded into a 25-character string, i.e. each 5-bit binary character in the 125-bit data is mapped into a target character in a 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, the 5 character segments are connected by a connection character, and a version number of the software authorization code is added at the end, so that a final SN (Serial Number) is obtained, i.e. a final software authorization code.

[0328] Figure 12 is a timing diagram for decryption of the software authorization code. Referring to Figure 12The method comprises the following steps: a user submits a software authorization code, a parsing service in a client calls a format checking service to check the format validity, and receives a checking result returned by the format checking service. Then, a decoding service is called to remove the connection character in the software authorization code and decode 125 bits of data, and 125 bits of data returned by the decoding service is received. Next, a grouping splicing service is called to split the 125 bits of data into 61 bits in front and 64 bits behind, and a grouping result returned by the grouping splicing service is received. Then, a decryption service is called to perform symmetric decryption on the 64 bits behind, and a 64 bits decryption string returned by the decryption service is received. Next, the grouping splicing service is called to splice the 61 bits in front and the decryption string, and 125 bits after splicing returned by the grouping splicing service is received. The grouping splicing service splits the 125 bits of data after splicing into 120 bits in front and 5 bits behind, and returns a grouping result. Then, the parsing service calls a decryption service to perform asymmetric decryption on the 120 bits in front, and receives a 120 bits decryption string returned by the decryption service. Then, the grouping splicing service is called to splice the decryption string and the 5 bits behind, and 125 bits of data after splicing returned by the grouping splicing service is received. Then, an integrity checking service is called to calculate a check code in the 101 bits in front of the 125 bits of data after splicing, the check code is compared with a check code of the last 16 bits in the 125 bits, and a comparison checking result returned by the integrity checking service is received. In the case of passing the check, the parsing service obtains software authorization information based on the 125 bits after decryption, and returns the software authorization information to the user.

[0329] Figure 13 is a timing diagram for parsing a software authorization code. Referring to Figure 13 The method comprises the following steps: a client receives an input software authorization code and calls a parsing service. Then, the parsing service decrypts the software authorization code to obtain 125 bit plaintext data. The parsing service then decomposes binary bits in the 125 bit plaintext data to obtain platform code, time information code, function code and other information codes. Then, platform information is parsed based on the platform code, and time information is parsed based on the time information code. Then, function permissions are matched based on a function list and the function code to obtain authorized function information. Next, preset core information parsed is data encapsulated to obtain a visual authorization data object. After the client receives the authorization data object returned by the parsing service, the authorization data object can be displayed to enable the user to understand the application permission range of the user to the client. It should be noted that the parsing service not only parses platform, time, function and other information, but also parses other software authorization information, which is not shown in the figure.

[0330] By the design of the above scheme, high information density, multi-level encryption protection and flexible expansion capability of the software authorization code are realized within 25 characters, and the usability and security of the software authorization code are also considered. The length of 25 characters is shortened by 60% compared with the length of the traditional software authorization code, effectively reducing the manual input error rate. Through simulation test, the software authorization code makes the user input error rate decrease from the industry average level of 15% to below 5%. At the same time, the shorter software authorization code is also suitable for multi-scene delivery. For example, the shorter software authorization code can be easily delivered through paper license, SMS, two-dimensional code and other ways, reducing the delivery cost of enterprises. For example, the traditional software authorization code needs to be printed in two lines, while the software authorization code of the present application can be displayed in a single line. And because the binary string corresponding to the software authorization information contains a 32-bit random number encoding field, the software authorization code generation method provided by the present application can support the generation of a large number of authorization codes. That is, under the same product and configuration, 2 32 billion unique software authorization codes can be generated, which meets the large-scale commercial demand.

[0331] The embodiments of the present application use asymmetric encryption to ensure key security and symmetric encryption to improve data processing efficiency. This hybrid encryption scheme forms a multi-layer protection. Moreover, the software authorization code integrates authorization information such as authorized region, authorized platform, authorized function, valid time, authorization type, opening time, and use type, so that the software authorization code can be used as a unique index and can also parse the required information for software activation in offline mode, thereby supporting offline activation of software. In addition, different versions of software authorization codes use different keys, which can realize seamless upgrade of security policy. Furthermore, the software authorization code is encoded by a custom target character table to avoid the use of easily confused characters in the software authorization code, thereby improving the usability and anti-misinput capability of the software authorization code.

[0332] It should be noted that the above examples are only used to understand the present application and do not limit the software authorization code generation method of the present application. More simple transformations based on this technical concept are within the scope of protection of the present application.

[0333] The present application also provides a software authorization code generation device, which is configured in a server and includes: Figure 14 A string obtaining module 110 is configured to obtain a binary string corresponding to software authorization information.

[0334] A grouping encryption module 120 is configured to perform multiple grouping encryptions on the binary string, and different encryption modes are used in each grouping encryption.

[0335]

[0336] ​The authorization code generation module 130 is configured to generate the software authorization code based on the ciphertext obtained after multiple times of group encryption.

[0337] Optionally, the group encryption module 120 is configured to group the string to obtain a plurality of partial strings; encrypt a target partial string in the plurality of partial strings to obtain an encrypted string; and splice the encrypted string and a partial string that is not encrypted in the plurality of partial strings to obtain the ciphertext.

[0338] Optionally, the group encryption module 120 comprises:

[0339] A first grouping unit is configured to group the binary string to obtain a first partial string and a second partial string;

[0340] A first encryption unit is configured to asymmetrically encrypt the first partial string, splice the obtained first encrypted string and the second partial string to obtain first ciphertext;

[0341] A second grouping unit is configured to group the first ciphertext to obtain a third partial string and a fourth partial string;

[0342] A second encryption unit is configured to symmetrically encrypt the fourth partial string, and splice the obtained second encrypted string and the third partial string to obtain second ciphertext.

[0343] Optionally, the first encryption unit is configured to divide the first partial string into a plurality of unit strings, each unit string containing N characters, and N is an integer greater than 1; and asymmetrically encrypt each unit string to obtain a first encrypted string corresponding to each unit string, and each first encrypted string contains N characters.

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

[0345] Optionally, the first encryption unit is configured to encrypt the first partial string by using a private key in asymmetric encryption, and the private key is stored in a server.

[0346] Optionally, the second encryption unit is configured to convert the fourth partial string into a decimal integer; symmetrically encrypt 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 partial string to obtain the second encrypted string.

[0347] Optionally, the second grouping unit is configured to form a fourth partial string by using the characters in the first ciphertext that are located at the last M positions, where M is a number of binary digits supported by the server for one-time processing; and form a third partial string by using the characters in the first ciphertext other than the fourth partial string.

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

[0349] Optionally, the string obtaining module 110 comprises:

[0350] The function determining unit is configured to determine the target function set authorized.

[0351] The function encoding unit is configured to perform information encoding on the target function set to obtain a function string.

[0352] The string generating unit is configured to generate a binary string corresponding to the software authorization information based on the function string, where the binary string corresponding to the software authorization information comprises the function string.

[0353] Optionally, the function encoding unit is configured to obtain a first function list, where the first function list comprises a correspondence between software functions and binary digits in the function string; query, from the first function list, target digits corresponding to the software functions in the target function set in the function string; and generate the function string based on the target digits, where a character corresponding to each target digit in the function string is 1, and a character corresponding to each binary digit other than the target digits in the function string is 0.

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

[0355] Optionally, the authorization code generating module 130 comprises:

[0356] The character table obtaining unit is configured to obtain a target character table, where each target character in the target character table corresponds to a decimal integer, and the target character table does not comprise easily-confusable characters.

[0357] The string dividing unit is configured to divide the ciphertext obtained after the multiple times of grouping and encryption into multiple unit strings, where each unit string comprises X binary characters, and X is an integer greater than 1.

[0358] The character mapping unit is configured to map each unit string in the ciphertext obtained after the multiple times of grouping and encryption into a target character in the target character table to obtain the software authorization code.

[0359] Optionally, the character mapping unit is configured to divide the mapped ciphertext into a plurality of character segments, each of the character segments including the same number of characters; and connect the plurality of character segments with a connection character to obtain the software authorization code.

[0360] Optionally, the key used in the group encryption is a key corresponding to a version number of the software authorization code.

[0361] The character mapping unit is configured to connect the plurality of character segments and the version number with a connection character to obtain the software authorization code.

[0362] Optionally, the string obtaining module 110 is configured to encode the software authorization information to obtain an effective information string; generate a check string corresponding to the effective information string; and add the check string to the end of the effective information string to obtain a binary string corresponding to the software authorization information.

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

[0364] at least one of a random number code, a region code, a platform code, a function code, an effective time code, an authorization type code, an opening time code, a use type code, an extension field code, and a check code.

[0365] The software authorization code generation apparatus provided in the present application adopts the software authorization code generation method in the above embodiments, and can solve the technical problem of insufficient anti-cracking capability and low security of the software authorization code in the related art. Compared with the prior art, the software authorization code generation apparatus provided in the present application has the same beneficial effects as the software authorization code generation method provided in the above embodiments, and other technical features in the software authorization code generation apparatus are the same as the features disclosed in the above embodiments, which will not be described herein.

[0366] The present application also provides a software authorization code analysis apparatus, which is configured in a client and includes: Figure 15

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

[0368] The group decryption module 220 is configured to perform multiple group decryption on the ciphertext, and each time the group decryption uses a different decryption mode.

[0369] The information obtaining module 230 is configured to obtain the software authorization information based on the binary string obtained after the multiple group decryption and not including the encrypted string.

[0370] ​Optionally, the grouping decryption module 220 is configured to group the string to obtain a plurality of partial strings; decrypt a target partial string in the plurality of partial strings to obtain a decrypted string; and concatenate the decrypted string with a non-decrypted partial string in the plurality of partial strings.

[0371] Optionally, the grouping decryption module 220 comprises:

[0372] The first grouping unit is configured to group the second ciphertext decoded from the software authorization code to obtain a second encrypted string and a third partial string.

[0373] The first decryption unit is configured to symmetrically decrypt the second encrypted string, concatenate a fourth partial string obtained by the symmetric decryption with the third partial string to obtain the first ciphertext.

[0374] The second grouping unit is configured to group the first ciphertext to obtain a first encrypted string and a second partial string.

[0375] The second decryption unit is configured to asymmetrically decrypt the first encrypted string, and concatenate a first partial string obtained by the asymmetric decryption with the second partial string to obtain a binary string not containing the encrypted string.

[0376] Optionally, the second decryption unit is configured to divide the first encrypted string into a plurality of unit strings, each unit string containing N characters, and N is an integer greater than 1; and asymmetrically decrypt each unit string to obtain a first partial string corresponding to each unit string, the first partial string corresponding to each unit string containing N characters.

[0377] Optionally, the second grouping unit is configured to form the first encrypted string by using a target number of characters in the first ciphertext, and the target number is a multiple of N; and form the second partial string by using characters in the first ciphertext other than the first encrypted string.

[0378] Optionally, the second decryption unit is configured to decrypt the first encrypted string by using a public key in asymmetric decryption, and the public key is stored in the client.

[0379] Optionally, the first decryption unit is configured to convert the second encrypted string into a decimal integer; symmetrically decrypt the decimal integer to obtain a decrypted integer; and convert the decrypted integer into a binary string with a same number of bits as the second encrypted string to obtain the fourth partial string.

[0380] Optionally, the first grouping unit is configured to form the second encrypted string by using characters in the second ciphertext with a last M bits, and M is a number of binary bits supported by a server generating the software authorization code for one-time processing; and form the third partial string by using characters in the second ciphertext other than the second encrypted string.

[0381] Optionally, the first decryption unit is configured to extract a version number of the software authorization code from the software authorization code, and perform symmetric decryption on the second encrypted string by using a key corresponding to the version number.

[0382] Optionally, the information obtaining module 230 comprises:

[0383] The string extraction unit is configured to extract the function string from the binary string.

[0384] The string decoding unit is configured to decode the function string to obtain the authorized target function set, and the software authorization information comprises the authorized target function set.

[0385] Optionally, the string decoding unit is configured to obtain a first function list, the first function list comprising a correspondence between software functions and binary bits in the function string, query a software function corresponding to a target bit with a value of 1 in the function string from the first function list, and form the target function set by using the queried software function.

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

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

[0388] The character table obtaining unit is configured to obtain a target character table, each target character in the target character table corresponding to a decimal integer, and the target character table not comprising an easily-confused character.

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

[0390] Optionally, the software authorization code comprises a plurality of character segments and connection characters between the plurality of character segments.

[0391] The character mapping unit is further configured to remove the connection characters in the software authorization code.

[0392] Optionally, the apparatus further comprises:

[0393] The format verification module is configured to perform format verification on the software authorization code, and determine that the software authorization code passes the format verification in a case where the plurality of character segments comprised in the software authorization code are connected by the connection characters, and the characters in the software authorization code all belong to the characters in the target character table.

[0394] Optionally, the apparatus further comprises:

[0395] The integrity checking module is configured to determine the valid information string and the checking string in the binary string, regenerate the checking string corresponding to the valid information string, and determine that the software authorization code passes the integrity check in a case where the regenerated checking string is consistent with the checking string carried in the binary string.

[0396] Optionally, the apparatus further comprises:

[0397] The information display module is configured to select preset core information from the obtained multiple items of software authorization information and display the core information.

[0398] The software authorization code parsing apparatus provided in the present application adopts the software authorization code parsing method in the above embodiments, and can solve the technical problem of insufficient anti-cracking capability and low security of the software authorization code in the related art. Compared with the prior art, the software authorization code parsing apparatus provided in the present application has the same beneficial effects as the software authorization code parsing method provided in the above embodiments, and other technical features in the software authorization code parsing apparatus are the same as the features disclosed in the above embodiments, which will not be described herein.

[0399] The present application provides an electronic device, comprising: at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the software authorization code generation method or the software authorization code parsing method in the above embodiments.

[0400] Reference will be made to the following Figure 16 which shows a structural schematic diagram of an electronic device suitable for implementing the embodiments of the present application. The electronic device can be used as a software authorization code generation device, i.e., a server, to generate a software authorization code, or can be used as a software authorization code parsing device, i.e., a terminal, to parse the software authorization code through a client installed thereon. The electronic device in the embodiments of the present application can include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), and vehicle-mounted terminals (e.g., vehicle-mounted 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 functions and use range of the embodiments of the present application.

[0401] AsFigure 16 As shown, the electronic device can include a processing apparatus 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that 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 apparatus 1003 into a random access memory (RAM) 1004. Various programs and data required for operation of the electronic device are also stored in the RAM 1004. The processing apparatus 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input apparatus 1007 including, for example, a touch panel, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output apparatus 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage apparatus 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication apparatus 1009. The communication apparatus 1009 can allow the electronic device to perform wireless or wired communication with other devices to exchange data. Although the electronic device having various systems is shown in the figure, it should be understood that all the shown systems are not required to be implemented or possessed. More or less systems can be alternatively implemented or possessed.

[0402] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure 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 through the communication apparatus, or installed from the storage apparatus 1003, or installed from the ROM 1002. When the computer program is executed by the processing apparatus 1001, the above-mentioned functions defined in the methods of embodiments of the present disclosure are performed.

[0403] The electronic device provided by the present disclosure adopts the method in the above embodiments, which can solve the technical problem of insufficient anti-cracking ability and low security of software authorization code in the related art. Compared with the prior art, the electronic device provided by the present disclosure has the same beneficial effects as the method provided by the above embodiments, and other technical features in the electronic device are the same as the features disclosed in the above method, which will not be repeated here.

[0404] It should be understood that various aspects of the disclosure can be implemented in hardware, software, firmware, or combinations thereof, to achieve the various aspects of the disclosure. In the description above, 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 illustrative of the application and is not intended to limit the scope of the application. Any modifications or equivalents of the application should be construed as falling within the scope of the application. The scope of the application should be determined by the appended claims.

[0406] The application provides a computer readable storage medium having computer readable program instructions (i.e., computer programs) stored thereon, the computer readable program instructions being used to execute the software authorization code generation method or the software authorization code analysis method in the above-described embodiments.

[0407] The computer readable storage medium provided by the application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electric connection having one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer readable storage medium can 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 can be transmitted by any suitable medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), etc., or any suitable combination of the above.

[0408] The above computer readable storage medium can be contained in the above electronic device; or can exist separately and not be assembled into the above electronic device.

[0409] The computer readable storage medium described above carries one or more programs, which, when executed by the software license code generation device, enable the software license code generation device to perform the software license code generation method described above. When the one or more programs are executed by the software license code analysis device, enable the software license code analysis device to perform the software license code analysis method described above.

[0410] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0411] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specified functions. It should also be noted that, in some alternative implementations, the functions noted in the blocks can occur in a different order than that noted in the figures. For example, two blocks noted in succession can in fact be executed substantially concurrently or in the opposite order, depending on the functionality involved. It should also be noted that each block in the block diagrams and / or flow diagrams, and combinations of blocks in the block diagrams and / or flow diagrams, can be implemented by dedicated hardware-based systems that perform the specified functions or operations, or can be implemented by a combination of dedicated hardware-based systems and computer instructions.

[0412] The modules involved in the embodiments of the present application can be implemented in software or in hardware. In some cases, the names of the modules do not constitute a limitation on the modules themselves.

[0413] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e., computer programs) for executing the software authorization code generation method or the software authorization code analysis method described above, and can solve the technical problems of insufficient anti-cracking ability and low security of the software authorization code in the related art. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the method provided by the above-mentioned embodiments, and will not be described here.

[0414] The present application also provides a computer program product comprising a computer program, which, when executed by a processor, implements the steps of the software authorization code generation method or the software authorization code analysis method as described above.

[0415] The computer program product provided by the present application can solve the technical problems of insufficient anti-cracking ability and low security of the software authorization code in the related art. Compared with the prior art, the computer program product provided by the present application has the same beneficial effects as the method provided by the above-mentioned embodiments, and will not be described here.

[0416] The above-mentioned is only part of the embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structural transformation, direct / indirect application in other related technical fields based on the technical concept of the present application, and the contents of the specification and drawings are included in the patent protection scope of the present application.

Claims

1. A software license code generation method, characterized by, The method is executed by a server, and the method comprises: Obtaining a binary string corresponding to software authorization information; Encrypting the binary string multiple times, each time using a different encryption method; Generating a software authorization code based on the ciphertext obtained after multiple times of encryption.

2. The method of claim 1, wherein, Each time of encryption comprises: Grouping the string to obtain multiple partial strings; Encrypting a target partial string in the multiple partial strings to obtain an encrypted string; Concatenating the encrypted string with the partial strings that have not been encrypted to obtain the ciphertext.

3. The method of claim 2, wherein, The multiple times of encryption of the binary string comprise: Grouping the binary string to obtain a first partial string and a second partial string; Asymmetrically encrypting the first partial string and concatenating the obtained first encrypted string with the second partial string to obtain first ciphertext; Grouping the first ciphertext to obtain a third partial string and a fourth partial string; Symmetrically encrypting the fourth partial string and concatenating the obtained second encrypted string with the third partial string to obtain second ciphertext.

4. A software license code parsing method, characterized by, The method is executed by a client, and the method comprises: In response to an input software authorization code, decoding ciphertext from the software authorization code; Decrypting the ciphertext multiple times, each time using a different decryption method; Obtaining software authorization information based on the binary string obtained after multiple times of decryption and not containing an encrypted string.

5. The method of claim 4, wherein, Each time of decryption comprises: Grouping the string to obtain multiple partial strings; Decrypting a target partial string in the multiple partial strings to obtain a decrypted string; Concatenating the decrypted string with the partial strings that have not been decrypted.

6. A software license code generating apparatus characterized by comprising: The device is configured in a server, and the device comprises: A string obtaining module for obtaining a binary string corresponding to software authorization information; An encryption module for encrypting the binary string multiple times, each time using a different encryption method; An authorization code generating module for generating a software authorization code based on the ciphertext obtained after multiple times of encryption.

7. A software license code parsing apparatus characterized by comprising: The device is configured in a client, and the device comprises: An authorization code decoding module for decoding ciphertext from an input software authorization code; A decryption module for decrypting the ciphertext multiple times, each time using a different decryption method; An information obtaining module for obtaining software authorization information based on the binary string obtained after multiple times of decryption and not containing an encrypted string.

8. An electronic device, comprising: The electronic device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the software authorization code generation method according to any one of claims 1 to 3, or the computer program being configured to implement the steps of the software authorization code analysis method according to any one of claims 4 to 5.

9. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium has stored thereon a computer program. The computer program, when executed by a processor, implements the steps of the software authorization code generation method according to any one of claims 1 to 3, or the computer program, when executed by a processor, implements the steps of the software authorization code analysis method according to any one of claims 4 to 5.

10. A computer program product, characterised in that, The computer program product comprises a computer program. The computer program, when executed by a processor, implements the steps of the software authorization code generation method according to any one of claims 1 to 3, or the computer program, when executed by a processor, implements the steps of the software authorization code analysis method according to any one of claims 4 to 5.

Citation Information

Patent Citations

  • Login code security management method, alarm mail sending method, and related equipment

    CN112333153A

  • Authorization method, authorization control method and device, equipment and medium

    CN114547558A

  • Data encryption method, data decryption method, data encryption device, data decryption device and data decryption equipment

    CN114826587A

  • Software authorization method, system and equipment and storage medium

    CN116502189A

  • Equipment authorization method and device, storage medium and computer equipment

    CN120145367A