Data encryption method and device, terminal equipment and computer storage medium
Through the combination of white box library files and dynamic encryption keys, the data leakage problem caused by theft of keys in the prior art is solved, efficient encryption of business data is achieved, and the security of Internet services is improved.
Patent Information
- Application Number
- CN202310558076.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-17
- Publication Date
- 2024-11-22
AI Technical Summary
After the existing data encryption method is stolen, the ciphertext data is easily decrypted, resulting in business data leakage and unable to effectively protect the security of Internet services.
Data encryption is performed using white box library files and dynamic encryption keys, and the encryption key is generated by the business client and server, and random numbers are introduced during the encryption process, so that the encryption key changes dynamically and improves the cracking difficulty.
It effectively improves the confidentiality and security of business data, increases the difficulty of attackers to crack cryptographic data, and ensures the security of business data and clients.
Smart Images

Figure CN119011162A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer network security technology, and in particular to a data processing encryption method, device, terminal equipment and computer storage medium. Background Art
[0002] With the popularization of the Internet and the implementation of Internet products, the business data generated by related Internet services can be transmitted in multiple Internet devices, and how to reduce the probability of network security attackers destroying the security performance of Internet services by intercepting the transmitted business data is the key research direction of various Internet products. In actual applications, the service providers of Internet services usually encrypt the business data during data transmission, so that the data in the data transmission link is ciphertext data, thereby effectively reducing the possibility of security risks caused by the leakage of business data during data transmission.
[0003] However, the use of currently popular data encryption methods to encrypt business data may result in the decryption of ciphertext data due to the theft of the key, thus leading to the problem of business data leakage. It can be seen that traditional data encryption methods cannot effectively encrypt business data. In view of this, proposing a data encryption method to achieve effective encryption of business data, thereby improving the security of business data and related Internet services, has become a key research topic in the current field of network security. Summary of the invention
[0004] The embodiments of the present application provide a data processing encryption method, apparatus, terminal equipment and computer storage medium, which can effectively improve the security of business data in Internet business.
[0005] On the one hand, an embodiment of the present application provides a data processing encryption method, including:
[0006] Acquire business data and a first key parameter provided by the business client for the business data;
[0007] Acquire a second key parameter of the business data, where the second key parameter includes: a random number related to the business data generated by the business server in response to a parameter acquisition request from the business client;
[0008] generating an encryption key for the service data according to the first key parameter and the second key parameter;
[0009] Acquire a white box library file used when white box encryption is performed on the service data generated by the service client, wherein the white box library file is at least used to indicate: an encryption algorithm used when white box encryption is performed on the service data generated by the service client;
[0010] The business data is encrypted using the white box library file and the encryption key to obtain ciphertext data of the business data.
[0011] On the other hand, an embodiment of the present application provides a data processing encryption device, including:
[0012] A first acquisition unit, used to acquire service data and a first key parameter provided by the service client for the service data;
[0013] A second acquisition unit is used to acquire a second key parameter of the service data, where the second key parameter includes: a random number related to the service data generated by the service server in response to a parameter acquisition request from the service client;
[0014] a generating unit, configured to generate an encryption key for the service data according to the first key parameter and the second key parameter;
[0015] A third acquisition unit is used to acquire a white box library file used when white box encryption is performed on the service data generated by the service client, wherein the white box library file is at least used to indicate: an encryption algorithm used when white box encryption is performed on the service data generated by the service client;
[0016] The encryption unit is used to use the white box library file and the encryption key to perform data encryption processing on the business data to obtain ciphertext data of the business data.
[0017] On the other hand, the embodiment of the present application further provides a terminal device, including:
[0018] A processor configured to execute one or more computer programs;
[0019] A computer storage medium storing one or more computer programs, wherein the one or more computer programs are suitable for being loaded by the processor and implementing the data encryption method according to the first aspect.
[0020] On the other hand, an embodiment of the present application further provides a computer storage medium, which stores one or more computer programs, and the one or more computer programs are suitable for being loaded by a processor and implementing the data encryption method of the first aspect.
[0021] In the embodiment of the present application, when the business client performs data encryption processing on the business data, the white box library file and the encryption key are used, so that the algorithm complexity of the data encryption processing of the business data is improved, thereby increasing the difficulty of the attacker to crack the ciphertext data, effectively ensuring the security of the business data, and realizing the effective encryption of the business data. In addition, since the encryption key used in the embodiment of the present application is generated based on the first key parameter provided by the business client and the second key parameter provided by the business server, the generation of the encryption key is the result of the joint participation of the business client and the business server, which increases the difficulty of cracking the encryption key of the business data. In addition, the second key parameter in the embodiment of the present application contains a random number, so that the encryption key generated by the business client is a dynamic key, and the interception of the dynamic key usually only causes a one-time leakage of the business data, and does not cause a serious threat to the security of the business client and the business data, and guarantees the security of the business client and the business data to a certain extent. In summary, it can be seen that the data encryption method proposed in the embodiment of the present application can realize the effective encryption of the business data, thereby improving the data security of the business data and the business client. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0023] Figure 1a It is a schematic diagram of plaintext data and ciphertext data provided by an embodiment of the present application;
[0024] Figure 1b It is a structural diagram of a data encryption system provided in an embodiment of the present application;
[0025] Figure 2 is a schematic flow chart of a data encryption method provided in an embodiment of the present application;
[0026] Figure 3 is a schematic flow chart of another data encryption method provided in an embodiment of the present application;
[0027] Figure 4 It is a schematic diagram of a business data collection interface provided in an embodiment of the present application;
[0028] Figure 5a This is a schematic diagram of the principle of static white box encryption provided by an embodiment of the present application;
[0029] Figure 5bThis is a schematic diagram of the principle of dynamic white box encryption provided by an embodiment of the present application;
[0030] Figure 6 This is a schematic diagram of the principle of encrypting payment data provided by an embodiment of the present application;
[0031] Figure 7 It is a structural schematic diagram of a data encryption device provided in an embodiment of the present application;
[0032] Figure 8 It is a structural diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The embodiment of the present application proposes a data encryption method, which is applied to a business client to encrypt business data in Internet services provided by the business client. This can effectively improve the confidentiality of the encrypted business data, thereby improving the security of business data and corresponding Internet services, and making important contributions to the construction of Internet network security.
[0034] In order to facilitate a comprehensive and detailed understanding of the data encryption method proposed in the embodiment of the present application, the general principle of the data encryption method is first described below. The method points out that when the business client needs to encrypt the business data, the first key parameter provided by the business client for the business data is obtained, and the second key parameter generated by the business server for the business data in response to the parameter acquisition request of the business client is obtained, so that the business client can generate the encryption key of the business data according to the first key parameter and the second key parameter. Among them, the encryption key can be used to implement the encryption processing of the business data, and the second key parameter used to generate the encryption key includes at least: a random number generated by the business server about the business data. In the embodiment of the present application, in order to increase the difficulty of data attackers to crack the encrypted ciphertext data, for the data encryption of the business data, the business client also obtains the white box library file used when the business data of the business client is white-box encrypted, so as to use the white box library file and the encryption key to jointly implement the data encryption processing of the business data, and finally obtain the ciphertext data with higher confidentiality. Among them, the white box library file is a kind of data generated by white box encryption technology, which can be used to indicate: the specific method used to encrypt and / or decrypt the corresponding data. Then, the white box library file obtained in the embodiment of the present application can at least be used to indicate: the encryption algorithm used when white box encryption is performed on the business data generated by the business client.
[0035] In the embodiment of the present application, the encryption key used when the business data is encrypted is generated based on the first key parameter and the second key parameter, and the first key parameter is provided by the business client, and the second key parameter includes a random number generated by the business server for the business data, so that the generation of the encryption key is the result of the joint participation of the business client and the business server, which increases the difficulty of cracking the encryption key of the business data. In addition, the second key parameter includes a random number, indicating that under normal circumstances, the second key parameter generated by the business server in response to different parameter acquisition requests for the same business data is different, so that the encryption key used by the business client when implementing the data encryption function is a dynamic key. Among them, the dynamic key generated for the business data is intercepted, which usually only causes a leakage of the business data, and does not cause a serious threat to the security of the business client and the business data, and guarantees the security of the business client and the business data to a certain extent. In addition, the second key parameter is generated by the business server for the business data, so that the encryption keys generated by the business server for different business data are usually different. Then, the leakage of the dynamic key of the business data is less likely to cause security risks to other business data in the business client, thereby effectively reducing the probability of serious data leakage incidents in the business client due to the leakage of the encryption key to a certain extent. In summary, it can be seen that the data encryption method proposed in the embodiment of the present application can achieve effective encryption of business data, thereby improving the data security of business data and business clients.
[0036] In one embodiment, business data refers to the plaintext data generated by the business client, and the data obtained after data encryption processing of the plaintext data is called ciphertext data. Among them, plaintext and ciphertext are terms in cryptography. Literally speaking, plaintext refers to unencrypted data, and the meaning of such data can be easily understood by humans or machines. Ciphertext refers to the data obtained after a series of transformations are performed on plaintext data through data encryption technology, and the meaning of such data cannot usually be directly understood by reading the data. In specific applications, plaintext data can specifically be a bit stream, such as: text, bitmap, digitized voice or digitized video image, etc. Exemplarily, when the plaintext data is text, the ciphertext data can be a series of character strings obtained after character transformation processing is performed on the text. For example, Figure 1a The data marked by 101 is the plaintext data, and the ciphertext data corresponding to the plaintext data can be Figure 1a As shown in the data marked by 102.
[0037] In one embodiment, the data encryption method proposed in the embodiment of the present application is mainly applied to a business client, which can be used to provide one or more Internet services, and the business data can refer to the business data generated by any Internet service provided by the business client. Among them, the business client can be run in a terminal device, so that the embodiment of the present application can be executed by the terminal device. Optionally, the terminal device can specifically include but is not limited to: a smart phone, a tablet computer, a laptop computer, a desktop computer, a car terminal, a smart home appliance (such as a smart refrigerator, a smart TV and a smart speaker, etc.), a game console, etc. It is worth mentioning that in actual applications, one or more other clients other than the business client can also be run in the terminal device running the business client. Exemplarily, an image processing client, a multimedia playback client, and a navigation client, etc. can also be run in the terminal device.
[0038] In another embodiment, the data encryption method proposed in the embodiment of the present application can be executed by the service client and the service server in collaboration. In this case, for example, the embodiment of the present application can be applied to Figure 1b In the data encryption system shown in FIG. Figure 1b As shown, the data encryption system may include at least a service server marked by 111 and one or more service clients marked by 112. Figure 1b In the data encryption system shown, a direct or indirect communication connection is established between the business server and each business client, so that the business client can send a parameter acquisition request to the business server, and the business server can respond to the parameter acquisition request of the business client and feedback the second key parameter generated for the business data to the business client, thereby supporting the business client to implement data encryption processing of the business data. In specific applications, the business server may specifically include but is not limited to: an independent physical server, a server cluster or distributed system composed of multiple physical servers, and one or more cloud servers that provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms, etc., and the embodiments of the present application do not impose specific restrictions on this.
[0039] Based on the implementation principle of the above data encryption method, this application embodiment proposes a specific data encryption method. Figure 2 , Figure 2 is a flowchart of the data encryption method, such as Figure 2 As shown, the method may at least include steps S201-S205:
[0040] S201. Obtain business data and a first key parameter provided by a business client for the business data.
[0041] In one embodiment, business data refers to data generated when a business client provides Internet services. Optionally, business data may be data that has been generated by the business client in a historical time period. The historical time period refers to a time period consisting of a period of time before the action of obtaining business data is performed. Optionally, business data may also be data input in real time in the business client after the business object triggers a data input operation. The business object refers to an object served by the business client. In actual applications, the business object may refer to an object with a client account registered in the business client.
[0042] Based on the above description, it is not difficult to understand that the business data in the embodiments of the present application may include but is not limited to one or two of the following: (1) Data used to indicate Internet business, such as business information, reference data required for implementing the Internet business, process data generated in the business execution process, etc. (2) Object data used to indicate the service object (or business object) of the Internet business, such as object behavior data, object attribute data, etc. Therefore, in one implementation method, when the business client obtains business data, it can correspondingly obtain it from the business database (used to store data generated by the business client), or obtain it from the data collected by the business data collection interface of the business client. Among them, the data collected from the business data collection interface can specifically be the data entered by the business object in the business data collection interface.
[0043] In one embodiment, the business client can be used to perform data encryption processing on business data, and the data encryption processing usually needs to be implemented with the help of an encryption key. In general, the encryption key needs to refer to one or more data when it is generated, and each data can be regarded as a key parameter. In an embodiment of the present application, the key parameter may at least include a first key parameter provided by the business client, and the number of the first key parameters is at least one. Exemplarily, the data used as the first key parameter by the business client may include, but is not limited to, one or more of the following: the client identifier of the business client, the object identifier of the business object using the business client, the random number generated by the business client for the business data, the business identifier of the Internet business to which the business data belongs, and the like.
[0044] In actual applications, the business client can trigger the operation of obtaining the first key parameter after receiving the data encryption instruction for the business data. The data encryption instruction is used to instruct the business client to perform data encryption processing on the business data. In addition, the data encryption instruction can be generated by the business client when the input operation of the business data is detected, and the generated data encryption instruction can be sent to the processing module for data encryption processing in the business client, so that the business client can obtain the first key parameter, thereby realizing data encryption processing of the business data. Optionally, the data encryption instruction can also be generated after the business client performs a confidentiality requirement assessment on the acquired business data and obtains an assessment result indicating that the confidentiality requirement of the business data is relatively large.
[0045] S202: Acquire a second key parameter of the business data, where the second key parameter includes: a random number related to the business data generated by the business server in response to a parameter acquisition request from the business client.
[0046] In one embodiment, the key parameters used to generate the encryption key also include a second key parameter provided by the business server for data encryption processing of business data. The business server refers to a server that has a communication connection with the business client and is used to provide support services such as data storage and / or data processing to the business client. In actual applications, after receiving a parameter acquisition request from the business client, the business server can respond to the parameter acquisition request, generate a random number, and then after generating a second key parameter containing the random number, feed the second key parameter back to the business client.
[0047] The parameter acquisition request may be generated and sent by the business client after acquiring the business data. Specifically, the business client may generate a parameter acquisition request when detecting that the business data has been successfully acquired, and then send the parameter acquisition request to the business server, so that the business client can receive the second key parameter from the business server. Optionally, the business client may also generate a parameter acquisition request after triggering the acquisition of the first key parameter. Triggering the acquisition of the first key parameter indicates that the business client determines that there is a data encryption requirement for the business data. In other words, the parameter acquisition request may be generated by the business client after determining that the business data needs to be encrypted.
[0048] Of course, in other implementations, the parameter acquisition request can also be pre-generated and sent to the business server before the business client acquires the business data. Then, when the business client receives the second key parameter, the second key parameter can be stored in the memory, so that when the business client performs data encryption processing on the business data, the second key parameter can be read from the memory, which effectively reduces the network interaction during the data encryption process, thereby improving the acquisition efficiency of the second key parameter to a certain extent, and ultimately bringing a certain efficiency improvement to the data encryption of the business data. It should be noted that after the business client reads the second key parameter from the memory, to prevent the second key parameter from being reused, the business client can delete the second key parameter from the memory and resend the parameter acquisition request to the business server, so that there can be a new second key parameter in the memory for the next data encryption process. In this way, the inconsistency between the second key parameters used in different data encryption processes can be maintained, thereby improving the encryption effect of the data encryption process.
[0049] Among them, different data encryption processing may include but is not limited to one or both of the following situations: (1) data encryption performed on business data at different times; (2) data encryption triggered by responses to different data encryption requests, and different data encryption requests may refer to different Internet objects, or data encryption requests initiated by different business clients for business data.
[0050] In addition, the parameter acquisition request may carry or include the authentication information of the business client, and the business server may obtain the authentication information of the business client by parsing the parameter acquisition request, and then authenticate the business client based on the authentication information, so as to respond to the parameter acquisition request after the business client's authentication is passed. The second parameter key is generated only after the authentication is passed, which can effectively reduce the probability of the business server responding to the parameter acquisition request sent by the client with malicious attack behavior, thereby reducing the probability of the business server exhausting resources due to responding to a large number of requests sent by the client, improving the stability of the business server, and further ensuring the stability of the data encryption function provided by the business client.
[0051] S203: Generate an encryption key for the business data according to the first key parameter and the second key parameter.
[0052] In one embodiment, a key (or Key) is a parameter input in an encryption algorithm that converts plaintext data into ciphertext data, or a decryption algorithm that converts ciphertext data into plaintext data. Among them, the key input in the encryption algorithm that converts plaintext data into ciphertext data is called an encryption key. In an embodiment of the present application, the generation of the encryption key needs to be implemented using a key generation algorithm, and the key generation algorithm used in the embodiment of the present application can be a pre-set fixed algorithm, or it can be dynamically selected from a plurality of preset key generation algorithms according to the encryption requirements of the business data, and is suitable for the target key generation algorithm used when the business data is encrypted. It is worth mentioning that in one implementation method, the target key generation algorithm can be determined based on the business type of the Internet business to which the business data belongs, such as: in the business client, the correspondence between the business type and the key generation algorithm is pre-set, and then the key generation algorithm corresponding to the business type of the Internet business to which the business data belongs is used as the target key generation algorithm.
[0053] In another implementation, the target key generation algorithm may also be specified by the business object that generates the business data. For example, after determining that data encryption processing needs to be performed on the business data, an algorithm selection interface may be displayed in the business client so that the business object can select the target key generation algorithm from the multiple key generation algorithms displayed in the algorithm selection interface. Of course, the business client may also instruct the business object to set the target key generation algorithm in advance, so that the business client can directly obtain the target key generation algorithm pre-set by the business object when determining that data encryption processing needs to be performed on the business data.
[0054] In a specific implementation, the business client can input the first key parameter and the second key parameter into the corresponding key generation algorithm, and then generate the encryption key required for data encryption processing of the business data by running the key generation algorithm after adding the first key parameter and the second key parameter. Among them, the encryption key is a piece of variable data, usually a string of one or more characters. The key generation algorithm (also referred to as a key derivation algorithm) used to generate the encryption key in the embodiment of the present application may include but is not limited to one or more of the following: PBKDF2 (Password-BasedKey Derivation Function2, password-based key derivation function 2), BCRYPT (cryptographic hash function based on Blowfish algorithm), SM3KDF (SM3 Key Derivation Function, SM3 key derivation algorithm), etc.
[0055] S204: Acquire a white box library file used when white box encryption is performed on the business data generated by the business client. The white box library file is at least used to indicate: an encryption algorithm used when white box encryption is performed on the business data generated by the business client.
[0056] In one embodiment, the white box library file is generated using white box cryptographic technology. Optionally, the white box library file can be generated using white box cryptographic technology before the business client triggers data encryption processing on the business data, or it can be generated using white box cryptographic technology during the process of performing data encryption processing on the business data, and the embodiments of the present application are not limited to this. Among them, white box cryptographic technology refers to: cryptographic technology that can resist attacks in a white box environment. A white box environment refers to an environment in which an attacker has complete control over the device terminal and can observe and change the internal data when the program is running. The core idea of white box cryptographic technology is to confuse the cryptographic algorithm (including encryption algorithm and / or decryption algorithm) so that the attacker cannot know the specific algorithm flow, thereby achieving the purpose of protecting key information, and can effectively prevent attackers from extracting keys in a white box environment, thereby ensuring the security of business data.
[0057] In practical applications, white-box cryptographic technology can be divided into dynamic white-box cryptographic technology and static white-box cryptographic technology. The white-box library file generated by dynamic white-box cryptographic technology can be called a dynamic white-box library file. Specifically, the dynamic white-box library file is obtained by permuting the encryption algorithm (including symmetric encryption algorithm and asymmetric encryption algorithm) using dynamic white-box cryptographic technology. The white-box library file generated by static white-box cryptographic technology can be called a static white-box library file. Among them, the static white-box library file is obtained by permuting the encryption algorithm (including symmetric encryption algorithm and asymmetric encryption algorithm) and the reference key of the service client using static white-box cryptographic technology, so that the static white-box library file can be used to indicate the white-box key and the obfuscated cryptographic algorithm. Exemplarily, the reference key of the service client can be the key assigned to the service client by the key management device.
[0058] S205: Use the white box library file and the encryption key to encrypt the business data to obtain ciphertext data of the business data.
[0059] In a specific embodiment, the business client can use the white box library file and the encryption key to encrypt the business data respectively, so as to obtain the ciphertext data of the business data by double encrypting the business data, thereby increasing the complexity of data encryption, and then increasing the difficulty of the attacker to crack the ciphertext data. Among them, the white box library file is used to implement white box encryption of business data, and the encryption key is used to implement data encryption different from white box encryption (such as SM4 symmetric encryption). In addition, the white box library file and the encryption key can be stored in the security control of the business client, or obtained by the security control, so that the business client can use the security control to implement encryption processing of the business data, thereby helping the business client to avoid security vulnerabilities and data leakage. Among them, the security control in the embodiment of the present application refers to: a software module, component or tool for ensuring system security or client security. The functions of the security control generally include but are not limited to: identity authentication, access control, encryption and decryption, audit logs, vulnerability scanning, etc.
[0060] In the embodiment of the present application, when the business client performs data encryption processing on the business data, the white box library file and the encryption key are used, so that the algorithm complexity of the data encryption processing of the business data is improved, thereby increasing the difficulty of the attacker to crack the ciphertext data, effectively ensuring the security of the business data, and realizing the effective encryption of the business data. In addition, since the encryption key used in the embodiment of the present application is generated based on the first key parameter provided by the business client and the second key parameter provided by the business server, the generation of the encryption key is the result of the joint participation of the business client and the business server, which increases the difficulty of cracking the encryption key of the business data. In addition, the second key parameter in the embodiment of the present application contains a random number, so that the encryption key generated by the business client is a dynamic key, and the interception of the dynamic key usually only causes a one-time leakage of the business data, and does not cause a serious threat to the security of the business client and the business data, and guarantees the security of the business client and the business data to a certain extent. In summary, it can be seen that the data encryption method proposed in the embodiment of the present application can realize the effective encryption of the business data, thereby improving the data security of the business data and the business client.
[0061] Based on the implementation principle of the above data encryption method and Figure 2 The data encryption method shown in the figure, this application embodiment proposes another specific data encryption method. Figure 3 , Figure 3 is a flowchart of the data encryption method. Figure 3 As shown, the method may at least include steps S301-S306:
[0062] S301: Acquire business data and a first key parameter provided by a business client for the business data.
[0063] In one embodiment, the specific manner in which the business client obtains the business data can refer to the relevant embodiment of the above step S201, which will not be repeated here.
[0064] After acquiring the business data, the business client can generate a string parameter, and then generate a key parameter containing the string parameter, so as to use the generated key parameter as the first key parameter. Among them, the string parameter contains one or more characters randomly generated by the business client. Exemplarily, the string parameter can be a random number composed of one or more random numbers. In a specific implementation, the key parameter generated by the business client can also include other data in addition to the string parameter. Optionally, the other data can be, for example, the client identifier of the business client mentioned in step S201 above, the object identifier of the business object using the business client, the random number generated by the business client for the business data, and one or more of the business identifiers of the Internet business to which the business data belongs.
[0065] In one embodiment, in order to save equipment resources while ensuring that the business client has high data security, the business client can trigger the step of obtaining the first key parameter provided by the business client for the business data when it is determined that it is necessary to encrypt the business data. In practical applications, the business data that needs to be encrypted is usually the privacy data of the business object, or the data with a high confidentiality coefficient in the business client, such as the database management account information and the data transmission node management account information in the business client. It should be noted that the method of determining whether it is necessary to encrypt the business data can be determined in a specific application scenario, depending on the type of business provided by the business client, and / or the business object served by the business client, and / or other information of reference significance, and the embodiments of the present application do not impose specific restrictions on this.
[0066] Exemplarily, in an embodiment of the present application, a business client may determine that data encryption of the business data is necessary when the data features of the business data are similar to any preset data features. Specifically, after acquiring the business data, the business client may extract features of the business data to obtain the data features of the business data. Further, the business client may calculate the feature similarity between the data features of the business data and each of the preset data features in one or more preset data features, and trigger the execution of related operations for obtaining the first key parameter when the feature similarity between the data features of the business data and any preset data features is greater than or equal to the similarity threshold.
[0067] Among them, feature extraction of business data can be achieved by the business client using an artificial neural network to extract feature vectors, or it can be achieved by using other methods (such as principal component analysis, linear discriminant analysis, independent component analysis, etc.) to extract features, and the embodiments of the present application do not limit this. In addition, the preset data features can be data features obtained by extracting features from business data generated within a historical period and having encryption requirements. It can be understood that the feature similarity between the data features of the business data and any preset data features is greater than or equal to the similarity threshold, indicating that the data features of the business data are similar to the preset data features, and then determining the necessity of performing data encryption processing on the business data.
[0068] Optionally, the similarity threshold may be a pre-set fixed value, or a value set based on a threshold setting request. The threshold setting request may be received during the data encryption process, and the threshold setting request is used to indicate a specific similarity threshold. In addition, the similarity threshold may also be a numerical value of a certain similarity determined based on the feature similarity between the data features of the business data and each preset data feature. Optionally, the business client may determine the maximum feature similarity based on one or more preset data features and the data features of the business data as the similarity threshold. Of course, optionally, the business client may also use other similarities among the determined feature similarities as the similarity threshold, or use the mathematical operation result obtained after performing a certain mathematical operation (such as arithmetic average operation or weighted average operation, etc.) on the determined feature similarities as the similarity threshold, and the embodiments of the present application are not limited to this.
[0069] S302: Acquire a second key parameter of the business data, where the second key parameter includes: a random number related to the business data generated by the business server in response to a parameter acquisition request from the business client.
[0070] In one embodiment, the second key parameter is generated by the business server in response to the parameter acquisition request of the business client. The parameter acquisition request may be generated when the business client detects an input operation (or input request) of business data of a preset type. The preset type of business data includes sensitive data applicable to the business client, such as data closely related to the information security or property security of the business object of the business client. For example, the sensitive data may be data such as the account password, payment password, etc. of the business object.
[0071] In actual applications, the business client can generate a parameter acquisition request when displaying the business data collection interface, and send the parameter acquisition request to the business server, so that the business server can respond to the parameter acquisition request, randomly generate the second key parameter, and then obtain the second key parameter by receiving the second key parameter sent by the business client. Exemplarily, the business data collection interface can specifically refer to a collection interface for sensitive data, such as Figure 4 The payment password input interface shown.
[0072] S303: Generate an encryption key for the business data according to the first key parameter and the second key parameter.
[0073] In one embodiment, the specific implementation of step S303 can refer to the relevant embodiment of the above-mentioned step S203, and the embodiment of the present application will not be repeated here.
[0074] S304: Acquire a white box library file used when white box encryption is performed on the business data generated by the business client. The white box library file is at least used to indicate: an encryption algorithm used when white box encryption is performed on the business data generated by the business client.
[0075] In one embodiment, the white box library file can be a dynamic white box library file, and the generation method of the dynamic white box library file can be as follows: the business client responds to the file generation request for generating the white box library file of the business client, and obtains the file reference information. Among them, the file reference information at least includes the algorithm identifier and the operating system identifier of the encryption algorithm. The operating system identifier is used to indicate: the operating system used by the computer device (such as the terminal device mentioned above) running the business client. Optionally, the operating system can be such as an Android operating system or an IOS operating system. Further, the business client can query the code block associated with the algorithm identifier from the code library associated with the operating system identifier, thereby generating a white box library file by running the queried code block. Optionally, the generated white box library file can at least include: one or more randomly generated lookup tables, and the lookup code corresponding to each lookup table. Among them, the lookup code of each lookup table is used to indicate the lookup logic used when performing a lookup operation on the lookup table, so that the white box library file can at least be used to indicate the way to perform white box encryption on the business data. Since the white box library file is generated by using the code blocks in the code library associated with the operating system corresponding to the business client, the generated white box library file can be more adapted to the data encryption processing of the business client, thereby improving the efficiency and stability of the data encryption processing to a certain extent.
[0076] In practical applications, the white box library file can also be a static white box library file, and when the business client generates a static white box library file, the business client uses the reference key and encryption algorithm of the business client as a whole to generate a key white box (i.e., a static white box library file). In other words, one reference key corresponds to one key white box. It can be seen that since the corresponding reference key of the static white box library file is determined, targeted optimization can be performed when generating the static white box library file. For example, the relevant transformation values of each number in the pre-calculated key are stored, so that when there are pre-calculated key numbers in the reference key, the business client can directly obtain the transformation values corresponding to the relevant data, reduce the complexity of data processing, thereby improving the calculation efficiency, and thus improving the generation efficiency of the static white box library.
[0077] When using a key white box to encrypt business data, the plaintext business data is input into the corresponding data encryption module for data encryption processing, and the ciphertext data corresponding to the business data can be obtained without inputting the white box key. For example, the principle of using a static white box library file to implement data encryption (i.e., the principle of static white box encryption) can be found in Figure 5a As shown, the principle of using dynamic white box library files to implement data encryption (i.e. the principle of dynamic white box encryption) can be found in Figure 5b As shown. Among them, Figure 5a The content indicated in the dashed box is the data contained in the static white box library file. Figure 5b The content indicated in the dashed box is the data contained in the dynamic white box library file. Figure 5b The white box key in the is obtained by converting the reference key using the white box cryptography technology used to generate the dynamic white box library file. The business client transfers the white box key to the matching dynamic white box library file to perform white box encryption of business data.
[0078] S305: Encrypt the business data based on the encryption key to obtain reference encrypted data of the business data.
[0079] In one embodiment, the SM4 encryption algorithm can be used to encrypt the business data based on the encryption key, or the AES encryption algorithm can be used to encrypt the business data based on the encryption key. Among them, the SM4 encryption algorithm is a block cipher algorithm, which is used as a commercial encryption algorithm standard. It mainly uses a 32-bit encryption key and a 128-bit plaintext block size for encrypting and decrypting data. The AES encryption algorithm is a symmetric encryption algorithm, also known as the Rijndael encryption algorithm. It is a block encryption algorithm that encrypts a fixed-length data block to generate a fixed-length ciphertext. At present, the AES encryption algorithm is widely used in various information security fields, such as: encrypted communication field, data storage field, and digital signature field. Of course, the business client can also use other encryption algorithms (such as the SM3 encryption algorithm) to implement encryption of business data to obtain reference encrypted data, and the embodiment of the present application does not limit this.
[0080] S306. Use the encryption algorithm indicated by the white-box library file to perform white-box encryption on the reference encrypted data to obtain ciphertext data of the business data.
[0081] In one embodiment, in order to make the ciphertext data of the business data have a better confidentiality effect, the business client can also use the encryption algorithm indicated by the white box library file to perform white box encryption on the reference encrypted data to use the final data as the ciphertext data of the business data.
[0082] In one embodiment, step S305 and step S306 mainly describe that the business client can perform double hybrid encryption on the business data based on the white box library file and the encryption key. Specifically, the business data can be encrypted by one encryption method to obtain reference encrypted data, and then the reference encrypted data can be encrypted again by another encryption method to obtain the ciphertext data of the business data. So, that is to say, steps S305 and S306 only describe one of the ways to generate ciphertext data. Optionally, in actual applications, the business client can also use the following method to obtain ciphertext data: the business client first uses the encryption algorithm indicated by the white box library file to perform white box encryption on the business data to obtain reference encrypted data of the business data, and then encrypts the reference encrypted data of the business data based on the encryption key to obtain the ciphertext data of the business data. Exemplarily, the white box encryption mentioned in this application can be white box encryption implemented based on the SM4 white box cryptographic algorithm. The SM4 white box cryptographic algorithm refers to a white box encryption algorithm proposed based on the algorithm principle of SM4 and the principle of white box encryption technology in the current data encryption field. The embodiment of this application does not specifically describe the algorithm.
[0083] In the embodiment of the present application, when the data characteristics of the business data are similar to any preset data characteristics, the business client triggers the data encryption processing of the business data, which can save equipment resources while ensuring that the business client has high data security. In addition, when performing data encryption processing on the business data, the white box library file and the encryption key are used, so that the data encryption processing of the business data is hybrid encryption. Therefore, even if the business client is running in a white box attack environment, the security of the business data can be well guaranteed and the business data can be effectively protected. It can be seen that the algorithm complexity of the data encryption processing of the business data in the embodiment of the present application is improved, thereby increasing the difficulty of the attacker to crack the ciphertext data, which can effectively ensure the security of the business data and realize the effective encryption of the business data. In addition, in the specific implementation, the white box encryption of the relevant data can be realized based on the SM4 white box encryption algorithm, so that the business client can not rely on additional hardware equipment for the data encryption of the business data, so that the protection of the sensitive data of the business client is autonomous and controllable, which is in line with the guidance of relevant laws and regulations, and thus the data encryption method proposed in the embodiment of the present application can be applied to many mainstream encryption platforms. Then, the security control developed based on this method will also have a strong market application value.
[0084] Above Figure 2 as well as Figure 3 The data encryption method shown can be widely used in multiple data encryption scenarios. The following takes the encryption scenario of payment data as an example to explain the specific application process of the embodiment of the present application in detail, so that relevant personnel can deeply understand the application value of the embodiment of the present application. Among them, the principle of encrypting payment data (such as payment password) can be found in Figure 6 shown.
[0085] When it is detected that the business object needs to input the payment password, the business client can display the secure keyboard so that the business object can enter the payment password in the secure keyboard. The secure keyboard refers to a security control in the business client. Using this control to input data can prevent other applications (or clients) running the business client from detecting and / or recording the typed content, thereby effectively improving the security of the payment password. The data entered by the business object is plain text data (such as Figure 6 In order to encrypt the plaintext data, the business client needs to call the key derivation algorithm (such as Figure 6The encryption key is generated by using the SM3KDF key derivation algorithm in the encryption key. The encryption key is generated after obtaining the device ID (identity document), business object ID, business ID, random number and salt value. The random number is generated by the business client, and the salt value is generated by the business server, which is also a random number in nature. After obtaining the encryption key, the business client can perform encryption processing on the plaintext data based on the encryption key (such as Figure 6 SM4 encryption in ) to obtain the reference ciphertext data (such as Figure 6 SM4 ciphertext in ). Furthermore, the business client can obtain the white box library file, and use the white box library file to perform secondary encryption processing on the reference ciphertext data, and finally obtain the ciphertext data of the business data. Since the encryption key and the white box library file are used in succession when encrypting the payment password, the business client performs multiple hybrid encryption on the data encryption of the payment password, which makes the payment password after encryption highly confidential, realizes the effective encryption of the payment data, and thus improves the asset security of the relevant business objects.
[0086] based on Figure 2 as well as Figure 3 In a data encryption method, the present application embodiment also proposes a data encryption device, which can be a computer program running in a service client or an interrupt device. In a specific embodiment, the data encryption device can be used to execute Figure 2 as well as Figure 3 See the steps for the data encryption method shown in Figure 7 The data encryption device at least includes: a first acquisition unit 701, a second acquisition unit 702, a generation unit 703, a third acquisition unit 704 and an encryption unit 705.
[0087] in:
[0088] A first acquisition unit 701 is used to acquire service data and a first key parameter provided by the service client for the service data;
[0089] A second acquisition unit 702 is configured to acquire a second key parameter of the service data, where the second key parameter includes: a random number related to the service data generated by the service server in response to a parameter acquisition request from the service client;
[0090] A generating unit 703, configured to generate an encryption key for the service data according to the first key parameter and the second key parameter;
[0091] The third acquisition unit 704 is used to acquire a white box library file used when white box encryption is performed on the service data generated by the service client, wherein the white box library file is used to indicate at least an encryption algorithm used when white box encryption is performed on the service data generated by the service client;
[0092] The encryption unit 705 is used to use the white box library file and the encryption key to perform data encryption processing on the business data to obtain ciphertext data of the business data.
[0093] In one implementation, the encryption unit 705 may be specifically configured to perform:
[0094] Encrypting the service data based on the encryption key to obtain reference encrypted data of the service data;
[0095] The reference encrypted data is white-box encrypted using the encryption algorithm indicated by the white-box library file to obtain ciphertext data of the business data.
[0096] In yet another embodiment, the encryption unit 705 may be specifically configured to execute:
[0097] Using the encryption algorithm indicated by the white-box library file, white-box encryption is performed on the business data to obtain reference encrypted data of the business data;
[0098] The reference encrypted data of the business data is encrypted based on the encryption key to obtain the ciphertext data of the business data.
[0099] In yet another implementation, the first acquiring unit 701 may be specifically configured to execute:
[0100] Generate a string parameter, the string parameter including one or more randomly generated characters;
[0101] A key parameter including the string parameter is generated, and the key parameter is used as the first key parameter.
[0102] In yet another implementation, the first acquisition unit 701 may be configured to execute:
[0103] Extracting features from the business data to obtain data features of the business data;
[0104] Calculating respectively the feature similarity between each of the one or more preset data features and the data feature of the business data;
[0105] If there is any preset data feature, and the feature similarity between the feature and the data feature of the business data is greater than or equal to the similarity threshold, then the step of obtaining the first key parameter generated by the business client for the business data is triggered.
[0106] In yet another implementation, the second obtaining unit 702 may be configured to execute:
[0107] After displaying the business data collection interface, sending a parameter acquisition request to the business server, so that the business server randomly generates the second key parameter in response to the parameter acquisition request;
[0108] Receive a second key parameter sent by the service server.
[0109] In yet another implementation, the third obtaining unit 704 may be configured to execute:
[0110] In response to a file generation request for generating a white box library file of the business client, file reference information is obtained; the file reference information at least includes an algorithm identifier of the encryption algorithm and an operating system identifier, the operating system identifier is used to indicate: an operating system used by a computer device running the business client;
[0111] Querying a code block associated with the algorithm identifier from a code library associated with the operating system identifier;
[0112] The white box library file is generated by running the queried code block.
[0113] According to one embodiment of the present application, Figure 7 The various units in the data encryption device shown are divided based on logical functions, and the above-mentioned various units can be separately or all combined into one or several other units to constitute, or one (some) of the units can be further divided into multiple functionally smaller units to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. In other embodiments of the present application, the above-mentioned data encryption device may also include other units, and in actual applications, these functions can also be implemented with the assistance of other units, and can be implemented with the assistance of multiple units.
[0114] According to another embodiment of the present application, a program that can execute the following operations can be executed on a general communication device such as the above-mentioned terminal device, which includes a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM), and other processing elements and storage elements. Figure 2 and Figure 3 A computer program (including program code) for each step of the method shown in FIG. Figure 7The data encryption device shown in the figure is used to implement the data encryption method of the embodiment of the present application. The computer program can be recorded on a computer storage medium, for example, and loaded into the above-mentioned terminal device through the computer storage medium and run therein.
[0115] In the embodiment of the present application, the data encryption device uses a white box library file and an encryption key when performing data encryption processing on the business data, so that the algorithm complexity of the data encryption processing of the business data is improved, thereby increasing the difficulty of the attacker to crack the ciphertext data, effectively ensuring the security of the business data, and realizing the effective encryption of the business data. In addition, since the encryption key used in the embodiment of the present application is generated based on the first key parameter provided by the business client and the second key parameter provided by the business server, the generation of the encryption key is the result of the joint participation of the business client and the business server, which increases the difficulty of cracking the encryption key of the business data. In addition, the second key parameter in the embodiment of the present application contains a random number, so that the encryption key generated by the data encryption device is a dynamic key, and the interception of the dynamic key usually only causes a one-time leakage of the business data, and does not cause a serious threat to the security of the business client and the business data, and guarantees the security of the business client and the business data to a certain extent. In summary, it can be seen that the data encryption method proposed in the embodiment of the present application can realize the effective encryption of the business data, thereby improving the data security of the business data and the business client.
[0116] Based on the relevant description of the above method embodiment and the device embodiment, the embodiment of the present application also provides a terminal device, which can be used to run a service client. Figure 8, the terminal device at least includes a processor 801 and a computer storage medium 802, and the processor 801 and the computer storage medium 802 are connected via a bus or other means. Among them, the computer storage medium 802 mentioned above is a memory device in the terminal device, which is used to store programs and data. It can be understood that the computer storage medium 802 here can include both the built-in storage medium in the terminal device and the extended storage medium supported by the terminal device. The computer storage medium 802 provides a storage space, which stores the operating system of the terminal device. In addition, one or more computer programs suitable for being loaded and executed by the processor 801 are also stored in the storage space, and these computer programs can be one or more program codes. It should be noted that the computer storage medium here can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage; optionally, it can also be at least one storage medium located away from the aforementioned processor. The processor 801 (or CPU (Central Processing Unit)) is the computing core and control core of the terminal device, which is suitable for implementing one or more computer programs, and is specifically suitable for loading and executing one or more computer programs to implement corresponding method processes or corresponding functions.
[0117] In one embodiment, the processor 801 may load and execute one or more computer programs stored in the computer storage medium 802 to implement the above-mentioned Figure 2 as well as Figure 3 Corresponding method steps in the method embodiment shown. In a specific implementation, one or more computer programs in the computer storage medium 802 can be loaded by the processor 801 and execute the following steps:
[0118] Acquire business data and a first key parameter provided by the business client for the business data;
[0119] Acquire a second key parameter of the business data, where the second key parameter includes: a random number related to the business data generated by the business server in response to a parameter acquisition request from the business client;
[0120] generating an encryption key for the service data according to the first key parameter and the second key parameter;
[0121] Acquire a white box library file used when white box encryption is performed on the service data generated by the service client, wherein the white box library file is at least used to indicate: an encryption algorithm used when white box encryption is performed on the service data generated by the service client;
[0122] The business data is encrypted using the white box library file and the encryption key to obtain ciphertext data of the business data.
[0123] In one implementation, the processor 801 may be specifically configured to load and execute:
[0124] Encrypting the service data based on the encryption key to obtain reference encrypted data of the service data;
[0125] The reference encrypted data is white-box encrypted using the encryption algorithm indicated by the white-box library file to obtain ciphertext data of the business data.
[0126] In yet another implementation, the processor 801 may be specifically configured to load and execute:
[0127] Using the encryption algorithm indicated by the white-box library file, white-box encryption is performed on the business data to obtain reference encrypted data of the business data;
[0128] The reference encrypted data of the business data is encrypted based on the encryption key to obtain the ciphertext data of the business data.
[0129] In yet another implementation, the processor 801 may be specifically configured to load and execute:
[0130] Generate a string parameter, the string parameter including one or more randomly generated characters;
[0131] A key parameter including the string parameter is generated, and the key parameter is used as the first key parameter.
[0132] In yet another implementation, the processor 801 may be specifically configured to load and execute:
[0133] Extracting features from the business data to obtain data features of the business data;
[0134] Calculating respectively the feature similarity between each of the one or more preset data features and the data feature of the business data;
[0135] If there is any preset data feature, and the feature similarity between the feature and the data feature of the business data is greater than or equal to the similarity threshold, then the step of obtaining the first key parameter generated by the business client for the business data is triggered.
[0136] In yet another implementation, the processor 801 may be specifically configured to load and execute:
[0137] After displaying the business data collection interface, sending a parameter acquisition request to the business server, so that the business server randomly generates the second key parameter in response to the parameter acquisition request;
[0138] Receive a second key parameter sent by the service server.
[0139] In yet another implementation, the processor 801 may be specifically configured to load and execute:
[0140] In response to a file generation request for generating a white box library file of the business client, file reference information is obtained; the file reference information at least includes an algorithm identifier of the encryption algorithm and an operating system identifier, the operating system identifier is used to indicate: an operating system used by a computer device running the business client;
[0141] Querying a code block associated with the algorithm identifier from a code library associated with the operating system identifier;
[0142] The white box library file is generated by running the queried code block.
[0143] In the embodiment of the present application, when the terminal device performs data encryption processing on the business data, the white box library file and the encryption key are used, so that the algorithm complexity of the data encryption processing of the business data is improved, thereby increasing the difficulty for the attacker to crack the ciphertext data, effectively ensuring the security of the business data, and realizing the effective encryption of the business data. In addition, since the encryption key used in the embodiment of the present application is generated based on the first key parameter provided by the business client in the terminal device and the second key parameter provided by the business server, the generation of the encryption key is the result of the joint participation of the business client and the business server, which increases the difficulty of cracking the encryption key of the business data. In addition, the second key parameter in the embodiment of the present application contains a random number, so that the encryption key generated by the business client in the terminal device is a dynamic key, and the interception of the dynamic key usually only causes a one-time leakage of the business data, and does not cause a serious threat to the security of the business client and the business data, and guarantees the security of the business client and the business data to a certain extent. In summary, it can be seen that the data encryption method proposed in the embodiment of the present application can realize the effective encryption of the business data, thereby improving the data security of the business data and the business client.
[0144] The embodiment of the present application also provides a computer storage medium, in which one or more computer programs corresponding to the above-mentioned data encryption method are stored. When the processor loads and executes the one or more computer programs, the description of the data encryption method in the embodiment can be implemented, and the embodiment of the present application will not be repeated here. Correspondingly, the description of the beneficial effects of adopting the same method will not be repeated here. In addition, it is worth mentioning that the computer program can be deployed on one or more devices that can communicate with each other for execution.
[0145] In addition, it should be noted that according to one aspect of the embodiments of the present application, a program product or a computer program is also provided, the program product includes a computer program, and the computer program is stored in a computer storage medium. The processor in the terminal device reads the computer program from the computer storage medium and then executes the computer program, thereby enabling the terminal device to perform the above Figure 2 as well as Figure 3 In the relevant embodiments of the data encryption method shown, implementation methods are proposed for various optional methods in various aspects.
[0146] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer storage medium, and when the computer program is executed, it can include all the processes related to the above-mentioned data encryption method. Among them, the computer storage medium may include a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0147] In addition, it can be understood that what is disclosed above is only a partial embodiment of the present application, and it certainly cannot be used to limit the scope of rights of the present application. Ordinary technicians in this field can understand that the entire or partial process of implementing the above-mentioned embodiment and the equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A data encryption method, characterized in that: The method is applied to a business client, and the method comprises: Acquire business data and a first key parameter provided by the business client for the business data; Acquire a second key parameter of the business data, where the second key parameter includes: a random number related to the business data generated by the business server in response to a parameter acquisition request from the business client; generating an encryption key for the service data according to the first key parameter and the second key parameter; Acquire a white box library file used when white box encryption is performed on the service data generated by the service client, wherein the white box library file is at least used to indicate: an encryption algorithm used when white box encryption is performed on the service data generated by the service client; The business data is encrypted using the white box library file and the encryption key to obtain ciphertext data of the business data.
2. The method according to claim 1, characterized in that The using the white box library file and the encryption key to perform data encryption processing on the business data to obtain ciphertext data of the business data includes: Encrypting the service data based on the encryption key to obtain reference encrypted data of the service data; The reference encrypted data is white-box encrypted using the encryption algorithm indicated by the white-box library file to obtain ciphertext data of the business data.
3. The method according to claim 1, characterized in that: The using the white box library file and the encryption key to perform data encryption processing on the business data to obtain ciphertext data of the business data includes: Using the encryption algorithm indicated by the white-box library file, white-box encryption is performed on the business data to obtain reference encrypted data of the business data; The reference encrypted data of the business data is encrypted based on the encryption key to obtain the ciphertext data of the business data.
4. The method according to claim 1, characterized in that: The method of obtaining the first key parameter includes: Generate a string parameter, the string parameter including one or more randomly generated characters; A key parameter including the string parameter is generated, and the key parameter is used as the first key parameter.
5. The method according to claim 1, characterized in that The method further comprises: Extracting features from the business data to obtain data features of the business data; Calculating respectively the feature similarity between each of the one or more preset data features and the data feature of the business data; If there is any preset data feature, and the feature similarity between the feature and the data feature of the business data is greater than or equal to the similarity threshold, then the step of obtaining the first key parameter generated by the business client for the business data is triggered.
6. The method according to claim 1, characterized in that The method of obtaining the second key parameter of the service data includes: After displaying the business data collection interface, sending a parameter acquisition request to the business server, so that the business server randomly generates the second key parameter in response to the parameter acquisition request; Receive a second key parameter sent by the service server.
7. The method according to claim 1, characterized in that The generation method of the white box library file includes: In response to a file generation request for generating a white box library file of the business client, file reference information is obtained; the file reference information at least includes an algorithm identifier of the encryption algorithm and an operating system identifier, the operating system identifier is used to indicate: an operating system used by a computer device running the business client; Querying a code block associated with the algorithm identifier from a code library associated with the operating system identifier; The white box library file is generated by running the queried code block.
8. A data encryption device, characterized in that: include: A first acquisition unit, used to acquire service data and a first key parameter provided by the service client for the service data; A second acquisition unit is used to acquire a second key parameter of the service data, where the second key parameter includes: a random number related to the service data generated by the service server in response to a parameter acquisition request from the service client; a generating unit, configured to generate an encryption key for the service data according to the first key parameter and the second key parameter; A third acquisition unit is used to acquire a white box library file used when white box encryption is performed on the service data generated by the service client, wherein the white box library file is at least used to indicate: an encryption algorithm used when white box encryption is performed on the service data generated by the service client; The encryption unit is used to use the white box library file and the encryption key to perform data encryption processing on the business data to obtain ciphertext data of the business data.
9. A terminal device, characterized in that: include: A processor configured to execute one or more computer programs; A computer storage medium storing one or more computer programs, wherein the one or more computer programs are suitable for being loaded by the processor and implementing the data encryption method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that: The computer storage medium stores one or more computer programs, and the one or more computer programs are suitable for being loaded by a processor and implementing the data encryption method according to any one of claims 1 to 7.
