[go: up one dir, main page]

CN120201137A - Image encryption method, image decryption method, device, equipment and medium - Google Patents

Image encryption method, image decryption method, device, equipment and medium Download PDF

Info

Publication number
CN120201137A
CN120201137A CN202510344372.4A CN202510344372A CN120201137A CN 120201137 A CN120201137 A CN 120201137A CN 202510344372 A CN202510344372 A CN 202510344372A CN 120201137 A CN120201137 A CN 120201137A
Authority
CN
China
Prior art keywords
image
chaotic
encrypted
channel
chaos
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202510344372.4A
Other languages
Chinese (zh)
Inventor
郭瑞彪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu com Times Technology Beijing Co Ltd
Original Assignee
Baidu com Times Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Baidu com Times Technology Beijing Co Ltd filed Critical Baidu com Times Technology Beijing Co Ltd
Priority to CN202510344372.4A priority Critical patent/CN120201137A/en
Publication of CN120201137A publication Critical patent/CN120201137A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/44Secrecy systems
    • H04N1/448Rendering the image unintelligible, e.g. scrambling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/001Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using chaotic signals

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Image Processing (AREA)

Abstract

本公开提供了一种图像加密方法、图像解密方法、装置、设备和介质,涉及信息安全领域,尤其涉及图像加密技术领域。图像加密方法包括:获取待加密图像,待加密图像包括第一数量的多个像素;利用基于切比雪夫映射和帐篷映射的复合混沌映射对混沌初值进行多轮混沌计算操作,以得到混沌序列;将混沌序列中的第一数量的混沌序列值作为密钥流对多个像素的像素值进行加密,以得到加密图像。

The present disclosure provides an image encryption method, an image decryption method, an apparatus, a device and a medium, which relate to the field of information security, and in particular to the field of image encryption technology. The image encryption method comprises: obtaining an image to be encrypted, the image to be encrypted comprises a first number of multiple pixels; performing multiple rounds of chaotic calculation operations on a chaotic initial value using a composite chaotic mapping based on a Chebyshev mapping and a tent mapping to obtain a chaotic sequence; using a first number of chaotic sequence values in the chaotic sequence as a key stream to encrypt pixel values of multiple pixels to obtain an encrypted image.

Description

Image encryption method, image decryption method, device, equipment and medium
Technical Field
The present disclosure relates to the field of information security, and in particular, to the field of image encryption technology, and more particularly, to an image encryption method, an image decryption method, an image encryption apparatus, an image decryption apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
Background
With the rapid development of digital image processing technology, images and videos are widely used in the fields of information transmission, communication, entertainment, security monitoring and the like. However, storage and transmission of image data presents a number of security challenges, especially in a network environment, where the image content is susceptible to illegal acquisition, tampering, or unauthorized access. Therefore, the image encryption technology becomes an important means for protecting the security of image information.
The approaches described in this section are not necessarily approaches that have been previously conceived or pursued. Unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section. Similarly, the problems mentioned in this section should not be considered as having been recognized in any prior art unless otherwise indicated.
Disclosure of Invention
The present disclosure provides an image encryption method, an image decryption method, an image encryption apparatus, an image decryption apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
According to one aspect of the disclosure, an image encryption method is provided, and the image encryption method comprises the steps of obtaining an image to be encrypted, wherein the image to be encrypted comprises a first number of pixels, performing multi-round chaotic calculation operation on a chaotic initial value by utilizing a composite chaotic map based on Chebyshev mapping and tent mapping to obtain a chaotic sequence, and encrypting the pixel values of the pixels by taking the first number of chaotic sequence values in the chaotic sequence as a key stream to obtain an encrypted image.
According to another aspect of the present disclosure, there is provided an image decryption method including acquiring an encrypted image obtained according to the above-described image encryption method and acquiring a chaos initial value, and decrypting the encrypted image based on the chaos initial value to obtain a decrypted image.
According to another aspect of the present disclosure, there is provided an image encryption apparatus including an image acquisition unit configured to acquire an image to be encrypted, the image to be encrypted including a first number of pixels, a chaotic calculation unit configured to perform a plurality of rounds of chaotic calculation operations on a chaotic initial value using a composite chaotic map based on chebyshev mapping and tent mapping to obtain a chaotic sequence, and a pixel encryption unit configured to encrypt pixel values of the plurality of pixels using the first number of chaotic sequence values in the chaotic sequence as a key stream to obtain an encrypted image.
According to another aspect of the present disclosure, there is provided an image decryption apparatus including an encrypted content acquisition unit configured to acquire an encrypted image obtained according to the above-described image encryption apparatus and to acquire a chaos initial value, and an image decryption unit configured to decrypt the encrypted image based on the chaos initial value to obtain a decrypted image.
According to another aspect of the present disclosure, there is provided an electronic device comprising at least one processor, and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the above-described method.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the above-described method.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program, when executed by a processor, implements the above-described method.
According to one or more embodiments of the present disclosure, the present disclosure improves the security of the data stream itself by encrypting image data using a chaotic system. Meanwhile, the high complexity and randomness of the chaotic system provide excellent encryption effect for the image data with large capacity and high redundancy, and the anti-attack capability of the encrypted image is improved from multiple layers.
By adopting the composite chaotic mapping based on Chebyshev (Chebyshev) mapping and Tent (Tent) mapping and through multiple rounds of iterative computation, a chaotic sequence which is more complex, has stronger randomness and is difficult to predict can be generated. The chaotic sequence value in the chaotic sequence is used as a key stream to encrypt the pixel values of a plurality of pixels in the image, so that the safety of the encrypted image is effectively improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The accompanying drawings illustrate exemplary embodiments and, together with the description, serve to explain exemplary implementations of the embodiments. The illustrated embodiments are for exemplary purposes only and do not limit the scope of the claims. Throughout the drawings, identical reference numerals designate similar, but not necessarily identical, elements.
FIG. 1 illustrates a schematic diagram of an exemplary system in which various methods described herein may be implemented, in accordance with an embodiment of the present disclosure;
FIG. 2 illustrates a flow chart of an image encryption method according to an embodiment of the present disclosure;
FIG. 3 illustrates a flow chart of an image encryption method according to an embodiment of the present disclosure;
FIG. 4 illustrates a flow chart of a process of encrypting a plurality of pixel values according to an embodiment of the present disclosure;
FIG. 5 shows a flow chart of an image encryption process according to an embodiment of the present disclosure;
FIG. 6 illustrates a flow chart of an image decryption method according to an embodiment of the present disclosure;
FIG. 7 illustrates an encryption effect schematic according to an embodiment of the present disclosure;
Fig. 8 shows a block diagram of the structure of an image encryption apparatus according to an embodiment of the present disclosure;
fig. 9 shows a block diagram of an image decryption apparatus according to an embodiment of the present disclosure, and
Fig. 10 illustrates a block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the present disclosure, the use of the terms "first," "second," and the like to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of the elements, unless otherwise indicated, and such terms are merely used to distinguish one element from another element. In some examples, a first element and a second element may refer to the same instance of the element, and in some cases, they may also refer to different instances based on the description of the context.
The terminology used in the description of the various examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, the elements may be one or more if the number of the elements is not specifically limited. Furthermore, the term "and/or" as used in this disclosure encompasses any and all possible combinations of the listed items.
In the related art, the existing image encryption method is not improved from the data stream, and after the data access layer is broken, the security of the data cannot be guaranteed.
In order to solve the problems, the present disclosure improves the security of the data stream itself by encrypting the image data using the chaotic system. Meanwhile, the high complexity and randomness of the chaotic system provide excellent encryption effect for the image data with large capacity and high redundancy, and the anti-attack capability of the encrypted image is improved from multiple layers.
By adopting the composite chaotic mapping based on Chebyshev (Chebyshev) mapping and Tent (Tent) mapping and through multiple rounds of iterative computation, a chaotic sequence which is more complex, has stronger randomness and is difficult to predict can be generated. The chaotic sequence value in the chaotic sequence is used as a key stream to encrypt the pixel values of a plurality of pixels in the image, so that the safety of the encrypted image is effectively improved.
Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
Fig. 1 illustrates a schematic diagram of an exemplary system 100 in which various methods and apparatus described herein may be implemented, in accordance with an embodiment of the present disclosure. Referring to fig. 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 coupling the one or more client devices to the server 120. Client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable execution of the methods of the present disclosure.
In some embodiments, server 120 may also provide other services or software applications, which may include non-virtual environments and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, for example, provided to users of client devices 101, 102, 103, 104, 105, and/or 106 under a software as a service (SaaS) model.
In the configuration shown in fig. 1, 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 are executable by one or more processors. A user 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 appreciated that a variety of different system configurations are possible, which may differ from system 100. Accordingly, FIG. 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
The user may use client devices 101, 102, 103, 104, 105, and/or 106 for human-machine interaction. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Although fig. 1 depicts only six client devices, those skilled in the art will appreciate that the present disclosure may support any number of client devices.
Client devices 101, 102, 103, 104, 105, and/or 106 may include various types of computer 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, and the like. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, application iOS, UNIX-like operating systems, linux or Linux-like operating systems (e.g., GOOGLE Chrome OS), or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, windows Phone, android. Portable handheld devices may include cellular telephones, smart phones, tablet computers, personal Digital Assistants (PDAs), and the like. Wearable devices may include head mounted displays (such as smart glasses) and other devices. The gaming system may include various handheld gaming devices, internet-enabled gaming devices, and the like. The client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (e.g., email applications), short Message Service (SMS) applications, and may use a variety of communication protocols.
Network 110 may be any type of network known to those skilled in the art that may support data communications using any of a number of available protocols, including but not limited to TCP/IP, SNA, IPX, etc. For example only, the one or more networks 110 may be a Local Area Network (LAN), an ethernet-based network, a token ring, a 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 (e.g., bluetooth, WIFI), and/or any combination of these and/or other networks.
The server 120 may include one or more general purpose computers, special purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-end servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and/or combination. The server 120 may include one or more virtual machines running a virtual operating system, or other computing architecture that involves virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain virtual storage devices of the server). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
The computing units in server 120 may run one or more operating systems including any of the operating systems described above as well as any commercially available server operating systems. Server 120 may also run any of a variety of additional server applications and/or middle tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and/or event updates received from users of client devices 101, 102, 103, 104, 105, and/or 106. Server 120 may 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.
In some implementations, the server 120 may be a server of a distributed system or a server that incorporates a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. The cloud server is a host product in a cloud computing service system, so as to solve the defects of large management difficulty and weak service expansibility in the traditional physical host and Virtual special server (VPS PRIVATE SERVER) service.
The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of databases 130 may be used to store information such as audio files and video files. Database 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. Database 130 may be of different types. In some embodiments, the database used by server 120 may be, for example, a relational database. One or more of these databases may store, update, and retrieve the databases and data from the databases in response to the commands.
In some embodiments, one or more of databases 130 may also be used by applications to store application data. The databases used by the application may be different types of databases, such as key value stores, object stores, or conventional stores supported by the file system.
The system 100 of fig. 1 may be configured and operated in various ways to enable application of the various methods and apparatus described in accordance with the present disclosure.
According to one aspect of the present disclosure, an image encryption method is provided. As shown in FIG. 2, the method 200 includes a step S201 of acquiring an image to be encrypted, wherein the image to be encrypted includes a first number of pixels, a step S202 of performing multi-round chaotic calculation operation on a chaotic initial value by using a composite chaotic map based on Chebyshev mapping and tent mapping to obtain a chaotic sequence, and a step S203 of encrypting the pixel values of the pixels by using the first number of chaotic sequence values in the chaotic sequence as a key stream to obtain an encrypted image.
Therefore, the security of the data stream is improved by encrypting the image data by using the chaotic system. Meanwhile, the high complexity and randomness of the chaotic system provide excellent encryption effect for the image data with large capacity and high redundancy, and the anti-attack capability of the encrypted image is improved from multiple layers.
By adopting the composite chaotic mapping based on Chebyshev (Chebyshev) mapping and Tent (Tent) mapping and through multiple rounds of iterative computation, a chaotic sequence which is more complex, has stronger randomness and is difficult to predict can be generated. The chaotic sequence value in the chaotic sequence is used as a key stream to encrypt the pixel values of a plurality of pixels in the image, so that the safety of the encrypted image is effectively improved.
In addition, the calculation process of the Chebyshev mapping and the tent mapping is relatively simple, so that the composite chaotic mapping based on the Chebyshev mapping and the tent mapping can efficiently encrypt large-capacity image data.
In step S201, an image to be encrypted is acquired, the image to be encrypted including a first number of pixels.
In the image encryption process, the image to be encrypted may be a file stored in a local device, or may be a data stream transmitted from a network, or may even be image data captured in real time. The format of the image typically includes a common image file format (e.g., JPEG, PNG, BMP, etc.), and may be a single frame image in a sequence of video frames. The pixels are the smallest units of an image, each pixel containing color or gray information of the image. The plurality of pixels may be a part of pixels or all of pixels in the image. These pixels are both the basic building blocks of the image and the direct object of the encryption operation. In an exemplary embodiment, an image to be encrypted is a 512×512 gray scale image, comprising 512×512=262, 144 pixels, each having a pixel value in the range of 0 to 255. The first number may be 262,144 or other values less than the number.
In step S202, a chaotic initial value is subjected to a multi-round chaotic calculation operation by using a composite chaotic map based on Chebyshev (Chebyshev) mapping and Tent (Tent) mapping, so as to obtain a chaotic sequence.
In some embodiments, the chaos initial value x 0 may be an initial input value of the chaos mapping system, and the value may be a real number in the interval (0, 1). As a starting point of the chaotic calculation, the initial value of the chaos provides an initial value for subsequent calculation operation of the chaotic system, so that the selection of the initial value of the chaos directly influences the generation process of the chaos sequence, and further influences the final encryption effect. The chaotic computation operation using the composite chaotic map is repeated for a plurality of rounds, and each round of computation is performed based on the results of the previous round. In other words, the chaos initial value is subjected to iterative computation by utilizing the composite chaos mapping, so that a chaos sequence is obtained.
In some embodiments, the image encryption method may further include determining the chaos initial value based on plaintext information of the image to be encrypted. Plaintext information refers to unencrypted or original data of the image itself. The plaintext information may include at least one of image pixel values, image metadata, image structure information, and image texture information.
The image pixel value may refer to color or gray information for each pixel in the image. Metadata of an image may refer to additional information beyond the image itself, typically stored in the header area of the image file. The image metadata may include EXIF data (exchange IMAGE FILE Format) generally containing information of photographing time, camera model, exposure time, focal length, geographical Position (GPS), etc. of an image, file information such as file size, resolution, image Format (JPEG, PNG, etc.), creator, etc. Image structure information may refer to global features or layout of an image, such as image resolution, image width, image height, pixel density, etc., as well as distribution, arrangement, hierarchical structure, etc., of objects or patterns in an image. Image texture information may refer to details of surface structures in an image, such as surface roughness, repetitive patterns, color changes, and the like. The chaos initial value may be determined based on any one of the plaintext information described above or other plaintext information.
Therefore, by using the plaintext information of the image itself as the chaos initial value, the encryption process is closely related to the original image data, so that an attacker can hardly predict the initial value without knowing the content of the image, and the anti-attack capability and encryption effect of the encryption system are improved.
In addition, since different images have different plaintext information, the plaintext information of the images is used as a chaos initial value, so that the key space of the encryption process can be increased, the plaintext information of the images has stronger randomness and variability, the randomness and unpredictability of a chaos sequence can be effectively improved, and the safety of the encrypted images is improved.
In some embodiments, determining the chaos initial value based on plaintext information of the image to be encrypted may include determining the chaos initial value based on a median and/or a mode of pixel values of the plurality of pixels.
The chaos initial value is determined based on the median and/or mode of the pixel values of part of pixels or all pixels in the image, so that the chaos sequence obtained later is strongly related to the content information in the image and the key stream, and the safety risk is further reduced. In addition, the relatively simple calculation steps of the median and the mode have little influence on the overall encryption efficiency, but can be automatically adjusted and adapted to different image characteristics according to different image contents, thereby increasing the randomness of the encryption process and improving the encryption security.
In some embodiments, the median or mode of the pixel values of the plurality of pixels may be determined directly as the chaos initial value, the average of the median and mode may be determined as the chaos initial value, or the chaos initial value may be determined based on at least one of the median and mode by other calculation means.
In addition to the above manner, the chaos initial value x 0 may be manually set or otherwise determined, which is not limited herein.
Chebyshev (Chebyshev) mapping is a nonlinear iterative mapping whose mathematical expression can be expressed as:
xn+1=cos(k·cos-1xn),
Where x n is the value of the nth iteration, the value is typically [ -1,1], x n+1 is the value of the next iteration, and k is the mapping control parameter. When k is more than or equal to 2, the system enters a chaotic state, and each round of iteration value can be uniformly distributed.
Tent (Tent) mapping is a simple piecewise linear chaotic mapping with high computational efficiency, and the mathematical expression can be expressed as:
Where x n is the value of the nth iteration, typically [0,1], x n+1 is the value of the next iteration, μ is the control parameter, and typically μ∈ (0, 2). When mu is more than or equal to 1, the system gradually enters a chaotic state, and the iteration sequence is more dispersed and bounded through the repeated processes of linear stretching and linear folding.
By combining the advantages of large range of control parameters of Chebyshev mapping, uniform iteration value distribution after the system enters a chaotic state, simple Tent mapping structure and sensitivity to a chaotic initial value, the two mappings can be combined to form a novel composite chaotic mapping system, the chaotic characteristic and the randomness are enhanced, and the complexity of the encryption system is improved.
In some embodiments, the composite chaotic map may have a chebyshev map as a basic control unit, and the composite chaotic map may have a segmented structure of tent maps. The basic control unit can respectively combine different sine and cosine signals on a plurality of segments included in the segment structure to perform feedback control.
The composite chaotic map can generate a chaotic sequence with higher complexity and randomness by integrating the advantages of different chaotic maps. In particular, the basic control unit based on chebyshev mapping can generate complex and unpredictable chaotic sequences, is more uniformly distributed statistically, and can better hide the original information of the image. The segmented structure of tent mapping realizes chaotic mapping through a simple piecewise linear function, and has stronger sensitivity and segmentality. By combining these two mappings, not only can the nonlinear complexity of the chebyshev mapping be maintained, but the piecewise nature of the tent mapping can be utilized to provide additional dynamics and flexibility, thereby generating a more complex and unpredictable chaotic sequence.
The sine and cosine signal feedback control can adjust the chaotic mapping output by introducing sine or cosine functions (such as sin (x) or cos (x)) so that the generated chaotic sequence value oscillates in a certain range. The periodicity and nonlinearity of the sine and cosine function can further improve the encryption effect. The basic control unit based on chebyshev mapping is enabled to respectively combine different sine and cosine signals on a plurality of segments of tent mapping to perform feedback control, so that two mapping modes can be deeply fused, and the two mapping modes are not simply combined. This way the security of the encryption is further improved.
In some embodiments, the composite chaotic map may also include system interference terms. The system interference term can also have the above-described segmented structure, i.e. the basic control unit is combined in several segments with different system interference terms, respectively. By using the system interference term, the complexity of the chaotic system can be further improved.
In some embodiments, the segmentation structure may be divided based on a comparison of the chaos initial value (i.e., the initial value x 0) or the chaos sequence value (x n) obtained from the previous round with the first chaos control parameter (denoted as k). The composite chaotic map may include a second chaotic control parameter being summed with a result of the chaotic map.
Therefore, the chaotic mapping result is subjected to the residual operation on the second chaotic control parameter, and the generated chaotic sequence value can be controlled within a certain range. This operation cooperates with the above-described division manner of the segment structure (i.e., determining the segments based on the comparison result of x n and k) so that the chaotic sequence value falls more uniformly into different segments, thereby obtaining a chaotic sequence with better chaotic characteristics. It is to be understood that the values of the first chaotic control parameter and the second chaotic control parameter may be set according to the requirements, which is not limited herein.
In an exemplary embodiment, if the first chaotic control parameter k includes only a single parameter, then respective corresponding expressions of the two segments may be designed for the composite chaotic map according to a comparison result of x n and k. It may be appreciated that the first chaotic control parameter k may also include a plurality of parameters, and the composite chaotic map may be correspondingly designed into a more segmented structure, which is not limited herein.
In some embodiments, the composite chaotic map may be expressed as:
Wherein x 0 is a chaos initial value, for n >0, x n is a result of the n-th round of chaos calculation operation, k is a first chaos control parameter, and r is a third chaos control parameter. The second chaotic control parameter may take 1, i.e., a sum (mod) operation is performed on1 by the chaotic mapping result.
In some embodiments, the chaos initial value x 0 is the starting point of the iterative process and may be determined based on plaintext information of the image to be encrypted. The k value may determine the break point of the segment structure in the chaotic sequence generation process. The r value can influence the behavior of tent mapping, and further influence the dynamic characteristics of the composite chaotic mapping. And finally, mod 1 operation is applied to the iterative formula, so that the generated chaotic sequence value is ensured to be positioned in a preset interval [0,1 ]. The k value and the r value may be manually set in advance according to needs, or may be determined in other manners, which is not limited herein.
Thus, by setting and applying the above-mentioned parameters, the complex chaotic map can generate a complex and unpredictable chaotic sequence. The method is used as a key stream for image encryption, and can realize efficient encryption and security protection of image data.
In step S203, the pixel values of the plurality of pixels may be encrypted using a first number of chaotic sequence values in the chaotic sequence as a key stream to obtain an encrypted image.
In some embodiments, the number of rounds of the chaotic calculation operation performed in step S202 may be the same as the first number N. That is, the chaotic sequence may include N chaotic sequence values. In step S203, the pixel values of the N pixels may be directly encrypted using the N chaotic sequence values as a key stream.
In some embodiments, the number of rounds of the chaotic calculation operation performed in step S202 may also be greater than the first number N. That is, more than N chaotic sequence values may be included in the chaotic sequence. In step S203, N chaotic sequence values among the chaotic sequences may be selected as the key stream.
In some embodiments, a key (i.e., one chaotic sequence value in a chaotic sequence) corresponding to each of the plurality of pixels is included in the key stream. The pixel value of each pixel may be subjected to a diffusion transformation using the key corresponding to that pixel to obtain an encrypted pixel value. The original pixel value may be replaced with the encrypted pixel value for each pixel to obtain an encrypted image. It will be appreciated that the pixel values of the plurality of pixels may also be encrypted by other means using a key stream, without limitation.
Fig. 3 shows a flowchart of an image encryption method 300 according to an embodiment of the present disclosure. As shown in fig. 3, the image encryption method 300 may further include a step S302 of splitting the image to be encrypted to obtain a plurality of channel images corresponding to the plurality of channel information in response to determining that the image to be encrypted includes the plurality of channel information, and a step S303 of determining a plurality of chaos initial values corresponding to the plurality of channel images based on plaintext information of each of the plurality of channel images. Step S301, step S304, and step S305 in the method 300 may refer to step S201 to step S203 in the method 200, respectively, which are not described herein.
In some embodiments, in step S302, in response to determining that the image to be encrypted includes a plurality of channel information, the image to be encrypted is channel-split to obtain a plurality of channel images corresponding to the plurality of channel information.
The plurality of channel information may be different color components or spectral components contained in the image. In one exemplary embodiment, the image to be encrypted may be an RGB image, and the plurality of channel information may include RGB (red, green, blue) three color channels, each containing intensity information of the image in a specific color dimension. Channel splitting may be the separation of an image data structure from a composite color space into separate channel data structures. For RGB images, channel splitting means converting image data from RGB format into three independent channel images, corresponding to red R channel, green G channel, and blue B channel, respectively. It is appreciated that the present disclosure supports channel splitting for other color modes and encryption is done separately.
In some embodiments, after obtaining multiple channel images, each channel image may be encrypted for a different channel image using the chaotic sequence values in the same chaotic sequence as a key stream. The step S305 of encrypting the pixel values of the plurality of pixels with the first number of chaotic sequence values in the chaotic sequence as a key stream to obtain an encrypted image may include encrypting the plurality of channel images respectively to obtain a plurality of channel encrypted images, and channel-merging the plurality of channel encrypted images to obtain the encrypted image.
In some embodiments, each channel may be independently encrypted, a chaotic sequence is generated using a composite chaotic map, a key stream is obtained therefrom, and then the pixel value of each channel is encrypted using the key stream. After encryption is completed, each encrypted channel can be recombined into a complete encrypted image, and meanwhile, the integrity and the correctness of the encrypted data are ensured to be reserved in the merging process.
Therefore, the processing suitable for the multi-channel image can be completed in parallel and efficiently, the channel splitting allows specific processing to be applied to each color channel of the image, the flexibility and decryption difficulty of an encryption method are increased by independently encrypting each channel, and meanwhile, the overall efficiency of the encryption process is improved by processing each channel in parallel.
Returning to step S302. In some embodiments, after obtaining the plurality of channel images, the chaotic initial values corresponding to the plurality of channel images may be determined, the chaotic sequence for each channel image may be obtained based on the different chaotic initial values, and the chaotic sequence corresponding to the plurality of channel images may be used as the key stream for encryption. As shown in fig. 3, the image encryption method may further include step S303 of determining a plurality of chaos initial values corresponding to the plurality of channel images based on plaintext information of each of the plurality of channel images. The plaintext information for each channel image may include, for example, the median and/or mode of the color values of the plurality of pixels in the corresponding channel.
Step S304, performing multi-round chaotic calculation operation on the chaotic initial values by utilizing the composite chaotic map based on Chebyshev mapping and tent mapping to obtain a chaotic sequence can comprise performing multi-round chaotic calculation operation on a plurality of chaotic initial values by utilizing the composite chaotic map to obtain a channel chaotic sequence for each channel image. The encrypting of the plurality of channel images to obtain the plurality of channel encrypted images in step S305 may include encrypting, for each of the plurality of channel images, pixel values of a plurality of pixels in the channel image using a first number of channel chaotic sequence values in a channel chaotic sequence for the channel image as a key stream to obtain a channel encrypted image corresponding to the channel image.
In an exemplary embodiment, the image to be encrypted is an RGB image, and the median of the color values of the plurality of pixels in the red channel may be selected as a chaos initial value x 0R for the red R channel, the median of the color values of the plurality of pixels in the green channel may be selected as a chaos initial value x 0G for the green G channel, and the median of the color values of the plurality of pixels in the blue channel may be selected as a chaos initial value x 0B for the blue B channel. And carrying out multi-round chaotic calculation operation on the chaotic initial value x 0R、x0G、x0B of each channel by utilizing the composite chaotic map to obtain a plurality of channel chaotic sequences corresponding to the three channels respectively. For each channel image, the pixel values (i.e., color values) are encrypted using the chaotic sequence values in the corresponding channel chaotic sequence as a key stream. And merging the R, G, B encrypted channel images to obtain a final encrypted image.
In addition, when the composite chaotic map is utilized to carry out multi-round chaotic calculation operation on the chaotic initial values corresponding to different channel images, the same chaotic control parameters can be used, and different chaotic control parameters can also be used, so that the method is not limited.
Therefore, the chaos initial value is determined by using the respective plaintext information for different channels, and the chaos sequence is obtained by corresponding calculation, so that different key streams are used for encrypting different channel images, and the randomness and the unpredictability of the encryption process are further increased. In addition, the chaotic sequence is generated for each channel based on the same composite chaotic map (for different chaotic initial values), and consistent encryption logic is adopted, so that different image quality distortion and pixel change trend of each channel after decryption caused by different encryption modes can be effectively avoided, and the overall consistency of images is further affected.
Fig. 4 illustrates a flow chart of a process 400 of encrypting a plurality of pixel values according to an embodiment of the present disclosure. The process 400 may be used to implement step S203 described above. As shown in fig. 4, the process 400 includes a step S401 of scrambling the pixel positions of a plurality of pixels, a step S402 of sequentially determining a key corresponding to each pixel in a key stream according to an arrangement order of the plurality of pixels after scrambling, and a step S403 of performing diffusion transformation on pixel values of the plurality of pixels based on the keys corresponding to the plurality of pixels, respectively, to obtain an encrypted image.
In step S401, the scrambling transformation may be an operation of moving pixels from an original position to a new position, and the new position of each pixel may be specified by creating a permutation map, thereby scrambling the original order of the pixels, which may be randomly determined based on the permutation map and different from the original order.
In step S402, after scrambling the plurality of pixels, corresponding keys may be sequentially determined in the key stream according to the new pixel arrangement order. For example, a first key in the keystream is determined to be the key corresponding to the first pixel in the scrambled transformed image, a second key in the keystream is determined to be the key corresponding to the second pixel in the scrambled transformed image, and so on.
In step S403, the pixel values of the pixels may be subjected to a diffusion transform based on the key determined for each pixel in the previous step, thereby realizing the encryption processing.
Thus, by combining scrambling transformation, key stream distribution and diffusion transformation, the complexity, randomness and unpredictability of the encryption process can be further improved, thereby increasing the security of image encryption.
In some embodiments, the scrambling transform may include an Arnold transform. The Arnold transformation may scramble the positions of pixels in the image by a simple linear mapping. The pixel locations of each channel may be subjected to an Arnold transform, rearranging the pixels of each channel. The arches' transformation is reversible and the original position of the pixel can be restored by inverse transformation when decrypting the encrypted image.
Therefore, the pixel positions can be effectively scattered by adopting the Arnold transformation, so that a better scrambling effect is obtained, and the security of the encryption process is enhanced.
In some embodiments, the diffusion transformation may include calculating a product of the key and a pixel value of the corresponding pixel and replacing the pixel value of the corresponding pixel. For each pixel in the image, a corresponding key value may be obtained from the key stream and the pixel value of the corresponding pixel in the original image is read to calculate the product of the key value and the pixel value.
Therefore, the statistical correlation among pixels is eliminated by multiplying each pixel value with the key value, and the randomness of the encrypted data is enhanced.
It will be appreciated that a scrambling transformation other than the Arnold transformation may be used in step S401, and a diffusion transformation other than the product of the computation key and the pixel value may be used in step S403, to achieve the corresponding encryption effect.
In some embodiments, the image encryption method may further include repeating the encrypting at least once with different scrambling transformation parameters and different chaos initial values to obtain a multiple encrypted image.
Different scrambling transformation parameters can obtain different pixel rearrangement results so as to influence the new position of pixels in the image, and the chaos initial value is used as a starting point for generating the chaos sequence, and the tiny initial value change can calculate completely different chaos sequences. The encryption operation is repeatedly carried out for a plurality of times by using different scrambling transformation parameters and chaos initial values, so that more layers of encryption protection can be carried out on the image, and the security of the encrypted image is further improved.
In some embodiments, scrambling transformation parameters may include permutation patterns, block sizes, scrambling sequences, and/or other parameters. The choice and value of the scrambling transformation parameters may be predetermined in any way.
Fig. 5 shows a flowchart of an image encryption process 500 according to an exemplary embodiment of the present disclosure. As shown in FIG. 5, the process 500 includes a step S501 of acquiring an image to be encrypted, a step S502 of extracting plaintext information of the image to be encrypted as a chaos initial value of a subsequent multi-round chaos calculation operation, a step S503 of judging whether the image to be encrypted is a single-channel image or not, if yes, directly executing the step S504 after splitting a channel, if not, executing the step S504, carrying out scrambling transformation on the image, a step S505 of carrying out multi-round chaos calculation operation on the chaos initial value by utilizing a composite chaos map based on Chebyshev mapping and tent mapping to obtain a chaos sequence, a step S506 of determining a key stream based on a chaos sequence value in the chaos sequence, a step S507 of encrypting pixel values (namely gray values or color values) in the single-channel image by utilizing the key stream and replacing the original pixel values by utilizing the encrypted pixel values, a step S508 of judging whether the image to be encrypted is the single-channel image or not, if yes, directly executing the step S509, if not, carrying out channel merging, and then executing the step S509, and taking the step S509 as an encryption result.
In some embodiments, steps S504-S507 may be looped t times to promote complexity of the resulting encrypted image.
According to another aspect of the present disclosure, an image decryption method is provided. As shown in fig. 6, the image decryption method 600 includes a step S601 of acquiring an encrypted image obtained by the image encryption method 200 or the image encryption method 300 and acquiring a chaos initial value, and a step S602 of decrypting the encrypted image based on the chaos initial value to obtain a decrypted image.
In some embodiments, the encrypted image data may be loaded from a storage device or network and the chaotic initial value used for encryption is obtained through a secure channel, which value is used in the encryption process to generate the chaotic sequence. The same chaotic sequence as that in encryption can be generated using the same chaotic map (e.g., a composite chaotic map based on chebyshev mapping and tent mapping) and the initial value of the chaos as in encryption.
Thus, the same key stream as that at the time of encryption can be generated by using the same chaotic initial value and chaotic map as those at the time of encryption, so that the image can be accurately decrypted. In addition, due to the complexity and randomness of the chaotic sequence, only a decryptor with a correct chaotic initial value can successfully decrypt the image, so that the safety of the image data is ensured.
In some embodiments, the encrypted image may be derived by scrambling and diffusion changes. The image decryption method may further include acquiring scrambling transformation parameters. Step S602, decrypting the encrypted image based on the chaos initial value to obtain a decrypted image may include performing anti-scrambling transformation based on the scrambling transformation parameter and performing anti-diffusion transformation based on the chaos initial value to obtain the decrypted image.
In some embodiments, scrambling transformation parameters for encryption may be obtained from a secure channel, which are used to scramble pixel locations during encryption. The anti-scrambling transformation may restore pixel locations in the encrypted image to original locations during the image decryption process. For each pixel in the encrypted image, its original position is calculated according to the inverse transformation rules and the pixel value is moved to that position, according to the scrambling transformation parameters. For example, if the Arnod transform is used in encryption, the inverse Arnod transform needs to be applied in decryption. The values in the key stream may be used to inverse spread transform the pixel values for each pixel to recover the original pixel values. The inverse diffusion change may be an operation of decrypting the pixel values in the encrypted image using the key stream during image decryption, and may be an inverse operation of diffusion transformation for undoing encryption of the pixel values during encryption.
Thus, the original image can be accurately restored by the inverse scrambling transformation and the inverse diffusion transformation. Because of the complexity and randomness of the chaotic sequence, only a decryptor with a correct chaotic initial value and scrambling transformation parameters can successfully decrypt the image, thereby ensuring the safety of the image data.
Fig. 7 illustrates an encryption effect diagram according to an exemplary embodiment of the present disclosure. The encrypted image completely smears out valid information in the image to be encrypted, and the decrypted image can restore the valid information.
According to another aspect of the present disclosure, there is provided an image encryption apparatus. As shown in fig. 8, the image encryption apparatus 800 includes an image acquisition unit 810, a chaotic calculation unit 820, and a pixel encryption unit 830. The image obtaining unit is configured to obtain an image to be encrypted, the image to be encrypted comprises a first number of pixels, the chaotic calculating unit is configured to perform multi-round chaotic calculation operation on a chaotic initial value by using a composite chaotic map based on chebyshev mapping and tent mapping to obtain a chaotic sequence, and the pixel encrypting unit can be configured to encrypt the pixel values of the pixels by taking the first number of chaotic sequence values in the chaotic sequence as a key stream to obtain an encrypted image.
It is to be understood that the operations and effects of the units 810 to 830 in the image encryption apparatus 800 may refer to the descriptions of the steps S201 to S203 in the method 200, and are not described herein.
According to another aspect of the present disclosure, there is provided an image decryption apparatus. As shown in fig. 9, the image decryption apparatus 900 includes an encrypted content acquisition unit 910 configured to acquire an encrypted image obtained according to the apparatus 800 described above and acquire a chaos initial value, and an image decryption unit 920 configured to decrypt the encrypted image based on the chaos initial value to obtain a decrypted image.
It is to be understood that the operations and effects of the units 910 to 920 in the image decryption apparatus 900 may refer to the descriptions of the steps S701 to S702 in the method 700, and are not described herein.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
According to embodiments of the present disclosure, there is also provided an electronic device, a readable storage medium and a computer program product.
Referring to fig. 10, a block diagram of a structure of an electronic device 1000 that may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 10, the electronic device 1000 includes a computing unit 1001 that 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 apparatus 1000 can also be stored. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other by a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
Various 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 may be any type of device capable of inputting information to the electronic device 1000, the input unit 1006 may receive input numeric or character information and generate key signal inputs related to user settings and/or function control of the electronic device, and may 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 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, video/audio output terminals, vibrators, and/or printers. Storage unit 1008 may include, but is not limited to, magnetic disks, optical disks. Communication unit 1009 allows electronic device 1000 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth devices, 802.11 devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
The computing unit 1001 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 1001 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized 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 performs the various methods, procedures, and/or processes described above. For example, in some embodiments, the methods, procedures, and/or processes may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program may 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 RAM 1003 and executed by computing unit 1001, one or more steps of the methods, procedures, and/or processes described above may be performed. Alternatively, in other embodiments, computing unit 1001 may be configured to perform these methods, procedures, and/or processes in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may 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 Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be a special or general purpose programmable processor, operable to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may 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 may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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.
To provide for interaction with a user, the systems and techniques described here 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 may also be used to provide for interaction with a user, for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback), and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end 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.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the foregoing methods, systems, and apparatus are merely exemplary embodiments or examples, and that the scope of the present invention is not limited by these embodiments or examples but only by the claims following the grant and their equivalents. Various elements of the embodiments or examples may be omitted or replaced with equivalent elements thereof. Furthermore, the steps may be performed in a different order than described in the present disclosure. Further, various elements of the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced by equivalent elements that appear after the disclosure.

