Data playing method and device, equipment and storage medium
By dividing the white box password algorithm into multiple sub-algories and sharing operations on the client device and server, the data playback problem caused by low client device configuration is solved, and data processing speed and security are improved.
Patent Information
- Application Number
- CN202411129652.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-12-03
AI Technical Summary
Due to the low configuration of the client device when playing data, the calculation resources are consumed too much during the processing of the white box password algorithm, resulting in lag.
The white box cipher algorithm is divided into at least two white box codon algorithms, which are run on the client device and the server respectively, and send data through the transmission layer security protocol to reduce the computing pressure of the client device and improve data processing efficiency.
It effectively avoids playback stuttering caused by low client device configuration, improves data processing speed and user experience, and ensures the security of data transmission.
Smart Images

Figure CN119071572A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data playback, and in particular to a data playback method, device, equipment and storage medium. Background Art
[0002] The DRM (Digital Rights Management) system is a digital rights management system that is mainly used to prevent the illegal copying and dissemination of digital content. The combination of white-box cryptographic algorithms and virtual machine technology, two technologies that are not easily cracked, can be used as the root of trust for software DRM systems. Among them, the purpose of the white-box cryptographic algorithm is to protect the security of encryption algorithms and keys in an untrusted environment. Even if an attacker can fully control and observe the computational process at runtime, he or she cannot effectively reverse the key or decrypt the data. At present, during the data playback process, if the client device has a low configuration, the client device will consume a lot of computing resources when running the white-box cryptographic algorithm, which will cause the client device to freeze during the data playback process.
[0003] Therefore, how to improve the data playback speed of the client device is a technical problem that those skilled in the art need to solve. Summary of the invention
[0004] The present application provides a data playback method, apparatus, device and storage medium to increase the data playback speed of a client device.
[0005] In a first aspect, the present application provides a data playback method, comprising:
[0006] Acquire target data during the data playback process; wherein the target data is data that needs to be processed by a white-box cryptographic algorithm during the data playback process of the client device; the white-box cryptographic algorithm includes at least two white-box cryptographic sub-algorithms;
[0007] The target data is processed using the at least two white-box cryptography algorithms; the at least two white-box cryptography algorithms are respectively run on the client device and the server.
[0008] Optionally, the processing of the target data using the at least two white-box codon algorithms comprises:
[0009] Determine the execution order of each white-box codon algorithm;
[0010] Taking the target data as input data, and sequentially running each white-box codon algorithm according to the execution order to complete processing of the target data;
[0011] Wherein, the client device and the server send data via the transport layer security protocol; the data sent between the client device and the server include: target data, intermediate result data, and final result data.
[0012] Optionally, the data playback method further includes:
[0013] The white-box cryptography algorithm running on the client device and the white-box cryptography algorithm running on the server are updated at a predetermined time period.
[0014] Optionally, the data playback method further includes:
[0015] If it is detected that the server is attacked, the white-box cryptography algorithm running on the client device and the white-box cryptography algorithm running on the server are updated.
[0016] Optionally, before acquiring the target data, the data playing method further includes:
[0017] Splitting the white-box cryptographic algorithm into at least two white-box cryptographic sub-algorithms;
[0018] Determining a white-box cryptography algorithm to be executed on the client device and a white-box cryptography algorithm to be executed on the server from the at least two white-box cryptography algorithms;
[0019] A white-box cryptographic algorithm is sent to the server for execution at the server.
[0020] Optionally, determining a white-box cryptography algorithm running on the client device and a white-box cryptography algorithm running on the server from the at least two white-box cryptography algorithms comprises:
[0021] The white-box cryptography algorithm running on the client device and the white-box cryptography algorithm running on the server are determined according to at least one of the computational load level, importance level and communication times of each white-box cryptography algorithm; wherein the communication times are the number of times data is sent between the client device and the server.
[0022] Optionally, determining the white-box cryptographic algorithm running on the client device and the white-box cryptographic algorithm running on the server according to at least one of the computation level, importance level, and number of communications of each white-box cryptographic algorithm comprises:
[0023] Determine a preliminary white-box cryptographic algorithm from the white-box operator algorithms, the algorithm having an operation level higher than a first predetermined level and an importance level lower than a second predetermined level;
[0024] Determine the number of communications between the client device and the server; the number of communications is the number of times data needs to be sent between the client device and the server to process the target data after the primary white-box cryptographic algorithm is run on the server;
[0025] Determining whether the number of communications is greater than a predetermined threshold;
[0026] If not, the initially selected white-box cryptography algorithm is used as the white-box cryptography algorithm running on the server, and other white-box cryptography algorithms except the initially selected white-box cryptography algorithm are used as the white-box cryptography algorithms running on the client device.
[0027] In a second aspect, the present application provides a data playback device, comprising:
[0028] An acquisition module is used to acquire target data during the data playback process; wherein the target data is data that needs to be processed by a white box cryptographic algorithm during the data playback process of the client device; the white box cryptographic algorithm includes at least two white box cryptographic sub-algorithms;
[0029] A processing module is used to process the target data using the at least two white-box cryptographic algorithms; the at least two white-box cryptographic algorithms are respectively run on the client device and the server.
[0030] In a second aspect, the present application provides an electronic device, including:
[0031] A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the data playback method described in any one of the above items of the present application through the computer program.
[0032] In a third aspect, the present application provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the data playback method described in any one of the above items of the present application.
[0033] The above-mentioned technical scheme provided by the embodiment of the present application has the following advantages compared with the prior art: when playing data, the present application needs to obtain target data during the data playback process; the target data is the data that needs to be processed by the white-box cryptographic algorithm of the client device during the data playback process; and, since the white-box cryptographic algorithm in the present application includes at least two white-box cryptographic algorithms, and the at least two white-box cryptographic algorithms are respectively run on the client device and the server, the present application uses at least two white-box cryptographic algorithms to process the target data, which can transfer part of the calculation work that originally needs to be completed by the client device alone to the server. This method can greatly reduce the data calculation pressure of the client device and avoid the playback jamming phenomenon caused by the low configuration of the client device. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0036] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0037] Figure 1 A schematic diagram of a hardware environment for a data playback method provided in an embodiment of the present application;
[0038] Figure 2 A schematic diagram of a data playback method flow provided in an embodiment of the present application;
[0039] Figure 3 A specific data processing flow chart provided for an embodiment of the present application;
[0040] Figure 4 A schematic diagram of another data playback method flow provided in an embodiment of the present application;
[0041] Figure 5a A schematic diagram of a device root of trust composition provided in an embodiment of the present application;
[0042] Figure 5b A schematic diagram of another device trust root composition provided in an embodiment of the present application;
[0043] Figure 6 A schematic diagram of the structure of a data playback device provided in an embodiment of the present application;
[0044] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0046] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0047] In order to solve the technical problem in the prior art that the terminal device may experience a freeze when playing data due to low terminal device configuration, the present application provides a data playback method, apparatus, device and storage medium to increase the data playback speed of the client device.
[0048] See also Figure 1 , is a schematic diagram of a hardware environment of a data playback method provided by an embodiment of the present invention; through Figure 1 It can be seen that the data playback method described in this solution can be applied to Figure 1 In the hardware environment composed of the client device 11 and the server 12 shown in FIG. Figure 1 As shown, the client device 11 and the server 12 are connected via a network so that data can be transmitted between the client device 11 and the server 12; the client device 11 is not limited to a PC (Personal Computer), a mobile phone, a tablet computer, etc.
[0049] When executing the data playback method, the present application is used to obtain target data in the process of playing data; the target data is data that needs to be processed by a white-box cryptographic algorithm during the data playback process of the client device 11; and the white-box cryptographic algorithm includes at least two white-box cryptographic algorithms, which are respectively run on the client device 11 and the server 12. Therefore, in the present embodiment, the client device 11 is also used to run the white-box cryptographic algorithm assigned to the client device 11; the server 12 is specifically used to run the white-box cryptographic algorithm assigned to the server 12. The present application completes the processing of the target data through the white-box cryptographic algorithm on the client device 11 and the white-box cryptographic algorithm on the server 12.
[0050] For example: the white-box cryptographic algorithm includes white-box cryptographic algorithm 1, white-box cryptographic algorithm 2 and white-box cryptographic algorithm 3, wherein white-box cryptographic algorithm 2 runs on the server 12, and white-box cryptographic algorithm 1 and white-box cryptographic algorithm 3 run on the client device 11, and the execution order of each sub-algorithm is: white-box cryptographic algorithm 1-white-box cryptographic algorithm 2-white-box cryptographic algorithm 3. Therefore, when processing the target data, the client device 11 first runs the white-box cryptographic algorithm 1 to process the target data to obtain intermediate result data 1, and sends the intermediate result data 1 to the server 12 through the network. The server 12 runs the white-box cryptographic algorithm 2 to process the intermediate result data 1 to obtain intermediate result data 2, and sends the intermediate result data 2 to the client device 11 through the network. The client device 11 runs the white-box cryptographic algorithm 3 to process the intermediate result data 2 to obtain the final result data.
[0051] From the above, it can be seen that since the white-box cryptographic algorithm in the present application includes at least two white-box cryptographic algorithms, and the at least two white-box cryptographic algorithms are respectively run on the client device and the server, the present application uses at least two white-box cryptographic algorithms to process the target data. The computing work that originally needs to be completed by the client device alone can be transferred to the high-performance server. This method not only improves security, making the white-box cryptographic algorithm on the client more difficult to crack the key, but also enables the client device to quickly perform white-box cryptographic operations, greatly reducing the data computing pressure of the client device, improving data processing efficiency, and increasing the start-up speed, avoiding playback jams caused by low client device configuration, and improving user experience.
[0052] See also Figure 2 , Figure 2 A data playback method flow chart provided in an embodiment of the present application, through Figure 2 It can be seen that this scheme specifically includes the following steps:
[0053] S101, obtaining target data during data playback; wherein the target data is data that needs to be processed by a white-box cryptographic algorithm during data playback by a client device; the white-box cryptographic algorithm includes at least two white-box cryptographic sub-algorithms;
[0054] Specifically, the playback data in this application can be video data, audio data, or any other form of data, which is not specifically limited here. Moreover, the target data in this application is not limited to a certain type of data. As long as the data meets the following conditions, it can be called target data: Condition 1: The data is the data used by the client device in the process of playing data; Condition 2: The data needs to be processed by a white box cryptographic algorithm. In this embodiment, the target data can specifically be video data that needs to be decrypted, a key that needs to be decrypted, or other data that needs to be encrypted, etc., which is not specifically limited here.
[0055] In this embodiment, the white-box cryptographic algorithm can be divided into multiple parts, each part is called a white-box codon algorithm. For example, if the white-box cryptographic algorithm includes 10 steps in total, in this embodiment, the algorithm corresponding to steps 1 to 3 can be called white-box codon algorithm 1, the algorithm corresponding to steps 4 to 7 can be called white-box codon algorithm 2, and the algorithm corresponding to steps 8 to 10 can be called white-box codon algorithm 3. That is, the white-box cryptographic algorithm includes three white-box codon algorithms.
[0056] It should be noted that this embodiment does not specifically limit the specific process of dividing the white-box cryptographic algorithm. It can be determined according to the execution steps of the white-box cryptographic algorithm, or it can be determined according to the amount of calculation of each part of the white-box cryptographic algorithm, or it can be determined according to the importance of each part of the white-box cryptographic algorithm. It is not specifically limited here.
[0057] S102. Process target data using at least two white-box cryptography algorithms; the at least two white-box cryptography algorithms are run on a client device and a server, respectively.
[0058] The purpose of dividing the white-box cryptographic algorithm into multiple white-box cryptographic algorithms in this embodiment is to transfer part of the white-box cryptographic algorithm from the client device to the server so as to reduce the computing pressure of the client device. Therefore, at least two white-box cryptographic algorithms in this embodiment need to be run on the client device and the server respectively. As described above, if the white-box cryptographic algorithm is divided into three white-box cryptographic algorithms: white-box cryptographic algorithm 1, white-box cryptographic algorithm 2 and white-box cryptographic algorithm 3, then white-box cryptographic algorithm 1 and white-box cryptographic algorithm 3 can be set to run on the client device, and white-box cryptographic algorithm 3 can be set to run on the server; wherein, this setting method is only to explain a specific implementation method listed in this scheme. In the actual application process, it is necessary to consider multiple factors to determine which part of the algorithm is specifically set in which device, such as: in order to improve the computing speed, the white-box cryptographic algorithm with a large amount of computing can be transferred to the server, and in order to ensure data security, the white-box cryptographic algorithm with a relatively low degree of importance can be transferred to the server, etc., which is not specifically limited here.
[0059] Furthermore, after the present embodiment divides the white-box cryptography algorithms, when processing the target data, the white-box cryptography algorithm that the server needs to calculate and the target data / intermediate result data can be sent to the server together. However, the amount of data sent in this manner is relatively large, and the white-box cryptography algorithm may take up additional sending time. Therefore, in the present embodiment, the divided white-box cryptography algorithms can also be sent to the server for storage before processing the target data. When the client processes the target data, if the server needs to participate in the calculation, the client device only needs to send the target data / intermediate result data and the identification information of the white-box cryptography algorithm to the server. For example, after sending the divided white-box cryptography algorithm 1, white-box cryptography algorithm 2 and white-box cryptography algorithm 3 to the server in advance, when processing the target data, the client device only needs to send the intermediate result data 1 and the identification information of the white-box cryptography algorithm 3 to the server together, and the server can know that the intermediate result data 1 is processed by the white-box cryptography algorithm 3. In another embodiment, after the divided white-box cryptographic algorithms are sent to the server for storage in advance, the identification information of the white-box cryptographic algorithm that the server needs to run can be directly set, so that when the client device sends data to the server, it only needs to send the target data / intermediate results.
[0060] It can be understood that when the present embodiment uses at least two white-box codon algorithms to process the target data, the target data can be used as input data and each white-box codon algorithm can be executed in sequence. Figure 3, which is a specific data processing flow chart provided by an embodiment of the present invention; it can be seen from the figure that the white-box cryptographic algorithm includes white-box cryptographic algorithm 1, white-box cryptographic algorithm 2 and white-box cryptographic algorithm 3, and white-box cryptographic algorithm 1 and white-box cryptographic algorithm 3 are run on the client device, and white-box cryptographic algorithm 2 is run on the server. Then, when processing target data, the target data is used as input data, and the client device executes white-box cryptographic algorithm 1. After the operation is completed, intermediate result data 1 is obtained, and the intermediate result data 1 is sent to the server through the network. The server executes white-box cryptographic algorithm 2 to process the intermediate result data 1 to obtain intermediate result data 2. The server sends the intermediate result data 2 to the client device through the network, and the client device runs white-box cryptographic algorithm 3 to process the intermediate result data 2 to obtain the final result data.
[0061] From the above, it can be seen that in order to avoid the phenomenon of jamming when playing data on the client device due to low configuration of the client device, the present application divides the white-box cryptographic algorithm into at least two white-box cryptographic sub-algorithms, and the at least two white-box cryptographic algorithms are run on the client device and the server respectively. Therefore, in the process of playing data, after the target data that needs to be processed by the white-box cryptographic algorithm is obtained, the target data needs to be processed jointly by the client device and the server. This processing method can transfer part of the computing work that originally needs to be completed by the client device alone to the server, which greatly reduces the data computing pressure of the client device and avoids the phenomenon of playback jamming caused by low configuration of the client device.
[0062] See also Figure 4 , Figure 4 A flowchart of another data playback method provided in an embodiment of the present application, through Figure 4 It can be seen that this scheme specifically includes the following steps:
[0063] S201, obtaining target data during data playback; wherein the target data is data that needs to be processed by a white-box cryptographic algorithm during data playback by the client device; the white-box cryptographic algorithm includes at least two white-box cryptographic sub-algorithms;
[0064] S202, determining the execution order of each white-box codon algorithm;
[0065] S203, taking the target data as input data, and sequentially running each white-box codon algorithm according to the execution order to complete processing of the target data;
[0066] Among them, the at least two white-box cryptographic algorithms are respectively run on a client device and a server, and data is sent between the client device and the server via a transport layer security protocol; the data sent between the client device and the server includes: target data, intermediate result data, and final result data.
[0067] It should be noted that each white-box cryptographic algorithm has an execution order. As mentioned above, the white-box cryptographic algorithm includes white-box cryptographic algorithm 1, white-box cryptographic algorithm 2 and white-box cryptographic algorithm 3. The execution order of each white-box cryptographic algorithm is: white-box cryptographic algorithm 1-white-box cryptographic algorithm 2-white-box cryptographic algorithm 3. Therefore, after obtaining the target data, the target data can be used as input data, and each white-box cryptographic algorithm is executed in sequence according to the execution order.
[0068] Since the multiple white-box cryptographic algorithms in this embodiment are respectively run on the client device and the server, data must be sent between the client device and the server, and the data can be any one of the target data, the intermediate result data, and the final result data. As mentioned above, the white-box cryptographic algorithm includes white-box cryptographic algorithm 1, white-box cryptographic algorithm 2, and white-box cryptographic algorithm 3. If it is necessary to run white-box cryptographic algorithm 1 through the server, the client device needs to send the target data to the server; if the terminal device generates intermediate result data 1 after running white-box cryptographic algorithm 1, and the server needs to run white-box cryptographic algorithm 2, the client device needs to send the intermediate result data 1 to the server; if it is necessary to run white-box cryptographic algorithm 3 through the server, the final result data generated after the server runs white-box cryptographic algorithm 3 needs to be sent to the client.
[0069] In order to ensure data security, in this application, data is sent between the client device and the server via a transport layer security protocol. The transport layer security protocol can be: SSL (Secure Socket Layer), or TLS (Transport Layer Security), etc., which is not specifically limited here, as long as it can play a role in data protection. Figure 3 In the data processing process, since white-box cryptography algorithm 1 and white-box cryptography algorithm 2 run on different devices, the intermediate result data 1 generated after the client device runs white-box cryptography algorithm 1 needs to be sent to the server through the transport layer security protocol. Similarly, white-box cryptography algorithm 2 and white-box cryptography algorithm 3 also run on different devices. Therefore, the intermediate result data 2 generated after the server runs white-box cryptography algorithm 2 also needs to be sent to the client device through the transport layer security protocol.
[0070] See also Figure 5a and Figure 5b The device root of trust composition intent shown, Figure 5a It is composed of the device trust root of the traditional solution. Figure 5b It is the device trust root component of this solution. By comparison, it can be seen that this solution divides the VM Bytecode (obfuscated bytecode) and white box components in the device-private white box cryptographic algorithm into two parts, one part of which is VM Bytecode1 and white box component 1, and the other part is VM Bytecode2 and white box component 2. Transmitted securely in the channel. Since the purpose of white box cryptography is to protect the security of encryption algorithms and keys in untrusted environments, even if the attacker can fully control and observe the calculation process at runtime, it is impossible to effectively reverse the key or decrypt the data. Therefore, in this usage scenario, the security of the server side can be guaranteed. In other words, for client devices with lower configurations, as long as the secure transmission of the channel is guaranteed, part of the computing work of the client device can be transferred to a high-performance server. In addition, when the traditional solution runs the white box cryptographic algorithm on a low-performance device, it may take seconds. After the present application transfers part of the computing work of the white box cryptographic algorithm to the server, the entire operation can be completed at the millisecond level, which greatly improves the computing speed.
[0071] From the above, it can be seen that in this embodiment, the target data is processed according to the execution order of each white-box cryptographic algorithm, which can ensure that the target data is processed accurately; and in this embodiment, data is sent between the client device and the server through the transport layer security protocol, which can ensure the security of the data during transmission.
[0072] In this embodiment, in order to reduce the computing pressure of the client device and increase the playback speed, the white box cryptographic algorithm can be split into multiple white box cryptographic sub-algorithms before playing the data, and some of the white box cryptographic sub-algorithms are sent to the server. The process specifically includes the following steps:
[0073] Splitting the white-box cryptographic algorithm into at least two white-box cryptographic sub-algorithms;
[0074] Determining a white-box cryptography algorithm to be executed on the client device and a white-box cryptography algorithm to be executed on the server from at least two white-box cryptography algorithms;
[0075] Sends the server a white-box cryptographic algorithm that runs on the server.
[0076] Specifically, the white-box cryptographic algorithm can be divided into a white-box asymmetric cryptographic algorithm and a white-box symmetric cryptographic algorithm according to the different encryption and decryption methods used. However, no matter which algorithm is used, the entire algorithm can be divided into multiple parts according to its operation process. In this embodiment, each part is called a white-box cryptographic algorithm, wherein the number of the white-box cryptographic algorithms is not specifically limited here, and can be adaptively adjusted according to the actual splitting principles. For example, if the white-box cryptographic algorithms with a larger amount of calculation are adjacent, the number of split white-box cryptographic algorithms is small. If the white-box cryptographic algorithms with a larger amount of calculation are not adjacent, the number of split white-box cryptographic algorithms will be large. After the present application splits out multiple white-box cryptographic algorithms, it is necessary to determine which white-box cryptographic algorithms need to be run on the client device and which white-box cryptographic algorithms need to be run on the server. This determination method is relatively flexible and can be determined according to actual needs. After determination, the white-box cryptographic algorithms running on the server can be sent to the server.
[0077] In an implementation provided in this embodiment, the process of determining a white-box cryptography algorithm running on a client device and a white-box cryptography algorithm running on a server from at least two white-box cryptography algorithms specifically includes: determining the white-box cryptography algorithm running on the client device and the white-box cryptography algorithm running on the server based on at least one of an operation level, an importance level, and a number of communications of each white-box cryptography algorithm; wherein the number of communications is the number of times data is sent between the client device and the server.
[0078] Specifically, the computational level can reflect the amount of computation required by each white-box cryptography algorithm when processing data. The more computational volume, the higher the computational level. In order to increase the playback speed of the client device, the present application can set the white-box cryptography algorithm with a higher computational level to run on the server side; the importance level can reflect the importance of the data processed by each white-box cryptography algorithm. The higher the confidentiality of the processed data, the higher the importance level. In order to ensure the security of the data, data with a higher importance level can be set to be processed locally on the client device; the number of communications can reflect the communication frequency between the client device and the server. The more communications, the more time the communication process consumes. Therefore, in order to reduce the communication time, the present application can limit the number of communications.
[0079] It should be noted that when the present application determines which device each white-box cryptographic algorithm runs on based on the three factors of computational load level, importance level and number of communications, it can be determined by only one of the factors, two of the factors, or all three factors. The specific determination method is not specifically limited in this embodiment. For example, when only the computational load level is used for determination, the white-box cryptographic algorithm with a high computational load level is set to run on the server; when only the importance level is used for determination, the white-box cryptographic algorithm with a higher importance level is set to run on the client device.
[0080] In an implementation provided in this embodiment, a process of determining a white-box cryptography algorithm running on a client device and a white-box cryptography algorithm running on a server according to at least one of a computation level, an importance level, and a number of communications of each white-box cryptography algorithm specifically includes the following steps:
[0081] Determine a preliminary white-box cryptographic algorithm from the white-box operator algorithms, the level of operation being higher than a first predetermined level and the level of importance being lower than a second predetermined level;
[0082] Determine the number of communications between the client device and the server; the number of communications is the number of times data needs to be sent between the client device and the server to process the target data after the primary white box cryptographic algorithm is run on the server;
[0083] Determine whether the number of communications is greater than a predetermined threshold; if not, use the pre-selected white-box cryptography algorithm as the white-box cryptography algorithm running on the server, and use other white-box cryptography algorithms except the pre-selected white-box cryptography algorithm as the white-box cryptography algorithm running on the client device.
[0084] It should be noted that the first predetermined level in this embodiment is determined according to the division of the computational load level. For example, if the computational load level is divided into a high computational load level and a low computational load level, then the first predetermined level can be a low computational load level, that is, as long as the high computational load level is met; if the computational load level is divided into a high computational load level, a medium computational load level and a low computational load level, then the first predetermined level can be set to a low computational load level or a medium computational load level. If it is set to a low computational load level, then both the medium computational load level and the high computational load level meet the requirements. If it is set to a medium computational load level, only the high computational load level meets the requirements. Similarly, the second predetermined level is also determined according to the division of the importance level, and will not be described in detail here.
[0085] The method for selecting the preliminary white-box cryptographic algorithm in this embodiment is: selecting a white-box cryptographic algorithm with a computation level higher than a first predetermined level and an importance level lower than a second predetermined level from the white-box operator algorithm. This selection method can set the white-box cryptographic algorithm with a high computation level and a low importance level to run on the server, which reduces the computing pressure of the client device and ensures the security of the data transmission process.
[0086] It can be understood that after the primary white-box cryptography algorithm is selected in this embodiment, in order to avoid excessive time consumption due to excessive communication between the client device and the server, the number of communications can be limited. If the number of communications is not greater than the predetermined threshold, it means that the requirements are met, and the primary white-box cryptography algorithm can be used as the white-box cryptography algorithm running on the server, and other white-box cryptography algorithms except the primary white-box cryptography algorithm can be used as the white-box cryptography algorithm running on the client device. If the number of communications is greater than the predetermined threshold, there are multiple solutions, such as: adjusting the first predetermined level and / or the second predetermined threshold, re-screening the primary white-box cryptography algorithm with a higher computation level and / or a lower importance level; or directly removing several white-box cryptography algorithms with the lowest computation level / highest importance level from the screened primary white-box cryptography algorithms, and the number of removed white-box cryptography algorithms is the same as the number of communications greater than the predetermined threshold, so that the number of communications after removal meets the requirements.
[0087] In summary, it can be seen that in this embodiment, the process of determining the white-box cryptography algorithm running on the client device and the white-box cryptography algorithm running on the server, and sending the white-box cryptography algorithm running on the server to the server is pre-executed before data playback, so as to avoid taking up extra processing time during the data playback process; and, in this embodiment, the method of determining the device on which the white-box cryptography algorithm runs by the computation level, importance level and number of communications can be used to set the white-box cryptography algorithm with a high computation level and a low importance level to run on the server, which reduces the computational pressure of the client device, ensures the security of the data transmission process, and avoids the data transmission process taking up too much extra time.
[0088] It can be understood that after the present application determines the white-box cryptography algorithm running on the client device and the white-box cryptography algorithm running on the server, the client device and the server can jointly process the target data according to the corresponding white-box cryptography algorithm. However, the white-box cryptography algorithm running on the client device and the white-box cryptography algorithm running on the server are not fixed settings and can be updated according to actual needs to avoid the server from being attacked to obtain relevant data; in this embodiment, the white-box cryptography algorithm running on the client device and the white-box cryptography algorithm running on the server can be updated in the following two ways:
[0089] Method 1: updating the white-box cryptographic algorithm running on the client device and the white-box cryptographic algorithm running on the server at a predetermined time period;
[0090] Method 2: If it is detected that the server is attacked, the white-box cryptographic algorithm running on the client device and the white-box cryptographic algorithm running on the server are updated.
[0091] Specifically, when updating the white-box cryptographic algorithm running on the client device and the white-box cryptographic algorithm running on the server, this embodiment can update according to a predetermined time period. The predetermined time period can be customized, such as one month, two months, etc., which is not specifically limited here. In addition, in this embodiment, if it is detected that the server is attacked, in order to ensure the security of related data, it can also be actively updated. Of course, the above two methods are two specific update methods provided by this embodiment. In actual applications, they can also be updated according to actual needs. For example, if the calculation process of the white-box cryptographic algorithm is adjusted, the update process can be actively triggered at this time.
[0092] From the above, it can be seen that the present application can ensure the security of the white-box cryptography algorithm and related data by updating the white-box cryptography algorithm running on the client device and the white-box cryptography algorithm running on the server in multiple ways.
[0093] See also Figure 6 , Figure 6 A schematic diagram of the structure of a data playback device provided in an embodiment of the present application, the device specifically comprises:
[0094] The acquisition module 21 is used to acquire target data during the data playback process; wherein the target data is data that needs to be processed by a white box cryptographic algorithm during the data playback process of the client device; the white box cryptographic algorithm includes at least two white box cryptographic sub-algorithms;
[0095] The processing module 22 is used to process the target data using the at least two white-box cryptographic algorithms; the at least two white-box cryptographic algorithms are respectively run on the client device and the server.
[0096] As an optional embodiment, the processing module 22 includes:
[0097] A determination unit, used to determine the execution order of each white-box codon algorithm;
[0098] A processing unit, configured to take the target data as input data and sequentially run each white-box codon algorithm according to the execution order to complete processing of the target data;
[0099] Wherein, the client device and the server send data via the transport layer security protocol; the data sent between the client device and the server include: target data, intermediate result data, and final result data.
[0100] As an optional embodiment, the device further includes:
[0101] The first update module is used to update the white box cryptography algorithm running on the client device and the white box cryptography algorithm running on the server at a predetermined time period.
[0102] As an optional embodiment, the device further includes:
[0103] The second update module is used to update the white box cryptography algorithm running on the client device and the white box cryptography algorithm running on the server when it is detected that the server is attacked.
[0104] As an optional embodiment, the device further includes:
[0105] A splitting module, used for splitting the white-box cryptographic algorithm into at least two white-box cryptographic sub-algorithms before acquiring the target data;
[0106] A determination module, configured to determine a white-box cryptography algorithm running on the client device and a white-box cryptography algorithm running on the server from the at least two white-box cryptography algorithms;
[0107] The sending module is used to send the white box cryptographic algorithm running on the server to the server.
[0108] As an optional embodiment, the determination module is specifically used for:
[0109] The white-box cryptography algorithm running on the client device and the white-box cryptography algorithm running on the server are determined according to at least one of the computational load level, importance level and communication times of each white-box cryptography algorithm; wherein the communication times are the number of times data is sent between the client device and the server.
[0110] As an optional embodiment, the determining module includes:
[0111] A first determination sub-unit is used to determine a preliminary white-box cryptographic sub-algorithm from the white-box operator algorithms, the level of which is higher than a first predetermined level and the level of which is lower than a second predetermined level;
[0112] A second determination subunit is used to determine the number of communications between the client device and the server; the number of communications is the number of times data needs to be sent between the client device and the server to process the target data after the primary white box cryptographic algorithm is run on the server;
[0113] A judging unit, configured to judge whether the number of communications is greater than a predetermined threshold;
[0114] The third determination subunit is used to use the preliminary white-box cryptography algorithm as the white-box cryptography algorithm running on the server when the number of communications is not greater than a predetermined threshold, and to use other white-box cryptography algorithms except the preliminary white-box cryptography algorithm as the white-box cryptography algorithm running on the client device.
[0115] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0116] See also Figure 7 , Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the electronic device specifically includes:
[0117] A memory 31, a processor 32 and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of the data playback method described in any of the above method embodiments through the computer program.
[0118] Among them, the processor 32 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 32 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 32 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 32 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 32 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0119] The memory 31 may include one or more computer-readable storage media, which may be non-transitory. The memory 31 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 31 is at least used to store the following computer program 321, wherein, after the computer program is loaded and executed by the processor 32, it can implement the relevant steps in the data playback method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 31 may also include an operating system 322 and data 323, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 322 may include Windows, Unix, Linux, etc.
[0120] In some embodiments, the electronic device may further include a display screen 33 , an input / output interface 34 , a communication interface 35 , a sensor 36 , a power source 37 , and a communication bus 38 .
[0121] certainly, Figure 7 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of the present application. In actual applications, the electronic device may include Figure 7 More or fewer components than shown, or combinations of certain components.
[0122] In another exemplary embodiment, a computer storage medium is also provided, and when the program instructions are executed by a processor, the steps of the data playback method described in any of the above method embodiments are implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0123] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0124] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0125] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be 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 present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A data playback method, characterized in that: include: Acquire target data during the data playback process; wherein the target data is data that needs to be processed by a white-box cryptographic algorithm during the data playback process of the client device; the white-box cryptographic algorithm includes at least two white-box cryptographic sub-algorithms; The target data is processed using the at least two white-box cryptography algorithms; the at least two white-box cryptography algorithms are respectively run on the client device and the server.
2. The data playback method according to claim 1, characterized in that: The processing of the target data using the at least two white-box codon algorithms comprises: Determine the execution order of each white-box codon algorithm; Taking the target data as input data, and sequentially running each white-box codon algorithm according to the execution order to complete processing of the target data; Wherein, the client device and the server send data via the transport layer security protocol; the data sent between the client device and the server include: target data, intermediate result data, and final result data.
3. The data playback method according to claim 1, characterized in that: The data playback method further includes: The white-box cryptography algorithm running on the client device and the white-box cryptography algorithm running on the server are updated at a predetermined time period.
4. The data playback method according to claim 1, characterized in that: The data playback method further includes: If it is detected that the server is attacked, the white-box cryptography algorithm running on the client device and the white-box cryptography algorithm running on the server are updated.
5. The data playback method according to any one of claims 1 to 4, characterized in that: Before acquiring the target data, the data playing method further includes: Splitting the white-box cryptographic algorithm into at least two white-box cryptographic sub-algorithms; Determining a white-box cryptography algorithm running on the client device and a white-box cryptography algorithm running on the server from the at least two white-box cryptography algorithms; A white-box cryptographic algorithm is sent to the server for execution at the server.
6. The data playback method according to claim 5, characterized in that: Determining a white-box cryptography algorithm running on the client device and a white-box cryptography algorithm running on the server from the at least two white-box cryptography algorithms comprises: The white-box cryptography algorithm running on the client device and the white-box cryptography algorithm running on the server are determined according to at least one of the computational load level, importance level and communication times of each white-box cryptography algorithm; wherein the communication times are the number of times data is sent between the client device and the server.
7. The data playback method according to claim 6, characterized in that: The step of determining the white-box cryptographic algorithm running on the client device and the white-box cryptographic algorithm running on the server according to at least one of the computation level, importance level, and number of communications of each white-box cryptographic algorithm comprises: Determine a preliminary white-box cryptographic algorithm from the white-box operator algorithms, the level of which is higher than a first predetermined level and the level of which is lower than a second predetermined level; Determine the number of communications between the client device and the server; the number of communications is the number of times data needs to be sent between the client device and the server to process the target data after the primary white-box cryptographic algorithm is run on the server; Determining whether the number of communications is greater than a predetermined threshold; If not, the initially selected white-box cryptography algorithm is used as the white-box cryptography algorithm running on the server, and other white-box cryptography algorithms except the initially selected white-box cryptography algorithm are used as the white-box cryptography algorithms running on the client device.
8. A data playback device, characterized in that: include: An acquisition module is used to acquire target data during the data playback process; wherein the target data is data that needs to be processed by a white box cryptographic algorithm during the data playback process of the client device; the white box cryptographic algorithm includes at least two white box cryptographic sub-algorithms; A processing module is used to process the target data using the at least two white-box cryptographic algorithms; the at least two white-box cryptographic algorithms are respectively run on the client device and the server.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the data playback method according to any one of claims 1 to 7 through the computer program.
10. A computer storage medium, characterized in that: The computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the data playback method described in any one of claims 1 to 7 of the present application.
