CN115314603A - Bit encryption coding and decoding method for digital image - Google Patents
Bit encryption coding and decoding method for digital image Download PDFInfo
- Publication number
- CN115314603A CN115314603A CN202210952115.5A CN202210952115A CN115314603A CN 115314603 A CN115314603 A CN 115314603A CN 202210952115 A CN202210952115 A CN 202210952115A CN 115314603 A CN115314603 A CN 115314603A
- Authority
- CN
- China
- Prior art keywords
- image
- bit
- matrix
- encryption
- nxor
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 21
- 239000011159 matrix material Substances 0.000 claims abstract description 37
- 238000005516 engineering process Methods 0.000 abstract description 4
- 230000009466 transformation Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
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/44—Secrecy systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- 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/184—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 bits, e.g. of the compressed video stream
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Pure & Applied Mathematics (AREA)
- Software Systems (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computational Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Bioethics (AREA)
- Computer Hardware Design (AREA)
- Algebra (AREA)
- Computer Security & Cryptography (AREA)
- Databases & Information Systems (AREA)
- Facsimile Transmission Control (AREA)
Abstract
The invention discloses a bit-level encryption coding and decoding method for a digital image, belonging to the field of image coding and decoding. The technical scheme of the invention is that the gray value of a digital image is decomposed into a single bit matrix group, then pixel-by-pixel and bit-by-bit encryption is carried out according to a randomly generated key matrix, and the bit matrix group after encryption is recombined into a ciphertext image which is transmitted to a receiver through a public channel. And the corresponding key matrix and encryption flag matrix are transmitted over the secure channel. The method has the advantages that the key length is short, the occupation of secret channel resources is reduced, the encryption process is fast, and the encryption result can resist a general password attack technology.
Description
Technical Field
The invention relates to an image coding and decoding method, in particular to a bit-level encryption coding and decoding method for a digital image.
Background
Today, with the rapid development of internet technology and digital storage technology, digital images are playing an extremely important role in various industries as a carrier for recording, storing and transmitting information. In many application scenarios, the content of a digital image contains confidential information, which unauthorized users cannot view. In this case, it is necessary to encrypt and encode the digital image content to ensure the security of the content. Therefore, image encryption and encoding methods have recently received much attention from professionals in this field. The basic goal of this technique is to transform a meaningful digital image into a meaningless noisy image by some coding method, with no correlation between the content of the noisy image and the original image. In order to implement encryption coding of an image, techniques such as randomization of phases in a spatial domain and a frequency domain through integral transformation, pixel position scrambling, image matrix decomposition, and the like have been proposed. However, the encryption method based on transformation is easy to be attacked, the length of the key is long, and the resources of the encryption channel are occupied more during transmission.
In order to compress the key length and improve the coding speed, the invention provides a bit-level encryption coding and decoding method for digital images. The method is based on Boolean algebra and binomial random distribution, the encoding process is not linear transformation, and cannot be attacked by a phase recovery algorithm, and the safety is improved.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a bit-level encryption coding and decoding method for a digital image. 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 an image I (x, y), where x and y represent pixel coordinates, the number of bits of the image is B, and the pixel size of the image is M x N, where M represents the number of columns of the image and N represents the number of rows of the image.
2. According to the bit number B of the image I, the image is decomposed into a single bit matrix group { IP [1], IP [2], …, IP [ B }, wherein the element with the small sequence number represents the low bit and the element with the large sequence number represents the high bit.
3. A binary digital matrix R (x, y) is randomly generated, the size of which corresponds to the image I.
4. x is 1 to M, y is 1 to N, all elements of the matrix are traversed, and encryption operation is carried out point by point: generating a random number t between 0 and 1, and calculating
Wherein B is taken from 1 to B; when T (·) = xor () when T takes a value of a certain interval, and T (·) = nxor () when T takes other values, xor () denotes bit exclusive or, and nxor () denotes bit exclusive or; information of the pixel operated by xor or nxor is recorded to an operator flag matrix K (x, y).
5. Calculating a ciphertext image Ie (x, y) according to equation (2),
6. transmitting the random matrix R (x, y) and the operator identifier matrix K (x, y) to a receiver through a secure channel; and transmits the ciphertext image Ie (x, y) to the recipient over the common channel.
7. The receiving side decomposes the received ciphertext image Ie (x, y) into a single-bit matrix set { IeP [1], ieP [2], …, ieP [ B ] }, where elements with small sequence numbers represent low-bit bits and elements with large sequence numbers represent high-bit bits.
8. x is 1 to M, y is 1 to N, all elements of the matrix are traversed, decryption operation is carried out point by point, bit information is restored according to the random matrix R (x, y) and the formula (3), and the bit information is obtained
Determining T (·) according to an agreed rule and an operator mark matrix K (x, y), and taking xor (·) or nxor (); b is taken from 1 to B.
9. The receiving side calculates a restored plaintext image Id (x, y) according to equation (4),
compared with the prior art, the invention has the beneficial effects that: the method provided by the invention can compress the length of the ciphertext and reduce the occupation of the secret channel resources. Meanwhile, the method consumes less computing resources in the encryption process, has high encryption speed and can resist the known general attack technology.
Drawings
The invention is further described below with reference to the accompanying drawings.
FIG. 1 is a flow chart of image encryption encoding and decoding according to the present invention.
Fig. 2 is a test gray-scale image I (x, y) used in an embodiment of the present invention.
Fig. 3 shows a binary digit matrix R (x, y) according to an embodiment of the invention.
Fig. 4 is a ciphertext image Ie (x, y) according to an embodiment of the present invention.
Fig. 5 is a decoded digital image Id (x, y) 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):
as shown in fig. 1, the encryption encoding includes the following steps:
1. a gray scale image I (x, y) is selected, the number of bits of the image is 8, and the pixel size of the image is 480 × 500, where 480 represents the number of columns of the image and 500 represents the number of rows of the image, as shown in fig. 2.
2. According to the bit number 8 of the image I, the image is decomposed into a single bit matrix group { IP [1], IP [2], …, IP [8 }, wherein the element with the small sequence number represents the low bit and the element with the large sequence number represents the high bit.
3. A binary digital matrix R (x, y) is randomly generated, the size of which corresponds to the image I, as shown in fig. 3.
4. x is 1 to 480, y is 1 to 500, all elements of the matrix are traversed, and the encryption operation is carried out point by point: generating a random number t between 0 and 1, and calculating
Wherein b is taken from 1 to 8; determining the form of T () according to equation (6)
And recording the information of the pixel operated by xor or nxor to an operator mark matrix K (x, y).
5. Calculating a ciphertext image Ie (x, y) according to equation (7),
6. transmitting the random matrix R (x, y) and the operator identifier matrix K (x, y) to a receiver through a secure channel; and transmits the ciphertext image Ie (x, y) to the recipient over the common channel.
7. The receiving side decomposes the received ciphertext image Ie (x, y) into a single-bit matrix set { IeP [1], ieP [2], …, ieP [8] }, where elements with small sequence numbers represent low-bit bits and elements with large sequence numbers represent high-bit bits.
8. x is 1 to 480, y is 1 to 500, all elements of the matrix are traversed, decryption operation is carried out point by point, bit information is restored according to the random matrix R (x, y) and the formula (3), and the bit information is obtained
Determining T (·) according to an agreed rule and an operator mark matrix K (x, y), and taking xor (·) or nxor (); b is taken from 1 to 8.
9. The receiving side calculates the restored plaintext image Id (x, y) according to equation (7).
Claims (1)
1. A bit-level encryption encoding and decoding method for digital images, characterized by: the method comprises the following steps:
1) For an image I (x, y), where x and y represent pixel coordinates, the number of bits of the image is B, and the pixel size of the image is M × N, where M represents the number of columns of the image and N represents the number of rows of the image;
2) According to bit number B of image I, decomposing the image into single bit matrix group { IP [1], IP [2], …, IP [ B ] }, wherein the element with small sequence number represents low bit, the element with large sequence number represents high bit;
3) Randomly generating a binary digital matrix R (x, y) whose size is consistent with the image I;
4) x is 1 to M, y is 1 to N, all elements of the matrix are traversed, and encryption operation is carried out point by point: generating a random number t between 0 and 1, and calculating
Wherein B is taken from 1 to B; when T (·) = xor () when T takes a value of a certain interval, and T (·) = nxor () when T takes other values, xor () denotes bit exclusive or, and nxor () denotes bit exclusive or; recording information of the pixel operated by xor or nxor to an operator mark matrix K (x, y);
5) Calculating a ciphertext image Ie (x, y) according to equation (2),
6) Transmitting the random matrix R (x, y) and the operator identifier matrix K (x, y) to a receiver through a secure channel; and transmitting the ciphertext image Ie (x, y) to a receiver through a public channel;
7) The receiving side decomposes the received ciphertext image Ie (x, y) into a single-bit matrix group { IeP [1], ieP [2], …, ieP [ B ] }, wherein elements with small sequence numbers represent low bits, and elements with large sequence numbers represent high bits;
8) x is 1 to M, y is 1 to N, all elements of the matrix are traversed, decryption operation is carried out point by point, and bit information is restored according to the random matrix R (x, y) and the formula (3) to obtain
Determining T (·) according to an agreed rule and an operator mark matrix K (x, y), and taking xor (·) or nxor (); b, taking B from 1;
9) The receiving side calculates a restored plaintext image Id (x, y) according to equation (4),
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210952115.5A CN115314603A (en) | 2022-08-10 | 2022-08-10 | Bit encryption coding and decoding method for digital image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210952115.5A CN115314603A (en) | 2022-08-10 | 2022-08-10 | Bit encryption coding and decoding method for digital image |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115314603A true CN115314603A (en) | 2022-11-08 |
Family
ID=83860537
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210952115.5A Pending CN115314603A (en) | 2022-08-10 | 2022-08-10 | Bit encryption coding and decoding method for digital image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115314603A (en) |
-
2022
- 2022-08-10 CN CN202210952115.5A patent/CN115314603A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Tang et al. | Image encryption with double spiral scans and chaotic maps | |
Lin et al. | An image encryption scheme based on Lorenz hyperchaotic system and RSA algorithm | |
Alexan et al. | A comparative study among different mathematical sequences in 3d image steganography | |
Ahmed et al. | A noisy channel tolerant image encryption scheme | |
Subramanyan et al. | Image encryption based on AES key expansion | |
CN109547663B (en) | Improved LSB image steganography method combined with cryptography | |
Gao et al. | A novel quantum image encryption technique based on improved controlled alternated quantum walks and hyperchaotic system | |
Rachmawanto et al. | A comparative study of image cryptographic method | |
CN1518269A (en) | Data enciphering equipment and method | |
CN114157772B (en) | Digital image encryption method based on space-time chaotic system and half tensor product compressed sensing | |
CN115412229A (en) | Image encryption coding and decoding method based on random sequence and bit XOR operation | |
JP4025283B2 (en) | Code embedding method, identification information restoring method and apparatus | |
CN113114869A (en) | Ciphertext domain high-capacity image reversible data hiding method based on MSB prediction | |
Sharma et al. | A new image encryption using modified aes algorithm and its comparision with aes | |
CN114401351A (en) | Image encryption and decryption method based on novel two-dimensional fractional order chaotic mapping | |
Banupriya et al. | Video steganography using LSB algorithm for security application | |
CN117527984A (en) | Image encryption method based on sine and cosine two-dimensional chaotic system | |
Alhassan et al. | Enhancing image security during transmission using residue number system and k-shuffle | |
CN109559269B (en) | Image encryption method and terminal | |
CN115208549A (en) | JPEG image reversible information hiding method and system based on Paillier homomorphic encryption | |
CN115314603A (en) | Bit encryption coding and decoding method for digital image | |
Kanshi et al. | Hybridized Cryptographic Encryption and Decryption Using Advanced Encryption Standard and Data Encryption Standard | |
CN115643015A (en) | Digital watermark tracing method | |
Satish et al. | Multimedia Multilevel Security by Integrating Steganography and Cryptography Techniques | |
Mondal et al. | A multi-stage encryption technique to enhance the secrecy of image |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20221108 |
|
WD01 | Invention patent application deemed withdrawn after publication |