Software registration serial number encryption generation method
By building the same hash tables H1 and H2 into the software and authorization ends, and using multiple hash operations and hardware feature information to generate complex registration serial numbers, the problems of traditional software serial numbers being easily cracked and authorization management being inflexible are solved, achieving highly secure and convenient authorization management.
Patent Information
- Application Number
- CN202510925430.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-05
- Publication Date
- 2025-10-14
AI Technical Summary
Traditional software serial number generation methods are easily cracked, authorization management is inflexible, and it is difficult to meet the needs of software copyright protection.
The same two hash tables H1 and H2 are built into the software and authorization ends. Multiple hash operations are performed through a randomly generated character encoding mapping table to generate a complex registration serial number, which is then encrypted and decrypted in combination with hardware feature information.
The generated serial number is highly unique and unpredictable, making it much more difficult to crack. It also enables convenient authorization management and dynamic password transmission.
Smart Images

Figure CN120781373A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data security technology, and in particular to a method for generating a software registration serial number through encryption. Background Art
[0002] With the rapid development of the computer software industry, copyright protection for software products is becoming increasingly important. Traditional methods for generating software serial numbers, such as single authorization codes and hardware binding, suffer from vulnerabilities such as susceptibility to cracking and inflexible authorization management. Therefore, developing a secure, efficient, and flexible method for generating encrypted software registration serial numbers is crucial for protecting software copyrights and controlling software authorization management. Summary of the Invention
[0003] The purpose of the present invention is to provide a method for generating a software registration serial number through encryption.
[0004] In order to achieve the above object, the present invention provides the following technical solutions: A method for generating encrypted software registration serial numbers, assuming both the software and the authorization end have built-in identical character encoding mapping tables, uses two hash tables H1 and H2, representing the character values corresponding to the encoding or decoding of each letter in the alphabets A-Z and 0-9 (each table totaling 36 characters). H1 and H2 share the same concept but different mapping contents, and are both randomly generated, exhibiting a high degree of irregularity. The specific steps of the method described in this application are as follows: S1, Encryption generation of serial number: When the software starts, automatically obtain the hard disk serial number, operating system, user name and other computer characteristic information of the computer, encode according to the unified format P0: hard disk serial number 12 characters, operating system 1 character (encoded in dictionary), user name 10 characters, software version number 2 characters (can be in dictionary, one byte represents the major version number, and one represents the minor version number), automatically cut off if the length is too long, fill in the letter "X" if the length is insufficient, arrange according to the fixed position, convert all lowercase letters to uppercase, replace the characters that are not letters or numbers with "X", and thus form a total of 25 characters of hardware characteristic information; then randomly select four characters C1, C2, C3, C4 from the H1 table according to the order number K1 of C1 in the H1 table (the order number is the letter number of the H1 mapping table), calculate M1=K1%4, if M1=0, encode using the H1 table, if M1=1, encode using the reverse order of the H1 table, if M1=2, encode using the H2 table, and if M1=3, encode using the reverse order of the H2 table, and the encoded result is P1; then use C2, C3, C4 to encode in the same way as C1 based on P1 (the result of the previous step), and so on until the last P4 is obtained; then combine C1, C2, C3, C4, P4 to obtain P5, which is a total of 29 characters; then accumulate the order number of each character of P5 to obtain SUM and take the modulus S=SUM%36, and then take the character C corresponding to the order number S, which is the check code; thus, C, C1, C2, C3, C4, P4 are combined to obtain P6, which is a registration serial number of 30 characters after multiple mixed encryption.
[0005] S2, Decryption and restoration of bound hardware characteristic information: When the authorization management software obtains the user's registration serial number, first disassemble it into three parts: check code C, encoding password C1, C2, C3, C4 and ciphertext P; then accumulate the order numbers of the 29 characters in C1, C2, C3, C4, P to obtain SUM and take the modulus S=SUM%36, then take the character C' corresponding to the order number S, if C' is inconsistent with C, the verification fails and no further decryption is needed, if C' is consistent with C, the verification passes and further decryption is needed; according to the order number K4 of C4 in the H1 table, calculate M4=K4%4, when M4=0, decode using the H1 table, when M4=1, decode using the reverse order of the H1 table, when M4=2, decode using the H2 table, and when M4=3, decode using the reverse order of the H2 table, and the decoded result is P3; then use C3, C2, C1 in turn to decode in the same way as C4 based on P3 (the decoded result of the previous step), and so on until the last P0 is obtained; then split and parse P0 according to the encoding format to obtain the hard disk serial number, operating system, user name, software version number and other information for corresponding software authorization processing. Advantageous effects
[0006] 1. High security: By adopting complex encryption algorithms and multiple hash operations, the generated serial number is highly unique and unpredictable, making it much more difficult to crack; 2. High convenience: The serial number ciphertext is dynamically encrypted and all characters are visible. The authorized party can decode it to obtain hardware information, which facilitates serial number transmission and authorization management operations; 3. The dynamic password is transmitted in the same package as the data, without the need to transmit the key separately. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Fig. 1 This is a schematic diagram of visible character mapping encoding shown in the present invention; Fig. 2 The flowchart of software application serial number encryption generation shown in the present invention; Fig. 3 This is a flowchart of the authorization management terminal decrypting and restoring information shown in the present invention. DETAILED DESCRIPTION
[0008] The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0009] See also Figs. 1-3 This application discloses a method for generating encrypted software registration serial numbers. Based on the premise that both the software and the authorization end have built-in identical character encoding mapping tables, two hash tables H1 and H2 represent the character values corresponding to the encoding or decoding of each letter in the alphabets A-Z and 0-9 (each table totaling 36 characters). H1 and H2 share the same concept but different mapping contents. Both are randomly generated and have a high degree of irregularity. The specific steps of the method described in this application are as follows: S1, Encryption generation of serial number: When the software starts, automatically obtain the hard disk serial number, operating system, username and other computer characteristic information of the computer, encode P0 in a unified format, 12 characters for the hard disk serial number, 1 character for the operating system (encoded in a dictionary manner), 10 characters for the username, 2 characters for the software version number (which can be in a dictionary manner, one byte representing the major version number and one representing the minor version number), automatically trim if the length is too long, supplement "X" if the length is not enough, arrange according to the fixed position, convert all lowercase letters to uppercase letters, replace non-alphabet and non-numeric characters with "X", and thus form a total of 25 characters of computer characteristic information; then randomly select four characters C1, C2, C3, C4 from the H1 table according to the order number K1 of C1 in the H1 table (the order number is the letter number of the H1 normal order mapping table), calculate M1 = K1%4, if M1 = 0, encode using the H1 table, if M1 = 1, encode using the reverse order of the H1 table, if M1 = 2, encode using the H2 table, and if M1 = 3, encode using the reverse order of the H2 table, and the encoded result is P1; then use C2, C3, C4 to encode in the same way as C1 based on P1 (the result of the last time), until the final P4 is obtained; then combine C1, C2, C3, C4, P4 to obtain P5, which is a total of 29 characters; then accumulate the order number of each character of P5 to obtain SUM and take the modulus S = SUM%36, and then take the character C corresponding to the order number S, which is the check code; thus, C, C1, C2, C3, C4, P4 are combined to obtain P6, which is a registration serial number of a total of 30 characters after multiple mixed encryption.
[0010] S2, Decryption and restoration of binding information: When the authorization management software obtains the registration serial number of the user, first, it is disassembled into three parts: check code C, encoding password C1, C2, C3, C4 and ciphertext P; then the order numbers of the 29 characters in C1, C2, C3, C4, P are accumulated to obtain SUM and take the modulus S = SUM%36, and then take the character C' corresponding to the order number S, C' is inconsistent with C, then the verification fails, C' is consistent with C, then the verification passes and the subsequent decryption is performed; according to the order number K4 of C4 in the H1 table, calculate M4 = K4%4, when M4 = 0, then decode using the H1 table, when M4 = 1, then decode using the reverse order of the H1 table, when M4 = 2, then decode using the H2 table, and when M4 = 3, then decode using the reverse order of the H2 table, and the decoded result is P3; then use C3, C2, C1 in turn to decode in the same way as C4 based on P3 (the result of the last time), until the final P0 is obtained; then split and parse P0 according to the fixed encoding format, and the hard disk serial number, operating system, username, software version number and other information can be obtained for corresponding software authorization processing.
Claims
1. A method for generating a software registration serial number encryption, characterized in that: Under the premise that both the software and the authorization end have built-in the same two character encoding mapping tables, two hash tables H1 and H2 represent the encoding or decoding rules of each letter A-Z and 0-9 respectively. H1 and H2 have the same concept but different mapping contents. Both are randomly generated and have a high degree of irregularity. The specific steps of the method described in this application are as follows: S1. Encrypted serial number generation: When the software is started, it automatically obtains the computer's hard disk serial number, operating system, user name and other computer feature information, and encodes them according to a unified format P0: hard disk serial number 12 characters, operating system 1 character, user name 10 characters, software version number 2 characters, automatically trims the longer ones, and fills the shorter ones with the letter "X". Arrange them in a fixed position, convert all lowercase letters to uppercase, and replace characters not in the letter encoding table with "X", thus forming a total of 25 characters of hardware feature information; then randomly select four characters from the H1 table Characters C1, C2, C3, C4, according to C1's sequence number K1 in the H1 table, calculate M1=K1%4. When M1=0, use the H1 table for encoding. When M1=1, use the H1 table for encoding in reverse order. When M1=2, use the H2 table for encoding. When M1=3, use the H2 table for encoding in reverse order. The encoded result is P1. Then, based on P1, use C2, C3, and C4 to encode in the same way as C1, until P4 is obtained. Then combine C1, C2, C3, C4, and P4 to obtain P5, which has a total of 29 characters. Then add the sequence number of each character in P5 to obtain SUM and take the modulus S=SUM%36. Then take the character C corresponding to the S sequence number as the check code. Thus, combine C, C1, C2, C3, C4, and P4 to obtain P6, which is the registration serial number with a total of 30 characters after multiple mixed encryption. S2. Decrypt and restore the bound hardware feature information: When the authorization management software obtains the user's registration serial number, it first decomposes it into three parts: the verification code C, the encoded password C1, C2, C3, C4 and the ciphertext P; then the sequence numbers of the 29 characters in C1, C2, C3, C4 and P are accumulated to get SUM and modulo S=SUM%36, and then the sequence number S is taken to correspond to the character C'. If C' is inconsistent with C, the verification fails and no subsequent decryption is required. If C' is consistent with C, the verification passes and subsequent decryption is performed; according to the sequence number K4 of C4 in the H1 table, the Calculate M4=K4%4. When M4=0, use H1 table for decoding. When M4=1, use H1 table in reverse order for decoding. When M4=2, use H2 table for decoding. When M4=3, use H2 table in reverse order for decoding. After decoding, P3 is obtained. Then, based on P3, use C3, C2, and C1 in sequence to perform the same decoding as C4, and finally obtain P0. Then, split and parse P0 according to the encoding format to obtain information such as the hard disk serial number, operating system, user name, software version number, etc., so as to perform corresponding software authorization processing.
Citation Information
Cited By
Locking authentication device and locking authentication method
CN121367620A
