A program authorization method, system, device and medium based on obfuscated encryption program keys

CN120498636BActive Publication Date: 2026-10-27INSPUR GENERSOFT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510691676.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2026-10-27
Estimated Expiration
2045-05-27

AI Technical Summary

Technical Problem

[0003]相关技术中,密钥生成方式常采用固定规则或伪随机数生成,生成的密钥随机性不足,存在一定可预测性

Benefits of technology

本申请提供的基于混淆加密程序密钥的程序授权方法通过获取设备时钟信号生成动态时间因子,结合真随机数生成算法产生第一基础密钥,利用时钟信号的实时变化和真随机数的不可预测性,生成动态且随机的密钥。提高了密钥生成的安全性,满足高安全场景下对密钥随机性和动态性。采用动态字符串混淆技术,综合运用字符重组、编码转换和数学运算嵌套等多种方式对初始程序密钥进行混淆,改变密钥原始形态。提升了密钥在存储和传输过程中的安全性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120498636B_ABST
    Figure CN120498636B_ABST
Patent Text Reader

Abstract

The application provides a program authorization method, system, device and medium based on obfuscated encryption program keys, belongs to the technical field of information security, and generates an initial program key through a random number generation algorithm; the initial program key is subjected to obfuscated processing by adopting a dynamic string obfuscation technology to obtain a program key; the program key is subjected to encryption processing by using a block cipher algorithm; a runtime verification mode including a decryption module and a verification module is established; the original key after decryption is obtained based on the decryption module, original key feature checking and integrity checking are performed by the verification module, and the program is authorized to run when the checking result meets a predefined security strategy. The program key is subjected to obfuscated and encryption processing through the obfuscation technology and the encryption algorithm, and the security of the program key is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of information security technology, and specifically relates to a program authorization method, system, device and medium based on obfuscated encryption program keys. Background Technology

[0002] Among the many technologies that safeguard various functional characteristics of information security, cryptography is the core and key technology. Data encryption technology can improve the security of data transmission and ensure the integrity of transmitted data to a certain extent. In a data encryption system, the key controls the encryption and decryption process. The overall security of an encryption system is based on the key, not the algorithm; therefore, the security of the program key is directly related to the security of the entire application.

[0003] In related technologies, key generation methods often employ fixed rules or pseudo-random numbers, resulting in insufficient randomness and a degree of predictability. For example, some systems generate keys based solely on simple timestamps or fixed seed values. Attackers can analyze the generation rules or obtain the seed value to deduce the key, leading to a high risk of key leakage and failing to meet the requirements of high-security scenarios. Some applications manage keys using hard-coded or static storage methods, lacking flexibility. Once a key is leaked, the entire application needs to be redeployed. Some applications' key generation methods are not random enough, or their encryption measures are not strong enough, making them vulnerable to cracking by specialized attack tools. As application scales, key management becomes increasingly complex, lacking effective key update and rotation mechanisms. Insufficient security protection for keys makes them susceptible to theft and cracking during storage and transmission, posing security vulnerabilities to the system. Summary of the Invention

[0004] This invention provides a program authorization method based on obfuscated encryption program keys. By obfuscating and encrypting the program key using obfuscation techniques and encryption algorithms, the security of the program key is improved.

[0005] The methods include: Step S101: Generate the initial program key using a random number generation algorithm; Step S102: Use dynamic string obfuscation technology to obfuscate the initial program key to obtain the program key; Step S103: Encrypt the program key using a block cipher algorithm; Step S104: Establish a runtime verification mode that includes 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 verification mechanism and integrity verification logic. Step S105: Obtain the decrypted original key based on the decryption module, and have the verification module perform original key feature verification and integrity verification. When the verification result meets the predefined security policy, the authorized program will 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 the following obfuscation methods: character recombination, encoding conversion, and nested mathematical operations, to generate a protection key with obfuscation characteristics.

[0007] It should be further explained that step S102 specifically includes: A dynamic time factor is generated by acquiring the device clock signal, and the first basic key is generated by combining it with a true random number generation algorithm. Configure character mapping rules to perform position transformation processing on the first basic key to generate the second basic key; The first basic key and the second basic key are segmented and cross-combined according to a preset ratio to form a composite program key; The composite program key is subjected to asymmetric conversion using character set extension encoding rules; After conversion, bitwise operations are performed on the string values ​​using algebraic transformation formulas to reassemble them. After recombination, the key fragments are dynamically shifted based on the sliding window mechanism to generate a confused key with a multi-layered nested structure. The output contains at least three interrelated subkey 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 then encrypted a second time using a block cipher algorithm, where: The block cipher algorithm employs a dynamic feedback mechanism in its block cipher mode and integrates a salt confusion parameter during key expansion, ultimately outputting a program key with double encryption features.

[0009] It should be further explained that step S102 specifically includes: generating a first protection key based on the timestamp generated by the current random number, defining the 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 generation of the first protection key based on the current random number generation timestamp specifically includes: A first protection subkey is generated based on the current random number generation timestamp to generate the first protection key; By performing a hash operation on the first protection subkey, a second protection subkey of the first protection key is obtained; The first protection key is obtained by concatenating the first protection subkey and the second protection subkey of the first protection key.

[0010] It should be further noted that generating the second protection key based on the hash value includes: The program key is hashed to obtain the hash value corresponding to the program key, and the hash value is used as the third protection subkey of the second protection key; The first protection subkey of the first protection key is determined as the second protection subkey of the second protection key, and the third protection subkey of the second protection key and the second protection subkey of the second protection key are concatenated to obtain the second protection key; The first protection key and the second protection key are combined to obtain an obfuscated string. Specifically, this includes: performing a segmented permutation 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 string.

[0011] It should be further noted that the verification module generates verification parameters based on real-time collected hardware fingerprints, geographic location coordinates, and system timestamps; The decrypted original key is then jointly verified with the verification parameters. The authorization program runs when the verification result meets the security constraints.

[0012] This application also provides a program authorization system based on a scrambled encryption program key, the system comprising: The key generation module is used to generate the initial program key using a random number generation algorithm; The obfuscation module is used to obfuscate the initial program key using dynamic string obfuscation technology to obtain the program key; The encryption processing module is used to encrypt the program key using a block cipher algorithm; The verification processing module is used to establish a runtime verification mode that includes 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 verification mechanism and integrity verification logic. The authorization module is used to obtain the decrypted original key from the decryption module. The verification module performs feature verification and integrity verification of the original key. When the verification results meet the predefined security policy, the authorization program runs.

[0013] According to another embodiment of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the program authorization method based on a scrambled encryption program key.

[0014] According to another embodiment of this application, a storage medium is also provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of a program authorization method based on a scrambled encryption program key.

[0015] As can be seen from the above technical solutions, 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 acquiring the device clock signal, and combines it with a true random number generation algorithm to generate a first basic key. Utilizing the real-time changes in the clock signal and the unpredictability of true random numbers, a dynamic and random key is generated. This improves the security of key generation and meets the requirements for key randomness and dynamism in high-security scenarios. Dynamic string obfuscation technology is employed, comprehensively utilizing character recombination, encoding conversion, and nested mathematical operations to obfuscate the initial program key, changing its original form. This enhances the security of the key during storage and transmission.

[0016] A runtime verification mode is established, comprising a decryption module and a verification module. The decryption module is configured with algorithms and parameters that match the encryption 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 program execution based on a predefined security policy. Only legitimate keys can enable program execution, effectively ensuring system security. Attached Figure Description

[0017] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 Here is a flowchart of a program authorization method based on obfuscated encryption program keys; Figure 2 This is a flowchart illustrating an embodiment of a program authorization method based on obfuscated encryption program keys; Figure 3 This is a flowchart of another embodiment of the program authorization method based on obfuscated encryption program keys; Figure 4 This is a schematic diagram of an electronic device. Detailed Implementation

[0019] The program authorization method based on obfuscated encrypted program keys provided in this application improves the security of program keys by obfuscating and encrypting them using obfuscation techniques and encryption algorithms. The program authorization method based on obfuscated encrypted program keys involved in this application will be described in detail below. Specific details such as particular system structures and technologies are presented for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this 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 feature, integral, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0021] The terms "one embodiment" or "some embodiments" used in this application mean that one or more embodiments of this application include the specific features, structures, or characteristics described in that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of 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 this disclosure can be written in one or more programming languages ​​or a combination thereof. These programming languages ​​include, but are not limited to, object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone 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 remote computers, the remote computer can 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 can be connected to an external computer (exemplarily using an Internet service provider for Internet connection).

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] Please see Figure 1 The diagram shows a flowchart of a program authorization method based on a scrambled encryption key in a specific embodiment. The method includes: Step S101: Generate the initial program key using a random number generation algorithm.

[0025] In some embodiments, a random character sequence is generated using a random number generation algorithm as the initial program key. Random number generation algorithms can be divided into pseudo-random number generators and true random number generators.

[0026] Pseudo-random number generators generate random number sequences based on specific algorithms and seed values, while true random number generators rely on physical phenomena, such as hardware noise and radioactive decay, to produce truly random numbers. The initial program key generated in this embodiment is random, effectively avoiding security risks arising from predictable keys and enhancing key security.

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

[0028] Optionally, dynamic string obfuscation technology includes at least one obfuscation method among character recombination, encoding conversion, and nested mathematical operations to generate a protection key with obfuscation characteristics.

[0029] It should be noted that character recombination is to rearrange the characters in the initial program key; encoding conversion is to convert the key to other encoding forms, such as Base64 encoding; and nested mathematical operations are to perform mathematical operations on the characters in the key, such as addition, subtraction, multiplication, division, bitwise operations, etc., and then nest the results in a new string.

[0030] This embodiment enhances the key's complexity by performing a series of transformation operations on the initial program key, altering its original form. Obfuscation increases the key's complexity and resistance to analysis, thereby improving its security.

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

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

[0033] In this embodiment, the AES-256-CBC mode divides the protection key into fixed-size blocks and encrypts each block. The PBKDF2-SHA256 function expands the input key into a new key through multiple iterative hash operations, which is then used for AES encryption, thus improving the encryption strength of the key.

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

[0035] The decryption module in this embodiment is configured with a decryption algorithm and key parameters that match the encryption process, used to decrypt the encrypted key during program execution. The verification module includes a hash verification mechanism and integrity verification logic. The hash verification mechanism verifies the integrity of the key 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 a predefined format and rules.

[0036] Step S105: Obtain the decrypted original key based on the decryption module, and have the verification module perform original key feature verification and integrity verification. When the verification result meets the predefined security policy, the authorized program will run.

[0037] The verification module generates verification parameters based on real-time collected hardware fingerprints, geographic location coordinates, and system timestamps; it then performs joint verification with the decrypted original key and the verification parameters; and when the verification result meets the security constraints, the authorization program runs.

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

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

[0040] In this embodiment, the decryption module 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, while 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 program's security requirements, such as key length and character range. This embodiment, through a key verification mechanism, ensures that only legitimate keys can authorize program execution, effectively preventing the execution of unauthorized programs and guaranteeing system security.

[0041] In one embodiment of the present invention, based on step S102, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.

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

[0043] This embodiment can acquire the device's clock signal and generate a dynamic time factor based on this signal.

[0044] Optionally, the device clock signal is dynamic and changes in real time. This can be added as a variable factor to the true random number generation algorithm, so that the generated first base key has randomness and time correlation.

[0045] S1022: Configure character mapping rules 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, which specify the new position to which each character in the first base key should be mapped. Based on these rules, the positions of the characters in the first base key are rearranged to generate the second base key. For example, the mapping rule could be to move the first character to the last position, the second character to the second-to-last position, and so on. This increases the level of key obfuscation.

[0047] S1023: The first basic key and the second basic key are segmented and cross-combined according to a preset ratio to form a composite program key.

[0048] In this embodiment, a ratio, such as 3:2, can be predetermined. The first and second basic keys are then segmented according to this ratio. The segmented first and second basic keys are then cross-combined to form a composite program key.

[0049] For example, first take the first segment of the first basic key, then take the first segment of the second basic key, then take the second segment of the first basic key, and so on. By combining these segments, the two different basic keys are merged together, so that the composite program key contains information from both basic keys, increasing the key's complexity.

[0050] S1024: The composite program key is subjected to asymmetric conversion using character set extended encoding rules.

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

[0052] S1025: After conversion, the string values ​​are recombined by bitwise operations using algebraic transformation formulas.

[0053] This embodiment treats the composite program key, after character set extended encoding conversion, as a string value. Bitwise operations, such as AND, OR, and XOR, are performed on this string value using predefined algebraic transformation formulas. This makes the key more complex and unpredictable at the binary level.

[0054] S1026: After recombination, the key fragment is dynamically shifted based on the sliding window mechanism to generate a confused key with a multi-layered nested structure. The output contains at least three interrelated subkey modules.

[0055] It should be noted that the sliding window mechanism and dynamic shift operations cause the key fragments to constantly change position, increasing the dynamism of the key. The multi-layered nested structure and interconnected sub-key modules further complicate the key structure.

[0056] In some specific embodiments, a stream cipher algorithm is used to initially encrypt the obfuscated key, generating intermediate encrypted data. A block cipher algorithm is then used to perform secondary encryption on the intermediate encrypted data, wherein the block cipher mode employs a dynamic feedback mechanism, and a salt obfuscation parameter is integrated during key expansion, ultimately outputting a program key with double encryption features.

[0057] As can be seen, during each encryption operation, the corresponding bits of the keystream and the confusion key are manipulated to change the original data form of the confusion key. Block cipher algorithms divide the plaintext message into fixed-length blocks and encrypt each block. When performing secondary encryption on the intermediate encrypted data, the block cipher mode employs a dynamic feedback mechanism, dynamically adjusting the parameters or process for the next encryption based on the result of each encryption. During key expansion, a salt obfuscation parameter is introduced. The salt is a string of random data, combined with the original key, and used to generate an encryption key through a specific key expansion algorithm. Using the generated encryption key and the dynamically feedback block cipher mode, the intermediate encrypted data is encrypted in blocks, ultimately outputting a program key with double encryption features. This double encryption provides a higher level of security for the program key.

[0058] Based on the above embodiments, in order to further improve the security of the program authorization method based on obfuscated encryption program keys provided in the above embodiments, the following is another implementable method, which specifically includes the following implementation steps: A first protection key is generated based on the current random number and timestamp. The hash value of the program key is defined. A second protection key is generated based on the hash value. The first and second protection keys are combined to obtain an obfuscated string.

[0059] This embodiment uses the timestamp generated by the current random number to create the first protection key. The timestamp is a numerical value representing the current moment. The hash value of the program key is calculated; the hash value is a fixed-length string obtained by performing a hash function operation on 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 in a certain order or according to certain rules to form an obfuscated string. After combining the two, the obfuscated string contains information from different sources, increasing its complexity.

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

[0061] In this embodiment, the timestamp of the current random number generation is used as input, and a specific algorithm is used to process it to generate the first protection subkey of the first protection key.

[0062] S2022: By performing a hash operation on the first protection subkey, a second protection subkey of the first protection key is obtained.

[0063] In this embodiment, the first protection subkey is used as input, and a hash function is used for computation. The hash function performs complex mathematical transformations on the input subkey and outputs a hash value of fixed length. This hash value 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 and second protection subkeys are concatenated in a specific order to form a complete string, which constitutes the first protection key. The concatenation order can be fixed or adjusted according to the specific security policy. This way, the first protection key incorporates timestamp and hash information, increasing the key's complexity.

[0066] In some specific embodiments, generating a second protection key based on a hash value includes: S3021: Perform a hash calculation on the program key to obtain the 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 arbitrary length into a fixed-length hash value through complex mathematical operations. This hash value is unique; 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 the second protection key.

[0069] The first protection subkey of the first protection key generated in the previous steps is directly designated as the second protection subkey of the second protection key. Then, 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, thus obtaining the second protection key. This makes the second protection key contain both time-related dynamic data and security identification data related to the program key, which is the third protection subkey.

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

[0071] Specifically, this includes: performing segmented replacement operations 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 the processed first protection key and the processed second protection key, and combining the processed first protection key and the processed second protection key to obtain an obfuscated 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 segmented and replaced with preset characters to obtain the processed first protection key and the processed second protection key. The processed first protection key and the processed second protection key are then combined to obtain an obfuscated string.

[0073] Optionally, certain specific characters are pre-defined as substitution 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. Then, according to certain rules, these segments are swapped or replaced with the preset characters to obtain the processed first protection key and the processed second protection key. Finally, the two processed protection keys are combined again in a specific order to form the final obfuscated string. This effectively resists various forms of attacks.

[0074] The following are embodiments of the program authorization system based on obfuscated encryption program keys provided in this disclosure. This system and the program authorization methods based on obfuscated encryption program keys in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the program authorization system based on obfuscated encryption program keys, please refer to the embodiments of the program authorization methods based on obfuscated encryption program keys described above.

[0075] The system includes a key generation module, which generates an initial program key using a random number generation algorithm.

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

[0077] The encryption 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 that includes 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, while the verification module includes a hash verification mechanism and integrity verification logic.

[0080] The authorization module is used to obtain the decrypted original key from the decryption module. The verification module performs feature verification and integrity verification of the original key. When the verification results meet the predefined security policy, the authorization program runs.

[0081] As an example of one embodiment of this application, Step 1: Use a random number generation algorithm to generate a random program key.

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

[0083] Example of a scrambled 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 example above, JS obfuscation technology was 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) to encrypt the obfuscated key and generate an encrypted key.

[0086] Step 4: When the application needs to verify the program key, retrieve the encrypted key from the storage location and decrypt it using the same key and algorithm as when it was encrypted to obtain the original program key.

[0087] Step 5: Verify the decrypted program key. If the verification is successful, allow the application to run normally; otherwise, refuse to run or take other security measures.

[0088] like Figure 4 As shown, this 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. When the processor 101 executes the program, it implements the steps of a program authorization method based on a scrambled encryption program key.

[0089] In 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 processors, cellular phones, smartphones, 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 described and / or claimed herein.

[0090] In this embodiment, processor 101 may be implemented using at least one of an application-specific integrated circuit, a programmable logic device, a field-programmable gate array, a processor, a controller, a microcontroller, a microprocessor, or an electronic unit designed to perform the functions described herein. In some cases, such an implementation may be implemented within a controller. For software implementation, implementations such as processes or functions may be implemented with separate software modules that allow the performance of at least one function or operation. Software code may be implemented by a software application (or program) written in any suitable programming language, and the software code may be stored in memory and executed by the 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, or the like.

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

[0093] This application also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the program authorization method based on a scrambled encryption program key.

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

[0095] In a storage medium, a readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take various 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, capable of sending, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0096] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those 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 invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A program authorization method based on obfuscated encryption program keys, characterized in that, The methods include: Step S101: Generate the initial program key using a random number generation algorithm; Step S102: Use dynamic string obfuscation technology to obfuscate the initial program key to obtain the program key; Step S102 specifically includes: A dynamic time factor is generated by acquiring the device clock signal, and the first basic key is generated by combining it with a true random number generation algorithm. Configure character mapping rules to perform position transformation processing on the first basic key to generate the second basic key; The first basic key and the second basic key are segmented and cross-combined according to a preset ratio to form a composite program key; The composite program key is subjected to asymmetric conversion using character set extension encoding rules; After conversion, bitwise operations are performed on the string values ​​using algebraic transformation formulas to reassemble them. After recombination, the key fragments are dynamically shifted based on the sliding window mechanism to generate a confused key with a multi-layered nested structure. The output contains at least three interrelated subkey modules. Step S103: Encrypt the program key using a block cipher algorithm; Step S104: Establish a runtime verification mode that includes 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 verification mechanism and integrity verification logic. Step S105: Obtain the decrypted original key based on the decryption module, and have the verification module perform original key feature verification and integrity verification. When the verification result meets the predefined security policy, the authorized program will run.

2. The program authorization method based on obfuscated encryption 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 the following obfuscation methods: character recombination, encoding conversion, and nested mathematical operations, to generate a protection key with obfuscation characteristics.

3. The program authorization method based on obfuscated encryption program keys according to claim 1, characterized in that, The obfuscation key is initially encrypted using a stream cipher algorithm to generate intermediate encrypted data. The intermediate encrypted data is then encrypted a second time using a block cipher algorithm, where: The block cipher algorithm employs a dynamic feedback mechanism in its block cipher mode and integrates a salt confusion parameter during key expansion, ultimately outputting a program key with double encryption features.

4. The program authorization method based on obfuscated encryption program keys according to claim 1, characterized in that, Step S102 specifically includes: generating a first protection key based on the timestamp generated by the current random number, defining the 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 generation of the first protection key based on the current random number generation timestamp specifically includes: A first protection subkey is generated based on the current random number generation timestamp to generate the first protection key; By performing a hash operation on the first protection subkey, a second protection subkey of the first protection key is obtained; The first protection key is obtained by concatenating the first protection subkey and the second protection subkey of the first protection key.

5. The program authorization method based on obfuscated encryption program keys according to claim 4, characterized in that, The generation of the second protection key based on the hash value includes: The program key is hashed to obtain the hash value corresponding to the program key, and the hash value is used as the third protection subkey of the second protection key; The first protection subkey of the first protection key is determined as the second protection subkey of the second protection key, and the third protection subkey of the second protection key and the second protection subkey of the second protection key are concatenated to obtain the second protection key; The first protection key and the second protection key are combined to obtain an obfuscated string. Specifically, this includes: performing a segmented permutation 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 string.

6. The program authorization method based on obfuscated encryption program keys according to claim 1 or 2, characterized in that, The verification module generates verification parameters based on real-time collected hardware fingerprints, geographic location coordinates, and system timestamps; The decrypted original key is then jointly verified with the verification parameters. The authorization program runs when the verification result meets the security constraints.

7. A program authorization system based on obfuscated encryption program keys, characterized in that, The system is used to implement the program authorization method based on the obfuscated encryption program key as described in any one of claims 1 to 6; The system includes: The key generation module is used to generate the initial program key using a random number generation algorithm; The obfuscation module is used to obfuscate the initial program key using dynamic string obfuscation technology to obtain the program key; The encryption processing module is used to encrypt the program key using a block cipher algorithm; The verification processing module is used to establish a runtime verification mode that includes 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 verification mechanism and integrity verification logic. The authorization module is used to obtain the decrypted original key from the decryption module. The verification module performs feature verification and integrity verification of the original key. When the verification results meet the predefined security policy, the authorized program runs.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the program authorization method based on the obfuscated encryption program key as described in any one of claims 1 to 6.

9. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the program authorization method based on a confused encryption program key as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data encryption and decryption method and device, equipment, storage medium and program product

    CN119814452A