Image processing method, device, medium and chip system based on key update

By using the key update technology based on digest value and stream encryption algorithm in the image encoding encryption process, the problems of high power consumption, poor applicability and attack cracking in the prior art are solved, and high security and high efficiency image encryption are achieved.

CN119583728BActive Publication Date: 2025-05-16SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510115240.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-05-16
Estimated Expiration
2045-01-24

AI Technical Summary

Technical Problem

The prior art has the risk of high power consumption, poor applicability and being hacked during image encoding and encryption.

Method used

By obtaining the digest value of the image frame, the key sequence is generated by using the stream encryption algorithm system, and the encoded image is dynamically encrypted.

Benefits of technology

Improves the security and efficiency of the encryption process, reduces the risk of attacks, and is suitable for a variety of image formats and sizes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583728B_ABST
    Figure CN119583728B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and discloses an image processing method, device, medium and chip system based on key update, the method comprising: obtaining a first summary value corresponding to the N-th frame image and the N-1-th frame image, extracting image block information from the N-th frame image, and encoding the N-frame image; using the first summary value and the image block information to perform key update and initialization vector IV update processing to obtain a first key and a first IV value; inputting the first key and the first IV value into a stream encryption algorithm system for processing to generate a key sequence; using the key sequence to encrypt the encoded N-th frame image, obtain an encrypted code stream and output it. This method not only realizes the encryption and decryption of video images, but also ensures the security of image data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an image processing method, device, medium and chip system based on key update. Background Art

[0002] As one of the most commonly used data formats, video images carry a large amount of information. With the development of Internet technology, it is very important to ensure that the image information can be transmitted securely and not be obtained by third-party attacks. In particular, if important military data and patient examination results are stolen during the transmission process, it will cause huge losses to the country and cause trouble to personal privacy. Therefore, image encryption is of great significance.

[0003] Since the original video image data volume is very large, it is usually compressed by image coding to reduce its data volume before transmission. When encrypting the image, according to the encryption position, it can be divided into three methods: data encryption before encoding, encryption during encoding, and data encryption after encoding.

[0004] Among them, Figure 1a As shown in the figure, data encryption before encoding has a large amount of data, which requires a high bandwidth for encryption processing technology. The area and power consumption of hardware implementation are very high. Encryption during encoding requires different encryption processing methods because different encoding technologies have very different encoding principles and processing flows, which leads to a narrow scope of application and poor applicability. Figure 1b As shown, the encoded data encryption also has the risk of being attacked and cracked because it does not use encryption algorithms and encryption modes. Summary of the invention

[0005] In view of this, the present invention provides an image processing method, device, medium and chip system based on key update to solve the problems of high power consumption, poor applicability and risk of being cracked in the current image encoding and encryption process.

[0006] In a first aspect, the present invention provides an image processing method based on key update, the method comprising:

[0007] Obtain the first summary value corresponding to the N-th frame image and the N-1-th frame image, where N is ≥ 2 and is a positive integer;

[0008] Extracting image block information from the Nth frame image, and encoding the N frames image;

[0009] Using the first summary value and the image block information to perform key update and initialization vector IV update processing to obtain a first key and a first IV value;

[0010] Inputting the first key and the first IV value into a stream encryption algorithm system for processing to generate a key sequence;

[0011] The encoded N-th frame image is encrypted using the key sequence to obtain an encrypted code stream and output it.

[0012] In combination with the first aspect, in a possible implementation manner, extracting image block information from the Nth frame image includes:

[0013] Determine a target image block from a plurality of image blocks included in the Nth frame image, wherein the target image block includes a plurality of pixel points;

[0014] The pixel value of each pixel point in the target image block is extracted, and at least a part of all the pixel values ​​are processed to obtain a pixel parameter sequence.

[0015] In combination with the first aspect, in another possible implementation, the using the first digest value and the image block information to perform key update and initialization vector update processing to obtain a first key and a first IV value includes:

[0016] Dividing the first digest value into a first part and a second part, wherein each part includes partial digest information of the first digest value;

[0017] Performing key update processing on the summary information of the first part and the pixel parameter sequence to generate the first key;

[0018] Perform initialization vector update processing on the summary information of the second part to obtain the first IV value.

[0019] In combination with the first aspect, in another possible implementation, dividing the first digest value into a first part and a second part includes: if the length of the first digest value is 256 bits, dividing it by 128 bits to obtain a first part with a higher length of 128 bits and a second part with a lower length of 128 bits.

[0020] In combination with the first aspect, in yet another possible implementation, encoding the N frames of images includes:

[0021] Encoding the target image block and the remaining image blocks to obtain an encoded target image block and encoded remaining image blocks, wherein the remaining image blocks are all remaining image blocks in the Nth frame image except the target image block;

[0022] The step of encrypting the encoded N-th frame image by using the key sequence to obtain an encrypted code stream includes:

[0023] Using the key sequence to encrypt the remaining encoded image blocks and / or the subsequently received N+1th frame image;

[0024] The encoded target image block is combined with the remaining encrypted image blocks and / or the encrypted N+1th frame image to generate the encrypted code stream.

[0025] In combination with the first aspect, in another possible implementation, obtaining the first summary value corresponding to the N-1th frame image includes: encoding the N-1th frame image to obtain encoded image data; and calculating the encoded image data according to a summary algorithm to obtain the first summary value.

[0026] In combination with the first aspect, in yet another possible implementation, the method further includes:

[0027] Receiving the encrypted code stream;

[0028] Extracting the encoded target image block and the remaining encrypted and encoded image blocks from the encrypted code stream;

[0029] Decoding the encoded target image block to obtain the target image block and a pixel parameter sequence;

[0030] Generate a key sequence according to the target image block, the pixel parameter sequence and the stream encryption algorithm system;

