Program authorization method, system and equipment based on confusion encryption program key and medium

The random number generation algorithm and dynamic string obfuscation technology combined with the packet cipher algorithm are used to process the program key, which solves the problem of non-random and easy to crack in the key generation method, and realizes high security and flexible management of the key.

CN120498636APending Publication Date: 2025-08-15INSPUR GENERSOFT CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510691676.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In the prior art, the program key generation method lacks randomness and flexibility, is easily cracked by attackers, and the key management is complex and cannot meet the needs of high security scenarios.

Method used

The random number generation algorithm is used to generate the initial key, and the dynamic string obfuscation technology and the packet cipher algorithm are combined for obfuscation and encryption processing, and the run-time verification mode of the decryption module and the verification module is established, and the security of the key is ensured through hash checksum integrity verification.

Benefits of technology

It improves the randomness and dynamicity of keys, enhances the security of keys during storage and transmission, ensures that only legal keys can authorize the operation of programs, and effectively prevents the operation of illegal programs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120498636A_ABST
    Figure CN120498636A_ABST
Patent Text Reader

Abstract

The invention provides a program authorization method, system and device based on a confusion encryption program key and a medium, and belongs to the technical field of information security. An initial program key is generated through a random number generation algorithm; performing confusion processing on the initial program key by adopting a dynamic character string confusion technology to obtain a program key; performing encryption processing on the program key by using a block cipher algorithm; establishing a runtime verification mode comprising a decryption module and a verification module; and obtaining the decrypted original key based on the decryption module, executing feature verification and integrity verification of the original key by the verification module, and authorizing the program to run when a verification result meets a predefined security policy. And confusion and encryption processing is performed on the program key through a confusion technology and an encryption algorithm, so that the security of the program key is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of information security technology, and in particular relates to a program authorization method, system, device and medium based on obfuscated encryption program keys. Background Art

[0002] Among the many technologies that guarantee information security, cryptography is a core and critical technology. Data encryption can improve data transmission security and ensure the integrity of transmitted data. In data encryption systems, keys control the encryption and decryption processes. The entire security of an encryption system is based on keys, not algorithms. Therefore, the security of program keys is directly related to the security of the entire application.

[0003] In related technologies, key generation methods often use fixed rules or pseudo-random numbers. The generated keys lack randomness and have a certain degree of predictability. For example, some systems generate keys based solely on simple timestamps or fixed seed values. Attackers can deduce the keys by analyzing the generation rules or obtaining the seed values, resulting in a high risk of key leakage and failing to meet the requirements of high-security scenarios. Some applications use hard-coded or static storage methods to manage keys, which lacks flexibility. Once a key is leaked, the entire application needs to be redeployed. The key generation methods of some applications are not random enough, or the encryption measures are not strong enough, making them easily cracked by specialized attack tools. As the scale of applications expands, key management becomes increasingly complex, and there is a lack of effective key update and rotation mechanisms. Keys cannot be adequately protected, and are easily stolen and cracked during storage and transmission, posing a security risk to the system. Summary of the Invention

[0004] The present invention provides a program authorization method based on obfuscating encrypted program keys, which obfuscates and encrypts the program keys through obfuscation technology and encryption algorithms, thereby improving the security of the program keys.

[0005] Methods include: Step S101: Generate an initial program key using a random number generation algorithm; Step S102: Obfuscate the initial program key using dynamic string obfuscation technology to obtain a program key; Step S103: Encrypting the program key using a block cipher algorithm; Step S104: establishing a runtime verification mode including a decryption module and a verification module; The decryption module is configured with a decryption algorithm and key parameters that match the encryption process, and the verification module includes a hash check mechanism and integrity verification logic; Step S105: The decrypted original key is obtained based on the decryption module, and the verification module performs the original key feature verification and integrity verification. When the verification result meets the predefined security policy, the program is authorized to run.

[0006] It should be further noted that, in step S101, the random number generation algorithm includes but is not limited to a pseudo-random number generator, a cryptographically secure pseudo-random number generator, or a quantum random number generator; In step S102, the obfuscation processing method includes at least one of character reorganization, encoding conversion and mathematical operation nesting to generate a protection key with obfuscation characteristics.

