Image encryption method and device, image decryption method and device, equipment and medium
By using a composite chaotic mapping based on Chebishev and tent mapping in image encryption technology to generate a key stream, the image is encrypted, and the problem of insufficient security of image data streams in the prior art is solved, and an efficient and secure image encryption effect is achieved.
Patent Information
- Application Number
- CN202510344372.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-06-24
AI Technical Summary
The prior art has failed to effectively improve the security of data flow in terms of image encryption, especially in the network environment, where image content is easily illegally acquired, tampered with or unauthorized access.
Using a composite chaos mapping based on Chebishev mapping and tent mapping, a chaotic sequence is generated through multiple iterative calculations and encrypts the pixel values of multiple pixels in the image as a key stream.
By improving the security of image data flow, the anti-attack capability of encrypted images is enhanced, ensuring advanced security of image data during transmission and storage.
Smart Images

Figure CN120201137A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of information security, particularly to the field of image encryption technology, and specifically relates to an image encryption method, an image decryption method, an image encryption device, an image decryption device, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the rapid development of digital image processing technology, images and videos have been widely used in fields such as information dissemination, communication, entertainment, and security monitoring. However, the storage and transmission of image data face many security challenges. Especially in a network environment, image content is easily illegally obtained, tampered with, or accessed without authorization. Therefore, image encryption technology has become an important means to protect the security of image information.
[0003] The methods described in this section are not necessarily methods that have been previously conceived or adopted. Unless otherwise specified, any method described in this section should not be considered prior art merely because it is included in this section. Similarly, unless otherwise specified, the problems mentioned in this section should not be considered to have been recognized in any prior art. Summary of the Invention
[0004] The present disclosure provides an image encryption method, an image decryption method, an image encryption device, an image decryption device, an electronic device, a computer-readable storage medium, and a computer program product.
[0005] According to one aspect of the present disclosure, there is provided an image encryption method, including: obtaining an image to be encrypted, the image to be encrypted including a plurality of pixels of a first quantity; performing multiple rounds of chaotic calculation operations on a chaotic initial value by using a composite chaotic map based on a Chebyshev map and a tent map to obtain a chaotic sequence; and encrypting the pixel values of the plurality of pixels by using the first quantity of chaotic sequence values in the chaotic sequence as a key stream to obtain an encrypted image.
[0006] According to another aspect of the present disclosure, there is provided an image decryption method, including: obtaining the encrypted image obtained according to the above image encryption method, and obtaining the chaotic initial value; and decrypting the encrypted image based on the chaotic initial value to obtain a decrypted image.
[0007] According to another aspect of the present disclosure, there is provided an image encryption device, including: an image acquisition unit configured to obtain an image to be encrypted, the image to be encrypted including a plurality of pixels of a first quantity; a chaotic calculation unit configured to perform multiple rounds of chaotic calculation operations on a chaotic initial value by using a composite chaotic map based on a Chebyshev map and a tent map to obtain a chaotic sequence; and a pixel encryption unit configured to encrypt the pixel values of the plurality of pixels by using the first quantity of chaotic sequence values in the chaotic sequence as a key stream to obtain an encrypted image.
[0008] According to another aspect of the present disclosure, there is provided an image decryption device, including: an encrypted content acquisition unit configured to acquire an encrypted image obtained according to the above-mentioned image encryption device and acquire a chaotic initial value; an image decryption unit configured to decrypt the encrypted image based on the chaotic initial value to obtain a decrypted image.
[0009] According to another aspect of the present disclosure, there is provided an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and these instructions are executed by the at least one processor to enable the at least one processor to execute the above method.
[0010] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the above method.
[0011] According to another aspect of the present disclosure, there is provided a computer program product, including a computer program, wherein the computer program implements the above method when executed by a processor.
[0012] According to one or more embodiments of the present disclosure, the present disclosure enhances the security of the data stream itself by encrypting image data using a chaotic system. At the same time, the high complexity and randomness of the chaotic system provide an excellent encryption effect for image data with large capacity and high redundancy, and enhance the anti-attack ability of the encrypted image from multiple levels.
[0013] By adopting a composite chaotic map based on Chebyshev map and Tent map and performing multi-round iterative calculations, a more complex, more random and unpredictable chaotic sequence can be generated. Using the chaotic sequence values in such a chaotic sequence as a key stream to encrypt the pixel values of multiple pixels in the image effectively improves the security of the encrypted image.
[0014] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings exemplarily illustrate embodiments and form a part of the specification, and are used together with the written description of the specification to explain the exemplary embodiments of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. In all the drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0016] Figure 1Schematic diagram of an exemplary system in which various methods described herein can be implemented according to an embodiment of the present disclosure;
[0017] Figure 2 Flowchart showing an image encryption method according to an embodiment of the present disclosure;
[0018] Figure 3 Flowchart showing an image encryption method according to an embodiment of the present disclosure;
[0019] Figure 4 Flowchart showing the process of encrypting multiple pixel values according to an embodiment of the present disclosure;
[0020] Figure 5 Flowchart showing an image encryption process according to an embodiment of the present disclosure;
[0021] Figure 6 Flowchart showing an image decryption method according to an embodiment of the present disclosure;
[0022] Figure 7 Schematic diagram showing the encryption effect according to an embodiment of the present disclosure;
[0023] Figure 8 Block diagram showing the structure of an image encryption device according to an embodiment of the present disclosure;
[0024] Figure 9 Block diagram showing the structure of an image decryption device according to an embodiment of the present disclosure; and
[0025] Figure 10 Block diagram showing an exemplary electronic device capable of implementing an embodiment of the present disclosure. Detailed implementation manners
[0026] The following makes an explanation of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings. Various details of the embodiments of the present disclosure are included herein to assist in understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0027] In the present disclosure, unless otherwise specified, the terms "first", "second", etc. are used to describe various elements and are not intended to limit the positional relationship, timing relationship, or importance relationship of these elements. Such terms are only used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of the element, and in certain cases, based on the description of the context, they may also refer to different instances.
[0028] In the description of various examples in this disclosure, the terms used are for the purpose of describing specific examples only and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically defined, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.
[0029] In the related art, existing image encryption methods do not improve from the data stream itself. After the data access layer is breached, the security of the data itself cannot be guaranteed.
[0030] To solve the above problems, this disclosure improves the security of the data stream itself by encrypting image data using a chaotic system. At the same time, the high complexity and randomness of the chaotic system provide excellent encryption effects for image data with large capacity and high redundancy, enhancing the anti-attack ability of the encrypted image from multiple levels.
[0031] By adopting a composite chaotic map based on Chebyshev mapping and Tent mapping and performing multi-round iterative calculations, a more complex, more random, and unpredictable chaotic sequence can be generated. Using the chaotic sequence values in such a chaotic sequence as the key stream to encrypt the pixel values of multiple pixels in the image effectively improves the security of the encrypted image.
[0032] Embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.
[0033] Figure 1 FIG. shows a schematic diagram of an exemplary system 100 in which the various methods and apparatuses described herein can be implemented according to an embodiment of this disclosure. Referring Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 that couple the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 can be configured to execute one or more applications.
[0034] In an embodiment of this disclosure, the server 120 can run one or more services or software applications that enable the execution of the methods of this disclosure.
[0035] In certain embodiments, the server 120 can also provide other services or software applications, which can include non-virtual environments and virtual environments. In certain embodiments, these services can be provided as web-based services or cloud services, for example, provided to users of the client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.
[0036] In Figure 1 the configuration shown, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or a combination thereof that may be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from system 100. Thus, Figure 1 is an example of a system for implementing the various methods described herein and is not intended to be limiting.
[0037] Users may use client devices 101, 102, 103, 104, 105, and / or 106 for human-computer interaction. The client device may provide an interface that enables the user of the client device to interact with the client device. The client device may also output information to the user via this interface. Although Figure 1 only six client devices are depicted, those skilled in the art will be able to understand that the present disclosure may support any number of client devices.
[0038] Client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computing devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors, or other sensing devices, etc. These computing devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT WindowsMobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smartphones, tablets, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may include various handheld gaming devices, Internet-enabled gaming devices, etc. The client device is capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and may use various communication protocols.
[0039] Network 110 can be any type of network well-known to those skilled in the art, which can support data communication using any one of a variety of available protocols (including but not limited to TCP / IP, SNA, IPX, etc.). By way of example only, one or more networks 110 can be a local area network (LAN), an Ethernet-based network, token ring, wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (such as Bluetooth, WIFI) and / or any combination of these and / or other networks.
[0040] Server 120 can include one or more general-purpose computers, dedicated server computers (such as PC (personal computer) servers, UNIX servers, midrange servers), blade servers, mainframes, server clusters, or any other suitable arrangement and / or combination. Server 120 can include one or more virtual machines running a virtual operating system, or other computing architectures involving virtualization (such as one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices of the server). In various embodiments, server 120 can run one or more services or software applications that provide the functions described below.
[0041] The computing units in server 120 can run one or more operating systems including any of the above operating systems as well as any commercially available server operating systems. Server 120 can also run any one of a variety of additional server applications and / or middleware applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
[0042] In some embodiments, server 120 can include one or more applications to analyze and merge data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105 and / or 106. Server 120 can also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105 and / or 106.
[0043] In some embodiments, the server 120 can be a server of a distributed system or a server integrated with a blockchain. The server 120 can also be a cloud server, or an intelligent cloud computing server or an intelligent cloud host with artificial intelligence technology. A cloud server is a host product in the cloud computing service system, which solves the defects of high management difficulty and weak business scalability existing in traditional physical hosts and virtual private server (VPS) services.
[0044] The system 100 may further include one or more databases 130. In certain embodiments, these databases can be used to store data and other information. For example, one or more of the databases 130 can be used to store information such as audio files and video files. The database 130 can reside in various locations. For example, the database used by the server 120 can be local to the server 120, or can be remote from the server 120 and can communicate with the server 120 via a network-based or dedicated connection. The database 130 can be of different types. In certain embodiments, the database used by the server 120 can be, for example, a relational database. One or more of these databases can store, update, and retrieve data to and from the database in response to commands.
[0045] In certain embodiments, one or more of the databases 130 can also be used by an application to store application data. The database used by the application can be a different type of database, such as a key-value repository, an object repository, or a conventional repository supported by a file system.
[0046] Figure 1 The system 100 can be configured and operated in various ways to enable the application of the various methods and apparatuses described in the present disclosure.
[0047] According to one aspect of the present disclosure, an image encryption method is provided. As Figure 2 shown, the method 200 includes: step S201, obtaining an image to be encrypted, the image to be encrypted including a first number of multiple pixels; step S202, performing multiple rounds of chaotic calculation operations on the chaotic initial value using a composite chaotic map based on a Chebyshev map and a tent map to obtain a chaotic sequence; step S203, encrypting the pixel values of the multiple pixels using the first number of chaotic sequence values in the chaotic sequence as a key stream to obtain an encrypted image.
[0048] Thus, by using a chaotic system to encrypt image data, the security of the data stream itself is improved. At the same time, the high complexity and randomness of the chaotic system provide an excellent encryption effect for image data with large capacity and high redundancy, enhancing the anti-attack ability of the encrypted image from multiple levels.
[0049] A compound chaotic map based on Chebyshev map and Tent map is adopted, and through multiple rounds of iterative calculations, a more complex, more random and unpredictable chaotic sequence can be generated. Taking the chaotic sequence values in such a chaotic sequence as the key stream to encrypt the pixel values of multiple pixels in the image effectively improves the security of the encrypted image.
[0050] In addition, the calculation processes of both the Chebyshev map and the Tent map are relatively simple. Therefore, the compound chaotic map based on these two maps can efficiently encrypt a large amount of image data.
[0051] In step S201, an image to be encrypted is obtained, and the image to be encrypted includes a plurality of pixels of a first quantity.
[0052] During the image encryption process, the image to be encrypted can be a file stored in a local device, a data stream transmitted from a network, or even image data captured in real time. The format of the image usually includes common image file formats (such as JPEG, PNG, BMP, etc.), and can also be a single frame image in a video frame sequence. A pixel is the smallest unit of an image, and each pixel contains the color or grayscale information of the image. The plurality of pixels can be a part of the pixels in the image or all of the pixels. These pixels are both the basic constituent units of the image and the direct objects of the encryption operation. In an exemplary embodiment, an image to be encrypted is a 512×512 grayscale image, including 512×512 = 262,144 pixels, and the pixel value range of each pixel is from 0 to 255. The first quantity can be 262,144 or other values smaller than this number.
[0053] In step S202, a multi-round chaotic calculation operation is performed on the chaotic initial value by using a compound chaotic map based on Chebyshev map and Tent map to obtain a chaotic sequence.
[0054] In some embodiments, the chaotic initial value x0 can be the initial input value of the chaotic map system, and its value can be a real number in the interval (0,1). As the starting point of the chaotic calculation, the chaotic initial value provides the initial value for the subsequent calculation operations of the chaotic system. Therefore, the selection of the chaotic initial value directly affects the generation process of the chaotic sequence and thus affects the final encryption effect. The chaotic calculation operation using the compound chaotic map is repeated for multiple rounds, and each round of calculation is based on the result of the previous round. In other words, an iterative calculation is performed on the chaotic initial value by using the compound chaotic map to obtain a chaotic sequence.
[0055] In some embodiments, the image encryption method may further include: determining a chaotic initial value based on the plaintext information of the image to be encrypted. The plaintext information refers to the unencrypted data or the original data of the image itself. The plaintext information may include at least one of the following: image pixel values, image metadata, image structure information, and image texture information.
[0056] The image pixel values may refer to the color or grayscale information of each pixel in the image. The metadata of the image may refer to additional information other than the image itself, usually stored in the header area of the image file. The image metadata may include: EXIF data (Exchangeable Image File Format), which usually contains information such as the shooting time of the image, the camera model, the exposure time, the focal length, the geographical location (GPS), etc.; file information, such as file size, resolution, image format (JPEG, PNG, etc.), creator, etc. The image structure information may refer to the global features or layout of the image, such as image resolution, image width, image height, pixel density, etc., and may also include the distribution, arrangement, and hierarchical structure of objects or patterns in the image. The image texture information may refer to the details of the surface structure in the image, such as surface roughness, repetitive patterns, color variations, etc. The chaotic initial value may be determined based on any one of the above-mentioned plaintext information or other plaintext information.
[0057] Thus, by using the plaintext information of the image itself as the chaotic initial value, the encryption process is closely related to the original image data. Therefore, it is difficult for an attacker to predict the initial value without knowing the image content, thereby increasing the anti-attack ability and encryption effect of the encryption system.
[0058] In addition, since different images have different plaintext information, using the plaintext information of the image as the chaotic initial value can increase the key space of the encryption process. Moreover, the plaintext information of the image itself has strong randomness and variability, which can effectively improve the randomness and unpredictability of the chaotic sequence, thereby enhancing the security of the encrypted image.
[0059] In some embodiments, determining the chaotic initial value based on the plaintext information of the image to be encrypted may include: determining the chaotic initial value based on the median and / or mode of the pixel values of multiple pixels.
[0060] By determining the chaotic initial value based on the median and / or mode of the pixel values of some or all of the pixels in the image, the subsequent chaotic sequence and key stream are strongly correlated with the content information in the image, further reducing the security risk. In addition, the relatively simple calculation steps of the median and mode have little impact on the overall encryption efficiency, but can automatically adjust to different image features according to the different contents of the image, increasing the randomness of the encryption process and improving the security of the encryption.
[0061] In some embodiments, the median or mode of the pixel values of multiple pixels can be directly determined as the initial chaotic value, or the average of the median and the mode can be determined as the initial chaotic value, or the initial chaotic value can be determined based on at least one of the median and the mode through other calculation methods.
[0062] In addition to the above methods, the initial chaotic value x0 can also be determined by manual setting or other methods, which are not limited herein.
[0063] The Chebyshev mapping is a non - linear iterative mapping, and its mathematical expression can be represented as:
[0064] x n+1 = cos(k·cos -1 x n ),
[0065] where x n is the value of the n - th iteration, usually taking values in [-1, 1], x n+1 is the value of the next iteration, and k is the mapping control parameter. When k≥2, the system enters the chaotic state, and the values of each round of iteration can be evenly distributed.
[0066] The Tent mapping is a simple piece - wise linear chaotic mapping with high computational efficiency, and its mathematical expression can be represented as:
[0067]
[0068] where x n is the value of the n - th iteration, usually taking values in [0, 1], x n+1 is the value of the next iteration, μ is the control parameter, and usually μ∈(0, 2). When μ≥1, the system gradually enters the chaotic state, and through the repeated process of linear stretching and linear folding, the iterative sequence becomes more dispersed and bounded.
[0069] Combining the advantages that the control parameter range of the Chebyshev mapping is relatively large and the iterative values are evenly distributed after the system enters the chaotic state, and the Tent mapping has a simple structure and is sensitive to the initial chaotic value, these two mappings can be combined to form a new composite chaotic mapping system, enhancing the chaotic characteristics and randomness, and improving the complexity of the encryption system.
[0070] In some embodiments, the composite chaotic mapping can use the Chebyshev mapping as the basic control unit, and the composite chaotic mapping can have the piece - wise structure of the Tent mapping. The basic control unit can perform feedback control by combining different sine and cosine signals in multiple segments included in the piece - wise structure.
[0071] Composite chaotic maps can generate chaotic sequences with higher complexity and randomness by integrating the advantages of different chaotic maps. Specifically, the basic control unit based on the Chebyshev map can generate complex and unpredictable chaotic sequences, which are more uniformly distributed statistically and can better hide the original information of the image. The piecewise structure of the tent map realizes the chaotic map through a simple piecewise linear function, with strong sensitivity and piecewise properties. By combining these two maps, not only can the nonlinear complexity of the Chebyshev map be maintained, but also the piecewise nature of the tent map can be utilized to provide additional dynamics and flexibility, thus generating more complex and unpredictable chaotic sequences.
[0072] Positive and negative cosine signal feedback control can adjust the output of the chaotic map by introducing sine or cosine functions (such as sin(x) or cos(x)), so that the values of the generated chaotic sequence oscillate within a certain range. The periodic and nonlinear characteristics of the positive and negative cosine functions can further enhance the encryption effect. By enabling the basic control unit based on the Chebyshev map to be combined with different positive and negative cosine signals for feedback control in multiple segments of the tent map, the two mapping methods can be deeply integrated rather than simply combined. This method further improves the security of encryption.
[0073] In some embodiments, the composite chaotic map may also include a system interference term. The system interference term can also have the above-mentioned piecewise structure, that is, the basic control unit is combined with different system interference terms in multiple segments respectively. By using the system interference term, the complexity of the chaotic system can be further enhanced.
[0074] In some embodiments, the piecewise structure can be divided based on the comparison result of the chaotic initial value (i.e., the initial value x0) or the chaotic sequence value (x n ) obtained in the previous round and the first chaotic control parameter (denoted as k). The composite chaotic map can include performing a modulo operation on the chaotic map result with respect to the second chaotic control parameter.
[0075] Thus, performing a modulo operation on the chaotic map result with respect to the second chaotic control parameter can control the generated chaotic sequence values within a certain range. This operation is coordinated with the above-mentioned division method of the piecewise structure (i.e., determining the segments based on the comparison result of x n and k) so that the chaotic sequence values fall into different segments more uniformly, thereby obtaining a chaotic sequence with better chaotic characteristics. It can be understood that the values of the first chaotic control parameter and the second chaotic control parameter can be set according to requirements and are not limited herein.
[0076] In an exemplary embodiment, if the first chaotic control parameter k only includes a single parameter, then it can be based on x nBased on the comparison result with k, design two corresponding expressions for each segment of the composite chaotic map. It can be understood that the first chaotic control parameter k can also include multiple parameters, and the composite chaotic map can be correspondingly designed into a structure with more segments, which is not limited herein.
[0077] In some embodiments, the composite chaotic map can be expressed as:
[0078]
[0079] where x0 is the initial value of chaos. For n > 0, x n is the result of the nth round of chaotic calculation operation, k is the first chaotic control parameter, and r is the third chaotic control parameter. The second chaotic control parameter can be taken as 1, that is, perform a modulo (mod) operation on the chaotic mapping result with respect to 1.
[0080] In some embodiments, the initial value of chaos x0 is the starting point of the iterative process and can be determined based on the plaintext information of the image to be encrypted. The value of k can determine the breakpoints of the segmented structure in the generation process of the chaotic sequence. The value of r can affect the behavior of the tent map and thus affect the dynamic characteristics of the composite chaotic map. Applying the mod 1 operation at the end of the iterative formula ensures that the generated chaotic sequence values are within the preset interval [0, 1). The values of k and r can be manually set in advance according to requirements or determined by other means, which is not limited herein.
[0081] Thus, through the setting and application of the above multiple parameters, the composite chaotic map can generate a complex and unpredictable chaotic sequence. Using it as the key stream for image encryption can achieve efficient encryption and security protection of image data.
[0082] In step S203, the first quantity of chaotic sequence values in the chaotic sequence can be used as the key stream to encrypt the pixel values of multiple pixels to obtain an encrypted image.
[0083] In some embodiments, the number of rounds of chaotic calculation operations in step S202 can be the same as the first quantity N. That is to say, the chaotic sequence can include N chaotic sequence values. In step S203, these N chaotic sequence values can be directly used as the key stream to encrypt the pixel values of N pixels.
[0084] In some embodiments, the number of rounds of chaotic calculation operations in step S202 can also be greater than the first quantity N. That is to say, the chaotic sequence can include more than N chaotic sequence values. In step S203, N chaotic sequence values can be selected from the chaotic sequence as the key stream.
[0085] In some embodiments, the key stream includes keys corresponding to respective pixels (i.e., one chaotic sequence value in the chaotic sequence). The pixel value of each pixel can be diffusively transformed using the key corresponding to the pixel to obtain an encrypted pixel value. The original pixel value can be replaced with the encrypted pixel value of each pixel to obtain an encrypted image. It can be understood that the pixel values of multiple pixels can also be encrypted using the key stream in other ways, which are not limited herein.
[0086] Figure 3 FIG. 4 shows a flowchart of an image encryption method 300 according to an embodiment of the present disclosure. As Figure 3 shown, the image encryption method 300 may further include: Step S302, in response to determining that the image to be encrypted includes multiple channel information, splitting the image to be encrypted into channels to obtain multiple channel images corresponding to the multiple channel information; Step S303, based on the plaintext information of each of the multiple channel images, determining multiple chaotic initial values corresponding to the multiple channel images. Steps S301, S304, and S305 in method 300 may respectively refer to steps S201 - S203 in method 200, which will not be elaborated herein.
[0087] In some embodiments, in step S302, in response to determining that the image to be encrypted includes multiple channel information, the image to be encrypted is split into channels to obtain multiple channel images corresponding to the multiple channel information.
[0088] The multiple channel information may be different color components or spectral components included in the image. In an exemplary embodiment, the image to be encrypted may be an RGB image, and the multiple channel information may include three color channels of RGB (red, green, blue), and each channel contains intensity information of the image in a specific color dimension. Channel splitting may be separating the image data structure from the composite color space into separate channel data structures. For an RGB image, channel splitting means converting the image data from the RGB format into three independent channel images corresponding to the red R channel, the green G channel, and the blue B channel respectively. It can be understood that the present disclosure supports channel splitting for other color modes and separately completing encryption.
[0089] In some embodiments, after obtaining the multiple channel images, for different channel images, the chaotic sequence values in the same chaotic sequence can be used as the key stream to encrypt each channel image. Step S305, using the first number of chaotic sequence values in the chaotic sequence as the key stream to encrypt the pixel values of multiple pixels to obtain an encrypted image may include: encrypting each of the multiple channel images to obtain multiple channel encrypted images; and merging the multiple channel encrypted images into channels to obtain an encrypted image.
[0090] In some embodiments, independent encryption processing can be performed on each channel. A composite chaotic map is applied to generate a chaotic sequence, and a key stream is obtained therefrom. Then, the pixel values of each channel are encrypted using the key stream. After encryption is completed, the encrypted channels can be recombined into a complete encrypted image, while ensuring the integrity and correctness of the encrypted data during the merging process.
[0091] Thus, the processing applicable to multi-channel images can be completed efficiently in parallel. Channel splitting allows specific processing to be applied to each color channel of the image. By encrypting each channel independently, the flexibility of the encryption method and the decryption difficulty are increased, and at the same time, parallel processing of each channel improves the overall efficiency of the encryption process.
[0092] Return to step S302. In some embodiments, after obtaining multiple channel images, the respective chaotic initial values corresponding to the multiple channel images can be determined. Based on different chaotic initial values, chaotic sequences for each channel image are obtained respectively, and the chaotic sequences corresponding to the multiple channel images are used as the key stream for encryption. As Figure 3 shown, the image encryption method may further include: step S303, determining multiple chaotic initial values corresponding to the multiple channel images based on the plaintext information of each of the multiple channel images. The plaintext information of each channel image may include, for example, the median and / or mode of the color values of multiple pixels in the corresponding channel.
[0093] Step S304, performing multiple rounds of chaotic calculation operations on the chaotic initial values using a composite chaotic map based on the Chebyshev map and the tent map to obtain the chaotic sequence may include: performing multiple rounds of chaotic calculation operations on the multiple chaotic initial values respectively using the composite chaotic map to obtain the channel chaotic sequences for each channel image. Step S305, encrypting the multiple channel images respectively to obtain multiple channel encrypted images may include: for each channel image among the multiple channel images, using the first number of channel chaotic sequence values in the channel chaotic sequence for the channel image as the key stream to encrypt the pixel values of the multiple pixels in the channel image to obtain the channel encrypted image corresponding to the channel image.
[0094] In an exemplary embodiment, the image to be encrypted is an RGB image. For the red R channel, the median of the color values of multiple pixels in the red channel can be selected as the chaotic initial value x 0R ; for the green G channel, the median of the color values of multiple pixels in the green channel can be selected as the chaotic initial value x 0G ; for the blue B channel, the median of the color values of multiple pixels in the blue channel can be selected as the chaotic initial value x 0B . For the chaotic initial value x 0R of each channel, x 0G of each channel, x0B , using a composite chaotic map to perform multiple rounds of chaotic calculation operations to obtain multiple channel chaotic sequences corresponding to each of the three channels. For each channel image, use the chaotic sequence values in the corresponding channel chaotic sequence as the key stream to encrypt the pixel values (i.e., color values). Merge the encrypted R, G, and B channel images to obtain the final encrypted image.
[0095] In addition, when using the composite chaotic map to perform multiple rounds of chaotic calculation operations on the chaotic initial values corresponding to different channel images, the same chaotic control parameters can be used, or different chaotic control parameters can be used, which are not limited herein.
[0096] Thus, by using the respective plaintext information for different channels to determine the chaotic initial values and calculating the corresponding chaotic sequences accordingly, different key streams are used to encrypt different channel images, thereby further increasing the randomness and unpredictability of the encryption process. In addition, by generating chaotic sequences for each channel based on the same composite chaotic map (for different chaotic initial values) and adopting a consistent encryption logic, it is possible to effectively avoid different image quality distortions and pixel change trends in each channel after decryption due to different encryption methods, which in turn affect the overall consistency of the image.
[0097] Figure 4 FIG. shows a flowchart of a process 400 for encrypting multiple pixel values according to an embodiment of the present disclosure. The process 400 can be used to implement the above step S203. As Figure 4 shown, the process 400 includes: step S401, performing a scrambling transformation on the pixel positions of multiple pixels; step S402, sequentially determining the key corresponding to each pixel in the key stream according to the arrangement order of the multiple pixels after the scrambling transformation; and step S403, performing a diffusion transformation on the pixel values of the multiple pixels based on the keys corresponding to the multiple pixels respectively to obtain the encrypted image.
[0098] In step S401, the scrambling transformation can be an operation of moving pixels from their original positions to new positions. By creating a permutation map, the new positions of each pixel can be specified, thereby disrupting the original order of the pixels. The new order can be randomly determined based on the permutation map and is different from the original order.
[0099] In step S402, after performing a scrambling transformation on multiple pixels, the corresponding keys can be sequentially determined in the key stream according to the new pixel arrangement order. For example, the first key in the key stream is determined as the key corresponding to the first pixel in the image after the scrambling transformation, the second key in the key stream is determined as the key corresponding to the second pixel in the image after the scrambling transformation, and so on.
[0100] In step S403, the pixel values of these pixels can be diffusively transformed based on the keys determined for each pixel in the previous step, thereby implementing the encryption process.
[0101] Thus, by combining scrambling transformation, key stream distribution, and diffusion transformation, the complexity, randomness, and unpredictability of the encryption process can be further enhanced, thereby increasing the security of image encryption.
[0102] In some embodiments, the scrambling transformation may include Arnold transformation. The Arnold transformation can scramble the positions of pixels in an image through a simple linear mapping. The Arnold transformation can be applied to the pixel positions of each channel to rearrange the pixels of each channel. The Arnold transformation is reversible, and the original positions of the pixels can be restored through the inverse transformation when decrypting the encrypted image.
[0103] Thus, by adopting the Arnold transformation, the pixel positions can be effectively scrambled to obtain a better scrambling effect, thereby enhancing the security of the encryption process.
[0104] In some embodiments, the diffusion transformation may include: calculating the product of the key and the pixel value of the corresponding pixel, and replacing the pixel value of the corresponding pixel. For each pixel in the image, the corresponding key value can be obtained from the key stream, and the pixel value of the corresponding pixel in the original image can be read to calculate the product of the key value and the pixel value.
[0105] Thus, by performing a multiplication operation on each pixel value and the key value, the statistical correlation between pixels is eliminated, and the randomness of the encrypted data is enhanced.
[0106] It can be understood that in the above step S401, other scrambling transformation methods different from the Arnold transformation can be adopted, and in the above step S403, other diffusion transformation methods different from calculating the product of the key and the pixel value can be adopted to achieve the corresponding encryption effect.
[0107] In some embodiments, the image encryption method may further include: repeating the encryption at least once using different scrambling transformation parameters and different chaotic initial values to obtain multiple encrypted images.
[0108] Different scrambling transformation parameters will result in different pixel rearrangement results, thereby affecting the new positions of the pixels in the image; and the chaotic initial value, as the starting point for generating the chaotic sequence, a slight change in the initial value will calculate a completely different chaotic sequence. Repeatedly performing multiple encryption operations using different scrambling transformation parameters and chaotic initial values can provide more levels of encryption protection for the image, thereby further enhancing the security of the encrypted image.
[0109] In some embodiments, the scrambling transformation parameters may include permutation patterns, block sizes, scrambling orders, and / or other parameters. The selection and values of the scrambling transformation parameters may be predetermined in any manner.
[0110] Figure 5 FIG. 4 shows a flowchart of an image encryption process 500 according to an exemplary embodiment of the present disclosure. As Figure 5 shown, the process 500 includes: step S501, obtaining an image to be encrypted; step S502, extracting the plaintext information of the image to be encrypted as the initial chaotic value for subsequent multi-round chaotic calculation operations; step S503, determining whether the image to be encrypted is a single-channel image. If so, directly execute step S504. If not, after performing channel splitting, then execute step S504; step S504, performing a scrambling transformation on the image; step S505, performing multi-round chaotic calculation operations on the initial chaotic value using a composite chaotic map based on Chebyshev map and tent map to obtain a chaotic sequence; step S506, determining a key stream based on the chaotic sequence values in the chaotic sequence; step S507, encrypting the pixel values (i.e., grayscale values or color values) of the pixels in the single-channel image using the key stream, and replacing the original pixel values with the encrypted pixel values; step S508, determining whether the image to be encrypted is a single-channel image. If so, directly execute step S509. If not, after performing channel merging, then execute step S509; and step S509, using the obtained result as the encrypted image.
[0111] In some embodiments, steps S504 - S507 may be looped t times to enhance the complexity of the finally obtained encrypted image.
[0112] According to another aspect of the present disclosure, an image decryption method is provided. As Figure 6 shown, the image decryption method 600 includes: step S601, obtaining an encrypted image and obtaining the initial chaotic value, where the encrypted image is obtained by using the above image encryption method 200 or method 300; step S602, decrypting the encrypted image based on the initial chaotic value to obtain a decrypted image.
[0113] In some embodiments, the encrypted image data may be loaded from a storage device or a network, and the initial chaotic value used for encryption may be obtained through a secure channel. This value is used to generate a chaotic sequence during the encryption process. The same chaotic map (such as a composite chaotic map based on Chebyshev map and tent map) and the initial chaotic value as those in the encryption process may be used to generate the same chaotic sequence as that during encryption.
[0114] Thus, by using the same initial chaotic value and chaotic mapping as in the encryption process, a key stream identical to that during encryption can be generated, enabling accurate decryption of the image. Additionally, due to the complexity and randomness of the chaotic sequence, only a decryptor with the correct initial chaotic value can successfully decrypt the image, ensuring the security of the image data.
[0115] In some embodiments, the encrypted image can be obtained through scrambling transformation and diffusion transformation. The image decryption method may further include: obtaining the scrambling transformation parameters. Step S602, decrypting the encrypted image based on the initial chaotic value to obtain the decrypted image may include: performing an inverse scrambling transformation based on the scrambling transformation parameters and performing an inverse diffusion transformation based on the initial chaotic value to obtain the decrypted image.
[0116] In some embodiments, the scrambling transformation parameters for encryption can be obtained from a secure channel, and these parameters are used to scramble the pixel positions during the encryption process. The inverse scrambling transformation can restore the pixel positions in the encrypted image to their original positions during the image decryption process. For each pixel in the encrypted image, its original position is calculated according to the inverse transformation rule based on the scrambling transformation parameters, and the pixel value is moved to that position. For example, if the Arnold transformation is used during encryption, the inverse Arnold transformation needs to be applied during decryption. The value in the key stream can be used to perform an inverse diffusion transformation on the pixel value of each pixel to restore the original pixel value. The inverse diffusion transformation can be an operation that decrypts the pixel value in the encrypted image using the key stream during the image decryption process, which can be the inverse operation of the diffusion transformation and is used to revoke the encryption of the pixel value during the encryption process.
[0117] Thus, through the inverse scrambling transformation and the inverse diffusion transformation, the original image can be accurately restored. Due to the complexity and randomness of the chaotic sequence, only a decryptor with the correct initial chaotic value and scrambling transformation parameters can successfully decrypt the image, ensuring the security of the image data.
[0118] Figure 7 A schematic diagram showing the encryption effect according to an exemplary embodiment of the present disclosure is presented. The encrypted image completely erases the valid information in the image to be encrypted, while the decrypted image can restore this valid information.
[0119] According to another aspect of the present disclosure, an image encryption device is provided. As Figure 8As shown, the image encryption device 800 includes: an image acquisition unit 810, a chaotic calculation unit 820, and a pixel encryption unit 830. The image acquisition unit is configured to acquire an image to be encrypted, and the image to be encrypted includes a first number of multiple pixels; the chaotic calculation unit is configured to perform multiple rounds of chaotic calculation operations on the chaotic initial value by using a composite chaotic map based on the Chebyshev map and the tent map to obtain a chaotic sequence; and the pixel encryption unit can be configured to use the first number of chaotic sequence values in the chaotic sequence as a key stream to encrypt the pixel values of the multiple pixels to obtain an encrypted image.
[0120] It can be understood that the operations and effects of the units 810 to 830 in the image encryption device 800 can refer to the descriptions of steps S201 to S203 in the method 200 above, and will not be elaborated here.
[0121] According to another aspect of the present disclosure, an image decryption device is provided. As Figure 9 shown, the image decryption device 900 includes: an encrypted content acquisition unit 910, configured to acquire the encrypted image obtained according to the above device 800 and acquire the chaotic initial value; and an image decryption unit 920, configured to decrypt the encrypted image based on the chaotic initial value to obtain a decrypted image.
[0122] It can be understood that the operations and effects of the units 910 to 920 in the image decryption device 900 can refer to the descriptions of steps S701 to S702 in the method 700 above, and will not be elaborated here.
[0123] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information involved all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0124] According to an embodiment of the present disclosure, an electronic device, a readable storage medium, and a computer program product are also provided.
[0125] Refer to Figure 10, a block diagram of an electronic device 1000 that can be a server or a client of the present disclosure will now be described. It is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0126] As Figure 10 shown, the electronic device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the electronic device 1000 can also be stored. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0127] A plurality of components in the electronic device 1000 are connected to the I / O interface 1005, including: an input unit 1006, an output unit 1007, a storage unit 1008, and a communication unit 1009. The input unit 1006 can be any type of device that can input information into the electronic device 1000. The input unit 1006 can receive input digital or character information, and generate key signal inputs related to the user settings and / or function controls of the electronic device, and can include, but is not limited to, a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone, and / or a remote control. The output unit 1007 can be any type of device that can present information, and can include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 1008 can include, but is not limited to, magnetic disks, optical disks. The communication unit 1009 allows the electronic device 1000 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks, and can include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0128] The computing unit 1001 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 executes the various methods, processes, and / or operations described above. For example, in some embodiments, these methods, processes, and / or operations can be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 1000 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded into the RAM 1003 and executed by the computing unit 1001, one or more steps of the methods, processes, and / or operations described above can be executed. Alternatively, in other embodiments, the computing unit 1001 can be configured to execute these methods, processes, and / or operations in any other suitable manner (e.g., by means of firmware).
[0129] Various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0130] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to the processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the program code is executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0131] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0132] To provide for interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).
[0133] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0134] A computer system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The relationship between the client and the server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
[0135] It should be understood that various forms of the processes shown above can be used, steps can be reordered, added or deleted. For example, the steps described in this disclosure can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and no limitations are imposed herein.
[0136] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but is only defined by the authorized claims and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, the steps can be executed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. Importantly, with the evolution of technology, many of the elements described herein can be replaced by equivalent elements that emerge after the present disclosure.
Claims
1. An image encryption method, comprising: Acquire an image to be encrypted, wherein the image to be encrypted includes a first number of pixels; The composite chaotic map based on Chebyshev map and tent map is used to perform multiple rounds of chaotic calculation operations on the chaotic initial value to obtain a chaotic sequence. as well as The first number of chaotic sequence values in the chaotic sequence is used as a key stream to encrypt the pixel values of the plurality of pixels to obtain an encrypted image.
2. The method according to claim 1, wherein: The composite chaotic mapping uses Chebyshev mapping as a basic control unit, and the composite chaotic mapping has a segmented structure of a tent mapping, wherein the basic control unit combines different sine and cosine signals in a plurality of segments included in the segmented structure for feedback control.
3. The method according to claim 2, wherein: The segmented structure is divided based on the comparison result between the chaotic initial value or the chaotic sequence value obtained in the previous round and the first chaotic control parameter, and the composite chaotic mapping includes performing a remainder operation on the chaotic mapping result with respect to the second chaotic control parameter.
4. The method according to claim 3, wherein: The composite chaotic map is expressed as: Among them, x0 is the initial value of chaos. For n>0, x n is the result of the nth round of chaotic computing operation, k is the first chaos control parameter, and r is the third chaos control parameter.
5. The method according to any one of claims 1 to 4, further comprising: The chaotic initial value is determined based on the plaintext information of the image to be encrypted, wherein the plaintext information includes at least one of the following items: image pixel value, image metadata, image structure information and image texture information.
6. The method according to claim 5, wherein: The determining the chaotic initial value based on the plaintext information of the image to be encrypted comprises: The chaotic initial value is determined based on the median and / or mode of the pixel values of the multiple pixels.
7. The method according to any one of claims 1 to 4, further comprising: In response to determining that the image to be encrypted includes a plurality of channel information, performing channel splitting on the image to be encrypted to obtain a plurality of channel images corresponding to the plurality of channel information; The step of using the first number of chaotic sequence values in the chaotic sequence as a key stream to encrypt the pixel values of the plurality of pixels to obtain an encrypted image includes: Encrypting the multiple channel images respectively to obtain multiple channel encrypted images; and The multiple channel-encrypted images are channel-merged to obtain the encrypted image.
8. The method according to claim 7, further comprising: Based on the plaintext information of each of the plurality of channel images, a plurality of chaotic initial values corresponding to the plurality of channel images are determined, The method of performing multiple rounds of chaotic calculation operations on the chaotic initial value by using a composite chaotic map based on Chebyshev mapping and tent mapping to obtain a chaotic sequence includes: The composite chaotic map is used to perform multiple rounds of chaotic calculation operations on the multiple chaotic initial values to obtain a channel chaotic sequence for each channel image. The step of encrypting the plurality of channel images respectively to obtain a plurality of channel encrypted images comprises: For each channel image among the multiple channel images, the first number of channel chaotic sequence values in the channel chaotic sequence used for the channel image is used as a key stream to encrypt the pixel values of the multiple pixels in the channel image to obtain a channel encrypted image corresponding to the channel image.
9. The method according to any one of claims 1 to 4, wherein: Using the first number of chaotic sequence values in the chaotic sequence as a key stream to encrypt the pixel values of the plurality of pixels to obtain an encrypted image comprises: Performing a scrambling transformation on pixel positions of the plurality of pixels; Determining the key corresponding to each pixel in the key stream in sequence according to the arrangement order of the plurality of pixels after the scrambling transformation; and The pixel values of the plurality of pixels are diffused and transformed based on the keys corresponding to the plurality of pixels respectively, so as to obtain the encrypted image.
10. The method according to claim 9, wherein: The diffusion transformation includes: The product of the key and the pixel value of the corresponding pixel is calculated, and the pixel value of the corresponding pixel is replaced.
11. The method according to claim 9, further comprising: The encryption is repeated at least once using different scrambling transformation parameters and different chaotic initial values to obtain multiple encrypted images.
12. An image decryption method, comprising: Obtain an encrypted image obtained by the method according to any one of claims 1 to 11, and obtain a chaotic initial value; as well as The encrypted image is decrypted based on the chaotic initial value to obtain a decrypted image.
13. The method according to claim 12, wherein: The encrypted image is obtained by scrambling transformation and diffusion change, and the method further includes: Get the scrambling transformation parameters, Wherein, decrypting the encrypted image based on the chaotic initial value to obtain a decrypted image includes: An inverse scrambling transformation is performed based on the scrambling transformation parameters, and an inverse diffusion change is performed based on the chaotic initial value to obtain the decrypted image.
14. An image encryption device, comprising: An image acquisition unit, configured to acquire an image to be encrypted, wherein the image to be encrypted includes a first number of pixels; A chaos computing unit is configured to perform multiple rounds of chaos computing operations on the chaos initial value using a composite chaos mapping based on Chebyshev mapping and tent mapping to obtain a chaotic sequence; as well as The pixel encryption unit is configured to encrypt the pixel values of the plurality of pixels by using the first number of chaotic sequence values in the chaotic sequence as a key stream to obtain an encrypted image.
15. An image decryption device, comprising: An encrypted content acquisition unit, configured to acquire an encrypted image obtained by the apparatus according to claim 14, and acquire a chaotic initial value; as well as The image decryption unit is configured to decrypt the encrypted image based on the chaotic initial value to obtain a decrypted image.
16. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; wherein The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 13.
17. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-13.
18. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.