Software authorization method, electronic equipment and storage medium

Verifying device information in an offline environment through RSA signature and public key verification algorithms solves the problem that the device to be authorized cannot be activated, and realizes effective activation and dedicated protection of the software.

CN119128830APending Publication Date: 2024-12-13TIANJIN JINHANG COMP TECH RES INST
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411117998.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In offline scenarios, the device to be authorized cannot activate the software, and the traditional software authorization method is not applicable to offline environments, resulting in the software being copied at will, destroying the interests of the software manufacturer.

Method used

The device information of the authorized device is encrypted through the RSA signature algorithm, the target authorization file is generated, and the files are decrypted and verified through the RSA public key verification algorithm to ensure the consistency of the device information, thereby activating the software in offline state.

Benefits of technology

It realizes accurate verification of device information and effective activation of software in offline environments, avoids leakage of device information and the arbitrary copy of software, and improves the specificity and protection of software.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128830A_ABST
    Figure CN119128830A_ABST
Patent Text Reader

Abstract

The invention provides a software authorization method, electronic equipment and a storage medium. The problem that the to-be-authorized device cannot activate the software in an offline scene is solved. The authorization device encrypts first device information of a to-be-authorized device through an RSA signature algorithm in advance to obtain a target authorization file of to-be-delivered software, and the method comprises the steps that the to-be-authorized device obtains the target authorization file; the to-be-authorized device decrypts the target authorization file through an RSA public key signature verification algorithm to obtain second device information; the to-be-authorized device verifies the first device information and the second device information to obtain a verification result, whether the verification result represents that the first device information and the second device information are consistent or not is judged, if yes, the to-be-authorized device activates the to-be-delivered software, and if not, the to-be-authorized device cannot activate the to-be-delivered software. The method does not need to be based on a network, the applicable verification scene is wider, the to-be-delivered software is prevented from being copied at will, and the specificity of the to-be-delivered software is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software authorization, and in particular to a software authorization method, electronic equipment and storage medium. Background Art

[0002] With the development of computer technology and the enhancement of awareness of intellectual property protection, the protection of software intellectual property rights has become increasingly important. In many scenarios, hardware devices are standardized and software is custom-developed. When the designed software is delivered to the user, the software can be copied into multiple copies and placed on other devices, which greatly damages the interests of the software manufacturer and is not conducive to the sustainable development of software products. Traditional software authorization methods are mostly based on network scenarios and are not applicable to offline software products.

[0003] Therefore, in an offline scenario, the inability of the device to be authorized to activate the software is an existing problem. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a software authorization method, an electronic device and a storage medium to solve the above-mentioned problem and realize the activation of software by the device to be authorized in an offline scenario.

[0005] In a first aspect, an embodiment of the present invention provides a software authorization method, wherein an authorization device encrypts first device information of a device to be authorized by using an RSA signature algorithm in advance to obtain a target authorization file of the software to be delivered, wherein the first device information includes a first CPU serial number, a first hard disk serial number, a first authorization start time, a first authorization end time, and a first authorized manufacturer name, and the method includes:

[0006] The device to be authorized obtains the target authorization file;

[0007] The device to be authorized decrypts the target authorization file through the RSA public key signature verification algorithm to obtain the second device information, where the second device information includes the second CPU serial number, the second hard disk serial number, the second authorization start time, the second authorization end time, and the second authorized manufacturer name;

[0008] The device to be authorized verifies the first device information and the second device information to obtain a verification result. If the verification result indicates that the first device information and the second device information are consistent, the device to be authorized activates the software to be delivered. If the verification result indicates that the first device information and the second device information are inconsistent, the device to be authorized cannot activate the software to be delivered.

[0009] Preferably, the step of the device to be authorized decrypting the target authorization file through an RSA public key signature verification algorithm to obtain the second device information includes:

[0010] The device to be authorized obtains the key generated by the authorization device through a removable storage device; wherein the key includes a public key and a private key;

[0011] The device to be authorized decrypts the target authorization file using the key to obtain the second device information.

[0012] Preferably, the step of the device to be authorized obtaining the authorization file includes:

[0013] The device to be authorized obtains the public key and associated file generated by the authorization device through the removable storage device;

[0014] The device to be authorized verifies the target authorization file through the public key and the associated file to obtain a verification result. If the verification result indicates that the target authorization file is valid, the device to be authorized obtains the target authorization file; if the verification result indicates that the target authorization file is invalid, the device to be authorized refuses to obtain the target authorization file.

