CN112188030B - Gray level image encryption coding and decoding method based on pixel combination and complex number transformation - Google Patents
Gray level image encryption coding and decoding method based on pixel combination and complex number transformation Download PDFInfo
- Publication number
- CN112188030B CN112188030B CN202010977345.8A CN202010977345A CN112188030B CN 112188030 B CN112188030 B CN 112188030B CN 202010977345 A CN202010977345 A CN 202010977345A CN 112188030 B CN112188030 B CN 112188030B
- Authority
- CN
- China
- Prior art keywords
- image
- complex number
- pixel
- gray
- encryption coding
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/32—Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
- H04N1/32101—Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
- H04N1/32144—Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
- H04N1/32149—Methods relating to embedding, encoding, decoding, detection or retrieval operations
- H04N1/32267—Methods relating to embedding, encoding, decoding, detection or retrieval operations combined with processing of the image
- H04N1/32272—Encryption or ciphering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0819—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/182—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/186—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Facsimile Transmission Control (AREA)
Abstract
The invention relates to a pixel combination and complex number transformation encryption coding and decoding method of a gray level image. In the encryption coding method, firstly, even lines of the image are filled, pixels are combined, and then the gray value is converted to a complex number field to realize encryption coding. The modular length of the complex number is used as a cipher text, the phase angle is used as a key, and the cipher text and the phase angle are respectively transmitted to a receiver through different channels. And after receiving the ciphertext and the key, the receiver recovers the information of the original image by calculating the real part and the imaginary part of the complex number. The method is simple in implementation mode, can immunize attacks from a phase recovery algorithm, improves the image encryption strength, and has good application potential.
Description
Technical Field
The present invention relates to an image encoding and decoding method, and more particularly, to an encoding and decoding method for encrypting a grayscale digital image.
Background
In the fields of modern military, industry, scientific research, life, entertainment and the like, digital images are widely used, and in many scenes, the content of the digital images relates to information such as copyright, privacy, confidentiality and the like, so that the digital images need to be encrypted and encoded and then transmitted. In the field of image encryption coding, a plurality of ways can realize hiding of image information, wherein one encryption scheme is that gray information of an image is regarded as a group of complex numbers comprising an amplitude part and a phase part, and then the amplitude part and the phase part are respectively encrypted to finally obtain a white noise image with unidentifiable content. In order to realize double random phase encoding, a Fourier transform method can be used to obtain an amplitude and phase distribution function, and the amplitude and phase distribution function is encrypted by a random phase matrix. In addition, the encryption may be implemented using fresnel transform, wavelet transform, cosine transform, or the like. Meanwhile, the encryption method can be realized by using an algorithm and can also be finished by an optoelectronic system.
However, studies have shown that optical transformations are mostly linear transformations and have well-defined physical models. These characteristics present a series of problems to the encryption method. Through model analysis, selection of appropriate parameters and a series of iterations by using a phase recovery algorithm, the information of the image can be reconstructed under the condition of not knowing a key.
In order to solve the problem, the patent proposes an encryption coding method for gray level images, which utilizes the coding of pixel combination and complex number transformation, is not attacked by a phase recovery algorithm, and improves the security.
Disclosure of Invention
Aiming at the defects of the existing method, the invention provides a gray level image encryption coding and decoding method of pixel combination and complex number transformation. The present invention will be described in further detail with reference to the accompanying drawings. In order to achieve the above object, the scheme of the invention comprises:
as shown in fig. 1, the encryption encoding includes the following steps:
1) for a gray-scale image I (x, y) which is a real number at each pixel, x and y respectively represent the pixel coordinates of the image, the pixel size of the image is M × N, where M represents the number of rows of the image and N represents the number of columns of the image, if M is an odd number, then one row is added by a random number after M rows of the image, so that M is an even number, M1 is the number of rows subjected to padding, and if M is an odd number, then M1 is M; if M is an even number, M1 is M + 1.
2) The gray scale range of the gray image I (x, y) is 0 to P, and the gray value of each pixel is adjusted to be
I1(x,y)=I(x,y)-(P+1)/2,(1)
3) Let a (p, q) ═ I1(x, y), b (p, q) ═ I1(x, y +1+ M1/2), where x is from 1 to N, y is from 1 to M1/2, and p and q are the pixel coordinates of the encoded picture. A matrix Z of random numbers of the same size as a is generated, the random numbers ranging from-0.5 to 0.5. Taking a (p, q) and b (p, q) as the real part and imaginary part of the complex number, and calculating
t(p,q)=sqrt[a(p,q)^2+b(p,q)^2],(2)
T(p,q)=t(p,q)+Z(p,q)*2*P,(3)
Wherein sqrt () represents the square operation, and ^2 represents the square operation.
4) Determining the phase angle r (p, q) of the complex number according to the equations (4) and (5),
if b (p, q) >0, then r (p, q) ═ arccos [ a (p, q)/t (p, q) ], (4)
If b (p, q) ≦ 0, then r (p, q) ═ arccos [ a (p, q)/t (p, q) ] + π, (5)
5) T (p, q) is transmitted as a ciphertext to the recipient over a public channel, while r (p, q) is transmitted as a key to the recipient over a secure channel.
At the receiving side, the decoding comprises the following steps:
1) decrypting based on the ciphertext T (p, q) and the key r (p, q),
a1(p,q)=cos[r(p,q)]*T(p,q),(6)
b1(p,q)=sin[r(p,q)]*T(p,q),(7)
2) the original image is restored to be the original image,
I2(x,y)=a1(p,q),(8)
I2(x,y+1+M1/2)=b1(p,q),(9)
and adjusting the gray value of I2(x, y) to be between 0 and P, wherein I2(x, y) is the decoded image.
Compared with the prior art, the invention has the advantages that: the invention provides the image encryption coding and decoding method which can not be attacked by the phase recovery algorithm, and the method has the advantages of simple calculation process, good encryption coding and decoding effects and good application prospect.
Drawings
The invention is further described below with reference to the accompanying drawings.
Fig. 1 is a flow chart of image encryption and encoding according to the present invention.
Fig. 2 is a test gray scale image used in an embodiment of the present invention.
Fig. 3 shows an encoded ciphertext image T (p, q) according to an embodiment of the present invention.
Fig. 4 is a decoded grayscale image according to an embodiment of the present invention.
Detailed Description
In order that the manner in which the above recited objects, features and advantages of the present invention are obtained will be readily understood, a more particular description of the invention briefly described above will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings.
Example (b):
according to encoding step 1), the pixel size of the grayscale image is 512 x 512, as shown in fig. 2, and no additional lines need to be filled because the number of lines is even.
According to the encoding step 2), the maximum value of the image gradation level P is 256, and the gradation value is adjusted to between-128 and 127 according to equation (1).
According to the encoding step 3), a and b are calculated, a random number matrix Z (p, q) is generated, and T (p, q) are calculated according to the equations (2) and (3), and fig. 3 shows the matrix T (p, q) after the encryption encoding.
In the encoding step 4), the phase angle r (p, q) is calculated from the equations (4) and (5).
According to the encoding step 5), T (p, q) is transmitted as a cryptogram to the receiver over a public channel, while r (p, q) and Z (p, q) are transmitted as keys to the receiver over a secure channel.
According to decoding step 1), a1(p, q) and b1(p, q) are calculated from the ciphertext T (p, q) and the keys r (p, q) and Z (p, q).
According to the decoding step 2), the image is restored and the gray value is adjusted, as shown in fig. 4, the decoded image.
Claims (1)
1. The gray level image encryption coding and decoding method based on pixel combination and complex number transformation is characterized in that: the method comprises the following steps:
the encryption coding comprises the following steps:
1) for a gray-scale image I (x, y) which is a real number at each pixel, x and y respectively represent the pixel coordinates of the image, the pixel size of the image is M × N, where M represents the number of rows of the image and N represents the number of columns of the image, if M is an odd number, then one row is added by a random number after M rows of the image, so that M is an even number, M1 is the number of rows subjected to padding, and if M is an odd number, then M1 is M; if M is an even number, M1 ═ M + 1;
2) the gray scale range of the gray image I (x, y) is 0 to P, and the gray value of each pixel is adjusted to be
I1(x,y)=I(x,y)-(P+1)/2, (1)
3) Let a (p, q) ═ I1(x, y), b (p, q) ═ I1(x, y +1+ M1/2), where x is from 1 to N, y is from 1 to M1/2, and p and q are the pixel coordinates of the encoded picture; generating a random number matrix Z with the same size as a, wherein the range of random numbers is-0.5 to 0.5; taking a (p, q) and b (p, q) as the real part and imaginary part of the complex number, and calculating
t(p,q)=sqrt[a(p,q)^2+b(p,q)^2], (2)
T(p,q)=t(p,q)+Z(p,q)*2*P, (3)
Wherein sqrt () represents the square operation, and ^2 represents the square operation;
4) determining the phase angle r (p, q) of the complex number according to the equations (4) and (5),
if b (p, q) >0, then r (p, q) ═ arccos [ a (p, q)/t (p, q) ], (4)
If b (p, q) ≦ 0, then r (p, q) ═ arccos [ a (p, q)/t (p, q) ] + π, (5)
5) Transmitting T (p, q) as a cipher text to a receiver through a public channel, and simultaneously transmitting r (p, q) as a key to the receiver through a secret channel;
at the receiving side, the decoding comprises the following steps:
1) decrypting based on the ciphertext T (p, q) and the key r (p, q),
a1(p,q)=cos[r(p,q)]*T(p,q), (6)
b1(p,q)=sin[r(p,q)]*T(p,q), (7)
2) the original image is restored to be the original image,
I2(x,y)=a1(p,q), (8)
I2(x,y+1+M1/2)=b1(p,q), (9)
and adjusting the gray value of I2(x, y) to be between 0 and P, wherein I2(x, y) is the decoded image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010977345.8A CN112188030B (en) | 2020-09-17 | 2020-09-17 | Gray level image encryption coding and decoding method based on pixel combination and complex number transformation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010977345.8A CN112188030B (en) | 2020-09-17 | 2020-09-17 | Gray level image encryption coding and decoding method based on pixel combination and complex number transformation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112188030A CN112188030A (en) | 2021-01-05 |
CN112188030B true CN112188030B (en) | 2022-08-05 |
Family
ID=73921383
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010977345.8A Active CN112188030B (en) | 2020-09-17 | 2020-09-17 | Gray level image encryption coding and decoding method based on pixel combination and complex number transformation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112188030B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113222829B (en) * | 2021-02-25 | 2023-04-25 | 安徽师范大学 | Bernstein-based digital image splitting method and image restoration method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109614808A (en) * | 2018-12-12 | 2019-04-12 | 苏州科技大学 | Gray level image encipher-decipher method based on linearity specifications transformation and gamma function |
CN110232284A (en) * | 2019-06-13 | 2019-09-13 | 首都师范大学 | A kind of image encryption method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070291855A1 (en) * | 2005-12-19 | 2007-12-20 | Zvi Reznic | Method, device and system of error-protection of a wireless video transmission |
-
2020
- 2020-09-17 CN CN202010977345.8A patent/CN112188030B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109614808A (en) * | 2018-12-12 | 2019-04-12 | 苏州科技大学 | Gray level image encipher-decipher method based on linearity specifications transformation and gamma function |
CN110232284A (en) * | 2019-06-13 | 2019-09-13 | 首都师范大学 | A kind of image encryption method and device |
Also Published As
Publication number | Publication date |
---|---|
CN112188030A (en) | 2021-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112637441A (en) | Color image compression encryption method based on compressed sensing | |
Guan et al. | An efficient high-capacity reversible data hiding scheme for encrypted images | |
Sheidaee et al. | A novel image steganography method based on DCT and LSB | |
Nyo et al. | Secure data transmission of video steganography using Arnold scrambling and DWT | |
Mo et al. | Reversible Data Hiding in Encrypted Image Based on Block Classification Permutation. | |
Singh | High PSNR based image steganography | |
CN112188030B (en) | Gray level image encryption coding and decoding method based on pixel combination and complex number transformation | |
Abdulkadhim et al. | Audio steganography based on least significant bits algorithm with 4D grid multi-wing hyper-chaotic system | |
Halagowda et al. | Image encryption method based on hybrid fractal-chaos algorithm | |
Ye et al. | Research on reversible image steganography of encrypted image based on image interpolation and difference histogram shift | |
Chang et al. | Sharing a verifiable secret image using two shadows | |
CN112188028B (en) | Method for encrypting, encoding and decoding color image by using spherical polar transformation | |
Hu et al. | On the cryptanalysis of a bit-level image chaotic encryption algorithm | |
Mulya et al. | Text steganography on digital video using discrete wavelet transform and cryptographic advanced encryption standard algorithm | |
Yalla et al. | GUI Implementation of Modified and Secure Image Steganography Using Least Significant Bit Substitution. | |
Blesswin et al. | An improved grayscale visual secret sharing scheme for visual information security | |
Rajput | An EVCS for Color Images with Real Size Image Recovery and Ideal Contrast Using Bit Plane Encoding | |
Hummady et al. | Enhancement of System Security by Using LSB and RSA Algorithms | |
Huang et al. | Dynamic embedding strategy of VQ-based information hiding approach | |
Shrivas et al. | Visual cryptography in the video using halftone technique | |
CN117896476B (en) | Multi-image encryption method based on variable parameter hyperchaotic system and compressed sensing | |
Wen et al. | Computer and Information Sciences | |
Amrutha et al. | Double Security to Colour Images with DCT based Watermarking and Chaos based Encryption | |
CN113486386B (en) | Double-image compression encryption method based on half-tensor compressed sensing | |
CN117978932A (en) | JPEG image parallelization compression and encryption domain fingerprint embedding and encryption method |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |