Hybrid encryption and decryption method and device based on trusted video
By switching to a general library for encryption and decryption processing when the chip capability parameters reach the upper limit, the problem of video delay and lag in trusted video multi-channel playback is solved, and the ability of multi-channel video playback is improved.
Patent Information
- Application Number
- CN202411807712.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-07
AI Technical Summary
During the multi-channel playback of trusted videos, the prior art solutions rely on the performance of the encryption and decryption chip, resulting in insufficient chip resources and problems of video delay and lag.
When the chip's capability parameters reach the upper limit, switch to the general library to perform encryption and decryption processing, release chip pressure, and improve the ability of multi-channel video playback.
It effectively avoids video delay and lag, improves the ability of multi-channel video playback, and makes it not limited by chip capabilities.
Smart Images

Figure CN119583891A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security and cryptography technology, and in particular to a hybrid encryption and decryption method and device based on trusted video. Background Art
[0002] In a trusted video system, a large amount of video stream data needs to be encrypted, decrypted, summarized, and signed. Since high-definition video stream data is large, the encryption and decryption performance requirements of the encryption and decryption chip are higher. For example, the bit rate required for 1920x1080 high-definition video is 2Mbit / s, and the bit rate required for 2k video of 2160x1440 is about 4~8Mbit / s. If the video capture device supports high frame rate, more video streams need to be encrypted. If multiple channels of video (such as 9 channels, 16 channels, 32 channels, etc.) are previewed at the same time, there will be a problem of insufficient encryption and decryption chip capacity and excessive video delay. For example, in the case of playing 16 channels, the encryption and decryption chip needs to process 2x16=32Mbit of data in one second, that is, it needs to process 32 / 8=4MB of data in one second. Since the encryption and decryption chip also needs to perform summary calculation operations, it actually needs to process 4MBx2=8MB of data in one second.
[0003] In the process of trusted video multi-channel playback, the existing technical solutions mainly rely on the ability of encryption and decryption chips to handle the entire encryption or decryption process, which is very limited by the performance limit of encryption and decryption chips. At the same time, if only encryption and decryption chips are used for encryption and decryption, it will lead to insufficient encryption and decryption chip resources, resulting in video freezes, seriously affecting the video preview effect. Summary of the invention
[0004] In order to solve the above-mentioned problems of video delay and freeze during multi-channel playback of trusted videos, an embodiment of the present application provides a hybrid encryption and decryption method and device based on trusted videos.
[0005] The technical solution is as follows: In a first aspect, an embodiment of the present application provides a hybrid encryption and decryption method based on trusted video, including: Encrypt and decrypt trusted videos based on secret keys and chips; Determine the chip capability parameters based on the type of secret key; When it is detected that the chip's capability parameters reach a preset threshold, the trusted video is encrypted and decrypted based on the universal library to obtain the target data.
[0006] In an optional solution of the first aspect, before encrypting and decrypting the trusted video based on the secret key and the chip, the method further includes: Extract key information from the trusted video and send a request to the cryptographic service platform to obtain the primary key; Generate a key based on the primary key and key information.
[0007] In another optional solution of the first aspect, before encrypting and decrypting the trusted video based on the secret key and the chip, the method further includes: Generate a hash value based on the time information of the trusted video; Generate a secret key based on the hash value.
[0008] In yet another optional solution of the first aspect, the capability parameter of the chip includes a first capability parameter and a second capability parameter; The chip capability parameters are determined based on the type of key, including: When the type of the secret key is identified as an encryption type, the encryption and decryption capability parameter is used as the first capability parameter, and the digest calculation capability parameter is used as the second capability parameter.
[0009] In yet another optional solution of the first aspect, determining the capability parameter of the chip according to the type of the secret key includes: When the type of the secret key is identified as a decryption type, the digest calculation capability parameter is used as the first capability parameter, and the encryption and decryption capability parameter is used as the second capability parameter.
[0010] In yet another optional solution of the first aspect, the preset threshold value includes a preset first threshold value and a preset second threshold value; When it is detected that the chip capability parameter reaches the preset threshold, the trusted video is encrypted and decrypted based on the universal library to obtain the target data, including: When it is detected that the first capability parameter reaches a preset first threshold, encrypting the trusted video based on the universal library to obtain encrypted data; Performing a first summary calculation process on the encrypted data based on the chip; When it is detected that the second capability parameter does not reach the preset second threshold, obtaining target data according to the result of the first summary calculation process; When it is detected that the second capability parameter reaches a preset second threshold, a second digest calculation process is performed on the encrypted data based on the general library, and the target data is obtained according to the result of the second digest calculation process.
[0011] In yet another optional solution of the first aspect, the preset threshold value includes a preset third threshold value and a preset fourth threshold value; When it is detected that the chip capability parameter reaches the preset threshold, the trusted video is encrypted and decrypted based on the universal library to obtain the target data, including: When it is detected that the first capability parameter reaches a preset third threshold, performing summary calculation processing on the trusted video based on the general library to obtain summary data; Performing a first decryption process on the summary data based on the chip; When it is detected that the second capability parameter does not reach a preset fourth threshold, obtaining target data according to a result of the first decryption process; When it is detected that the second capability parameter reaches a preset fourth threshold, a second decryption process is performed on the summary data based on the general library, and the target data is obtained according to a result of the second decryption process.
[0012] In a second aspect, an embodiment of the present application provides a hybrid encryption and decryption device based on trusted video, including: The first processing module is used to encrypt and decrypt the trusted video based on the secret key and the chip; A second processing module is used to determine the capability parameters of the chip according to the type of the secret key; The third processing module is used to encrypt and decrypt the trusted video based on the universal library to obtain target data when it is detected that the chip capability parameter reaches a preset threshold.
[0013] In a third aspect, an embodiment of the present application further provides a hybrid encryption and decryption device based on trusted video, including a processor and a memory; The processor is connected to the memory; A memory for storing executable program codes; The processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the hybrid encryption and decryption method based on trusted video provided by the first aspect of the embodiment of the present application or any implementation method of the first aspect.
[0014] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the trusted video-based hybrid encryption and decryption method provided by the first aspect of the embodiment of the present application or any one of the implementation methods of the first aspect can be implemented.
[0015] The beneficial effects brought by the technical solutions provided by some embodiments of this specification include at least: In the hybrid encryption and decryption process based on trusted video, when the chip capability parameters reach the upper limit, the encryption and decryption processing is switched to the general library, which effectively releases part of the chip pressure and improves the ability of multi-channel video playback. This makes the ability of multi-channel video playback not limited by chip capabilities, avoiding high video delays and freezes. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 An overall flow chart of a hybrid encryption and decryption method based on trusted video provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of a hybrid encryption and decryption device based on trusted video provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of another hybrid encryption and decryption device based on trusted video provided in an embodiment of the present application. DETAILED DESCRIPTION
[0018] The technical solutions 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.
[0019] In the following introduction, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The following introduction provides multiple embodiments of the present application, and different embodiments can be replaced or combined, so the present application can also be considered to include all possible combinations of the same and / or different embodiments recorded. Therefore, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then the present application should also be considered to include embodiments containing one or more of all other possible combinations of A, B, C, and D, although the embodiment may not be clearly recorded in the following text.
[0020] The following description provides examples and does not limit the scope, applicability or examples set forth in the claims. Changes may be made to the functions and arrangements of the elements described without departing from the scope of the present application. Various processes or components may be appropriately omitted, substituted or added to each example. For example, the described method may be performed in an order different from the order described, and various steps may be added, omitted or combined. In addition, features described in some examples may be combined in other examples.
[0021] See also Figure 1 , Figure 1 An overall flow chart of a hybrid encryption and decryption method based on trusted video provided in an embodiment of the present application is shown.
[0022] like Figure 1 As shown, the hybrid encryption and decryption method based on trusted video may at least include the following steps: Step 101: Encrypt and decrypt the trusted video based on the secret key and the chip.
[0023] In the embodiment of the present application, the hybrid encryption and decryption method based on trusted video can be applied to, but not limited to, video surveillance equipment, video conferencing systems, vehicle-mounted video equipment, drone video transmission, smart wearable devices, security alarm systems, etc. It is understandable that in the hybrid encryption and decryption process based on trusted video, when the chip capability parameter reaches the upper limit, the encryption and decryption processing is switched to the general library, which effectively releases part of the chip pressure, improves the multi-channel video playback capability, and makes the multi-channel video playback capability not limited by the chip capability, avoiding high video delay and freeze.
[0024] Specifically, in the hybrid encryption and decryption process based on trusted video, the trusted video can be first encrypted and decrypted by the encryption chip, wherein the user signature authentication operation is completed by the key pair generated by the chip.
[0025] As an option of the embodiment of the present application, before encrypting and decrypting the trusted video based on the secret key and the chip, it also includes: Extract key information from the trusted video and send a request to the cryptographic service platform to obtain the primary key; Generate a key based on the primary key and key information.
[0026] Specifically, before encrypting the trusted video through the encryption and decryption chip, key information can be extracted from the trusted video and a request can be sent to the cryptographic service platform to obtain the first-level ciphertext, so that the first-level ciphertext can be decrypted through an asymmetric encryption and decryption algorithm to obtain a first-level key, and then a secret key can be generated based on the first-level key and the key information. The key information can include but is not limited to text information (such as video titles and subtitles), image information (such as QR codes in videos), audio information (such as background music or sound effects), and time information (such as timestamps in videos).
[0027] It is understandable that the cryptographic service platform provides centralized cryptographic device resource management, cryptographic service management, and application key management functions. It supports a variety of cryptographic devices and algorithms, including domestic and international algorithms, and can achieve unified management and scheduling of cryptographic services. The cryptographic service platform provides a unified authentication function for business systems and supports multiple authentication methods. At the same time, it also provides a wealth of cryptographic service interfaces, including lower-level cryptographic operation interfaces and high-level business interfaces, which facilitates business system access and calls. The cryptographic service platform supports the full life cycle management of keys, including key generation, distribution, query, update, recovery, and destruction. It uses devices such as hardware security modules (HSMs) or cloud cryptographic machines to store and manage keys to ensure the security and availability of keys.
[0028] Then, after obtaining the key information, the key information can be encoded by, but not limited to, converting text into binary code, encrypting numbers, or converting image features into decryption algorithm input, and then the secret key, i.e., the secondary key, can be decrypted based on the encoded key information.
[0029] As another option of the embodiment of the present application, before encrypting and decrypting the trusted video based on the secret key and the chip, the method further includes: Generate a hash value based on the time information of the trusted video; Generate a secret key based on the hash value.
[0030] Specifically, before decrypting the trusted video through the encryption and decryption chip, the current timestamp can be obtained using an authoritative timestamp service agency or a trusted time source. These timestamp service agencies usually provide accurate and reliable timestamp services, such as the timestamp service of the RFC3161 international standard. At the same time, for video data, the timestamp can be obtained when the video is generated or uploaded, and stored as part of the video data or metadata.
[0031] Next, the timestamp can be converted to a format suitable for an encryption algorithm. For example, if the encryption algorithm requires a sequence of bytes as input, the timestamp can be converted to a sequence of bytes. The timestamp can then be hashed to generate a fixed-length hash value that can be used as part of or as the basis for an encryption or decryption key.
[0032] After that, the key generation mechanism of the encryption algorithm (such as AES, RSA, etc.) can be used in combination with the processed timestamp to generate the key. The hash value can be used as one of the inputs for key generation, or the timestamp can be combined with other information (such as video ID, user ID, etc.) and hashed as the input for key generation.
[0033] It is worth noting that the generated keys need to be securely stored and managed to prevent the keys from being leaked or used maliciously. Therefore, a key management service (KMS) can be used to store the keys and ensure that only authorized users or systems can access them.
[0034] Step 102: Determine the chip capability parameters according to the type of the secret key.
[0035] Specifically, after the encryption and decryption chip encrypts and decrypts the trusted video according to the secret key, the capability parameters of the encryption and decryption chip can be determined according to the type of the secret key. The type of the secret key usually determines the algorithm and complexity required in the encryption and decryption process, which in turn affects the capability parameters of the encryption and decryption chip.
[0036] It is worth noting that for symmetric key encryption, the chip needs to be able to perform encryption and decryption operations quickly, which can be achieved through efficient and fast algorithms such as SM1 algorithm, SM4 algorithm or AES algorithm, but is not limited to. For example, at a clock frequency of 80MHz, the encryption and decryption speed of the SM4 algorithm can reach 29.5MByte / s.
[0037] In addition, asymmetric key encryption usually uses a longer key length. For example, the RSA algorithm may support a key length of 1024 bits or 2048 bits. For asymmetric key encryption, the chip needs to be able to quickly perform signing and verification operations. For example, the RSA algorithm may support 32 signing and verification operations per second (for a 1024-bit key) at an 80MHz clock frequency. At the same time, asymmetric key encryption involves a large number of modular operations, such as modular addition, modular subtraction, modular multiplication, modular inversion, and modular exponentiation. The chip needs to have strong modular operation capabilities to support these complex computing operations.
[0038] As another option of the embodiment of the present application, the capability parameter of the chip includes a first capability parameter and a second capability parameter; The chip capability parameters are determined based on the type of key, including: When the type of the secret key is identified as an encryption type, the encryption and decryption capability parameter is used as the first capability parameter, and the digest calculation capability parameter is used as the second capability parameter.
[0039] Specifically, the chip capability parameters mainly include a first capability parameter and a second capability parameter. In the process of determining the chip capability parameters according to the type of the secret key, when the type of the secret key is identified as an encryption type, it means that the encryption process of the trusted video is in progress, and the judgment of the chip's encryption and decryption capabilities should take precedence over the judgment of the chip's summary calculation capabilities. Therefore, the encryption and decryption capability parameter can be used as the first capability parameter, and the summary calculation capability parameter can be used as the second capability parameter.
[0040] As another option of the embodiment of the present application, determining the capability parameters of the chip according to the type of the key includes: When the type of the secret key is identified as a decryption type, the digest calculation capability parameter is used as the first capability parameter, and the encryption and decryption capability parameter is used as the second capability parameter.
[0041] Specifically, in the process of determining the chip capability parameters according to the type of the secret key, when the type of the secret key is identified as a decryption type, it means that the chip is in the decryption process of the trusted video. The judgment of the chip's encryption and decryption capabilities should be later than the judgment of the chip's summary calculation capabilities. Therefore, the summary calculation capability parameter can be used as the first capability parameter, and the encryption and decryption capability parameter can be used as the second capability parameter.
[0042] Step 103: When it is detected that the chip capability parameter reaches a preset threshold, the trusted video is encrypted and decrypted based on the universal library to obtain target data.
[0043] Specifically, in the process of encryption and decryption of trusted video by the encryption and decryption chip, when it is detected that the chip's capability parameter reaches the preset threshold, it means that the encryption and decryption capability of the current encryption and decryption chip has reached the upper limit. Continuing to perform encryption and decryption operations by the chip is likely to cause video delay or freeze. Therefore, it can be converted to a general library to complete the encryption and decryption operations to relieve chip pressure and improve multi-channel video playback capabilities so that it is not limited to the chip's capability upper limit. It is understandable that the general library can be, but is not limited to, encryption libraries such as openssl and gmssl. After the trusted video is encrypted and decrypted by the general library, the final target data can be obtained.
[0044] As another option of the embodiment of the present application, the preset threshold includes a preset first threshold and a preset second threshold; When it is detected that the chip capability parameter reaches the preset threshold, the trusted video is encrypted and decrypted based on the universal library to obtain the target data, including: When it is detected that the first capability parameter reaches a preset first threshold, encrypting the trusted video based on the universal library to obtain encrypted data; Performing a first summary calculation process on the encrypted data based on the chip; When it is detected that the second capability parameter does not reach the preset second threshold, obtaining target data according to the result of the first summary calculation process; When it is detected that the second capability parameter reaches a preset second threshold, a second digest calculation process is performed on the encrypted data based on the general library, and the target data is obtained according to the result of the second digest calculation process.
[0045] Specifically, when the chip capability parameter reaches a preset threshold, the universal library is used to perform encryption and decryption processing on the trusted video. The preset threshold includes a preset first threshold (the encryption capability of the chip during the encryption process) and a preset second threshold (the summary calculation capability of the chip during the encryption process). When it is detected that the first capability parameter of the chip reaches the preset first threshold, it means that the encryption capability of the chip has reached the upper limit at this time, and the universal library can be used to encrypt the trusted video to obtain encrypted data.
[0046] Next, the chip can perform a first summary calculation on the encrypted data, and when it is detected that the second capability parameter does not reach the preset second threshold, the target data can be obtained according to the result of the first summary calculation. At this time, the summary calculation capability of the chip has not reached the upper limit.
[0047] At the same time, when it is detected that the second capability parameter reaches the preset second threshold, it means that the summary calculation capability of the chip has reached the upper limit. The general library can be used to perform the second summary calculation processing on the trusted video, and then the target data can be obtained through the result of the second summary calculation processing.
[0048] As another option of the embodiment of the present application, the preset threshold includes a preset third threshold and a preset fourth threshold; When it is detected that the chip capability parameter reaches the preset threshold, the trusted video is encrypted and decrypted based on the universal library to obtain the target data, including: When it is detected that the first capability parameter reaches a preset third threshold, performing summary calculation processing on the trusted video based on the general library to obtain summary data; Performing a first decryption process on the summary data based on the chip; When it is detected that the second capability parameter does not reach a preset fourth threshold, obtaining target data according to a result of the first decryption process; When it is detected that the second capability parameter reaches a preset fourth threshold, a second decryption process is performed on the summary data based on the general library, and the target data is obtained according to a result of the second decryption process.
[0049] Specifically, when the capability parameter of the chip reaches a preset threshold, the general library is used to perform encryption and decryption processing on the trusted video. The preset threshold includes a preset third threshold (the summary calculation capability of the chip during the decryption process) and a preset fourth threshold (the decryption capability of the chip during the decryption process). When it is detected that the first capability parameter of the chip reaches the preset third threshold, it means that the summary calculation capability of the chip has reached the upper limit at this time, and the general library can be used to perform summary calculation processing on the trusted video to obtain summary data.
[0050] Next, the chip may perform a first decryption process on the summary data, and when it is detected that the second capability parameter does not reach a preset fourth threshold, the target data may be obtained according to the result of the first decryption process. At this time, the decryption capability of the chip does not reach the upper limit.
[0051] At the same time, when it is detected that the second capability parameter reaches the preset fourth threshold, it means that the decryption capability of the chip has reached its upper limit, and the general library can be used to perform a second decryption process on the trusted video, and then the target data can be obtained through the result of the second decryption process.
[0052] See also Figure 2 , Figure 2 A structural schematic diagram of a hybrid encryption and decryption device based on trusted video provided in an embodiment of the present application is shown.
[0053] like Figure 2As shown, the hybrid encryption and decryption device based on trusted video may include at least a first processing module 201, a second processing module 202 and a third processing module 203, wherein: The first processing module 201 is used to perform encryption and decryption processing on the trusted video based on the secret key and the chip; The second processing module 202 is used to determine the capability parameters of the chip according to the type of the secret key; The third processing module 203 is used to encrypt and decrypt the trusted video based on the universal library to obtain target data when it is detected that the chip capability parameter reaches a preset threshold.
[0054] In some possible embodiments, before encrypting and decrypting the trusted video based on the secret key and the chip, the method further includes: The first processing module 201 is specifically used for: Extract key information from the trusted video and send a request to the cryptographic service platform to obtain the primary key; Generate a key based on the primary key and key information.
[0055] In some possible embodiments, before encrypting and decrypting the trusted video based on the secret key and the chip, the method further includes: The first processing module 201 is specifically used for: Generate a hash value based on the time information of the trusted video; Generate a secret key based on the hash value.
[0056] In some possible embodiments, the capability parameter of the chip includes a first capability parameter and a second capability parameter; The chip capability parameters are determined based on the type of key, including: The second processing module 202 is specifically used for: When the type of the secret key is identified as an encryption type, the encryption and decryption capability parameter is used as the first capability parameter, and the digest calculation capability parameter is used as the second capability parameter.
[0057] In some possible embodiments, the capability parameters of the chip are determined according to the type of the key, including: The second processing module 202 is specifically used for: When the type of the secret key is identified as a decryption type, the digest calculation capability parameter is used as the first capability parameter, and the encryption and decryption capability parameter is used as the second capability parameter.
[0058] In some possible embodiments, the preset threshold includes a preset first threshold and a preset second threshold; When it is detected that the chip capability parameter reaches the preset threshold, the trusted video is encrypted and decrypted based on the universal library to obtain the target data, including: The third processing module 203 is specifically used for: When it is detected that the first capability parameter reaches a preset first threshold, encrypting the trusted video based on the universal library to obtain encrypted data; Performing a first summary calculation process on the encrypted data based on the chip; When it is detected that the second capability parameter does not reach the preset second threshold, obtaining target data according to the result of the first summary calculation process; When it is detected that the second capability parameter reaches a preset second threshold, a second digest calculation process is performed on the encrypted data based on the general library, and the target data is obtained according to the result of the second digest calculation process.
[0059] In some possible embodiments, the preset threshold includes a preset third threshold and a preset fourth threshold; When it is detected that the chip capability parameter reaches the preset threshold, the trusted video is encrypted and decrypted based on the universal library to obtain the target data, including: The third processing module 203 is specifically used for: When it is detected that the first capability parameter reaches a preset third threshold, performing summary calculation processing on the trusted video based on the general library to obtain summary data; Performing a first decryption process on the summary data based on the chip; When it is detected that the second capability parameter does not reach a preset fourth threshold, obtaining target data according to a result of the first decryption process; When it is detected that the second capability parameter reaches a preset fourth threshold, a second decryption process is performed on the summary data based on the general library, and the target data is obtained according to a result of the second decryption process.
[0060] See also Figure 3 , Figure 3 A structural schematic diagram of another hybrid encryption and decryption device based on trusted video provided in an embodiment of the present application is shown.
[0061] like Figure 3 As shown, the trusted video-based hybrid encryption and decryption device 300 may include at least one processor 301 , at least one network interface 304 , a user interface 303 , a memory 305 , and at least one communication bus 302 .
[0062] The communication bus 302 may be used to realize the connection and communication among the above-mentioned components.
[0063] The user interface 303 may include buttons, and the optional user interface may also include a standard wired interface or a wireless interface.
[0064] The network interface 304 may include, but is not limited to, a Bluetooth module, an NFC module, a Wi-Fi module, etc.
[0065] Among them, the processor 301 may include one or more processing cores. The processor 301 uses various interfaces and lines to connect the various parts of the entire trusted video-based hybrid encryption and decryption device 300, and executes various functions and processes data of the trusted video-based hybrid encryption and decryption device 300 by running or executing instructions, programs, code sets or instruction sets stored in the memory 305, and calling data stored in the memory 305. Optionally, the processor 301 can be implemented in at least one hardware form of DSP, FPGA, and PLA. The processor 301 can integrate one or a combination of CPU, GPU, modem, etc. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 301, and it can be implemented separately through a chip.
[0066] The memory 305 may include a RAM or a ROM. Optionally, the memory 305 includes a non-transitory computer-readable medium. The memory 305 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 305 may optionally be at least one storage device located away from the aforementioned processor 301. As Figure 3 As shown, the memory 305 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a hybrid encryption and decryption application based on trusted video.
[0067] Specifically, the processor 301 may be used to call the trusted video-based hybrid encryption and decryption application stored in the memory 305, and specifically perform the following operations: Encrypt and decrypt trusted videos based on secret keys and chips; Determine the chip capability parameters based on the type of secret key; When it is detected that the chip's capability parameters reach a preset threshold, the trusted video is encrypted and decrypted based on the universal library to obtain the target data.
[0068] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.
[0069] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0070] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0071] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0072] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0073] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0074] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program codes.
[0075] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by entering a program to instruct related hardware, and the program may be stored in a computer-readable memory, which may include a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0076] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field that are not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A hybrid encryption and decryption method based on trusted video, characterized in that: include: Encrypt and decrypt trusted videos based on secret keys and chips; Determining capability parameters of the chip according to the type of the secret key; When it is detected that the capability parameter of the chip reaches a preset threshold, the trusted video is encrypted and decrypted based on a universal library to obtain target data.
2. The method according to claim 1, characterized in that Before the trusted video is encrypted and decrypted based on the secret key and the chip, the method further includes: Extract key information from the trusted video and send a request to the cryptographic service platform to obtain the primary key; Generate a key based on the primary key and key information.
3. The method according to claim 1, characterized in that: Before the trusted video is encrypted and decrypted based on the secret key and the chip, the method further includes: Generate a hash value based on the time information of the trusted video; A secret key is generated based on the hash value.
4. The method according to claim 1, characterized in that: The capability parameters of the chip include a first capability parameter and a second capability parameter; The determining the capability parameter of the chip according to the type of the secret key includes: When it is identified that the type of the secret key is an encryption type, the encryption and decryption capability parameter is used as the first capability parameter, and the digest calculation capability parameter is used as the second capability parameter.
5. The method according to claim 4, characterized in that The determining the capability parameter of the chip according to the type of the secret key includes: When it is identified that the type of the secret key is a decryption type, the digest calculation capability parameter is used as the first capability parameter, and the encryption and decryption capability parameter is used as the second capability parameter.
6. The method according to claim 4, characterized in that The preset threshold includes a preset first threshold and a preset second threshold; When it is detected that the capability parameter of the chip reaches a preset threshold, the trusted video is encrypted and decrypted based on a universal library to obtain target data, including: When it is detected that the first capability parameter reaches the preset first threshold, encrypting the trusted video based on the universal library to obtain encrypted data; Performing a first digest calculation process on the encrypted data based on the chip; When it is detected that the second capability parameter does not reach the preset second threshold, obtaining target data according to the result of the first summary calculation process; When it is detected that the second capability parameter reaches the preset second threshold, a second digest calculation process is performed on the encrypted data based on the universal library, and target data is obtained according to a result of the second digest calculation process.
7. The method according to claim 5, characterized in that The preset threshold value includes a preset third threshold value and a preset fourth threshold value; When it is detected that the capability parameter of the chip reaches a preset threshold, the trusted video is encrypted and decrypted based on a universal library to obtain target data, including: When it is detected that the first capability parameter reaches the preset third threshold, performing summary calculation processing on the credible video based on a universal library to obtain summary data; Performing a first decryption process on the summary data based on the chip; When it is detected that the second capability parameter does not reach the preset fourth threshold, obtaining target data according to the result of the first decryption process; When it is detected that the second capability parameter reaches the preset fourth threshold, a second decryption process is performed on the summary data based on the universal library, and target data is obtained according to a result of the second decryption process.
8. A hybrid encryption and decryption device based on trusted video, characterized in that: include: The first processing module is used to encrypt and decrypt the trusted video based on the secret key and the chip; A second processing module, used to determine the capability parameters of the chip according to the type of the secret key; The third processing module is used to encrypt and decrypt the trusted video based on the universal library to obtain target data when it is detected that the capability parameter of the chip reaches a preset threshold.
9. A hybrid encryption and decryption device based on trusted video, characterized in that: including a processor and a memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the steps of the method according to any one of claims 1 to 7.