[0015] Preferably, the device to be authorized verifies the target authorization file through the public key and the associated file to obtain the verification result, including:

[0016] The device to be authorized calculates the content of the target authorization file by using a hash algorithm to obtain a hash value of the target authorization file;

[0017] The device to be authorized decrypts the associated file using the private key to obtain a hash value of the associated file;

[0018] The device to be authorized compares the target authorization file hash value and the associated file hash value. If the target authorization file hash value and the associated file hash value are the same, the verification result indicates that the target authorization file is valid. If the target authorization file hash value and the associated file hash value are different, the verification result indicates that the target authorization file is invalid.

[0019] Preferably, the method further comprises:

[0020] After the device to be authorized establishes a network connection with the authorization device, the activation result of the software to be delivered is sent to the authorization device.

[0021] Preferably, the authorization device encrypts the first device information of the device to be authorized by using an RSA signature algorithm in advance to obtain a target authorization file of the software to be delivered, including:

[0022] The authorization device obtains the first device information, where the first device information includes a first CPU serial number, a first hard disk serial number, a first authorization start time, a first authorization end time, and a first authorized manufacturer name;

[0023] The authorization device generates the key through an RSA signature algorithm;

[0024] The authorization device encrypts the first device information using the key to obtain the target authorization file.

[0025] Preferably, the authorization device encrypts the first device information by using the key to obtain the target authorization file, comprising:

[0026] The authorization device processes the first device information by using the private key to obtain a hash value of the first device information;

[0027] The authorization device encodes the first device information hash value based on the Base64 encoding rule to obtain the activation code string;

[0028] The authorization device encrypts the activation code string using the public key to obtain a preliminary authorization file;

[0029] The authorization device writes the preliminary authorization file into the license file to generate the target authorization file.

[0030] Preferably, the authorization device generates a license file in advance, and the method further comprises:

[0031] The authorization device calculates the content of the preliminary authorization file by using the hash algorithm to obtain the associated file hash value;

[0032] The authorization device encrypts the associated file hash value using the public key to obtain the associated file.

[0033] The software authorization method provided by the present invention brings the following beneficial effects:

[0034] The present invention provides a software authorization method. The method can ensure that the first device information is not leaked by encrypting the first device information through the RSA signature algorithm, and avoid the situation that after the first device information is leaked, the non-authorized device tampers with its own device information according to the first device information to activate the software to be delivered, and ensure the accuracy of the verification process of the first device information and the second device information by the authorized device. Compared with the prior art, the method encrypts the first device information to generate a target authorization file, and realizes that the authorized device can also verify the first device information and the second device information in an offline state, so that the software to be delivered can authorize the authorized device without being based on the network, and the applicable verification scenarios are more extensive. The method avoids the software to be delivered from being copied at will, and improves the specificity of the software to be delivered.

[0035] In a second aspect, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the beneficial effects of any of the methods described above are achieved, which will not be repeated here.

[0036] In a third aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the beneficial effects of any of the methods described above are achieved, which will not be repeated here.

[0037] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description and the drawings.

[0038] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 A schematic diagram of a software authorization method flow chart provided by an embodiment of the present invention;

[0041] Figure 2 A flowchart of another software authorization method provided by an embodiment of the present invention;

[0042] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] To facilitate understanding of this embodiment, the embodiment of the present invention is described in detail below.

[0045] The embodiment of the present invention provides a software authorization method, in which the authorization device encrypts the first device information of the device to be authorized by using the RSA signature algorithm in advance to obtain a target authorization file of the software to be delivered, wherein the first device information includes the first CPU (Central Processing Unit) serial number, the first hard disk serial number, the first authorization start time, the first authorization end time and the first authorized manufacturer name, such as Figure 1 As shown, Figure 1 A flowchart of a software authorization method provided by an embodiment of the present invention includes the following steps:

[0046] S101, the device to be authorized obtains a target authorization file.

[0047] Specifically, the target authorization file is obtained by encrypting the first device information of the device to be authorized by the above-mentioned authorization device through the RSA signature algorithm, and the first device information is the hardware information of the device to be authorized. The device to be authorized is the device used by the customer of the first authorized manufacturer to obtain the software after the first authorized manufacturer designs the software, and the software is the above-mentioned software to be delivered. The above-mentioned device to be authorized can obtain the target authorization file through a removable storage device in an offline scenario, such as a USB flash drive or a CD.

[0048] As can be seen from the above, the device to be authorized installs the target authorization file offline through the removable storage device, which can prevent the target authorization file from being leaked and strengthen the confidentiality of the target authorization file.