[0007] It should be further explained that step S102 specifically includes: Generate a first basic key by obtaining a dynamic time factor from a device clock signal and combining it with a true random number generation algorithm; Configure a character mapping rule to perform position transformation processing on the first basic key to generate a second basic key; Cross-combining the first basic key and the second basic key in sections according to a preset ratio to form a composite program key; Performing asymmetric conversion on the composite program key using character set extension encoding rules; After the conversion, the string values are reorganized by bit operations using algebraic transformation formulas; After reorganization, the key fragments are dynamically shifted based on the sliding window mechanism to generate an obfuscated key with a multi-layer nested structure, the output of which contains at least three interrelated sub-key modules.

[0008] It should be further noted that the obfuscated key is initially encrypted using a stream cipher algorithm to generate intermediate encrypted data; The intermediate encrypted data is encrypted twice using a block cipher algorithm, where: The block cipher working mode in the block cipher algorithm adopts a dynamic feedback mechanism, and integrates salt value confusion parameters in the key expansion process, and finally outputs a program key with double encryption characteristics.

[0009] It should be further explained that step S102 specifically includes: generating a first protection key based on the current random number generation timestamp, defining a hash value of the program key, generating a second protection key based on the hash value, and combining the first protection key and the second protection key to obtain an obfuscated string; The first protection key is generated based on the current random number generation timestamp, specifically including: generating a first protection subkey of the first protection key based on the current random number generation timestamp; Obtaining a second protection subkey of the first protection key by performing a hash operation on the first protection subkey; The first protection key is obtained by concatenating the first protection subkey of the first protection key and the second protection subkey of the first protection key.

[0010] It should be further explained that generating the second protection key based on the hash value includes: Performing a hash calculation on the program key to obtain a hash value corresponding to the program key, and using the hash value as the third protection subkey of the second protection key; Determining the first protection subkey of the first protection key as the second protection subkey of the second protection key, and concatenating the third protection subkey of the second protection key and the second protection subkey of the second protection key to obtain a second protection key; The first protection key and the second protection key are combined to obtain an obfuscated character string, specifically comprising: performing a segmented permutation operation on a first protection subkey of the first protection key and a third protection subkey of the second protection key with preset characters to obtain a processed first protection key and a processed second protection key, and combining the processed first protection key and the processed second protection key to obtain the obfuscated character string.

[0011] It should be further noted that the verification module generates verification parameters based on the hardware fingerprint, geographic location coordinates and system timestamp collected in real time; Perform joint verification on the decrypted original key and the verification parameter; When the verification result meets the security constraints, the authorization program runs.

[0012] This application also provides a program authorization system based on obfuscated encrypted program keys, the system comprising: A key generation module, configured to generate an initial program key using a random number generation algorithm; An obfuscation processing module is used to obfuscate the initial program key using dynamic string obfuscation technology to obtain a program key; An encryption processing module, used for encrypting the program key using a block cipher algorithm; A verification processing module, used to establish a runtime verification mode including a decryption module and a verification module; The decryption module is configured with a decryption algorithm and key parameters that match the encryption process, and the verification module includes a hash check mechanism and integrity verification logic; The authorization running module is used to use the decryption module to obtain the decrypted original key. The verification module performs the original key feature verification and integrity verification. When the verification result meets the predefined security policy, the program is authorized to run.

[0013] According to another embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the program authorization method based on obfuscated encryption program keys when executing the program.

[0014] According to another embodiment of the present application, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the program authorization method based on obfuscated encryption program keys are implemented.

[0015] It can be seen from the above technical solutions that the present invention has the following advantages: The program authorization method based on obfuscated encryption program keys provided in this application generates a dynamic time factor by obtaining the device clock signal, combines it with a true random number generation algorithm to generate a first basic key, and utilizes the real-time changes of the clock signal and the unpredictability of true random numbers to generate a dynamic and random key. This improves the security of key generation and meets the requirements for key randomness and dynamics in high-security scenarios. It uses dynamic string obfuscation technology and comprehensively utilizes various methods such as character reorganization, encoding conversion, and nested mathematical operations to obfuscate the initial program key, changing the original form of the key. This improves the security of the key during storage and transmission.

[0016] A runtime verification model is established, encompassing both a decryption module and a verification module. The decryption module is configured with algorithms and parameters that match the encryption module to ensure accurate decryption. The verification module verifies the key from multiple dimensions using a hash check mechanism and integrity verification logic, and determines whether to authorize the program to run based on predefined security policies. Only legitimate keys can enable the program to run, effectively ensuring system security. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for the description. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 A flowchart of a program authorization method based on obfuscated encrypted program keys; Figure 2 Flowchart of an embodiment of a program authorization method based on obfuscated encrypted program keys; Figure 3 A flow chart of another embodiment of a program authorization method based on obfuscated encrypted program keys; Figure 4 Schematic diagram of an electronic device. DETAILED DESCRIPTION

[0019] The program authorization method based on obfuscated encryption program keys provided by the application obfuscates and encrypts the program keys through obfuscation techniques and encryption algorithms, thereby improving the security of the program keys. The program authorization method based on obfuscated encryption program keys involved in the application will be described in detail below. For the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are provided to provide a thorough understanding of the embodiments of the application. However, it should be clear to those skilled in the art that the application can also be implemented in other embodiments without these specific details.

[0020] It should be understood that when used in this specification, the term "comprising" indicates the presence of the described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their collections. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0021] The phrases "one embodiment" or "some embodiments" described in this application mean that the specific features, structures, or characteristics described in the embodiment are included in one or more embodiments of the application. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. that appear in different places in this application do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized.

[0022] In embodiments of the present invention, computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or power server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (exemplarily via the Internet using an Internet service provider).

[0023] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only 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 making creative efforts are within the scope of protection of the present invention.

[0024] See also Figure 1 FIG. 1 is a flow chart of a program authorization method based on obfuscated encrypted program keys in a specific embodiment, the method comprising: Step S101: Generate an initial program key using a random number generation algorithm.

[0025] In some embodiments, a random number generation algorithm is used to generate a string of random characters as the initial program key. Random number generation algorithms can be divided into pseudo-random number generators and true random number generators.

[0026] A pseudorandom number generator generates a random number sequence based on a specific algorithm and seed value, while a true random number generator relies on physical phenomena, such as hardware noise and radioactive decay, to produce truly random numbers. The random nature of the initial program key generated in this embodiment effectively avoids the security risks associated with predictable keys, thereby enhancing key security.

[0027] Step S102: using dynamic string obfuscation technology to obfuscate the initial program key to obtain a protection key.

[0028] Optionally, the dynamic string obfuscation technology includes at least one obfuscation method selected from character reorganization, encoding conversion, and mathematical operation nesting to generate a protection key with obfuscation characteristics.

[0029] It should be noted that character reorganization is to rearrange the order of characters in the initial program key; encoding conversion is to convert the key into other encoding forms, such as Base64 encoding; mathematical operation nesting is to perform mathematical operations on the characters in the key, such as addition, subtraction, multiplication, division, bit operations, etc., and nest the operation results in a new string.

[0030] This embodiment performs a series of transformation operations on the initial program key to change its original form and enhance the key's accountability. The obfuscation process increases the key's complexity and resistance to analysis, thereby improving the key's security.

[0031] Step S103: Encrypt the protection key using a block cipher algorithm.

[0032] It should be noted that the block cipher algorithm uses AES-256-CBC mode, the key derivation function uses PBKDF2-SHA256, and the number of iterations is no less than 10,000. This number of iterations means that the function performs at least 10,000 hash operations on the input key, increasing the security of the key.

[0033] The AES-256-CBC mode in this embodiment divides the protection key into fixed-size blocks and performs encryption operations on each block. The PBKDF2-SHA256 function uses multiple iterative hash operations to expand the input key into a key for AES encryption, thereby increasing the key's encryption strength.

