Software encryption and decryption method and device, equipment and storage medium
By exchanging software serial numbers between the terminal and the cloud to generate and decrypt software license information, and replacing specified algorithm parameters, the problem of easy cracking of oil exploration software is solved, the protection level of the software is improved and the difficulty of cracking is increased, and the circulation of pirated software is eliminated.
Patent Information
- Application Number
- CN202211399987.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-09
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2042-11-09
AI Technical Summary
Existing oil exploration software encryption technology is easily cracked, leading to rampant piracy, which seriously damages the interests of development companies and affects the promotion and development of the software.
By exchanging software serial numbers between the terminal and the cloud, generating and decrypting software license information, replacing target parameters in a specified algorithm, and running the software using encrypted parameters, the difficulty of cracking is increased.
This increases the difficulty of cracking the software, making it impossible for unauthorized users to confirm a successful crack, rendering the cracked software useless, and preventing the circulation of pirated software.
Smart Images

Figure CN118013472B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of software protection, in particular to a software encryption and decryption method and device, equipment and storage medium. BACKGROUND
[0002] The present technology is an enhanced encryption technology for petroleum exploration software. As the industry software is increasingly cracked, and the piracy is rampant, the traditional encryption technology using software dogs or binding hardware is easily broken by increasingly sophisticated cracking techniques, resulting in rampant piracy of industry software and serious damage to the interests of the development enterprises. With the increasingly widespread application of petroleum exploration software systems, some cracked software has been found to have entered circulation, which has a negative impact on the promotion and development of software.
[0003] Petroleum seismic exploration software has penetrated every aspect of exploration construction. The core algorithm is the core competitiveness of the software and the key to making the software stand out from similar software. It often requires a lot of manpower, material and time for research and development, and has high value, which is very attractive to users of cracked software.
[0004] The conventional software authorization method is divided into soft encryption and hard encryption. The characteristic string is associated with the dog or other hardware devices, and the authorization is performed by checking the characteristic string during software running. The position of the characteristic string in the program is fixed and known, and it can be easily located by the method of disassembly. Then the software is cracked by bypassing the method of checking the characteristic string. It is relatively easy. After the software is cracked by this method, all algorithms of the software can be used normally, and the rights of the software cannot be protected.
[0005] As the industry software is increasingly cracked, the conventional encryption technology using software dogs or binding hardware is easily broken by increasingly sophisticated cracking techniques, resulting in rampant piracy of industry software and serious damage to the interests of the development enterprises. With the increasingly widespread application of petroleum exploration software systems, some cracked software has been found to have entered circulation, which has a negative impact on the promotion and development of software.
[0006] In order to strengthen the protection of the rights of the software, how to enhance the software authorization protection level and the difficulty of reverse cracking has become a problem that needs to be solved for petroleum exploration software and other industry software. SUMMARY
[0007] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present disclosure provide a software encryption and decryption method and device, equipment and storage medium.
[0008] In a first aspect, embodiments of the present disclosure provide a software encryption and decryption method applied to a terminal, the method comprising:
[0009] In response to the received software activation request, extracting the software serial number in the software activation request and sending it to the cloud;
[0010] Receiving software license information returned by the cloud according to the software serial number;
[0011] In response to the request for calling a specified algorithm during software running process, decrypting the software license information and extracting the encrypted target parameter from the software license information;
[0012] Decrypting the encrypted target parameter to obtain the target parameter of the specified algorithm;
[0013] Replacing the preset pseudo parameter in the specified algorithm with the target parameter of the specified algorithm, and using the specified algorithm with the replaced parameter for the software running process.
[0014] In a possible implementation, the target parameter is a fuzzing parameter, and after the encrypted target parameter is decrypted to obtain the target parameter of the specified algorithm, the method further comprises:
[0015] De-fuzzing the target parameter, and using the de-fuzzed target parameter to replace the preset pseudo parameter in the specified algorithm.
[0016] In a possible implementation, the method further comprises:
[0017] In the case of directly calling the specified algorithm during the software running process without skipping the software activation step, using the specified algorithm with the preset pseudo parameter for the software running process.
[0018] In a second aspect, embodiments of the present disclosure provide a software encryption and decryption method applied to a cloud, the method comprising:
[0019] Receiving a software serial number, determining a target software matching the software serial number;
[0020] Creating software license information of the target software and sending it to the terminal.
[0021] In a possible implementation, the creating of the software license information of the target software comprises:
[0022] For each specified algorithm in the target software, determining the target parameter of the current algorithm;
[0023] Encrypting the determined target parameter to obtain an encrypted target parameter;
[0024] The encrypted target parameters are associated with the name of the target software, and the associated information is digitally signed to generate the software license information of the target software.
[0025] In one possible implementation, before encrypting the determined target parameters, the method further includes:
[0026] The names and values of the determined target parameters are fuzzed to obtain fuzzed target parameters, which are then encrypted.
[0027] In one possible implementation, the target parameters of the current algorithm include at least one constant parameter related to the calculation result.
[0028] Thirdly, embodiments of this disclosure provide a software encryption / decryption apparatus, comprising:
[0029] The extraction module is used to extract the software serial number from the received software activation request and send it to the cloud in response to the request.
[0030] The receiving module is used to receive software license information returned by the cloud based on the software serial number;
[0031] The first decryption module is used to decrypt the software license information in response to a request to call a specified algorithm during software operation, and to extract the encrypted target parameters from the software license information.
[0032] The second decryption module is used to decrypt the encrypted target parameters to obtain the target parameters of the specified algorithm;
[0033] The replacement module is used to replace the preset pseudo-parameters in the specified algorithm with the target parameters of the specified algorithm, and to use the specified algorithm with the replaced parameters in the software running process.
[0034] Fourthly, embodiments of this disclosure provide a software encryption / decryption apparatus, comprising:
[0035] The determination module is used to receive the software serial number and determine the target software that matches the software serial number.
[0036] The module is used to create the software license information for the target software and send it to the terminal.
[0037] Fifthly, embodiments of this disclosure provide an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0038] Memory, used to store computer programs;
[0039] The processor is used for realizing the software encryption and decryption method when executing the program stored on the memory.
[0040] In a fourth aspect, the embodiments of the present disclosure provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the software encryption and decryption method.
[0041] Compared with the prior art, the above technical solution provided by the embodiments of the present disclosure has at least part or all of the following advantages:
[0042] The software encryption and decryption method provided by the embodiments of the present disclosure, the present disclosure relates to a software encryption and decryption method and device, equipment and storage medium, the method comprises the following steps: in response to the received software activation request, extracting the software serial number in the software activation request, and sending to the cloud; receiving the software license information returned by the cloud according to the software serial number; in response to the request of calling the specified algorithm in the software running process, decrypting the software license information, and extracting the encrypted target parameter from the software license information; decrypting the encrypted target parameter to obtain the target parameter of the specified algorithm; replacing the preset pseudo parameter in the specified algorithm with the target parameter of the specified algorithm, and using the specified algorithm after the replacement parameter in the software running process, by providing an enhanced software encryption technology, the key core algorithm is protected, the difficulty of software cracking is increased, and the protected algorithm makes the software cracked by the conventional method to obtain an error result, so that the illegal user is uncertain whether the software is cracked successfully, the software cracked by the conventional method loses the use value, thereby eliminating the possibility of circulation of the software cracked by the conventional method. BRIEF DESCRIPTION OF DRAWINGS
[0043] The accompanying drawings incorporated in the specification and forming a part thereof illustrate embodiments consistent with the present disclosure and together with the description serve to explain the principles of the present disclosure.
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the accompanying drawings needed to be used in the embodiments or related description will be briefly introduced. Obviously, those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0045] Figure 1 The software encryption and decryption method flowchart according to the embodiments of the present disclosure is schematically shown;
[0046] Figure 2 The software license file according to the embodiments of the present disclosure is schematically shown;
[0047] Figure 3Fig. 2 schematically shows a flowchart of a software encryption and decryption method according to another embodiment of the present disclosure;
[0048] Figure 4 Fig. 3 schematically shows a structural block diagram of a software encryption and decryption device according to an embodiment of the present disclosure;
[0049] Figure 5 Fig. 4 schematically shows a structural block diagram of a software encryption and decryption device according to another embodiment of the present disclosure; and
[0050] Figure 6 Fig. 5 schematically shows a structural block diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0051] In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present disclosure.
[0052] Referring to Figure 1 The embodiments of the present disclosure provide a software encryption and decryption method applied to a terminal, and the method comprises the following steps.
[0053] S11, in response to a received software activation request, extracting a software serial number in the software activation request and sending to a cloud end;
[0054] S12, receiving software license information returned by the cloud end according to the software serial number;
[0055] S13, in response to a request of calling a specified algorithm in a software running process, decrypting the software license information and extracting encrypted target parameters from the software license information;
[0056] In the present embodiment, the specified algorithm is a high-value algorithm that needs to be protected in the software, such as an obstacle avoidance algorithm in land acquisition design, a flight path planning algorithm in offshore design, a ray tracing algorithm in forward modeling illumination, a static correction amount calculation algorithm in static correction software, etc.
[0057] S14, decrypting the encrypted target parameters to obtain target parameters of the specified algorithm;
[0058] In the embodiment, the target parameter is one or more constant parameters in the specified algorithm selected according to specific characteristics of the specified algorithm, the structure of the target parameter is the name and value of the target parameter, the name is a string, and the value can be an integer, a floating-point constant value or an array index, and the specific type of the value is converted by a conversion function set by the algorithm as required.
[0059] S15, replacing the target parameter of the specified algorithm with a preset pseudo parameter in the specified algorithm, and using the specified algorithm after the replacement for software running.
[0060] In some embodiments, the target parameter is a fuzzing parameter, and after the encrypted target parameter is decrypted to obtain the target parameter of the specified algorithm, the method further comprises:
[0061] The target parameter is de-fuzzed, and the de-fuzzed target parameter is used to replace the preset pseudo parameter in the specified algorithm.
[0062] In some embodiments, the method further comprises:
[0063] In the case of skipping the software activation step and directly calling the specified algorithm in the software running process, the specified algorithm with the preset pseudo parameter is used in the software running process, wherein the preset pseudo parameter is an error parameter value preset in the software.
[0064] In actual application, when the software is not normally activated, the preset pseudo parameter cannot be replaced by the correct parameter, so that an error result is calculated.
[0065] Referring to Figure 2 , after the software is normally activated, the software license file obtained by the application program, the license file contains software feature values (indicating the type of software), encrypted custom fields (key parameter information), digital signatures and the like (function authorization and decryption parameters).
[0066] When the user uses the software to calculate, the protected high-value algorithm will obtain the key encrypted custom field from the license file, and the preset pseudo parameter of the algorithm is replaced after the encrypted custom field is decrypted and restored, so that the correct calculation result is returned. If an illegal user uses the software, the illegal user cannot obtain the license file because the illegal user bypasses the normal activation program, and cannot obtain the encrypted custom field from the license file for replacement when using the high-value algorithm to calculate, and thus an error result is obtained by using the preset pseudo parameter.
[0067] Referring to Figure 3 , the embodiment of the disclosure provides a software encryption and decryption method applied to the cloud, and the method comprises the following steps.
[0068] S31, Receive software serial number, determine target software that matches software serial number;
[0069] S32, create the software license information for the target software and send it to the terminal.
[0070] In this embodiment, step S22, the software license information for creating the target software includes:
[0071] For each specified algorithm in the target software, determine the target parameters of the current algorithm, wherein the target parameters include at least one constant parameter related to the calculation result;
[0072] The determined target parameters are encrypted to obtain the encrypted target parameters;
[0073] The encrypted target parameters are associated with the name of the target software, and the associated information is digitally signed to generate the software license information of the target software.
[0074] In this embodiment, the determined target parameters are encrypted, including:
[0075] The parameter name and value of the target parameter are encrypted as a whole. The parameter name and value are treated as a single string. For example, pi, which is commonly used in scientific calculations, can be represented as "PI = 3.1415926". To further increase the deception and make it more difficult for unauthorized users to discover the physical meaning of the parameter during disassembly, the parameter name is replaced with a meaningless combination of letters, and the value is multiplied by any multiple, such as "ABC = 9.4247778". The parameter string "ABC = 9.4247778" is then encrypted using a key to form an encrypted custom field.
[0076] In another embodiment, step S22, the software license information for creating the target software includes:
[0077] Based on the pre-defined association between software feature values and encrypted custom fields, the encrypted custom fields corresponding to the software feature values of the target software are obtained from the pre-defined database. License content is generated based on the encrypted custom fields, and the license content is digitally signed to generate the software license information of the target software. The encrypted custom fields are encrypted target parameters pre-stored in the pre-defined database, and the software feature values can be the software name.
[0078] In some embodiments, before encrypting the determined target parameters, the method further includes:
[0079] The names and values of the determined target parameters are fuzzed to obtain fuzzed target parameters, which are then encrypted.
[0080] The following is a two-dimensional model forward software in a seismic acquisition engineering software system as an example to explain the software encryption and decryption method of the embodiment:
[0081] (1) Select the key algorithm that needs to be protected.
[0082] For the target software, select the key algorithm with high technical content in the software as the specified algorithm. In the two-dimensional model forward software, the key ray tracing algorithm is selected for protection.
[0083] (2) Analyze the specified algorithm and select the key parameter.
[0084] Select the more important parameter that is frequently used in the algorithm, and the change of this parameter will cause the calculation result to appear a large amplitude anomaly, which plays a better anti-cracking role. After analysis, it is found that the ray tracing algorithm frequently uses a basic constant-pi as the target parameter to be encrypted.
[0085] (3) Custom parameter field.
[0086] Define a custom field "ABC=9.4247778" about the target parameter pi. In order to increase the confusion, the expression of pi is processed in a fuzzy manner, the parameter name is set to a meaningless group of letters, and the value of the parameter is operated, here pi is multiplied by 3. At the same time, a set of incorrect pi values "-1" are pre-set in the software program as the preset pseudo parameter.
[0087] (4) Associate the custom field with the software feature value.
[0088] Store the custom field information in the database of the authorization server, and associate the custom field with the corresponding software feature value. For this embodiment, the "ABC=9.4247778" custom field is associated with the two-dimensional model forward software feature value "KLMODEL2D".
[0089] (5) Add custom field in license.
[0090] After the user activates the software with the correct activation code, the server issues an authorization license to the user terminal, which records software feature value KLMODEL2D, license function, license duration, and other authorization information. Add the custom field containing the key parameter to the license content, and use the digital signature algorithm to sign and authenticate the information in the license.
[0091] (6) Software activation.
[0092] The user terminal connects to the authorization server through the Internet, submits a correct software serial number, and the authorization server returns a license containing a custom field and saves it in the trusted area of the computer. An illegal user who bypasses the activation will not be able to obtain the correct license file and thus will not be able to obtain the correct parameter information.
[0093] (7) Parameter replacement.
[0094] During the operation of the ray tracing algorithm, the custom field is obtained from the license and decrypted by the key to restore "ABC = 9.4247778", and then the correct value of pi "3.1415926" is obtained after the value is processed according to the rule and divided by 3. An illegal user who bypasses the authorization check will obtain an incorrect value of pi "-1", and the final result of the ray tracing algorithm will be completely incorrect.
[0095] The software encryption and decryption method of the present disclosure is suitable for industry software that needs to protect high-value algorithms. The method encrypts some key parameters, and users who do not pass the verification will obtain incorrect parameters, resulting in incorrect software calculation results, making the software lose its value. The method sends key parameters through the Internet, which is not easy to crack, and provides more secure protection for software as a secondary supplement to regular encryption.
[0096] The software encryption and decryption method of the present disclosure is suitable for industry software that needs to protect high-value algorithms. The method encrypts some key parameters, and users who do not pass the verification will obtain incorrect parameters, resulting in incorrect software calculation results, making the software lose its value. The method sends key parameters through the Internet, which is not easy to crack, and provides more secure protection for software as a secondary supplement to regular encryption.
[0097] Referring to Figure 4 The embodiment of the present disclosure provides a software encryption and decryption device, which comprises:
[0098] The extraction module 41 is configured to extract the software serial number in the software activation request in response to the received software activation request and send the software serial number to the cloud;
[0099] The receiving module 42 is configured to receive software license information returned by the cloud according to the software serial number;
[0100] The first decryption module 43 is configured to decrypt the software license information and extract the encrypted target parameter from the software license information in response to a request for calling a specified algorithm during software operation;
[0101] The second decryption module 44 is configured to decrypt the encrypted target parameter to obtain the target parameter of the specified algorithm.
[0102] The replacement module 45 is configured to replace the preset dummy parameter in the specified algorithm with the target parameter of the specified algorithm, and use the specified algorithm after the parameter replacement in a software running process.
[0103] The functions and effects of the units in the above device are specifically described in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0104] For the device embodiment, since it basically corresponds to the method embodiment, the related parts can be referred to the part of the method embodiment. The device embodiments described above are only illustrative, and the units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present application according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0105] In the above embodiments, any multiple of the extraction module 41, the receiving module 42, the first decryption module 43, the second decryption module 44 and the replacement module 45 can be combined in one module, or any one of the modules can be split into multiple modules. Alternatively, at least part of the function of one or more of the modules can be combined with at least part of the function of the other modules, and implemented in one module. At least one of the extraction module 41, the receiving module 42, the first decryption module 43, the second decryption module 44 and the replacement module 45 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on substrate, a system on package, an application specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging circuits, etc. hardware or firmware, or any one of software, hardware and firmware or any appropriate combination of several of them. Alternatively, at least one of the extraction module 41, the receiving module 42, the first decryption module 43, the second decryption module 44 and the replacement module 45 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0106] Referring to Figure 5 , the embodiments of the present disclosure provide a software encryption and decryption device, comprising:
[0107] The determination module 51 is configured to receive a software serial number and determine a target software matching the software serial number.
[0108] The creating module 52 is configured to create the software license information of the target software and send the software license information to the terminal.
[0109] The functions and effects of the units in the device are described in detail in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0110] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can be referred to the part of the method embodiment. The device embodiments described above are only illustrative, and the units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e., they can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present application according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0111] In the above embodiments, any of the determining module 51 and the creating module 52 can be combined in one module, or any of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of the modules can be combined with at least part of the functions of other modules, and implemented in one module. At least one of the determining module 51 and the creating module 52 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on substrate, a system on package, an application specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging circuits, etc. hardware or firmware, or any one of software, hardware and firmware or any appropriate combination of several of them. Alternatively, at least one of the determining module 51 and the creating module 52 can be at least partially implemented as a computer program module that can perform corresponding functions when the computer program module is run.
[0112] The software encryption and decryption device of the present disclosure bypasses the illegal cracking software that calculates the wrong result by encrypting the key parameters in the high-value algorithm, loses the use value, and is very suitable for software products with many high-value algorithms in industries such as oil exploration. The encryption method is secret, and the wrong result obtained by using the cracking software confuses illegal users, so that they are not sure whether the software is cracked successfully or the algorithm of the software itself is wrong, and the key is used to encrypt the key parameters, which greatly increases the difficulty and cost of cracking the software. After applying this method, the circulation and use of cracking software are eliminated.
[0113] Reference Figure 6As shown, the electronic device provided by the embodiment of the present disclosure comprises a processor 1110, a communication interface 1120, a memory 1130 and a communication bus 1140, wherein the processor 1110, the communication interface 1120 and the memory 1130 complete mutual communication through the communication bus 1140;
[0114] The memory 1130 is used for storing a computer program.
[0115] The processor 1110 is used for executing the program stored in the memory 1130, and realizes the software encryption and decryption method as shown below:
[0116] In response to the received software activation request, the software serial number in the software activation request is extracted and sent to the cloud.
[0117] The software license information returned by the cloud according to the software serial number is received.
[0118] In response to the request of the software running process calling the specified algorithm, the software license information is decrypted, and the encrypted target parameter is extracted from the software license information.
[0119] The encrypted target parameter is decrypted to obtain the target parameter of the specified algorithm.
[0120] The target parameter of the specified algorithm is used to replace the preset pseudo parameter in the specified algorithm, and the specified algorithm after the replacement parameter is used for the software running process.
[0121] The communication bus 1140 described above can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
[0122] The communication interface 1120 is used for communication between the above-mentioned electronic device and other devices.
[0123] The memory 1130 can include a random access memory (RAM) and can also include a non-volatile memory, such as at least one disk memory. Optionally, the memory 1130 can also be at least one storage device located away from the aforementioned processor 1110.
[0124] The processor 1110 described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0125] Embodiments of the present disclosure further provide a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the software encryption and decryption method described above.
[0126] The computer readable storage medium can be included in the device / apparatus described in the above embodiments; or can exist separately and not be assembled into the device / apparatus. The computer readable storage medium carries one or more programs, and when the one or more programs are executed, the software encryption and decryption method according to the embodiments of the present disclosure is implemented.
[0127] According to embodiments of the present disclosure, the computer readable storage medium can be a non-volatile computer readable storage medium, which can include but is not limited to: a portable computer diskette, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), a portable compact disc read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination of the foregoing. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program, which can be used by or in connection with an instruction execution system, apparatus or device.
[0128] It has to be noted that, in the present document, relational terms are intended only to convey a possible relationship between elements or
[0129] The above description is merely that of the specific embodiments of the present disclosure and therefore is not intended to limit the present disclosure. Various modifications made to the embodiments of the present disclosure will be apparent to those skilled in the art to which the present disclosure pertains, and such modifications are not to be interpreted within the scope or spirit of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments shown herein but will be construed to include all the modifications, equivalents, and alternatives falling within the scope and spirit of the present disclosure.
Claims
1. A software encryption and decryption method, characterized by, The method applied to a terminal comprises: In response to a received software activation request, extracting a software serial number in the software activation request and sending it to the cloud; Receiving software license information returned by the cloud according to the software serial number; In response to a request for calling a specified algorithm in a software running process, decrypting the software license information and extracting encrypted target parameters from the software license information; Decrypting the encrypted target parameters to obtain the target parameters of the specified algorithm; Replacing the target parameters of the specified algorithm with preset dummy parameters in the specified algorithm, and using the specified algorithm with the replaced parameters in the software running process; The target parameters are fuzzed parameters, and after the encrypted target parameters are decrypted to obtain the target parameters of the specified algorithm, the method further comprises: De-fuzzing the target parameters and using the de-fuzzed target parameters to replace the preset dummy parameters in the specified algorithm; The method further comprises: In the case of skipping the software activation step and directly calling the specified algorithm in the software running process, using the specified algorithm with the preset dummy parameters in the software running process.
2. A software encryption and decryption method, characterized by, The method applied to the cloud comprises: Receiving a software serial number, determining a target software matched with the software serial number; Creating software license information of the target software and sending it to the terminal; The creation of the software license information of the target software comprises: For each specified algorithm in the target software, determining the target parameters of the current algorithm; Encrypting the determined target parameters to obtain encrypted target parameters; Associating the encrypted target parameters with the name of the target software, and digitally signing the associated information to generate the software license information of the target software; Before the encryption of the determined target parameters, the method further comprises: Fuzzing the name and value of the determined target parameters to obtain fuzzed target parameters, so as to encrypt the fuzzed target parameters.
3. The method of claim 2, wherein, The target parameters include at least one constant parameter related to a calculation result.
4. A software encryption and decryption apparatus characterized by comprising: Comprise: An extraction module for extracting a software serial number in a received software activation request and sending it to the cloud; A receiving module for receiving software license information returned by the cloud according to the software serial number; A first decryption module for decrypting the software license information and extracting encrypted target parameters from the software license information in response to a request for calling a specified algorithm in a software running process; The target parameters are fuzzed parameters; A second decryption module for decrypting the encrypted target parameters to obtain the target parameters of the specified algorithm; A replacement module for de-fuzzing the target parameters, replacing the preset dummy parameters in the specified algorithm with the de-fuzzed target parameters, and using the specified algorithm with the replaced parameters in the software running process; in the case of skipping the software activation step and directly calling the specified algorithm in the software running process, using the specified algorithm with the preset dummy parameters in the software running process.
5. A software encryption and decryption apparatus characterized by comprising: Comprise: A determination module for receiving a software serial number and determining a target software matched with the software serial number; The creating module is used for determining target parameters of a current algorithm for each specified algorithm in the target software, performing fuzzy processing on the name and assignment of the determined target parameters to obtain fuzzy target parameters, performing encryption processing on the fuzzy target parameters to obtain encrypted target parameters, associating the encrypted target parameters with the name of the target software, performing digital signature on the associated information, generating software license information of the target software, and sending the software license information to the terminal.
6. An electronic device, comprising: The device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used for storing a computer program; The processor is used for executing the program stored in the memory to realize the software encryption and decryption method in any one of claims 1-3.
7. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the software encryption and decryption method in any one of claims 1-3.
Citation Information
Patent Citations
Electronic License Management
CN105760716A
Accessing a secured software application
CN106575334A