[0049] S102: The device to be authorized decrypts the target authorization file through an RSA public key signature verification algorithm to obtain second device information.

[0050] The second device information includes a second CPU serial number, such as 68-DA-73-A4-89-3D, a second hard disk serial number, such as C2D9BCF9, a second authorization start time, such as 20230101, a second authorization end time, such as 20240101, and a second authorized manufacturer name, such as customer;

[0051] Specifically, the RSA public key signature verification algorithm is an algorithm based on large number decomposition and has high confidentiality. Using the RSA public key signature verification algorithm for decryption can ensure that the second device information obtained by decryption is complete and accurate, and has high security.

[0052] S103, the device to be authorized verifies the first device information and the second device information, obtains a verification result, and determines whether the verification result indicates that the first device information and the second device information are consistent. If so, the device to be authorized activates the software to be delivered. If not, the device to be authorized cannot activate the software to be delivered.

[0053] Specifically, the first device information encrypted by the above-mentioned authorization device is a unique identifier for determining the device to be authorized. It is necessary to compare the first device information and the second device information to determine whether the first device information and the second device information are consistent. If they are consistent, the device to be authorized can activate the software to be delivered, that is, the software to be delivered authorizes the device to be authorized. If they are inconsistent, the device to be authorized cannot activate the software to be delivered, that is, the software to be delivered refuses authorization from the device to be authorized.

[0054] The RSA signature algorithm in this method is an algorithm based on large number decomposition and has high confidentiality. The process of encrypting the first device information through the RSA signature algorithm can ensure that the first device information is not leaked, and avoid the situation where the non-authorized device tampers with its own device information according to the first device information to activate the software to be delivered after the first device information is leaked, and ensure the accuracy of the verification process of the first device information and the second device information by the authorized device. Compared with the prior art, this method encrypts the first device information to generate a target authorization file, and realizes that the authorized device can also verify the first device information and the second device information in an offline state, so that the software to be delivered can authorize the authorized device without being based on the network, and the applicable verification scenarios are more extensive. This method avoids the software to be delivered from being copied at will and improves the specificity of the software to be delivered.

[0055] In one embodiment, the above-mentioned device to be authorized decrypts the target authorization file through the RSA public key signature algorithm to obtain the second device information, including: the device to be authorized obtains the key generated by the authorization device through a removable storage device; wherein the key includes a public key and a private key; the device to be authorized decrypts the target authorization file through the key to obtain the second device information.

[0056] Specifically, in this method, a key is obtained from the authorization device through a removable storage device, such as a USB flash drive or a CD, and the target authorization file is decrypted by the key. After decryption by the key, the authorized device can verify the consistency of the first device information and the second device information.

[0057] This method does not rely on the network and can obtain the key obtained by the RSA public key signature algorithm in the authorized device in an offline scenario. It is applicable to a wider range of scenarios. In addition, since the key is not obtained through network communication, the process is more confidential and can effectively prevent the leakage of the key.

[0058] In one embodiment, the step of the device to be authorized obtaining the authorization file includes: the device to be authorized obtains the public key and associated files generated by the authorization device through a removable storage device; the device to be authorized verifies the target authorization file through the public key and the associated files to obtain a verification result, if the verification result indicates that the target authorization file is valid, the device to be authorized obtains the target authorization file, if the verification result indicates that the target authorization file is invalid, the device to be authorized refuses to obtain the target authorization file.

[0059] Specifically, in this method, the device to be authorized needs to determine whether the authorization file is valid, and needs to verify the target authorization file through the public key and associated files. If the target authorization file is verified to be valid, the device to be authorized will receive the target authorization file. If the target authorization file is verified to be invalid, it means that the target authorization file is not generated by the authorized device based on the device to be authorized.

[0060] This method verifies whether the target authorization file is valid through the public key and the associated file, and determines whether to accept the target authorization file based on the verification result. Since the public key and the associated file are both unique and are obtained by a removable storage device, they are transmitted through network communication, reducing the risk of leakage, so this method has high reliability.

[0061] In one embodiment, the above-mentioned device to be authorized verifies the target authorization file through the public key and the associated file, and the step of obtaining the verification result includes: the device to be authorized calculates the content of the target authorization file through a hash algorithm to obtain the target authorization file hash value; the device to be authorized decrypts the associated file through a private key to obtain the associated file hash value; the device to be authorized compares the target authorization file hash value and the associated file hash value. If the target authorization file hash value and the associated file hash value are the same, the verification result indicates that the target authorization file is valid; if the target authorization file hash value and the associated file hash value are different, the verification result indicates that the target authorization file is invalid.

[0062] Specifically, the content of the target authorization file should be the same as the content of the preliminary authorization file under normal circumstances (not tampered with), and both are the first device information. In this method, the authorization device determines whether the target authorization file hash value and the associated file hash value are consistent. If they are consistent, it means that the target authorization file is obtained by encrypting the first device information by the authorization device, and the target authorization file is valid. If they are inconsistent, it means that the target authorization file is not obtained by encrypting the first device information by the authorization device, and the target authorization file is invalid.

[0063] This method obtains a verification result by comparing the target authorization file hash value with the associated file hash value, and determines whether the target authorization file is valid based on the verification result, with high reliability.

[0064] In one implementation, after the device to be authorized establishes a network connection with the authorizing device, the device sends the activation result of the software to be delivered to the authorizing device.

[0065] Specifically, in order to determine whether the device to be authorized has successfully activated the software to be delivered, after the device to be authorized establishes a network connection with the authorizing device, the device to be authorized will send the activation result of the software to be delivered to the authorizing device, so that the authorizing device that generates the target authorization file can confirm the activation result.

[0066] This method enables designers of the software to be delivered to clearly understand whether the device to be authorized has successfully activated the software to be delivered.

[0067] In one embodiment, the above-mentioned authorization device encrypts the first device information of the device to be authorized by the RSA signature algorithm in advance, and the step of obtaining the target authorization file of the software to be delivered includes: the authorization device obtains the first device information, the first device information includes the first CPU serial number, the first hard disk serial number, the first authorization start time, the first authorization end time and the first authorized manufacturer name; the authorization device generates a key by the RSA signature algorithm; the authorization device encrypts the first device information by the key to obtain the target authorization file.

[0068] Specifically, in this method, the key generated by the authorization device through the RSA signature algorithm can ensure that the target authorization file is complete during the offline transmission process. Because the first device information in the target authorization file is the unique verification identifier of the device to be authorized, the complete first device information is required to enable the software to be delivered to authorize the device to be authorized.

[0069] This method avoids the integrity of the first device information in the target authorization file and avoids the first device information being leaked during offline transmission.

[0070] In one embodiment, the authorization device encrypts the first device information through a key to obtain a target authorization file, comprising: the authorization device processes the first device information through a private key to obtain a hash value of the first device information; the authorization device encodes the hash value of the first device information based on the Base64 encoding rule to obtain an activation code string; the authorization device encrypts the activation code string through a public key to obtain a preliminary authorization file; the authorization device writes the preliminary authorization file into a license file to generate a target authorization file.

[0071] Specifically, in this method, the encrypted preliminary authorization file is written into the license file to obtain the target authorization file, so as to ensure that the target authorization file can be transferred to the device to be authorized in an offline manner through a removable storage device. In order to facilitate the public key pair to encrypt the first device information, the authorization device encodes the obtained first device information hash value based on the Base64 encoding rule to obtain an activation code string to meet the formal requirements of public key encryption.

[0072] This method uses a public key to encrypt the activation code string to obtain a preliminary authorization file, which ensures the integrity of the first device information and avoids the leakage of the first device information during offline transmission, resulting in the inability of the authorized device to normally activate the software to be delivered. The authorized device writes the preliminary authorization file into the license file to generate the target authorization file, which improves the feasibility of offline transmission.

[0073] In one implementation, the authorization device generates a license file in advance, calculates the content of the preliminary authorization file by a hash algorithm, and obtains a hash value of the associated file; the authorization device encrypts the hash value of the associated file by a public key to obtain the associated file.

[0074] Specifically, in this method, the content in the associated file is the same as the content in the preliminary authorization file, and the content in the preliminary authorization file is the same as the content in the target authorization file. When the device to be authorized subsequently determines whether the target authorization file is valid, the first device information in the associated file serves as a reference.

[0075] In this way, the authorization device encrypts the preliminary authorization file with a private key to obtain an associated file, thereby improving the confidentiality of the content of the associated file and the accuracy of the verification result obtained by comparing the first device information when the subsequent authorized device determines whether the target authorization file is valid.

[0076] Based on the above method embodiment, the embodiment of the present invention provides another software authorization method, such as Figure 2 As shown, Figure 2 A flowchart of another software authorization method provided by an embodiment of the present invention, the method comprises the following steps:

[0077] S201, authorizing a device to obtain first device information.

[0078] Among them, the first device information includes the first CPU serial number, such as 68-DA-73-A4-89-3D, the first hard disk serial number, such as C2D9BCF9, the first authorization start time, such as 20230101, the first authorization end time, such as 20240101 and the first authorized manufacturer name, such as customer.

[0079] S202, the authorization device generates a public key and a private key through an RSA signature algorithm.

[0080] For details, please refer to the aforementioned embodiments, and the embodiments of the present invention will not be described in detail here.

[0081] S203: The authorization device processes the first device information using a private key to obtain a hash value of the first device information.

[0082] For details, please refer to the aforementioned embodiments, and the embodiments of the present invention will not be described in detail here.

[0083] S204: The authorization device encodes the first device information hash value based on the Base64 encoding rule to obtain an activation code string.

[0084] For details, please refer to the aforementioned embodiments, and the embodiments of the present invention will not be described in detail here.

[0085] S205, the authorization device encrypts the activation code string using the public key to obtain a preliminary authorization file.

[0086] For details, please refer to the aforementioned embodiments, and the embodiments of the present invention will not be described in detail here.

[0087] S206, the authorization device calculates the content of the preliminary authorization file through a hash algorithm to obtain a hash value of the associated file.

[0088] For details, please refer to the aforementioned embodiments, and the embodiments of the present invention will not be described in detail here.

[0089] S207, the authorization device generates a license file in advance, and the authorization device encrypts the associated file hash value using a public key to obtain the associated file.

[0090] For details, please refer to the aforementioned embodiments, and the embodiments of the present invention will not be described in detail here.

[0091] S208, the authorization device writes the preliminary authorization file into the license file to generate a target authorization file.

[0092] For details, please refer to the aforementioned embodiments, and the embodiments of the present invention will not be described in detail here.

[0093] S209: The device to be authorized obtains the public key and associated files generated by the authorization device through a removable storage device.

[0094] For details, please refer to the aforementioned embodiments, and the embodiments of the present invention will not be described in detail here.

[0095] S210, the device to be authorized verifies the target authorization file through the public key and the associated file to obtain a verification result. If the verification result indicates that the target authorization file is valid, the device to be authorized obtains the target authorization file. If the verification result indicates that the target authorization file is invalid, the device to be authorized refuses to obtain the target authorization file.

[0096] For details, please refer to the aforementioned embodiments, and the embodiments of the present invention will not be described in detail here.

[0097] S211, the device to be authorized decrypts the target authorization file through the RSA public key signature verification algorithm to obtain the second device information.

[0098] The second device information includes a second CPU serial number, a second hard disk serial number, a second authorization start time, a second authorization end time, and a second authorized manufacturer name.

[0099] For details, please refer to the aforementioned embodiments, and the embodiments of the present invention will not be described in detail here.

[0100] S212, the device to be authorized verifies the first device information and the second device information, obtains a verification result, and determines whether the verification result indicates that the first device information and the second device information are consistent. If so, the device to be authorized activates the software to be delivered. If not, the device to be authorized cannot activate the software to be delivered.

[0101] For details, please refer to the aforementioned embodiments, and the embodiments of the present invention will not be described in detail here.

[0102] This method uses the RSA public key signature algorithm to encrypt the first device information, which can ensure that the first device information is not leaked, and avoid the situation where the unauthorized device tampers with its own device information based on the first device information to activate the software to be delivered after the first device information is leaked, thereby ensuring the accuracy of the verification process of the first device information and the second device information by the authorized device. Compared with the prior art, this method encrypts the first device information to generate a target authorization file, and realizes that the authorized device can also verify the first device information and the second device information in an offline state, so that the software to be delivered can authorize the authorized device without being based on the network, and the applicable verification scenarios are more extensive. This method prevents the software to be delivered from being copied at will, and improves the specificity of the software to be delivered.

[0103] An embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned software authorization method.

[0104] See also Figure 3 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine executable instructions that can be executed by the processor 100. The processor 100 executes the machine executable instructions to implement the above software authorization method.

[0105] Further, Figure 3 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 100 , the communication interface 103 and the memory 101 are connected via the bus 102 .

[0106] Among them, the memory 101 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 102 can be an ISA (Industrial Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Enhanced Industry Standard Architecture) bus, etc. The above-mentioned bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0107] The processor 100 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 100. The above processor 100 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the steps of the method of the above embodiment in combination with its hardware.

[0108] This embodiment also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned software authorization method.

[0109] The software authorization method and the computer program product of the electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing program codes, and the instructions included in the program codes can be used to execute the methods described in the previous method embodiments. The specific implementation can refer to the method embodiments, which will not be described in detail here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the previous method embodiments, which will not be described in detail here.

[0110] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances. If the function is implemented in the form of a software function unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium that can be executed by a processor. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0111] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0112] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A software authorization method, characterized in that: The authorization device encrypts the first device information of the device to be authorized by using an RSA signature algorithm in advance to obtain a target authorization file of the software to be delivered, wherein the first device information includes a first CPU serial number, a first hard disk serial number, a first authorization start time, a first authorization end time, and a first authorized manufacturer name. The method includes: The device to be authorized obtains the target authorization file; The device to be authorized decrypts the target authorization file through the RSA public key signature verification algorithm to obtain the second device information, where the second device information includes the second CPU serial number, the second hard disk serial number, the second authorization start time, the second authorization end time, and the second authorized manufacturer name; The device to be authorized verifies the first device information and the second device information to obtain a verification result. If the verification result indicates that the first device information and the second device information are consistent, the device to be authorized activates the software to be delivered. If the verification result indicates that the first device information and the second device information are inconsistent, the device to be authorized cannot activate the software to be delivered.

2. The software authorization method according to claim 1, characterized in that: The step of the device to be authorized decrypting the target authorization file by using an RSA public key signature verification algorithm to obtain the second device information includes: The device to be authorized obtains the key generated by the authorization device through a removable storage device; wherein the key includes a public key and a private key; The device to be authorized decrypts the target authorization file using the key to obtain the second device information.

3. The software authorization method according to claim 1, characterized in that: The step of the device to be authorized obtaining the authorization file includes: The device to be authorized obtains the public key and associated file generated by the authorization device through the removable storage device; The device to be authorized verifies the target authorization file through the public key and the associated file to obtain a verification result. If the verification result indicates that the target authorization file is valid, the device to be authorized obtains the target authorization file; if the verification result indicates that the target authorization file is invalid, the device to be authorized refuses to obtain the target authorization file.

4. The software authorization method according to claim 3, characterized in that: The device to be authorized verifies the target authorization file by using the public key and the associated file to obtain a verification result, including: The device to be authorized calculates the content of the target authorization file by using a hash algorithm to obtain a hash value of the target authorization file; The device to be authorized decrypts the associated file using the private key to obtain a hash value of the associated file; The device to be authorized compares the target authorization file hash value and the associated file hash value. If the target authorization file hash value and the associated file hash value are the same, the verification result indicates that the target authorization file is valid. If the target authorization file hash value and the associated file hash value are different, the verification result indicates that the target authorization file is invalid.

5. The software authorization method according to claim 1, characterized in that: The method further comprises: After the device to be authorized establishes a network connection with the authorization device, the activation result of the software to be delivered is sent to the authorization device.

6. The software authorization method according to claim 1, characterized in that: The step of the authorization device encrypting the first device information of the device to be authorized by using the RSA signature algorithm in advance to obtain the target authorization file of the software to be delivered includes: The authorization device obtains the first device information, where the first device information includes a first CPU serial number, a first hard disk serial number, a first authorization start time, a first authorization end time, and a first authorized manufacturer name; The authorization device generates the key through an RSA signature algorithm; The authorization device encrypts the first device information using the key to obtain the target authorization file.

7. The software authorization method according to claim 6, characterized in that: The step of encrypting the first device information by the authorization device using the key to obtain the target authorization file includes: The authorization device processes the first device information by using the private key to obtain a hash value of the first device information; The authorization device encodes the first device information hash value based on the Base64 encoding rule to obtain the activation code string; The authorization device encrypts the activation code string using the public key to obtain a preliminary authorization file; The authorization device writes the preliminary authorization file into the license file to generate the target authorization file.

8. The software authorization method according to claim 7, characterized in that: The authorization device pre-generates a license file, and the method further includes: The authorization device calculates the content of the preliminary authorization file by using the hash algorithm to obtain the associated file hash value; The authorization device encrypts the associated file hash value using the public key to obtain the associated file.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 8 are executed.

Citation Information

Cited By

  • License authorization method and system suitable for multiple scenes, terminal and medium

    CN120979723A

  • A license authorization method and system suitable for multiple scenarios, a terminal and a medium

    CN120979723B

  • Offline authorization method and device supporting dynamic configuration

    CN121435200A