An image encryption and decoding method based on mode perturbation
By using a perturbation-based image encryption and decoding method, which employs integer field operations and random perturbation values for image encryption, the problems of floating-point operation distortion and key synchronization difficulties in existing technologies are solved, and an efficient and lossless image encryption and decryption process is achieved.
Patent Information
- Application Number
- CN202511568859.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-10-30
AI Technical Summary
Existing image encryption methods suffer from low transmission efficiency and poor robustness due to floating-point operation distortion and difficulties in key synchronization.
An image encryption and decoding method based on modulus perturbation is adopted. By randomly selecting pairwise coprime positive integers as moduli, a set of moduli is constructed. The partial set of moduli and inverses are constructed by using division and modulo operations in the integer field. Encryption is performed by combining random perturbation values. Decryption is performed using the same preset seed value and pseudo-random number generator.
It achieves lossless encryption and decryption, significantly improves the efficiency and robustness of image encryption, reduces computational overhead, and meets the real-time requirements of large-scale image processing.
Smart Images

Figure CN121037512B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image encryption and decryption, and particularly relates to an image encryption and decoding method based on mode perturbation. BACKGROUND
[0002] In today's information society, images have become one of the core carriers of information expression and communication. Compared with traditional text data, image data has higher information density and more intuitive expression form, and thus is widely used in medical diagnosis, video conference, unmanned driving, remote sensing monitoring, social entertainment and other scenarios. However, with the popularity of the Internet and wireless communication technology, image data is extremely vulnerable to security threats such as theft, tampering or illegal copying during transmission and storage. Especially in sensitive fields, the security problem is particularly prominent. How to design an encryption method that can guarantee image content confidentiality, and at the same time, can balance the computational efficiency and realizability, has become a common concern of the academic and industrial circles.
[0003] Existing image encryption methods include encryption methods based on traditional cryptography algorithms, encryption methods based on chaotic systems, and encryption methods based on transform domains. The encryption method based on traditional cryptography algorithms directly sequences the image pixels and applies classical symmetric or asymmetric algorithms such as AES and RSA for encryption; although this method is secure, it is designed for text or binary data, and when applied to images, it may ignore the high redundancy, large data volume and real-time requirements specific to image data, resulting in low encryption and decryption efficiency. The encryption method based on chaotic systems uses chaotic mapping or pseudo-random sequence method, which utilizes the initial value sensitivity and long-term unpredictability of chaotic systems to scramble and diffuse image pixels; the implementation of the chaotic method is relatively flexible, but it generally has problems such as sensitive parameter selection, insufficient key space, and limited ability to resist differential attacks. Common means in encryption methods based on transform domains include encrypting coefficients in wavelet transform, discrete cosine transform or fractional Fourier transform domain; this method can improve the encryption complexity by combining frequency domain characteristics, but its implementation relies on floating-point operations, which has high computational complexity, and may introduce distortion in the recovery process, limiting its promotion in high-precision applications.
[0004] In summary, the existing image encryption methods have the problems of low computational efficiency, non-loss recovery and poor practical robustness due to the direct application of traditional cryptographic algorithms that are not suitable for image characteristics, or the reliance on floating-point transform domain operations that introduce distortion, or the use of chaotic systems that have synchronization problems and security risks, resulting in low image transmission efficiency and poor robustness. SUMMARY
[0005] To this end, the technical problem to be solved by the present application is to overcome the problems of low efficiency and poor robustness of image encryption transmission due to the existence of floating-point operation distortion and key synchronization difficulty in the prior art.
[0006] To solve the above technical problems, the present application provides an image encryption and decoding method based on module perturbation, applied to a sender, comprising:
[0007] obtaining a gray image of the image to be transmitted, randomly selecting two prime integers in the gray value range of the gray image, as moduli, to form a modulus set, multiplying all the moduli in the modulus set to obtain a modulus product; the modulus product is greater than the maximum gray value of the gray image;
[0008] respectively calculating the quotient of the modulus product and two moduli, obtaining partial moduli, forming a partial modulus set;
[0009] respectively calculating the inverse element of partial moduli under its corresponding modulus, obtaining inverse elements, forming an inverse element set;
[0010] performing modulo operation on each pixel in the image to be transmitted with moduli in the modulus set, based on modulo operation results, forming a remainder vector set of each pixel in the image to be transmitted;
[0011] randomly generating integers based on a preset seed value, as random perturbation values of remainder vectors in the remainder vector set of each pixel in the image to be transmitted;
[0012] adding remainder vectors of each pixel in the image to be transmitted to their corresponding random perturbation values, obtaining perturbation vectors; performing modulo operation on perturbation vectors with moduli, to obtain an encrypted data set at each pixel position in the image to be transmitted;
[0013] sending the encrypted data set at all pixel positions in the image to be transmitted to the receiver through a public channel, and sending the modulus set, the modulus product, the partial modulus set, the inverse element set, the maximum gray value of the gray image and the preset seed value to the receiver through a secure channel, so that the receiver restores the image to be transmitted.
[0014] Preferably, the gray image of the image to be transmitted is obtained, and two relatively prime positive integers, as moduli, to form a modulus set, multiply all the moduli in the modulus set to obtain a modulus product, including:
[0015] obtaining a gray image of the image to be transmitted , and are pixel coordinates, , , and represent the pixel width and pixel height of the gray image, and the maximum gray value of the gray image is ;
[0016] Randomly select two relatively prime positive integers within the gray value range of the gray image , as moduli, to form a modulus set ;
[0017] Calculate the product of all the moduli in the modulus set to obtain a modulus product , which is represented as: , .
[0018] Preferably, the quotient of the modulus product and the modulus is calculated to obtain partial moduli, which form a partial modulus set, including:
[0019] Calculate the quotient of the modulus product and the modulus in the modulus set to obtain the partial modulus corresponding to the modulus , which is represented as: ;
[0020] Based on all the partial moduli, a partial modulus set is formed .
[0021] Preferably, the inverse element of the partial modulus under its corresponding modulus is calculated to obtain inverse elements, which form an inverse element set, including:
[0022] Based on the formula , the inverse element of the partial modulus under the modulus is calculated and obtained ;
[0023] All inverse elements are obtained to form an inverse element set .
[0024] Preferably, each pixel in the image to be transmitted corresponds to a value in the modulus set. Perform modulo operations on each modulus, based on The modulo operation results form a set of remainder vectors for each pixel of the image to be transmitted, including:
[0025] Pixels of the image to be transmitted Compared to the first in the modulus set Modulus Perform a modulo operation to obtain the first... A vector with remainders is represented as: ;
[0026] Get pixels Modulo operation for all modulo numbers The remainder vectors form the pixels in the image to be transmitted. The set of remainder vectors .
[0027] Preferably, each pixel of the image to be transmitted... Each remainder vector is added to its corresponding random perturbation value to obtain... One perturbation vector; Each perturbation vector is targeted at... The modulus is used to perform a modulo operation to obtain the encrypted data set at each pixel position in the image to be transmitted, including:
[0028] The first pixel of each pixel in the image to be transmitted Remainder vector Its corresponding random perturbation value Add them together to get the first one. The disturbance vectors are represented as follows: ;
[0029] For the The perturbation vector is compared to the first perturbation vector in the modulus set. Modulus Perform a modulo operation to obtain the corresponding encrypted data. , is represented as: ;
[0030] Obtain the image to be transmitted at each pixel position Each encrypted data point constitutes a set of encrypted data at each pixel location of the image to be transmitted. .
[0031] This invention provides an image encryption and encoding / decoding method based on modal perturbation, applied to a receiver, comprising:
[0032] The encrypted data set of all pixels of the image to be transmitted, generated by the sender using the image encryption encoding and decoding method based on mode perturbation as described above, is received via a public channel.
[0033] The secure channel receives the set of moduli, moduli product, partial set of moduli, set of inverse elements, maximum gray value of grayscale image and preset seed value generated by the sender based on the image encryption and decoding method based on moduli perturbation as described above.
[0034] Based on a preset seed value, generate a generator identical to the sender's. Each of the given integers represents a set of encrypted data for each pixel of the image to be transmitted. The random perturbation value corresponding to each encrypted data;
[0035] Each pixel of the image to be transmitted Each encrypted data point is subtracted from its corresponding random perturbation value to obtain... denoised vectors; Each denoising vector is targeted at Perform modulo operations on the modulus to obtain the position of each pixel in the image to be transmitted. Each of the following is a set of recovery remainder vectors, which together form the set of recovery remainder vectors at each pixel position in the image to be transmitted.
[0036] The set of recovery remainder vectors at each pixel location of the image to be transmitted Each recovery remainder vector and its corresponding Modulus of each part Multiply the inverses of each inverse and sum them. Based on the summation, take the modulus product and the modulus of the maximum gray value in turn to decrypt the pixels at each pixel position of the image to be transmitted and restore the image to be transmitted.
[0037] Preferably, each pixel of the image to be transmitted... Each encrypted data point is subtracted from its corresponding random perturbation value to obtain... denoised vectors; Each denoising vector is targeted at Perform modulo operations on the modulus to obtain the position of each pixel in the image to be transmitted. A set of recovery remainder vectors, comprising the recovery remainder vectors at each pixel location of the image to be transmitted, including:
[0038] The first pixel of each pixel in the image to be transmitted Encrypted data Its corresponding number A random perturbation value Subtract to get the first The denoised vectors are represented as follows: ;
[0039] For the The denoised vector is compared to the denoised vector in the modulus set. Modulus Perform a modulo operation to obtain the first... The recovery remainder vector is represented as follows: ;
[0040] Get the position of each pixel in the image to be transmitted The set of recovery remainder vectors of the image to be transmitted consists of several recovery remainder vectors. .
[0041] Preferably, the set of recovery remainder vectors at each pixel location of the image to be transmitted is... Each recovery remainder vector and its corresponding Modulus of each part Multiply the inverses of each inverse and sum them. Based on the summation, take the modulus of the product and the maximum gray value in sequence to decrypt the pixels at each pixel position in the image to be transmitted, including:
[0042] The set of recovery remainder vectors at each pixel location of the image to be transmitted The recovery remainder vector and its corresponding first... Modulus of each part , No. Each inverse element Multiply and then sum to construct the summation result at each pixel location. ;
[0043] Based on the summation result, the modulo product is applied sequentially. Maximum grayscale value Modulo operation is used to decrypt the pixel at each pixel position in the image to be transmitted, represented as: .
[0044] Preferably, the same preset seed value and the same pseudo-random number generator are used to generate the same number on both the sender and receiver. A random perturbation value.
[0045] Compared with the prior art, the above-described technical solution of the present invention has the following advantages:
[0046] The image encryption and encoding / decoding method based on modulus perturbation described in this invention, at the sending end, randomly selects positive integer moduli from the grayscale values of the grayscale image to construct a set of moduli that are pairwise coprime. Based on the moduli set, a partial moduli set and inverse element fitting are constructed using division, and a remainder vector set is constructed using addition and modulo operations. This invention gradually constructs the partial moduli set, inverse element set, and remainder vector set through addition, subtraction, multiplication, and division operations. Integer addition, subtraction, multiplication, and division operations significantly reduce computational overhead, and the encryption process of each pixel is independent and can be parallelized, thereby achieving high-speed encryption and meeting the real-time requirements of large-scale image data processing. A set of random perturbation values is generated based on a preset seed number and added to the remainder vector set to obtain the corresponding encrypted data. The random perturbation values ensure that even when encrypting the same pixel value, completely different ciphertexts will be generated due to different random perturbations, greatly enhancing pixel diffusion and data confusion, compensating for the security weaknesses that may exist in simple modulo operations, and improving the robustness of image encryption.
[0047] During decryption at the receiving end, based on the same set of random perturbation values as during encryption, the perturbation values are removed by modulo subtraction. After obtaining the set of recoverable remainder vectors, these remainder vectors are weighted and combined with a portion of the modulus and inverses, and then gradually accumulated to finally obtain a value consistent with the original pixel. Since all operations are performed in the integer domain and are mathematically strictly reversible, this invention uses the same preset seed value and pseudo-random number generator at both the sender and receiver, ensuring the generation of identical random perturbation values. Therefore, the decryption result can completely and accurately recover the original pixel matrix, achieving lossless encryption and decryption.
[0048] This invention is a decomposition and reconstruction mechanism based on integer modular arithmetic and random perturbation. This decomposition and reconstruction method avoids the need to perform high-complexity operations on large modulo numbers directly. Integer operations avoid the high complexity and precision loss caused by floating-point transformations. The same preset seed value solves the synchronization dependency problem and ensures the complete consistency of encryption and decryption results. Under the premise of ensuring lossless decryption, it significantly improves encryption and decryption efficiency and robustness. Attached Figure Description
[0049] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein:
[0050] Figure 1 This is a flowchart of the steps of the image encryption and encoding / decoding method based on modal perturbation of the present invention at the sending end;
[0051] Figure 2 This is a flowchart of the steps of the image encryption and encoding / decoding method based on mode perturbation of the present invention at the receiving end;
[0052] Figure 3It is a grayscale image of the image to be transmitted;
[0053] Figure 4 It is an encrypted image after the image to be transmitted has been encrypted by the sender;
[0054] Figure 5 It is the image to be transmitted that is decrypted and restored by the receiver. Detailed Implementation
[0055] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0056] Reference Figure 1 As shown, the flowchart of the image encryption and encoding / decoding method based on modal perturbation of the present invention at the sender specifically includes:
[0057] S101: Obtain the grayscale image of the image to be transmitted. , and For pixel coordinates, , , and This represents the pixel width and pixel height of a grayscale image. The maximum grayscale value of the grayscale image is [value to be filled in]. Within the range of grayscale values in a grayscale image random selection The set of moduli consists of three pairwise coprime positive integers. Multiply all the moduli in the modulus set to obtain the modulo product. , The modulus product is greater than the maximum grayscale value of the grayscale image.
[0058] S102: Calculate the modulo product and... The quotient of the modulus is obtained. Partial modulus, set of constituent moduli ;
[0059] Among them, the The partial modulus corresponding to each modulus , is represented as: ;
[0060] S103: Calculate separately For each partial modulus, obtain its inverse in the form of its corresponding modulus. Each inverse element forms an inverse element set. ;
[0061] Among them, the Modulus of each part In the Modulus The inverse element below The calculation is expressed as: ;
[0062] S104: Let each pixel in the image to be transmitted correspond to the modulus set. Perform modulo operations on each modulus, based on The modulo operation results form the remainder vector set for each pixel of the image to be transmitted. ;
[0063] Among them, the pixels of the image to be transmitted Compared to the first in the modulus set Modulus Perform a modulo operation to obtain the first... A vector with remainders is represented as: ;
[0064] S105: Randomly generated based on a preset seed value. There are 12 integers, which serve as the remainder vector set for each pixel of the image to be transmitted. The random perturbation value of the remainder vector;
[0065] S106: Transmit each pixel of the image to be transmitted. Each remainder vector is added to its corresponding random perturbation value to obtain... One perturbation vector; Each perturbation vector is targeted at... Perform modulo operations on each modulus to obtain the encrypted data set at each pixel location in the image to be transmitted. ;
[0066] Among them, for the first perturbation vector Compared to the first in the modulus set Modulus Perform a modulo operation to obtain the corresponding encrypted data. , is represented as: ;
[0067] S107: The encrypted data set of all pixel positions in the image to be transmitted is sent to the receiver via a public channel. The modulus set, modulus product, partial modulus set, inverse set, maximum gray value of the grayscale image and preset seed value are sent to the receiver via a secure channel so that the receiver can recover the image to be transmitted.
[0068] The image encryption and encoding / decoding method based on modulus perturbation described in this invention, at the sending end, randomly selects positive integer moduli from the grayscale values of the grayscale image to construct a set of moduli that are pairwise coprime. Based on the moduli set, a partial moduli set and inverse element fitting are constructed using division, and a remainder vector set is constructed using addition and modulo operations. This invention gradually constructs the partial moduli set, inverse element set, and remainder vector set through addition, subtraction, multiplication, and division operations. Integer addition, subtraction, multiplication, and division operations significantly reduce computational overhead, and the encryption process of each pixel is independent and can be parallelized, thereby achieving high-speed encryption and meeting the real-time requirements of large-scale image data processing. A set of random perturbation values is generated based on a preset seed number and added to the remainder vector set to obtain the corresponding encrypted data. The random perturbation values ensure that even when encrypting the same pixel value, completely different ciphertexts will be generated due to different random perturbations, greatly enhancing pixel diffusion and data confusion, compensating for the security weaknesses that may exist in simple modulo operations, and improving the robustness of image encryption.
[0069] Based on the above embodiments, in this embodiment of the invention, the receiver decrypts the encrypted image to be transmitted by the sender, referring to... Figure 2 The diagram shows the steps of the image encryption and decoding method based on mode perturbation at the receiver. The specific steps include:
[0070] S201: The encrypted data set of all pixels of the image to be transmitted, generated by the sender using the image encryption encoding and decoding method based on the mode perturbation described above, is received via a common channel.
[0071] S202: Receive via a secure channel the set of moduli, moduli product, partial set of moduli, set of inverse elements, maximum gray value of grayscale image and preset seed value generated by the sender based on the image encryption and decoding method based on moduli perturbation as described above;
[0072] S203: Generate the same seed value as the sender based on the preset seed value. Each of the given integers represents a set of encrypted data for each pixel of the image to be transmitted. The random perturbation value corresponding to each encrypted data;
[0073] S204: Transmit each pixel of the image to be transmitted. Each encrypted data point is subtracted from its corresponding random perturbation value to obtain... denoised vectors; Each denoising vector is targeted at Perform modulo operations on the modulus to obtain the position of each pixel in the image to be transmitted. A set of recovery remainder vectors is formed at each pixel position of the image to be transmitted. ;
[0074] Among them, for the first Denoising vectors Compared to the first in the modulus set Modulus Perform a modulo operation to obtain the first... The recovery remainder vector is represented as follows: ;
[0075] S205: The set of restor vectors at each pixel location of the image to be transmitted. Each recovery remainder vector and its corresponding Modulus of each part Multiply the inverses of each inverse and sum them. Based on the summation, take the modulus product and the maximum gray value in turn to decrypt the pixels at each pixel position of the image to be transmitted and restore the image to be transmitted.
[0076] Among them, based on the summation result Modular product in sequence Maximum grayscale value Modulo operation is used to decrypt the pixel at each pixel position in the image to be transmitted, represented as: .
[0077] During decryption at the receiving end, based on the same set of random perturbation values as during encryption, the perturbation values are removed by modulo subtraction. After obtaining the set of recoverable remainder vectors, these remainder vectors are weighted and combined with a portion of the modulus and inverses, and then gradually accumulated to finally obtain a value consistent with the original pixel. Since all operations are performed in the integer domain and are mathematically strictly reversible, this invention uses the same preset seed value and pseudo-random number generator at both the sender and receiver, ensuring the generation of identical random perturbation values. Therefore, the decryption result can completely and accurately recover the original pixel matrix, achieving lossless encryption and decryption.
[0078] Based on the above embodiments, the image encryption and encoding / decoding method based on modal perturbation provided by this invention is used to encrypt and transmit images. This significantly reduces computational overhead while improving encryption strength, providing an efficient and reliable solution for the secure storage and transmission of image data. The specific encryption and encoding / decoding steps include:
[0079] S301: Obtain the grayscale image corresponding to the input image. ;
[0080] in, and For pixel coordinates, , , and This represents the pixel width and pixel height of a grayscale image, both with a value of 512; the maximum grayscale value of the grayscale image is [value missing]. ;
[0081] S302: Randomly select from the range of 1 to 255 Given a set of pairwise coprime positive integers, construct the set of moduli. subscript Represent the ordinal number of a prime number and its product. ;
[0082] In this embodiment, take The set of positive integer moduli is Modular product ;
[0083] S303: For each module ,calculate , constitutes a partial modulus set ;
[0084] S304: For each part modulus Find its inverse in terms of the corresponding positive integer modulus. Obtain the inverse set The inverse element satisfies: , This represents the modulo operation;
[0085] S305: For each pixel of the input image Calculate its modulus in the set of positive integers. The set of remainder vectors , is represented as:
[0086] , ;
[0087] S306: Given a seed value A set of remainder vectors is generated using a random number generator. A set of random perturbation values consisting of the same number of random integers. and guarantee ;
[0088] S307: Set of Remainder Vectors Perturb all values and perform modulo addition to obtain the encrypted data set. The encrypted data is represented as:
[0089] ;
[0090] S308: Encrypt the data set Transmitted to the receiver via a public channel; inverse set Partial Modulus Set set of positive integer moduli Maximum grayscale value Modulus product With seed value It is transmitted to the recipient via a secure channel;
[0091] S309: After receiving the data, the receiver, based on the seed value, uses the same random number generator to generate the same set of random perturbation values as the sender. Combined with the received encrypted data set Perform a modulo subtraction operation with the set of positive integer moduli to obtain the set of recovered remainders. ;
[0092] The restored remainder is expressed as: ;
[0093] S310: Recovering the set of remainders The decrypted pixel matrix is calculated in the middle. , is represented as:
[0094] ;
[0095] S311: Output the decrypted pixel matrix .
[0096] The proposed image encryption and decoding method based on modulus perturbation achieves secure image data transmission through modulus decomposition and reconstruction mechanisms. Specifically, the method first preprocesses the input image pixels. During encryption, each pixel value is decomposed into multiple remainder components under a modulus set, and random perturbations are added to enhance pixel diffusion and data confusion. During decryption, each remainder component is weighted and combined with its inverse according to pre-calculated component values, and then gradually accumulated. The perturbation values are then removed, ultimately yielding a value consistent with the original pixel. This decomposition and reconstruction method avoids the need for highly complex calculations on large moduli while ensuring complete consistency between encryption and decryption results. This invention significantly reduces computational overhead while improving encryption strength, providing an efficient and reliable solution for the secure storage and transmission of image data.
[0097] Reference Figure 3 The image shown is a grayscale image of the image to be transmitted; refer to... Figure 4 The image shown is the encrypted image after the image to be transmitted has been encrypted by the sender; see reference. Figure 5 The image shown is the image to be transmitted, decrypted and restored by the receiver. (Comparison) Figure 3 and Figure 5As can be seen, this invention avoids the need for high-complexity operations on large moduli by decomposing and reconstructing, avoids the high complexity and precision loss caused by floating-point transformations by integer operations, solves the synchronization dependency problem by using the same preset seed value, and ensures the complete consistency of encryption and decryption results. Under the premise of ensuring lossless decryption, it significantly improves encryption and decryption efficiency and robustness.
[0098] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0099] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0100] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0101] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0102] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. An image encryption encoding and decoding method based on mode perturbation, characterized in that, Applied to the sender, including: Obtain the grayscale image of the image to be transmitted, and randomly select from the grayscale values within the range of the grayscale image. A set of moduli is formed by taking a set of positive integers that are pairwise coprime. The moduli in the set are multiplied together to obtain the moduli product. The moduli product is greater than the maximum gray value of the grayscale image. Calculate the modulus product and The quotient of the modulus is obtained. Partial modulus, and the set of constituent modulus; Calculate separately For each partial modulus, obtain its inverse in the form of its corresponding modulus. Each inverse element forms an inverse element set; Let each pixel in the image to be transmitted correspond to the set of moduli. Perform modulo operations on each modulus, based on The modulo operation results form a set of remainder vectors for each pixel of the image to be transmitted; Randomly generated based on a preset seed value. There are 12 integers, which are used as the remainder vector sets for each pixel of the image to be transmitted. The random perturbation value of the remainder vector; Each pixel of the image to be transmitted Each remainder vector is added to its corresponding random perturbation value to obtain... One perturbation vector; Each perturbation vector is targeted at... Perform modulo operations on each modulus to obtain the encrypted data set at each pixel position in the image to be transmitted; The encrypted data set of all pixel locations in the image to be transmitted is sent to the receiver via a public channel. The modulus set, modulus product, partial modulus set, inverse set, maximum grayscale value of the grayscale image and preset seed value are sent to the receiver via a secure channel so that the receiver can recover the image to be transmitted.
2. The image encryption and encoding / decoding method based on mode perturbation according to claim 1, characterized in that, Obtain the grayscale image of the image to be transmitted, and randomly select from the grayscale values within the range of the grayscale image. We take three pairwise coprime positive integers as moduli, form a set of moduli, and multiply all the moduli in the set to obtain the modulo product, including: Obtain the grayscale image of the image to be transmitted. , and For pixel coordinates, , , and This represents the pixel width and pixel height of a grayscale image. The maximum grayscale value of the grayscale image is [value to be filled in]. ; The range of grayscale values in a grayscale image random selection The set of moduli consists of three pairwise coprime positive integers. ; Calculate the product of all moduli in the modulus set to obtain the modulo product. , is represented as: , .
3. The image encryption and encoding / decoding method based on mode perturbation according to claim 2, characterized in that... Calculate the modulo product and respectively The quotient of the modulus is obtained. Each part modulus, comprising a set of part moduli, including: Calculate the product of moduloes and the product of moduloes in the set of moduloes. The quotient of the modulus is obtained. The partial modulus corresponding to each modulus , is represented as: ; Based on all partial moduli, the set of component moduli. .
4. The image encryption and encoding / decoding method based on mode perturbation according to claim 3, characterized in that, Calculate separately For each partial modulus, obtain its inverse in the form of its corresponding modulus. There are 3 inverses, forming a set of inverses, including: Based on formula Calculate and obtain the first Modulus of each part In the Modulus The inverse element below ; Obtain all inverses and form an inverse set. .
5. The image encryption and encoding / decoding method based on mode perturbation according to claim 4, characterized in that, Let each pixel in the image to be transmitted correspond to the set of moduli. Perform modulo operations on each modulus, based on The modulo operation results form a set of remainder vectors for each pixel of the image to be transmitted, including: Pixels of the image to be transmitted Compared to the first in the modulus set Modulus Perform a modulo operation to obtain the first... A vector with remainders is represented as: ; Get pixels Modulo operation for all modulo numbers The remainder vectors form the pixels in the image to be transmitted. The set of remainder vectors .
6. The image encryption and encoding / decoding method based on mode perturbation according to claim 5, characterized in that, Each pixel of the image to be transmitted Each remainder vector is added to its corresponding random perturbation value to obtain... One perturbation vector; Each perturbation vector is targeted at... The modulus is used to perform a modulo operation to obtain the encrypted data set at each pixel position in the image to be transmitted, including: The first pixel of each pixel in the image to be transmitted Remainder vector Its corresponding random perturbation value Add them together to get the first one. The disturbance vectors are represented as follows: ; For the The perturbation vector is compared to the first perturbation vector in the modulus set. Modulus Perform a modulo operation to obtain the corresponding encrypted data. , is represented as: ; Obtain the image to be transmitted at each pixel position Each encrypted data point constitutes a set of encrypted data for each pixel location of the image to be transmitted. .
7. An image encryption encoding and decoding method based on mode perturbation, characterized in that, Applied to the recipient, including: The encrypted data set of all pixels of the image to be transmitted, generated by the sender based on the image encryption encoding and decoding method based on any one of claims 1 to 6, is received via a public channel. The sender receives, via a secure channel, a set of moduli, a product of moduli, a partial set of moduli, a set of inverse elements, the maximum gray value of the grayscale image and a preset seed value, generated by the image encryption and decoding method based on modulo perturbation as described in any one of claims 1 to 6. Based on a preset seed value, generate a generator identical to the sender's. Each of the given integers represents a set of encrypted data for each pixel of the image to be transmitted. The random perturbation value corresponding to each encrypted data; Each pixel of the image to be transmitted Each encrypted data point is subtracted from its corresponding random perturbation value to obtain... denoised vectors; Each denoising vector is targeted at Perform modulo operations on the modulus to obtain the position of each pixel in the image to be transmitted. Each of the following is a set of recovery remainder vectors, which together form the set of recovery remainder vectors at each pixel position in the image to be transmitted. The set of recovery remainder vectors at each pixel location of the image to be transmitted Each recovery remainder vector and its corresponding Modulus of each part Multiply the inverses of each inverse and sum them. Based on the summation, take the modulus product and the modulus of the maximum gray value in turn to decrypt the pixels at each pixel position of the image to be transmitted and restore the image to be transmitted.
8. The image encryption and encoding / decoding method based on mode perturbation according to claim 7, characterized in that, Each pixel of the image to be transmitted Each encrypted data point is subtracted from its corresponding random perturbation value to obtain... denoised vectors; Each denoising vector is targeted at Perform modulo operations on the modulus to obtain the position of each pixel in the image to be transmitted. A set of recovery remainder vectors, comprising the recovery remainder vectors at each pixel location of the image to be transmitted, including: The first pixel of each pixel in the image to be transmitted Encrypted data Its corresponding number A random perturbation value Subtract to get the first The denoised vectors are represented as follows: ; For the The denoised vector is compared to the denoised vector in the modulus set. Modulus Perform a modulo operation to obtain the first... The recoverable remainder vector is represented as follows: ; Get the position of each pixel in the image to be transmitted The set of recovery remainder vectors of the image to be transmitted consists of several recovery remainder vectors. .
9. The image encryption and encoding / decoding method based on mode perturbation according to claim 8, characterized in that, The set of recovery remainder vectors at each pixel location of the image to be transmitted Each recovery remainder vector and its corresponding Modulus of each part Multiply the inverses of each inverse and sum them. Based on the summation, take the modulus of the product and the maximum gray value in sequence to decrypt the pixels at each pixel position in the image to be transmitted, including: The set of recovery remainder vectors at each pixel location of the image to be transmitted The recovery remainder vector and its corresponding first... Modulus of each part , No. Each inverse element Multiply and then sum to construct the summation result at each pixel location. ; Based on the summation result, the modulo product is applied sequentially. Maximum grayscale value Modulo operation is used to decrypt the pixel at each pixel position in the image to be transmitted, represented as: .
10. The image encryption and encoding / decoding method based on mode perturbation according to claim 7, characterized in that, Using the same preset seed value and the same pseudo-random number generator, the same numbers are generated on both the sender and receiver. A random perturbation value.
Citation Information
Patent Citations
A signal compression and encryption method based on coupled circuit
AU2020103541A4
Encryption processing method and device based on chaos parameter adjustment, equipment and medium
CN120342577A