[0031] Decrypting the remaining encrypted and encoded image blocks using the key sequence to obtain decrypted image data;

[0032] The decrypted image data is input to the image decoding unit for decoding processing, and after decoding, it is combined with the decoded target image block to generate the original N-th frame image and output it.

[0033] In combination with the first aspect, in another possible implementation, generating a key sequence based on the target image block, the pixel parameter sequence and the stream encryption algorithm system includes: calculating according to the pixel parameter sequence and the first summary value corresponding to the N-1th frame image to obtain the first key and the first IV value; inputting the first key and the first IV value into the stream encryption algorithm system for processing to generate the key sequence.

[0034] In combination with the first aspect, in another possible implementation, the method further includes: synchronously performing a digest algorithm calculation on the original Nth frame image to generate a second digest value, and inputting the second digest value into the stream encryption algorithm system as a calculation element for generating a second key and a second IV value when performing a decryption operation on the N+1th frame image.

[0035] In combination with the first aspect, in another possible implementation, the stream encryption algorithm system is a Zu Chongzhi algorithm ZUC system or a symmetric encryption algorithm RC4 encryption system;

[0036] The digest algorithm includes one or more of SM3, SHA1, and SHA2.

[0037] In a second aspect, the present invention provides an image processing device based on key update, the device comprising:

[0038] An acquisition module, used to acquire a first summary value corresponding to the Nth frame image and the N-1th frame image, where N is greater than or equal to 2 and is a positive integer;

[0039] An encoding module, used for extracting image block information from the N-th frame image, and encoding the N-th frame image;

[0040] An updating module, configured to perform key updating and initialization vector IV updating processing using the first summary value and the image block information to obtain a first key and a first IV value;

[0041] A processing module, used for inputting the first key and the first IV value into a stream encryption algorithm system for processing to generate a key sequence;

[0042] The encryption module is used to encrypt the encoded N-th frame image using the key sequence to obtain an encrypted code stream and output it.

[0043] In a third aspect, the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the image processing method based on key update of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0044] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the image processing method based on key update according to the first aspect or any corresponding embodiment thereof.

[0045] In addition, the present invention provides a computer program product, including computer instructions, which are used to enable a computer to execute the image processing method based on key update of the above-mentioned first aspect or any corresponding embodiment thereof.

[0046] In a fifth aspect, the present invention provides a chip system, the chip system comprising an image encoding system and an image decoding system, wherein the image encoding system and the image decoding system are connected;

[0047] An image encoding system is used to execute the image processing method based on key update of the above-mentioned first aspect or at least part of its corresponding implementation methods; an image decoding system is used to execute the image processing method based on key update of at least part of its implementation methods corresponding to the first aspect.

[0048] The image processing method, device, medium and chip system based on key update provided by the present invention obtain the summary values ​​corresponding to the Nth frame image and the N-1th frame image, and use these summary values ​​to update the key, thereby ensuring that a different key is used for each encryption. This dynamic key update mechanism greatly improves the security of the encryption process, making it difficult for attackers to decipher image data through known "plaintext-ciphertext" pairs. Since the key is dynamically generated based on the summary value of the image, even if a key is leaked, the attacker cannot use the key to decrypt other images because the summary values ​​and generated keys of other images are different.

[0049] In addition, a stream encryption algorithm system is used in the image encryption process, which can quickly generate a key sequence and encrypt the encoded image, thereby improving the encryption efficiency. At the same time, this method is applicable to various image formats and sizes, because the key update and encryption process are based on the image summary value and the encoded information, which is independent of the specific format and size of the image and has strong adaptability.

[0050] By encoding and encrypting the image, this method can ensure the integrity of the image during transmission and storage. Even if the image is tampered with or damaged during transmission, the receiver can find the abnormality through the decryption process, thus ensuring the authenticity and reliability of the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0052] Figure 1a is a schematic diagram of a process of image encryption before encoding provided by the present invention;

[0053] Figure 1b is a schematic diagram of a process of encrypting an encoded image according to the present invention;

[0054] Figure 2 is a flowchart of an image processing method based on key update provided according to an embodiment of the present invention;

[0055] Figure 3 is a schematic diagram of an image encoding process provided according to an embodiment of the present invention;

[0056] Figure 4 is a schematic diagram of the structure of a target image block provided according to an embodiment of the present invention;

[0057] Figure 5 is a schematic diagram of the temporal relationship of various processing flows of an image encryption system provided by an embodiment of the present invention;

[0058] Figure 6 is a flow chart of another image processing method based on key update provided according to an embodiment of the present invention;

[0059] Figure 7 is a schematic diagram of an image decoding process provided according to an embodiment of the present invention;

[0060] Figure 8 is a schematic diagram of the temporal relationship of various processing flows of an image decryption system provided by an embodiment of the present invention;

[0061] Fig. 9 is a structural block diagram of an image processing device provided according to an embodiment of the present invention;

[0062] Fig.10 is a schematic diagram of the hardware structure of an electronic device provided according to an embodiment of the present invention;

[0063] Fig.11 It is a structural block diagram of a chip system provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0065] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0066] Furthermore, the terms “first” and “second” are used for descriptive purposes only and should not be understood as indicating or implying relative importance.

[0067] The technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0068] First, the application scenarios and related technical terms of the technical solutions provided in the embodiments of the present invention are introduced.

[0069] The technical solution of the embodiment of the present invention is applied to the field of image processing technology and can be implemented by designing a chip circuit or a chip system. Specifically, a self-updating image encryption and decryption algorithm based on a key and an IV initial value is proposed. By calculating part of the original uncoded image information and the encoded data value, a new set of keys and IV initial values ​​is generated for each frame of the image and updated to the stream encryption algorithm system, thereby realizing encryption of the encoded image and decryption of the encrypted image.

[0070] In this process, video image compression processing is involved. Specifically, the JPEG image compression method can be used. JPEG video image compression is a commonly used international standard for video image compression, which is used to compress continuous tone static images (including grayscale images and color images). JPEG is the abbreviation of the Joint Photographic Experts Group. This standard aims to support various applications based on continuous tone static image compression. The image to be compressed can be in any color space. Users can adjust the compression ratio to make the compression effect reach or approach the top compression performance in the industry, and have good resolution and restoration quality. Therefore, when a large number of images need to be stored and transmitted, the JPEG image compression method can be used to compress video images.

[0071] The SM3 algorithm is a cryptographic hash function standard, which was issued by the State Cryptography Administration in . The relevant standard is "GM / T0004-2012 SM3 Cryptographic Hash Algorithm". In the commercial cryptographic system, SM3 is mainly used for digital signature and verification, message authentication code generation and verification, random number generation, etc. Its algorithm is public. According to the State Cryptography Administration, its security and efficiency are equivalent to SHA-256. As a self-designed cryptographic hash algorithm, the SM3 algorithm generally has an output message digest value length of 256 bits, a message block length of 512 bits, and 64 iterations of compression.

[0072] At present, when encrypting an image, it can be divided into: data encryption before encoding, encryption during encoding, and data encryption after encoding according to the encryption location, but these three encryption processes have their own advantages and disadvantages.

[0073] For example, data encryption before encoding, that is, encrypting the original image in the spatial domain, such as Figure 1a As shown in the figure, the commonly used methods include: pixel position scrambling and pixel value size change. The disadvantages are: the data encryption before encoding has a large amount of data itself, which requires a high bandwidth for encryption processing technology, and the area and power consumption are very high when implemented in hardware. At the same time, the encryption of the data before encoding will change the original image features, from a regular graphic to a disordered state, resulting in a larger amount of data after encoding than the data after encoding in an unencrypted regular state.

[0074] Another example is encryption during the encoding process, that is, encryption is performed at a certain link in the encoding process, such as the encrypted quantization parameter table in JPEG; encryption during the encoding process, because the encoding principles and processing flows of different encoding technologies vary greatly, different encryption processing methods need to be used, resulting in a very narrow scope of application and poor applicability.

[0075] Encoded data encryption uses an encryption algorithm to encrypt the encoded image data. Commonly used algorithms include AES, DES, SM4 and other symmetric block encryption algorithms. Figure 1b As shown in the figure, the image is encrypted after encoding, and then the image is transmitted and decrypted in the decryption system. In the decryption system, the image is first decrypted, and then the decrypted image is decoded to obtain the original image information. When the encrypted image is transmitted, the key or key information used for encryption and decryption also needs to be transmitted to ensure that the same set of keys are used for encryption and decryption, otherwise the image cannot be decoded normally, resulting in the inability to obtain correct data information.

[0076] The disadvantages are: generally using fixed algorithms and algorithm modes, fixed keys, when using a specific attack, it may be cracked. When using multiple keys, since the encryption process and decryption process must use the same key, there is a problem of key management between the encryption party and the decryption party. The key management process itself is also vulnerable to attack, resulting in risks.

[0077] In order to solve the above problems existing in the encryption and decryption process of the above-mentioned images, an embodiment of the present invention provides an image processing method based on key update, which calculates part of the original uncoded image information and the coded data value, generates a new set of keys and IV initial values ​​for each frame of the image, and updates them to the stream encryption algorithm system for calculation to encrypt the coded image. It not only realizes the encryption and decryption of video images, but also ensures the security of image data.

[0078] The technical solution provided by the embodiment of the present invention is described in detail below.

[0079] An embodiment of the present invention provides an embodiment of an image processing method based on key update. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0080] In this embodiment, an image processing method is provided, which can be used in an image coding and decoding system, or an apparatus, a chip circuit or other equipment including an image coding system and an image decoding system. Figure 2 is a flowchart of an image processing method based on key update according to an embodiment of the present invention. Figure 2 As shown, the method includes:

[0081] Step S101: obtaining a first summary value corresponding to the Nth frame image and the N-1th frame image, where N≥2 and is a positive integer.

[0082] The Nth frame image can be captured by a camera or a mirror module and then transmitted to the image coding system, and the image coding system receives the N-1th frame, the Nth frame and the N+1th frame image in real time. In this embodiment, it is assumed that the Nth frame image is a frame image in the intermediate encoding and decoding process.

[0083] Before acquiring the Nth frame image, the image encoding system may calculate a digest value, such as a first digest value, based on the received N-1th frame image, and store the first digest value for subsequent use in encoding or encrypting the Nth frame image.

[0084] The first digest value may be an output message obtained by calculation based on the aforementioned SM3 algorithm.

[0085] It should be noted that in this step, the time sequence of obtaining the first summary value corresponding to the N-th frame image and the N-1-th frame image may be the same or different. For example, the first summary value is obtained first, and then the N-th frame image is obtained. Alternatively, the first summary value and the N-th frame image are obtained at the same time.

[0086] In addition, the method for obtaining the first digest value corresponding to the N-1th frame image includes: encoding the N-1th frame image to obtain encoded image data; and calculating the encoded image data according to a digest algorithm to obtain a first digest value. The digest algorithm includes but is not limited to SM3, SHA1, SHA2, etc.

[0087] Step S102: extracting image block information from the Nth frame image, and encoding the Nth frame image.

[0088] The image block information is a part of multiple image blocks in the Nth frame image, and is used to describe the features of the Nth frame image.

[0089] Specifically, one implementation method is as follows: Figure 3 As shown, after the current Nth frame of the original image is transmitted to the image coding system, it is converted into an 8x8 image block format (the reason is the processing requirement of JPEG coding technology) for subsequent coding processing. The 8x8 image block is used as the target image block, as shown in Figure 4 As shown, the image block information is extracted from the target image block.

[0090] At the same time, the image encoding system also encodes the current Nth frame image.

[0091] Further, step S102 includes: determining a target image block from a plurality of image blocks included in the Nth frame image, wherein the target image block includes a plurality of pixel points; extracting a pixel value of each pixel point in the target image block, processing at least a portion of all pixel values ​​to obtain a pixel parameter sequence.

[0092] In this embodiment, the first image block is used as the target image block. The first image block refers to the 8x8 image block located at the upper left corner of each frame image, that is, the image area of ​​the first 8 rows and the first 8 columns. Figure 4 As shown, the pixel value of each pixel in the image is obtained. According to the JPEG standard, the value of each pixel is 8 bits (color depth). Bit 5 and bit 4 of each pixel value are extracted to form the first image block information parameter of 128 bits in total, block_1_reg = {Pixel-64[5:4], Pixel-63[5:4], Pixel-62[5:4] ... Pixel-1[5:4]}, that is, the 127th and 126th bits of block_1_reg are the 5th and 4th bits of Pixel-64, and so on. The pixel parameter sequence can be represented by the block_1_reg parameter, which is used to update the key in the stream encryption algorithm system.

[0093] The value of each pixel is 8 bits, which means that when image data is stored or processed, the information of each pixel is encoded in units of 8 bits.

[0094] The image encoding system will then pass the block_1_reg parameter to the stream encryption algorithm system for the key update part.

[0095] Step S103: performing key update and initialization vector (IV) update processing using the first digest value and the image block information to obtain a first key and a first IV value.

[0096] like Figure 3As shown, in this step, the first summary value and the image block information are used to perform key update and initialization vector update processing to obtain the first key and the first IV value, which specifically includes: firstly dividing the first summary value into a first part and a second part, wherein each part includes partial summary information of the first summary value; then performing key update processing on the summary information of the first part and the pixel parameter sequence to generate the first key; performing initialization vector IV update processing on the summary information of the second part to obtain the first IV value.

[0097] A specific implementation of dividing the first digest value into the first part and the second part includes: if the length of the first digest value is 256 bits, it is divided into 128 bits to obtain a first part with a high 128-bit length and a second part with a low 128-bit length.

[0098] Step S104: input the first key and the first IV value into the stream encryption algorithm system for processing to generate a key sequence.

[0099] The stream encryption algorithm system is used to generate a key sequence so as to use the key sequence to perform encryption operations on image data.

[0100] Optionally, the stream encryption algorithm system is a ZUC Encryption Algorithm, and its type is: a stream cipher algorithm, which uses a key stream to encrypt plaintext.

[0101] Specifically, the ZUC encryption algorithm is a commercial-oriented stream encryption algorithm designed independently. It has been approved as the international standard for the new generation of broadband wireless mobile communication systems. The complete standard includes the ZUC encryption algorithm and the integrity algorithm 128-EIA3 and confidentiality algorithm 128-EEA3 based on the ZUC encryption algorithm. The ZUC encryption algorithm is a word-oriented stream encryption algorithm that takes a 128-bit initial key KEY and a 128-bit initialization vector IV as input. In addition, the output of the algorithm is a 32-bit sequence, namely the key sequence, which can be used to encrypt and decrypt digital information.

[0102] In the case of the initial key being unchanged, using the key stream to test the same data multiple times will reduce the security of the algorithm. In order to ensure that the results of multiple encryptions of the same data under the same key are still different, the cryptographic designer introduced the concept of random number IV. That is, in each session, the initial key can remain unchanged for a long time, while the IV can be changed in real time, thereby improving the security of the algorithm.

[0103] In addition, the above stream encryption algorithm system can also be an RC4 algorithm system. RC4 is a stream cipher (encryption one byte at a time) encryption algorithm in a symmetric cipher (encryption and decryption use the same key). Specifically, the key to the RC4 algorithm is to generate a corresponding key stream based on the plaintext and the key. The length of the key stream corresponds to the length of the plaintext, that is, if the length of the plaintext is 500 bytes, then the key stream is also 500 bytes. The i-th byte of the ciphertext is equal to the result of the XOR operation of the i-th byte of the plaintext and the i-th byte of the key stream. Generally, the length of the RC4 key Key is 1 to 256 bytes. The length of the key keylen has no necessary relationship with the length of the plaintext and the length of the key stream. Usually, the length of the key is 16 bytes (128 bits).

[0104] Step S105: Encrypt the encoded N-th frame image using the key sequence to obtain and output an encrypted code stream.

[0105] One implementation manner is to encode the target image block and the remaining image blocks to obtain an encoded target image block and encoded remaining image blocks, wherein the remaining image blocks are all remaining image blocks except the target image block in the Nth frame image;

[0106] The encoded N-th frame image is encrypted using a key sequence to obtain an encrypted code stream, including: using the key sequence to encrypt the remaining encoded image blocks and / or the subsequently received N+1-th frame image; combining the encoded target image block with the remaining encrypted image blocks and / or the encrypted N+1-th frame image to generate an encrypted code stream.

[0107] The image processing method provided in this embodiment obtains the digest values ​​corresponding to the Nth frame image and the N-1th frame image, and uses these digest values ​​to update the key, thereby ensuring that a different key is used for each encryption. This dynamic key update mechanism greatly improves the security of the encryption process, making it difficult for attackers to decipher image data through known "plaintext-ciphertext" pairs. Since the key is dynamically generated based on the digest value of the image, even if a key is leaked, the attacker cannot use the key to decrypt other images because the digest values ​​of other images and the generated keys are different.

[0108] In addition, a stream encryption algorithm system is used in the image encryption process, which can quickly generate a key sequence and encrypt the encoded image, thereby improving the encryption efficiency. At the same time, this method is applicable to various image formats and sizes, because the key update and encryption process are based on the image summary value and the encoded information, which is independent of the specific format and size of the image and has strong adaptability.

[0109] By encoding and encrypting the image, this method can ensure the integrity of the image during transmission and storage. Even if the image is tampered with or damaged during transmission, the receiver can find the abnormality through the decryption process, thus ensuring the authenticity and reliability of the image.

[0110] Combine the following Figures 3 to 5 The process of image encoding, encryption and key sequence generation in this embodiment is described in detail.

[0111] like Figure 3 As shown, after the Nth frame image is input into the image encoding system, the first image block is first obtained as the target image block, information is extracted from the first image block, and the extracted image block is JPEG encoded. This encoding process is a standard image encoding algorithm, which is not described in detail in this embodiment. The data obtained after encoding the first image block is recorded as Image_encode.

[0112] At the same time, a summary value calculation, such as SM3 calculation, is also performed on the encoded image. The encoded image is passed to the next stage, and while being passed, SM3 calculation is performed on the currently encoded image frame data. SM3 calculation is performed once for each frame of image encoded data. When the encoding of a frame of image data is completed, the result of the SM3 calculation can be synchronously obtained, which is also called the summary value sm3_digest. In this embodiment, the summary value obtained after performing SM3 calculation on the Nth frame of image is recorded as the second summary value, expressed as "sm3_digest". Similarly, the first summary value is obtained after performing SM3 calculation on the N-1th frame of image, and the first summary value is recorded as "sm3_digest_pre".

[0113] It should be noted that since the video image is updated in real time, the two digest values ​​are also updated. When a new frame digest value is about to be obtained, the digest value of the current frame automatically changes to the digest value of the previous frame. In addition, when the image is just beginning to be calculated, that is, when the first frame is being calculated, sm3_digest_pre takes the default initial value, which can be defined by the user.

[0114] After obtaining the second digest value sm3_digest, the first digest value sm3_digest_pre of the previous frame image is passed to the ZUC computing system, wherein the 256-bit digest value of sm3_digest_pre is divided into two parts, divided by 128-bit bit length, the upper 128 bits are passed as the first part of the first digest value to the key update system for key update, and the lower 128 bits are passed as the second part of the first digest value to the IV initial value update part.

[0115] It should be noted that the ZUC algorithm requires an IV value each time it generates a key stream. Different IV values ​​generate different key streams. In the technical solution of this embodiment, each frame of the image uses a key stream generated by a different IV value, that is, the IV value is updated before each frame of the image is encrypted to generate a new key sequence, thereby ensuring that the key stream is updated for each frame, thereby improving system security.

[0116] The key update process specifically includes the following calculation method for updating the key before encrypting each frame of image:

[0117] Key= sm3_digest_pre[255:128]^block_1_reg(1)

[0118] Wherein, Key and block_1_reg are both 128-bit parameters, ^ is an XOR operation, key is the key to be updated, and block_1_reg is the aforementioned pixel parameter sequence. The above relationship indicates that sm3_digest_pre[255:128] is XOR-ed with the pixel parameter sequence block_1_reg to generate the first key Key.

[0119] The updating process of the initial value IV is as follows: before encrypting each frame of image, the initial value is updated, and the calculation method is as follows:

[0120] IV = sm3_digest_pre[127:0](2)

[0121] The IV value is a parameter with a length of 128 bits, that is, the lower 128 bits of sm3_digest_pre are taken as the updated IV value, that is, the first IV value.

[0122] It should be understood that the first key and the first IV value may actually be binary strings or sequences.

[0123] In the above step S104, a stream encryption system, such as a ZUC algorithm core, is used to calculate the input first key and the first IV value to generate a first key sequence. A specific processing process can be performed by an algorithm unit of the ZUC algorithm standard mentioned above. Finally, the first key sequence is used to encrypt the encoded N-th frame image to generate an encrypted code stream and output it.

[0124] In this embodiment, the encoded image data is encrypted. The data of the first block of each frame (i.e., the image block 8x8 in the upper left corner) is not encrypted after encoding and is directly output, which is expressed as: Image_encode_crypto = Image_encode. Image_encode_crypto means Figure 3The output result after XOR encryption is shown; Image_encode represents the output code stream after encoding.

[0125] For all subsequent data or frame images, the first key sequence is used for encryption, that is, Image_encode and the key sequence zuc_out of ZUC are XORed (encryption process) to generate an encrypted code stream; this process is to encrypt the encrypted data Image_encode_crypto (that is, all remaining data blocks), and the formula is: Image_encode_crypto= zuc_out ^Image_encode.

[0126] See also Figure 5 As shown, the time relationship of each processing flow of the image encryption system is shown. After the N-1th frame image is input, the first image block information is extracted first, and then the key and IV value are updated to generate the first digest value. Then, the key and IV value to be used for the Nth frame image are updated using the first digest value.

[0127] That is, the summary value used when updating the current frame image is the summary value calculated for the previous frame image. Since the output of JPEG encoding has a certain delay, that is, encoding processing is required after the block data is input, the output of the actual encoded data needs to wait for a certain period of time (generally several or dozens of clock cycles). This period of time is enough to complete the calculation and update of the key and IV value, and then the ZUC algorithm core can output the key stream synchronously in real time. The image encoding output, ZUC key stream generation, XOR encryption, and SM3 calculation processes are processed in parallel and synchronously.

[0128] This embodiment proposes an image encryption algorithm based on self-updating of key and IV initial value, which generates a new set of key and IV initial value for each frame of image by calculating part of the original uncoded image information and the coded data value, and updates them to the ZUC Zu Chongzhi algorithm operation unit to encrypt the coded image. The encryption of video images is realized, and the security of image data is guaranteed.

[0129] In another embodiment, an image processing method is also provided. The method is mainly applied to an image decoding system, which corresponds to an encryption system and has the same principle. Figure 6 As shown, the method includes:

[0130] Step S201: receiving an encrypted code stream.

[0131] The image decoding system receives the encrypted code stream transmitted from the image encoding system in real time. The encrypted code stream includes but is not limited to: configuration information (such as image data specifications, size, encoding table, etc.), encoding, encrypted data, including encrypted valid data, etc.

[0132] Step S202: extracting the encoded target image block and the remaining encrypted and encoded image blocks from the encrypted code stream.

[0133] The target image block may be the first image block of the current frame image, which is not encrypted but only encoded. Except for the first image block, the remaining image blocks are all encoded and encrypted on the image encoding system side.

[0134] Step S203: Decode the encoded target image block to obtain the target image block and a pixel parameter sequence.

[0135] The target image block is the first image block mentioned above, such as Figure 4 The pixel parameter sequence includes the block_1_reg parameter.

[0136] Step S204: Generate a key sequence according to the target image block, the pixel parameter sequence and the stream encryption algorithm system.

[0137] Step S205: Decrypt the remaining encrypted and encoded image blocks using the key sequence to obtain decrypted image data.

[0138] Step S206: input the decrypted image data to the image decoding unit for decoding processing, and after decoding, combine it with the decoded target image block to generate the original N-th frame image and output it.

[0139] Specifically, a specific implementation of step S204 includes: calculating according to the pixel parameter sequence and the first summary value corresponding to the N-1th frame image to obtain the first key and the first IV value; inputting the first key and the first IV value into the stream encryption algorithm system for processing to generate a key sequence.

[0140] During the image decoding process, the encrypted and encoded remaining image blocks are decrypted through the key sequence, and the decrypted image data is input into the image decoding unit for decoding. The decoded image is the original image. The original image is output externally in one way, and the other way performs an SM3 calculation on each frame of the original image data. After all the image data of the current frame is input and all the calculations are completed, a summary value is generated, which is the first summary value corresponding to the N-1 frame image described above. Because the image is updated in real time, the current frame N also becomes the previous frame, that is, the N-1 frame, compared to the next frame image. This summary value is used as a calculation factor for generating the key and IV when the next frame N+1 image is decrypted.

[0141] See also Figure 7 As shown, the encoded and encrypted data is input, and the data of the first image block is first obtained. Because the first image block is not encrypted, it is directly input into the JPEG image decoding unit for processing, and the information of the first 8X8 image block is obtained, and the block_1_reg parameter, that is, the aforementioned pixel parameter sequence, is generated.

[0142] Then, the block_1_reg parameter is used to update the key and the initial value IV. The processing method is the same as that in the encryption system, and this embodiment will not be repeated here. The updated first key and the first IV value are input into the ZUC algorithm system to generate a first key sequence, and the first key sequence is used to perform an XOR operation on the encrypted image data to achieve a decryption operation.

[0143] Furthermore, the above method also includes: the image decoding system synchronously performs a digest algorithm calculation on the original Nth frame image to generate a second digest value, and inputs the second digest value into the stream encryption algorithm system as a calculation element for generating a second key and a second IV value when performing a decryption operation on the N+1th frame image.

[0144] The decrypted data is sent to the JPEG image decoding unit for decoding, and the original image information, such as the Nth frame image, is obtained. The decoded original Nth frame image information is synchronously calculated by SM3 to obtain the second summary value, which is used as the initial value and part of the key for the next frame image decryption operation.

[0145] It should be noted that, in this embodiment, “decoding JPEG of the first image block” and “decoding JPEG of the image” can be executed by one unit in hardware.

[0146] In addition, in the above embodiments, the stream encryption algorithm system is the Zu Chongzhi algorithm ZUC system or the symmetric encryption algorithm RC4 encryption system; the digest algorithm includes one or more of SM3, SHA1, and SHA2.

[0147] like Figure 8 As shown in the figure, the time relationship of each processing flow of the decryption system is that after the encoded and encrypted image is input, the first image block is encrypted and information is extracted, and then the key and IV are updated. It should be noted that the digest value used during the update is the digest value calculated for the previous frame of the image. The image decoding output, ZUC key stream generation, XOR decryption, and SM3 calculation processes are processed in parallel and synchronously most of the time.

[0148] Since the specific process of updating the key and IV value during image decryption is the same as that of the aforementioned image encryption system, refer to the specific description of the aforementioned image encryption system, this embodiment will not be described in detail in the image decoding system.

[0149] This embodiment provides an image processing method based on key update. The method calculates part of the original uncoded image information and the coded data value, generates a new set of keys and IV initial values ​​for each frame of the image, and updates them to the stream encryption algorithm system for operation, and decrypts the coded and encrypted image, which not only realizes the decryption from the image encryption system, but also ensures the security of the image data.

[0150] In this embodiment, an image processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0151] This embodiment provides an image processing device based on key update, such as Fig. 9 As shown, the device includes: an acquisition module 910, an encoding module 920, an update module 930, a processing module 940 and an encryption module 950. In addition, the device may also include other more or fewer modules, such as a decryption module, a storage module, an image decoding unit, etc., which is not limited in this embodiment.

[0152] The acquisition module 910 is used to acquire the first summary value corresponding to the Nth frame image and the N-1th frame image, where N≥2 and is a positive integer.

[0153] The encoding module 920 is used to extract image block information from the Nth frame image and encode the Nth frame image.

[0154] The updating module 930 is used to perform key update and initialization vector IV update processing using the first summary value and the image block information to obtain a first key and a first IV value.

[0155] The processing module 940 is used to input the first key and the first IV value into the stream encryption algorithm system for processing to generate a key sequence.

[0156] The encryption module 950 is used to encrypt the encoded N-th frame image using the key sequence to obtain and output an encrypted code stream.

[0157] In some optional embodiments, the acquisition module 910 is specifically used to determine a target image block from multiple image blocks included in the Nth frame image, where the target image block includes multiple pixel points; extract the pixel value of each pixel point in the target image block, process at least a part of the pixel values ​​of all the pixel values, and obtain a pixel parameter sequence.

[0158] In some other optional embodiments, the update module 930 is specifically used to divide the first summary value into a first part and a second part, each part including partial summary information of the first summary value; perform key update processing on the summary information and pixel parameter sequence of the first part to generate a first key; perform initialization vector update processing on the summary information of the second part to obtain a first IV value.

[0159] If the length of the first digest value is 256 bits, it is divided into 128 bits to obtain a first part with a high 128-bit length and a second part with a low 128-bit length.

[0160] In other optional embodiments, the encoding module 920 is specifically used to encode the target image block and the remaining image blocks to obtain an encoded target image block and encoded remaining image blocks, wherein the remaining image blocks are all remaining image blocks in the Nth frame image except the target image block.

[0161] The encryption module 950 is specifically used to use the key sequence to encrypt the remaining encoded image blocks and / or the subsequently received N+1th frame image; combine the encoded target image block with the remaining encrypted image blocks and / or the encrypted N+1th frame image to generate an encrypted code stream.

[0162] In some further optional implementations, the acquisition module 910 is specifically configured to encode the N-1th frame image to obtain encoded image data; and calculate the encoded image data according to a digest algorithm to obtain a first digest value.

[0163] In some further optional implementations, the above-mentioned device further includes: a receiving module and a decryption module, etc.

[0164] The receiving module is used to receive the encrypted code stream.

[0165] The processing module 940 is further used to extract the encoded target image block and the remaining encrypted and encoded image blocks from the encryption code stream, and to decode the encoded target image block to obtain the target image block and a pixel parameter sequence.

[0166] The processing module 940 is further configured to generate a key sequence, such as a second key sequence, according to the target image block, the pixel parameter sequence and the stream encryption algorithm system.

[0167] The decryption module is used to decrypt the remaining encrypted and encoded image blocks using the key sequence to obtain decrypted image data, and transmit the decrypted image data to the image decoding unit.

[0168] The image decoding unit is used to input the decrypted image data into the image decoding unit for decoding processing, and after decoding, it is combined with the decoded target image block to generate the original N-th frame image and output it.

[0169] In some further optional embodiments, the processing module 940 is further specifically used to calculate according to the pixel parameter sequence and the first summary value corresponding to the N-1th frame image to obtain a first key and a first IV value; the first key and the first IV value are input into the stream encryption algorithm system for processing to generate a key sequence.

[0170] In some other optional embodiments, the acquisition module 910 is also used to synchronously perform a digest algorithm calculation on the original Nth frame image to generate a second digest value, and input the second digest value into the stream encryption algorithm system as a calculation element for generating a second key and a second IV value when performing a decryption operation on the N+1th frame image.

[0171] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0172] The image processing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0173] The embodiment of the present invention also provides an electronic device having the above Fig. 9 The image processing device shown.

[0174] See also Fig.10 , is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present invention, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface).

[0175] In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.10 A processor 10 is taken as an example.

[0176] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0177] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the image processing method shown in the above embodiment.

[0178] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0179] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0180] The electronic device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Fig.10 The example of connecting through bus is taken in the following.

[0181] The input device 30 can receive input digital or character information and generate signal input related to the user settings and function control of the electronic device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0182] In addition, the electronic device also includes at least one communication interface for the electronic device to communicate with other devices or a communication network.

[0183] Optionally, the electronic device in this embodiment may be a network device, such as a server or a data center, or may be a terminal device, such as a PC, a smart terminal, etc.

[0184] The embodiment of the present invention also provides a chip system, such as Fig.11 As shown, the chip system includes an image encoding system 110 and an image decoding system 120, wherein the image encoding system 110 and the image decoding system 120 are connected.

[0185] The image coding system 110 is used to perform the above Figure 2 , Figure 3 and Figure 5 The image processing method flow shown mainly implements the encoding and encryption process of the original image, generates an encrypted code stream and outputs it to the outside.

[0186] The image decoding system 120 is used to perform the above Figures 6 to 8 The illustrated image processing method flow based on key update mainly realizes the function of receiving the encrypted code stream generated by the image coding system 110, and restoring the original image after decryption and decoding operations.

[0187] Specifically, the functions of the image encoding system 110 and the image decoding system 120 refer to the description of the above-mentioned embodiment, which will not be described in detail in this embodiment.

[0188] It should be noted that the above-mentioned image encoding system 110 and image decoding system 120 are located in a chip system and integrated in an electronic device, such as a server or a client. In addition, the image encoding system 110 and the image decoding system 120 can also be located in different chip systems, so that the image encoding system 110 and the image decoding system 120 are respectively located in different electronic devices, such as integrating the image encoding system 110 on PC1 and integrating the image decoding system 120 on PC2, and PC1 and PC2 form an image encoding and decoding system.

[0189] More specifically, the chip system, or the physical structure / hardware structure of the server and PC, can be Fig.10 The structures shown are the same, and this embodiment does not limit this.

[0190] An embodiment of the present invention also provides a computer-readable storage medium. The image processing method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented by downloading through a network and originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware.

[0191] The storage medium may be a disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid state drive, etc.; further, the storage medium may also include a combination of the above-mentioned types of memories. It is understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by the computer, processor or hardware, the image processing method shown in the above embodiment is implemented.

[0192] Embodiments of the present application may also provide a computer program product, including computer program instructions, which, when executed by a processor, cause the processor to perform the steps in the above method. Wherein, the computer program product may be written in any combination of one or more programming languages ​​to perform program codes for performing the operations of the disclosed embodiments, wherein the programming languages ​​include object-oriented programming languages, such as Java, C++, etc., and also include conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on a user computing device, partially on a user device, as an independent software package, partially on a user computing device, partially on a remote computing device, or entirely on a remote computing device or server.

[0193] The above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them. Although the embodiments of the present invention are described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An image processing method based on key update, characterized in that: The method comprises: Obtain the first summary value corresponding to the N-th frame image and the N-1-th frame image, where N is ≥ 2 and is a positive integer; Extracting image block information from the Nth frame image, and encoding the N frames image; Using the first summary value and the image block information to perform key update and initialization vector IV update processing to obtain a first key and a first IV value; Inputting the first key and the first IV value into a stream encryption algorithm system for processing to generate a key sequence; Using the key sequence to encrypt the encoded N-th frame image, obtain an encrypted code stream and output it; The step of performing key update and initialization vector update processing using the first summary value and the image block information to obtain a first key and a first IV value includes: Dividing the first digest value into a first part and a second part, wherein each part includes partial digest information of the first digest value; Performing key update processing on the summary information of the first part and the pixel parameter sequence to generate the first key; Perform initialization vector update processing on the summary information of the second part to obtain the first IV value.

2. The method according to claim 1, characterized in that The extracting the image block information from the Nth frame image includes: Determine a target image block from a plurality of image blocks included in the Nth frame image, wherein the target image block includes a plurality of pixel points; The pixel value of each pixel point in the target image block is extracted, and at least a part of all the pixel values ​​are processed to obtain a pixel parameter sequence.

3. The method according to claim 1, characterized in that The dividing the first digest value into a first part and a second part comprises: If the length of the first digest value is 256 bits, it is divided into 128 bits to obtain a first part with a high 128-bit length and a second part with a low 128-bit length.

4. The method according to claim 2, characterized in that: The encoding of the N frames of images comprises: Encoding the target image block and the remaining image blocks to obtain an encoded target image block and encoded remaining image blocks, wherein the remaining image blocks are all remaining image blocks in the Nth frame image except the target image block; The step of encrypting the encoded N-th frame image by using the key sequence to obtain an encrypted code stream includes: Using the key sequence to encrypt the remaining encoded image blocks and / or the subsequently received N+1th frame of image; The encoded target image block is combined with the remaining encrypted image blocks and / or the encrypted N+1th frame image to generate the encrypted code stream.

5. The method according to claim 1, characterized in that Obtaining a first summary value corresponding to the N-1th frame image includes: Performing encoding processing on the N-1th frame image to obtain encoded image data; The encoded image data is calculated according to a digest algorithm to obtain the first digest value.

6. The method according to claim 4, characterized in that The method further comprises: Receiving the encrypted code stream; Extracting the encoded target image block and the remaining encrypted and encoded image blocks from the encrypted code stream; Decoding the encoded target image block to obtain the target image block and a pixel parameter sequence; Generate a key sequence according to the target image block, the pixel parameter sequence and the stream encryption algorithm system; Decrypting the remaining encrypted and encoded image blocks using the key sequence to obtain decrypted image data; The decrypted image data is input to the image decoding unit for decoding processing, and after decoding, it is combined with the decoded target image block to generate the original N-th frame image and output it.

7. The method according to claim 6, characterized in that The step of generating a key sequence according to the target image block, the pixel parameter sequence and the stream encryption algorithm system comprises: Calculate the first key and the first IV value according to the pixel parameter sequence and the first digest value corresponding to the N-1th frame image; The first key and the first IV value are input into the stream encryption algorithm system for processing to generate the key sequence.

8. The method according to claim 7, characterized in that The method further comprises: A digest algorithm is synchronously performed on the original Nth frame image to generate a second digest value, and the second digest value is input into the stream encryption algorithm system as a calculation element for generating a second key and a second IV value when performing a decryption operation on the N+1th frame image.

9. The method according to claim 8, characterized in that The stream encryption algorithm system is the Zu Chongzhi algorithm ZUC system or the symmetric encryption algorithm RC4 encryption system; The digest algorithm includes one or more of SM3, SHA1, and SHA2.

10. An image processing device based on key update, characterized in that: The device comprises: An acquisition module, used to acquire a first summary value corresponding to the Nth frame image and the N-1th frame image, where N is greater than or equal to 2 and is a positive integer; An encoding module, used for extracting image block information from the N-th frame image, and encoding the N-th frame image; An updating module, configured to perform key updating and initialization vector IV updating processing using the first summary value and the image block information to obtain a first key and a first IV value; A processing module, used for inputting the first key and the first IV value into a stream encryption algorithm system for processing to generate a key sequence; An encryption module is used to encrypt the encoded N-th frame image using the key sequence to obtain an encrypted code stream and output it; The update module is specifically used to divide the first summary value into a first part and a second part, each part including partial summary information of the first summary value; perform key update processing on the summary information and pixel parameter sequence of the first part to generate the first key; perform initialization vector update processing on the summary information of the second part to obtain the first IV value.

11. An electronic device, characterized in that: comprising a memory and a processor, wherein the memory and the processor are connected; The memory stores computer instructions, and the processor executes the image processing method based on key update according to any one of claims 1 to 9 by executing the computer instructions.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the image processing method based on key update according to any one of claims 1 to 9.

13. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the image processing method based on key update according to any one of claims 1 to 9.

14. A chip system, characterized in that: The chip system includes an image encoding system and an image decoding system, wherein the image encoding system and the image decoding system are connected; The image coding system is used to execute the image processing method based on key update according to any one of claims 1 to 5; The image decoding system is used to execute the image processing method based on key update as claimed in any one of claims 6 to 9.

Citation Information

Patent Citations

  • Data encryption method, data decryption method, terminal, and storage medium

    US20240031129A1