Claims (18)

1.一种图像加密方法,包括:1. An image encryption method, comprising: 获取待加密图像,所述待加密图像包括第一数量的多个像素;Acquire an image to be encrypted, wherein the image to be encrypted includes a first number of pixels; 利用基于切比雪夫映射和帐篷映射的复合混沌映射对混沌初值进行多轮混沌计算操作,以得到混沌序列;以及Using a composite chaotic map based on Chebyshev mapping and tent mapping to perform multiple rounds of chaotic calculation operations on the chaotic initial value to obtain a chaotic sequence; and 将所述混沌序列中的所述第一数量的混沌序列值作为密钥流对所述多个像素的像素值进行加密,以得到加密图像。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.根据权利要求1所述的方法,其中,所述复合混沌映射以切比雪夫映射为基本控制单元,并且所述复合混沌映射具有帐篷映射的分段结构,其中,所述基本控制单元在所述分段结构所包括的多个分段分别结合不同的正余弦信号进行反馈控制。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 performs feedback control in combination with different sine and cosine signals in the multiple segments included in the segmented structure. 3.根据权利要求2所述的方法,其中,所述分段结构是基于所述混沌初值或上一轮得到的混沌序列值与第一混沌控制参数的比较结果进行划分的,并且所述复合混沌映射包括将混沌映射结果对第二混沌控制参数进行求余运算。3. The method according to claim 2, wherein the segmented structure is divided based on the comparison result between the chaos initial value or the chaos sequence value obtained in the previous round and the first chaos control parameter, and the composite chaos mapping includes performing a remainder operation on the chaos mapping result with respect to the second chaos control parameter. 4.根据权利要求3所述的方法,其中,所述复合混沌映射表示为:4. The method according to claim 3, wherein the composite chaotic map is expressed as: 其中,x0为混沌初值,对于n>0,xn为第n轮混沌计算操作的结果,k为第一混沌控制参数,r为第三混沌控制参数。Among them, x0 is the initial value of chaos, for n>0, xn is the result of the nth round of chaos calculation operation, k is the first chaos control parameter, and r is the third chaos control parameter. 5.根据权利要求1-4中任一项所述的方法,还包括: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.根据权利要求5所述的方法,其中,所述基于所述待加密图像的明文信息,确定所述混沌初值包括: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.根据权利要求1-4中任一项所述的方法,还包括: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.根据权利要求7所述的方法,还包括: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.根据权利要求1-4中任一项所述的方法,其中,将所述混沌序列中的所述第一数量的混沌序列值作为密钥流对所述多个像素的像素值进行加密,以得到加密图像包括: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.根据权利要求9所述的方法,其中,所述扩散变换包括:10. The method according to claim 9, wherein the diffusion transformation comprises: 计算密钥与对应像素的像素值的乘积,并替换所述对应像素的像素值。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.根据权利要求9所述的方法,还包括: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.一种图像解密方法,包括:12. An image decryption method, comprising: 获取根据权利要求1至11中任一项所述的方法得到的加密图像,并获取混沌初值;以及Obtaining an encrypted image obtained by the method according to any one of claims 1 to 11, and obtaining a chaotic initial value; and 基于所述混沌初值对所述加密图像进行解密,以得到解密图像。The encrypted image is decrypted based on the chaotic initial value to obtain a decrypted image. 13.根据权利要求12所述的方法,其中,所述加密图像是通过置乱变换和扩散变化而得到的,所述方法还包括:13. The method according to claim 12, wherein the encrypted image is obtained by scrambling transformation and diffusion transformation, and the method further comprises: 获取置乱变换参数,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.一种图像加密装置,包括: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; and 像素加密单元,被配置为将所述混沌序列中的所述第一数量的混沌序列值作为密钥流对所述多个像素的像素值进行加密,以得到加密图像。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.一种图像解密装置,包括:15. An image decryption device, comprising: 加密内容获取单元,被配置为获取根据权利要求14所述的装置得到的加密图像,并获取混沌初值;以及an encrypted content acquisition unit, configured to acquire the encrypted image obtained by the apparatus according to claim 14, and acquire a chaotic initial value; and 图像解密单元,被配置为基于所述混沌初值对所述加密图像进行解密,以得到解密图像。The image decryption unit is configured to decrypt the encrypted image based on the chaotic initial value to obtain a decrypted image. 16.一种电子设备,其特征在于,所述电子设备包括: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 所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-13中任一项所述的方法。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.一种存储有计算机指令的非瞬时计算机可读存储介质,其特征在于,所述计算机指令用于使所述计算机执行根据权利要求1-13中任一项所述的方法。17. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 13. 18.一种计算机程序产品,包括计算机程序,其中,所述计算机程序在被处理器执行时实现权利要求1-13中任一项所述的方法。18. A computer program product, comprising a computer program, wherein the computer program implements the method of any one of claims 1 to 13 when executed by a processor.
CN202510344372.4A 2025-03-21 2025-03-21 Image encryption method, image decryption method, device, equipment and medium Pending CN120201137A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510344372.4A CN120201137A (en) 2025-03-21 2025-03-21 Image encryption method, image decryption method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510344372.4A CN120201137A (en) 2025-03-21 2025-03-21 Image encryption method, image decryption method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN120201137A true CN120201137A (en) 2025-06-24