[0034] Step S104: establishing a runtime verification mode including a decryption module and a verification module; wherein the decryption module is configured with a decryption algorithm and key parameters matching the encryption process, and the verification module includes a hash check mechanism and integrity verification logic.

[0035] The decryption module of this embodiment is configured with a decryption algorithm and key parameters that match the encryption process and is used to decrypt the encrypted key during program execution. The verification module includes a hash check mechanism and integrity verification logic. The hash check mechanism verifies the key's integrity by calculating the hash value of the decrypted key and comparing it with a pre-stored hash value. The integrity verification logic checks whether the key conforms to pre-defined formats and rules.

[0036] Step S105: The decrypted original key is obtained based on the decryption module, and the verification module performs the original key feature verification and integrity verification. When the verification result meets the predefined security policy, the program is authorized to run.

[0037] The verification module generates verification parameters based on the hardware fingerprint, geographic location coordinates and system timestamp collected in real time; jointly verifies the decrypted original key and the verification parameters; and authorizes the program to run when the verification result meets the security constraint conditions.

[0038] It should be noted that the hardware fingerprint collected in the verification module can be the CPU, ID, or motherboard serial number. The geographic location coordinates involve longitude and latitude accuracy information.

[0039] When the verification result meets the security constraints, the program can be authorized to run based on the hash matching degree, and / or hardware fingerprint consistency, and / or geographic location deviation threshold.

[0040] The decryption module of this embodiment decrypts the encrypted key to obtain the original key, and the verification module performs feature verification and integrity verification on the original key. Feature verification checks whether the key contains specific characters or patterns, and integrity verification ensures that the key has not been modified during transmission and storage. Predefined security policies are a series of rules set according to the security requirements of the program, such as key length, character range, etc. This embodiment uses a key verification mechanism to ensure that only legitimate keys can authorize program execution, effectively preventing the operation of illegal programs and ensuring system security.

[0041] In an embodiment of the present invention, based on step S102, a possible embodiment will be given below to illustrate its specific implementation scheme in a non-limiting manner.

[0042] like Figure 2 As shown, step S102 specifically includes: S1021: Generate a dynamic time factor by acquiring a device clock signal, and generate a first basic key by combining it with a true random number generation algorithm.

[0043] In this embodiment, a clock signal of the device may be obtained, and a dynamic time factor may be generated based on the clock signal.

[0044] Optionally, the device clock signal is dynamic and changes in real time, and is added as a variable factor to the true random number generation algorithm to make the generated first basic key random and time-related.

[0045] S1022: Configure a character mapping rule to perform position transformation processing on the first basic key to generate a second basic key.

[0046] This embodiment predefines a set of character mapping rules that specify the new position to which each character in the first basic key should be mapped. Based on these rules, the character positions in the first basic key are rearranged to generate the second basic key. For example, the mapping rule might move the first character to the last position, the second character to the second-to-last position, and so on. This increases the degree of key obfuscation.

[0047] S1023: Cross-combining the first basic key and the second basic key in sections according to a preset ratio to form a composite program key.

[0048] In this embodiment, a ratio of, for example, 3:2 may be predetermined. The first basic key and the second basic key may be segmented according to this ratio. The segmented first basic key and the second basic key may be cross-combined to form a composite program key.

[0049] For example, the first segment of the first base key is taken, followed by the first segment of the second base key, followed by the second segment of the first base key, and so on. By cross-combining the segments, two different base keys are combined, so that the composite program key contains information from both base keys, increasing the complexity of the key.

[0050] S1024: Perform asymmetric conversion on the composite program key using character set extension encoding rules.

[0051] This embodiment increases the character representation range of the key by converting the composite program key into a larger character set, making the key more difficult to crack.

[0052] S1025: After the conversion, the string value is reorganized by performing bit operations using an algebraic transformation formula.

[0053] This embodiment treats the composite program key after character set expansion encoding conversion as a string value. Using predefined algebraic transformation formulas, bitwise operations such as AND, OR, and XOR are performed on this string value. This makes the key more chaotic and difficult to predict at the binary level.

[0054] S1026: After reorganization, a dynamic shift operation is performed on the key fragments based on a sliding window mechanism to generate an obfuscated key with a multi-layer nested structure, the output of which contains at least three interrelated sub-key modules.

[0055] It should be noted that the sliding window mechanism and dynamic shift operation make the key fragments constantly change in position, increasing the key's dynamic nature. The multi-layer nested structure and interrelated sub-key modules make the key structure more complex.

[0056] In some specific embodiments, a stream cipher algorithm is used to perform preliminary encryption on the obfuscated key to generate intermediate encrypted data. The intermediate encrypted data is then re-encrypted using a block cipher algorithm, wherein the block cipher algorithm employs a dynamic feedback mechanism in its block cipher mode and integrates salt obfuscation parameters during key expansion, ultimately outputting a program key having dual encryption characteristics.

[0057] As can be seen, during each encryption operation, the keystream and the corresponding bits of the obfuscated key are operated on, changing the original data form of the obfuscated key. A block cipher algorithm divides the plaintext message into blocks of fixed length and encrypts each block. When re-encrypting the intermediate encrypted data, the block cipher mode utilizes a dynamic feedback mechanism, dynamically adjusting the parameters or process for the next encryption based on the results of each encryption. During the key expansion process, a salt obfuscation parameter is introduced. The salt is a string of random data that is combined with the original key to generate an encryption key using a specific key expansion algorithm. Using the generated encryption key and the dynamic feedback block cipher mode, the intermediate encrypted data is encrypted in blocks, ultimately outputting a program key with double encryption characteristics. This double encryption method provides a higher level of security for the program key.

[0058] On the basis of the above embodiment, in order to further improve the security of the program authorization method based on obfuscated encrypted program keys provided in the above embodiment, the following is another feasible method, which specifically includes the following specific implementation steps: A first protection key is generated based on a current random number generation timestamp, a hash value of the program key is defined, a second protection key is generated based on the hash value, and the first protection key and the second protection key are combined to obtain an obfuscated string.

[0059] This embodiment uses a timestamp generated by the current random number to create a first protection key. The timestamp is a numerical value representing the current moment. A hash value is calculated for the program key. The hash value is a fixed-length string obtained by applying a hash function to the program key. Based on this hash value, a second protection key is generated using another algorithm. Finally, the first and second protection keys are combined according to a specific order or rule to form an obfuscated string. This combination of the two creates an obfuscated string containing information from different sources, increasing its complexity.

[0060] The first protection key is generated based on the current random number generation timestamp, specifically including: like Figure 3 As shown, S2021: Generate a first protection subkey of the first protection key based on the current random number generation timestamp.

[0061] This embodiment takes the timestamp generated by the current random number as input, processes it through a specific algorithm, and generates the first protection subkey of the first protection key.

[0062] S2022: Obtain a second protection subkey of the first protection key by performing a hash operation on the first protection subkey.

[0063] This embodiment uses the first protection subkey as input and performs a hash function. The hash function performs a complex mathematical transformation on the input subkey and outputs a fixed-length hash value, which is the second protection subkey of the first protection key.

[0064] S2023: Concatenate the first protection subkey of the first protection key and the second protection subkey of the first protection key to obtain the first protection key.

[0065] It should be noted that the first protection subkey and the second protection subkey are concatenated in a specific order to form a complete string, which is the first protection key. The concatenation order can be fixed or adjusted according to specific security policies. In this way, the first protection key includes timestamp and hash operation information, increasing the complexity of the key.

[0066] In some specific embodiments, generating the second protection key based on the hash value includes: S3021: Perform hash calculation on the program key to obtain a hash value corresponding to the program key, and use the hash value as the third protection subkey of the second protection key.

[0067] This embodiment uses MD5 and SHA-256 hash functions to calculate the original program key. The hash function converts a program key of any length into a fixed-length hash value through complex mathematical operations. This hash value is unique, and different program keys will generate different hash values. The generated hash value is then designated as the third protection subkey of the second protection key.

[0068] S3022: Determine the first protection subkey of the first protection key as the second protection subkey of the second protection key, and concatenate the third protection subkey of the second protection key and the second protection subkey of the second protection key to obtain a second protection key.

[0069] The first protection subkey of the first protection key generated in the previous step is directly assigned as the second protection subkey of the second protection key. Next, the third protection subkey of the second protection key and the second protection subkey of the second protection key are concatenated in a specific order to form a complete string, thereby generating the second protection key. This ensures that the second protection key contains both time-related dynamic data and security identification data related to the program key, thus becoming the third protection subkey.

[0070] S3023: Combine the first protection key and the second protection key to obtain an obfuscated character string.

[0071] Specifically, the method includes performing a segmented replacement operation on the first protection subkey of the first protection key and the third protection subkey of the second protection key with preset characters to obtain a processed first protection key and a processed second protection key, and combining the processed first protection key and the processed second protection key to obtain an obfuscated character string.

[0072] In this embodiment, the first protection subkey of the first protection key and the third protection subkey of the second protection key are subjected to a segmented permutation operation with preset characters to obtain a processed first protection key and a processed second protection key, and the processed first protection key and the processed second protection key are combined to obtain an obfuscated character string.

[0073] Optionally, specific characters are pre-set as replacement elements. The first protection subkey of the first protection key and the third protection subkey of the second protection key are each divided into several small segments. These segments are then swapped or replaced with pre-set characters according to a specific rule to produce the processed first and second protection keys. Finally, the two processed protection keys are combined again in a specific order to form the final obfuscated string. This effectively protects against various attacks.

[0074] The following is an embodiment of a program authorization system based on an obfuscated encrypted program key provided by an embodiment of the present disclosure. This system and the program authorization method based on an obfuscated encrypted program key in the above-mentioned embodiments belong to the same inventive concept. For details not fully described in the embodiment of the program authorization system based on an obfuscated encrypted program key, please refer to the embodiment of the program authorization method based on an obfuscated encrypted program key.

[0075] The system includes: a key generation module, which is used to generate an initial program key through a random number generation algorithm.

[0076] The obfuscation processing module is used to use dynamic string obfuscation technology to obfuscate the initial program key to obtain the program key.

[0077] The encryption processing module is used to encrypt the program key using a block cipher algorithm.

[0078] The verification processing module is used to establish a runtime verification mode including a decryption module and a verification module.

[0079] The decryption module is configured with a decryption algorithm and key parameters that match the encryption process, and the verification module includes a hash check mechanism and integrity verification logic.

[0080] The authorization running module is used to use the decryption module to obtain the decrypted original key. The verification module performs the original key feature verification and integrity verification. When the verification result meets the predefined security policy, the program is authorized to run.

[0081] As an example of an embodiment of the present application, Step 1: Generate a random program key using a random number generation algorithm.

[0082] Step 2: Use JavaScript (JS) obfuscation tools to obfuscate the generated program key to obtain the obfuscated key. For example: Original Key: var originalKey = "Jid38h23brox7e8*%KJFOW23emfmnb\[]opugbhjk".

[0083] Example of an obfuscated key: Function _0x14bf(){var _0x2d0b5b=['725103IofRQc','556575AnMJEy','Jid38h23brox7e8*%KJFOW23emfmnb[]opugbhjk','3nUugiu','145176pMnIaE','102dXbkgn','471322HKsasJ','13707192hWqChm','102076ZdmCrH','7446516BfXbRY'];_0x14bf=function(){return _0x2d0b5b;};return _0x14bf();}var _0x250076=_0x5f35;function _0x5f35(_0xb58431,_0x589109){var _0x14bf1e=_0x14bf();return_0x5f35=function(_0x5f35fb,_0x340972){_0x5f35fb=_0x5f35fb-0x95;var _0x40a60f=_0x14bf1e[_0x5f35fb];return _0x40a60f;},_0x5f35(_0xb58431,_0x589109);}(function(_0x48aa9f,_0x52eb71){var _0x2b03d9=_0x5f35,_0x28cac3=_0x48aa9f();while(!![]){try{var _0xb1a2d2=-parseInt(_0x2b03d9(0x97)) / 0x1+parseInt(_0x2b03d9(0x95)) / 0x2*(-parseInt(_0x2b03d9(0x9c)) / 0x3)+-parseInt(_0x2b03d9(0x9d)) / 0x4+parseInt(_0x2b03d9(0x9a)) / 0x5*(parseInt(_0x2b03d9(0x9e)) / 0x6)+parseInt(_0x2b03d9(0x98)) / 0x7+-parseInt(_0x2b03d9(0x96)) / 0x8+parseInt(_0x2b03d9(0x99)) / 0x9;if(_0xb1a2d2===_0x52eb71)break;else _0x28cac3['push'](_0x28cac3['shift']());}catch(_0x59d6fa){_0x28cac3['push'](_0x28cac3['shift']());}}}(_0x14bf,0xe7c20));var originalKey=_0x250076(0x9b). ;

[0084] In the above example, JS obfuscation technology is used to obfuscate the original program key into code that is difficult to read and understand.

[0085] Step 3: Select a suitable encryption algorithm (such as AES), encrypt the obfuscated key, and generate an encrypted key.

[0086] Step 4: When the application needs to verify the program key, the encrypted key is obtained from the storage location and decrypted using the same key and algorithm as used for encryption to obtain the original program key.

[0087] Step 5: Verify the decrypted program key. If the verification passes, the application is allowed to run normally; otherwise, it is refused to run or other security measures are taken.

[0088] like Figure 4 As shown, the present application also provides an electronic device, including a display module 103, a memory 102, a processor 101, and a computer program stored in the memory and executable on the processor 101, wherein the processor 101 implements the steps of a program authorization method based on an obfuscated encryption program key when executing the program.

[0089] In the embodiments of the present invention, electronic devices include, but are not limited to, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present application described and / or claimed herein.

[0090] In the embodiment of the present application, the processor 101 can be implemented by using at least one of a special purpose integrated circuit, a programmable logic device, a field programmable gate array, a processor, a controller, a microcontroller, a microprocessor, and an electronic unit designed to perform the functions described herein. In some cases, such an embodiment can be implemented in a controller. For software implementation, an embodiment such as a process or function can be implemented with a separate software module that allows the execution of at least one function or operation. The software code can be implemented by a software application (or program) written in any appropriate programming language, and the software code can be stored in a memory and executed by a controller.

[0091] The display module 103 is used to display information input by the user or information provided to the user. The display module 103 may include a display panel, which may be configured in the form of a liquid crystal display, an organic light emitting diode, etc.

[0092] The memory 102 can be used to store software programs and various data. The memory 102 can include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0093] The present application also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the program authorization method based on obfuscated encryption program keys.

[0094] The storage medium can be any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0095] In the context of storage media, a readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0096] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A program authorization method based on obfuscated encrypted program keys, characterized in that: Methods include: Step S101: Generate an initial program key using a random number generation algorithm; Step S102: Obfuscate the initial program key using dynamic string obfuscation technology to obtain a program key; Step S103: Encrypting the program key using a block cipher algorithm; Step S104: establishing a runtime verification mode including a decryption module and a verification module; The decryption module is configured with a decryption algorithm and key parameters that match the encryption process, and the verification module includes a hash check mechanism and integrity verification logic; Step S105: The decrypted original key is obtained based on the decryption module, and the verification module performs the original key feature verification and integrity verification. When the verification result meets the predefined security policy, the program is authorized to run.

2. The program authorization method based on obfuscated encrypted program keys according to claim 1, characterized in that: In step S101, the random number generation algorithm includes but is not limited to a pseudo-random number generator, a cryptographically secure pseudo-random number generator, or a quantum random number generator; In step S102, the obfuscation processing method includes at least one of character reorganization, encoding conversion and mathematical operation nesting to generate a protection key with obfuscation characteristics.

3. The program authorization method based on obfuscated encrypted program keys according to claim 1, characterized in that: Step S102 specifically includes: Generate a first basic key by obtaining a dynamic time factor from a device clock signal and combining it with a true random number generation algorithm; Configure a character mapping rule to perform position transformation processing on the first basic key to generate a second basic key; Cross-combining the first basic key and the second basic key in sections according to a preset ratio to form a composite program key; Performing asymmetric conversion on the composite program key using character set extension encoding rules; After the conversion, the string values are reorganized by bit operations using algebraic transformation formulas; After reorganization, the key fragments are dynamically shifted based on the sliding window mechanism to generate an obfuscated key with a multi-layer nested structure, the output of which contains at least three interrelated sub-key modules.

4. The program authorization method based on obfuscated encrypted program keys according to claim 3, characterized in that: Using a stream cipher algorithm to preliminarily encrypt the obfuscated key to generate intermediate encrypted data; The intermediate encrypted data is encrypted twice using a block cipher algorithm, where: The block cipher working mode in the block cipher algorithm adopts a dynamic feedback mechanism, and integrates salt value confusion parameters in the key expansion process, and finally outputs a program key with double encryption characteristics.

5. The program authorization method based on obfuscated encrypted program keys according to claim 1, characterized in that: Step S102 specifically includes: generating a first protection key based on the current random number generation timestamp, defining a hash value of the program key, generating a second protection key based on the hash value, and combining the first protection key and the second protection key to obtain an obfuscated string; The first protection key is generated based on the current random number generation timestamp, specifically including: generating a first protection subkey of the first protection key based on the current random number generation timestamp; Obtaining a second protection subkey of the first protection key by performing a hash operation on the first protection subkey; The first protection key is obtained by concatenating the first protection subkey of the first protection key and the second protection subkey of the first protection key.

6. The program authorization method based on obfuscated encrypted program keys according to claim 5, characterized in that: Generating a second protection key based on the hash value includes: Performing a hash calculation on the program key to obtain a hash value corresponding to the program key, and using the hash value as the third protection subkey of the second protection key; Determining the first protection subkey of the first protection key as the second protection subkey of the second protection key, and concatenating the third protection subkey of the second protection key and the second protection subkey of the second protection key to obtain a second protection key; The first protection key and the second protection key are combined to obtain an obfuscated character string, specifically comprising: performing a segmented permutation operation on a first protection subkey of the first protection key and a third protection subkey of the second protection key with preset characters to obtain a processed first protection key and a processed second protection key, and combining the processed first protection key and the processed second protection key to obtain the obfuscated character string.

7. The program authorization method based on obfuscated encrypted program keys according to claim 1 or 2, characterized in that: The verification module generates verification parameters based on the hardware fingerprint, geographic location coordinates and system timestamp collected in real time; Perform joint verification on the decrypted original key and the verification parameter; When the verification result meets the security constraints, the authorization program runs.

8. A program authorization system based on obfuscated encrypted program keys, characterized in that: The system is used to implement the program authorization method based on obfuscated encryption program keys as described in any one of claims 1 to 7; The system includes: A key generation module, configured to generate an initial program key using a random number generation algorithm; An obfuscation processing module is used to obfuscate the initial program key using dynamic string obfuscation technology to obtain a program key; An encryption processing module, used for encrypting the program key using a block cipher algorithm; A verification processing module, used to establish a runtime verification mode including a decryption module and a verification module; The decryption module is configured with a decryption algorithm and key parameters that match the encryption process, and the verification module includes a hash check mechanism and integrity verification logic; The authorization running module is used to use the decryption module to obtain the decrypted original key. The verification module performs the original key feature verification and integrity verification. When the verification result meets the predefined security policy, the program is authorized to run.

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 program, the steps of the program authorization method based on obfuscated encrypted program keys as described in any one of claims 1 to 7 are implemented.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the program authorization method based on obfuscated encrypted program keys as claimed in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Key management and authorization system and method in data outsourcing encryption and decryption mode

    CN115225251A

  • Encryption method and device, decryption method and device, electronic equipment and computer readable medium

    CN117294430A

  • Secret communication method and system for big data

    CN118353604A

  • Encryption method based on RSA algorithm

    CN119449308A

  • Encryption method and system based on symmetric cryptographic algorithm

    CN119538312A