Family

ID=96071267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510344372.4A Pending CN120201137A (en) 2025-03-21 2025-03-21 Image encryption method, image decryption method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN120201137A (en)

Similar Documents

Publication Publication Date Title
CN111738238B (en) Face recognition method and device
CN110753226B (en) High-capacity ciphertext domain image reversible data hiding method
CN114422237B (en) Data transmission method and device, electronic equipment and medium
CN107659753B (en) Image compression encryption method
Wen et al. Triple-image bit-level encryption algorithm based on double cross 2D hyperchaotic map
CN111563262B (en) Encryption method and system based on reversible deep neural network
CN105830134A (en) Method and device for compressing and expanding image intended for encrypted communication, program, and storage medium
US20150356114A1 (en) Systems and methods for dynamic data storage
CN116432244B (en) An image processing method, device, equipment and system
CN114494071B (en) Image processing method, device, equipment and storage medium
WO2024037556A1 (en) Image processing method and apparatus, and device and storage medium
CN113672954A (en) Feature extraction method and device and electronic equipment
CN110232284B (en) An image encryption method and device
CN114387155A (en) Image processing method, apparatus and storage medium
CN107315970B (en) Sensitive data interaction method and device
KR20190010245A (en) A method and apparatus for hash encryption using image vector processing
CN120201137A (en) Image encryption method, image decryption method, device, equipment and medium
US20240303369A1 (en) Key update using comparison of transformed feature sets for extended reality privacy
CN115001654B (en) A batch image encryption method based on chaos-based thread pool and GPU combination optimization
Jiao et al. Improved security for android system based on multi-chaotic maps using a novel image encryption algorithm
Song et al. Neural network-driven parallel accelerated selective image encryption with semantic understanding
CN116847036B (en) Image display method, device, electronic equipment and computer-readable medium
CN110532793A (en) Image encryption method, image encrypting apparatus, electronic equipment and readable storage medium storing program for executing
EP4391516A1 (en) Image obfuscation
US12348649B1 (en) Authentication signature embedding in digital media

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination