CN104348611B - Melt file in the camouflage encryption method of image - Google Patents
Melt file in the camouflage encryption method of image Download PDFInfo
- Publication number
- CN104348611B CN104348611B CN201310215112.4A CN201310215112A CN104348611B CN 104348611 B CN104348611 B CN 104348611B CN 201310215112 A CN201310215112 A CN 201310215112A CN 104348611 B CN104348611 B CN 104348611B
- Authority
- CN
- China
- Prior art keywords
- image
- color
- palette
- pixel
- shift register
- 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
Landscapes
- Editing Of Facsimile Originals (AREA)
- Image Processing (AREA)
Abstract
The present invention relates to a kind of files that melts in the camouflage encryption method of image, it successively includes: to the value of each color assignment 0 or 1 of untreated palette image, then by secret information be randomly-embedded in untreated palette image treated palette image, complete camouflage encryption.The present invention improves the camouflage of image concealing information, the safety of stability and information by image Camouflage Algorithm and accidental enciphering algorithm.
Description
[technical field]
The present invention relates to encryption methods, and in particular to melts file in the camouflage encryption method of image.
[background technique]
Now, with computer and Internet rapid development and become increasingly popular, the secrecy of data the aobvious important, logarithm
According to secure fashion can be realized by Encryption Algorithm, can also be realized by the steganography or camouflage of data.
For the purpose of information privacy, in information is transmitted or is stored, using cryptographic technique to the information of need for confidentiality into
Row processing, prevent treated information is from being understood or being interpreted by unauthorized person's (containing the illegal), this process is known as encrypting.?
In encryption process, the information of need for confidentiality is known as " plaintext ", and encrypted treated information is referred to as " ciphertext ".Encryption is
" plaintext " is become to the process of " ciphertext ";It is similar, the process that " ciphertext " becomes " plaintext " is referred to as and is decrypted.
The principle of feedback shift register formation sequence: a feedback shift register is by shift register and feedback function
Two parts composition, wherein shift register is a bit sequence.As shown in Figure 1, one is needed every time for n bit shift register,
All bitwise shift rights one in n bit shift register, the position of new left end then pass through according to other positions in n bit shift register
Feedback function, which calculates, to be obtained, and a position of shift register output is usually least significant bit.
Linear feedback shift register (LFSR) is a kind of simplest feedback shift register, and feedback function is deposit
Certain simple exclusive or in device, certain positions are also referred to as tap sequence.One n can be allowed using certain tap sequence
LFSR can generate 2 before repeatingnThe pseudo-random sequence of -1 bit length, the sequence of this output are just referred to as m-sequence, share
2n- 1 different internal state sequence.
As shown in Fig. 2, 4 linear feedback shift registers, the position of tap are set as the 1st and the 4th, (i.e. tap sequence
It sets its initial value 14) if being classified as 1111, totally 15 kinds of internal state sequences can be generated before repeating, therefore its period is
24-1.15 kinds of internal state sequences are as follows: (1) 1111, (2) 0111 (move to right one by initial value 1111, left end position 0 for b1 with
B4 exclusive or value, following each status switch are analogized), (3) 1011, (4) 0101, (5) 1010, (6) 1101, (7) 0110, (8)
0011, (9) 1001, (10) 0100, (11) 0010, (12) 0001, (13) 1000, (14) 1100, (15) 1110.
Color distance: bitmap images are made of pixel, and the corresponding vector of each pixel, this vector indicates the pixel
Color;If color c1=(r1, g1, b1), c2=(r2, g2, b2) defines the distance between two kinds of colors d, such as formula (1.1)
It indicates;
Wherein, r1, g1, b1, r2, g2, b2 indicate color component;Distance d can be used to measure two kinds of colors visually
Difference, the value of d is smaller, and the brightness for indicating two kinds of colors and vision difference are on the contrary then bigger with regard to smaller.
The structure of bitmap file: BMP image file is bitmap file, and bitmap, which refers to, is divided into grid, grid for entire image
The every bit of lattice is known as pixel, i.e. piece image is a series of dot matrix being made of pixels;Bmp file is substantially divided into four
Part, as shown in table 1.
Table 1
Best odd even distributes (optimum parity assignment, OPA) principle: by the color in bitmap palette
Two subsets are divided into, different subsets characterize different bits respectively, the smallest another with a certain color distance during camouflage
One color necessarily belongs to different subsets, that is to say, that when pixel primitive color represent information and the information to be embedded in not
Meanwhile primitive color need to be only changed to immediate color therewith.Therefore, very little is distorted caused by this secret writing, it is this
The method of dividing subset is referred to as " best ".
Palette image is image format common on internet, and therefore, the secret writing in palette image has weight
The practical significance wanted.The grey scale pixel value of palette image does not indicate color component directly, but represents a certain in palette
The call number of color.Therefore, carrying out secret writing using palette image has the uniqueness for being different from gray level image or true color image
Place.In common color image, each pixel is made of 24 bits, and R.G.B respectively accounts for 8 bits, and possible color is shared
224Kind;And the number of color occurred in the practical color image of a width is often much smaller than this value.For the ease of in transmission over networks,
Palette image often uses seldom color category (such as 256 colors) to show acceptable color vision effect.In palette image
In, for one index value of color assignment that each occurs, each pixel just corresponds to a color index value.If a width is mixed colours
Only occur 256 kinds of colors in plate image, then a color index number only needs 8 bits to indicate, so, stores needed for image
Space just greatly reduce.
[summary of the invention]
The invention solves first technical problem be to provide a kind of file that melts in the camouflage encryption method of image, improve
The camouflage of image concealing information, the safety of randomness and information.
Above-mentioned technical problem is achieved through the following technical solutions:
A kind of file that melts is in the camouflage encryption method of image, which comprises the following steps:
1) calculate in untreated palette image (to be embedded into the image of confidential information) every two different colours it
Between distance dij=| ci-cj|, wherein ciAnd cjIndicate different colors;I, j=0,1,2 ..., 255;i≠j;| | expression takes
Euclid norm, i.e., as formula (1.1) opens radical sign to the quadratic sum of the difference of three components;
2) by all distance dijBy sequence arrangement from small to large, the d of same sizeijBetween sequence can be random
It is fixed;
3) priming color set C is set as empty set, initial token set Pxy(x=0,1,2 ... 255;Y=0,1) it is empty set,
In, Px0For recording the color index number nearest with corresponding bitmap palette call number color, Px1For record with it is corresponding
The odd even characterization value of bitmap palette call number color;Successively select each d down in orderijDo following processing: if ci
And cjIt is all not belonging to C, then enables Pi1=0 and Pj1=1;IfAnd cj∈ C, enables Pi1=1-Pj1;If ci∈ C andThen
Enable Pj1=1-Pi1, then Pi0=j, Pj0=i;Update C=C ∪ { ci}∪{cj};
After step 3), each color ck(k=0,1,2 ..., 255) has the value P for being 0 or 1k1, set C packet
Containing all colors;
4) it is embedded in secret information: first sequentially by the unduplicated puppet of each bit of the file of required secrecy
A pixel in the mode of random walk and the untreated palette image establishes corresponding relationship, by corresponding relationship do with
Lower processing: if the corresponding P of pixel colorx1Be worth it is identical with the bit to be embedded in, just without modification;If it is different, then by the picture
The call number of the color of element is changed to Px0, i.e., it is and its immediate color the color change of the pixel;It show that treated to adjust
Colour table image;
5) when extracting secret information, referring initially to the Pxy of the step 1) step 3) palette image that calculates that treated, then
Corresponding relationship is established with the identical pseudorandom migration mode and the pixel in treated palette image, is then taken out pair
Answer the P of pixelx1Value.
The unduplicated pseudorandom migration, is realized using linear feedback shift register, specifically: pass through First Line
Property feedback shift register LFSR_1 generates all line numbers;Corresponding each line number generated, by the second linear feedback shift
Register LFSR_2 generates all row numbers to determine the position of embedding information.
In each row, the tap sequence of the second linear feedback shift register LFSR_2 is all different.
As seen from the above technical solution, the present invention improves image concealing by image Camouflage Algorithm and accidental enciphering algorithm
The safety of the camouflage of information, stability and information.
[Detailed description of the invention]
Fig. 1 is the application schematic diagram of linear feedback shift register;
Fig. 2 is the application schematic diagram of 4 linear feedback shift registers;
Fig. 3 is the specific implementation schematic diagram of unduplicated pseudorandom migration;
Fig. 4 is untreated 8 pcolors;
Fig. 5 is to carry out the picture after insertion encryption information to Fig. 4 through the invention.
[specific embodiment]
The file provided by the invention that melts in the camouflage encryption method of image, specifically includes the following steps:
1) calculate in untreated palette image (to be embedded into the image of confidential information) every two different colours it
Between distance dij=|ci-cj|, wherein ciAnd cjIndicate different colors;I, j=0,1,2 ..., 255;i≠j;| | expression takes
Euclid norm, i.e., as formula (1.1) opens radical sign to the quadratic sum of the difference of three components;
2) by all distance dijBy sequence arrangement from small to large, the d of same sizeijBetween sequence can be random
It is fixed;
3) priming color set C is set as empty set, initial token set Pxy(x=0,1,2 ... 255;Y=0,1) it is empty set,
In, Px0For recording the color index number nearest with corresponding bitmap palette call number color, Px1For record with it is corresponding
The odd even characterization value of bitmap palette call number color;Successively select each d down in orderijDo following processing: if ci
And cjIt is all not belonging to C, then enables Pi1=0 and Pj1=1;IfAnd cj∈ C, enables Pi1=1-Pj1;If ci∈ C andThen
Enable Pj1=1-Pi1, then Pi0=j, Pj0=i;Update C=C ∪ { ci}∪{cj};
After step 3), each color ck(k=0,1,2 ..., 255) has the value P for being 0 or 1k1, set C packet
Containing all colors;
4) it is embedded in secret information: first sequentially by the unduplicated pseudorandom of each bit of required secrecy
A pixel in the mode of migration and the untreated palette image establishes corresponding relationship, does following place by corresponding relationship
Reason: if the corresponding P of pixel colorx1Be worth it is identical with the bit to be embedded in, just without modification;If it is different, then by the pixel
The call number of color is changed to Px0, i.e., it is and its immediate color the color change of the pixel;The palette that show that treated
Image;It can be seen that it is maximum to pixel change also only be adjusted in most similar color, untreated palette image with
Difference between treated palette image is with regard to smaller, it is ensured that good concealment;
5) when extracting secret information, referring initially to the P of step 1)-step 3) palette image that calculates that treatedxy, (i.e.
The step 1)-step 3) handled untreated palette image is handled " treated palette image ") and then use phase
With the pseudorandom migration mode establish corresponding relationship with the pixel in treated palette image, then take out corresponding picture
The P of elementx1Value.
As shown in figure 3, the unduplicated pseudorandom migration, is realized using linear feedback shift register, specifically:
All line numbers are generated (i.e. using the first linear feedback shift register by the first linear feedback shift register LFSR_1
LFSR_1 determines the processing sequence of row);Corresponding each line number generated, is produced by the second linear feedback shift register LFSR_2
Raw all row numbers (determining the processing sequence arranged in every a line using the second linear feedback shift register LFSR_1) are come really
Determine the position of embedding information;In each row, the tap sequence of the second linear feedback shift register LFSR_2 is all different, with true
The column sequence protected in every a line is all different, and discreteness or the randomness for improving embedding data are more preferable, add to improve
Close intensity.By taking 256 × 256 pictures as an example, each pixel embedding information, the first linear feedback shift register needs 8
Bit is initialized, and the second linear feedback shift register needs 8 bits to carry out when carrying out information loading in each row
Initialization, due to totally 256 row, 8+256 × 8 bit is needed to carry out LFSR initialization in total.
As shown in Figure 4 and Figure 5, it is proved by test, using the above camouflage processed coloured picture of Encryption Algorithm, (secret writing rate is
97.7%) almost without visual impact compared with original image.
The present invention is not limited to the above embodiment, based on the above embodiment, the simple replacement of not making creative work,
Should belong to the invention discloses range.
Claims (2)
1. a kind of file that melts is in the camouflage encryption method of image, which comprises the following steps:
1) it calculates in untreated palette image (to be embedded into the image of confidential information) between every two different colours
Distance dij=| ci-cj|, wherein ciAnd cjIndicate different colors;I, j=0,1,2 ..., 255;i≠j;| | expression takes Europe several
In norm;
2) by all distance dijBy sequence arrangement from small to large, the d of same sizeijBetween sequence can arbitrarily determine;
3) priming color set C is set as empty set, initial token set PxyFor empty set, wherein Px0For recording and corresponding bitmap
The nearest color index number of palette call number color, Px1For recording and the odd even of corresponding bitmap palette call number color
Characterization value;Successively select each d down in orderijDo following processing: if ciAnd cjIt is all not belonging to C, then enables Pi1=0 and Pj1
=1;IfAnd cj∈ C, enables Pi1=1-Pj1;If ci∈ C andThen enable Pj1=1-Pi1, then Pi0=j, Pj0=i;
Update C=C ∪ { ci}∪{cj};
After step 3), each color ckThere is the value P for being 0 or 1k1, set C includes all colors;
4) it is embedded in secret information: first sequentially by the unduplicated pseudorandom of each bit of the file of required secrecy
A pixel in the mode of migration and the untreated palette image establishes corresponding relationship, does following place by corresponding relationship
Reason: if the corresponding P of pixel colorx1Be worth it is identical with the bit to be embedded in, just without modification;If it is different, then by the pixel
The call number of color is changed to Px0, i.e., it is and its immediate color the color change of the pixel;The palette that show that treated
Image;The unduplicated pseudorandom migration, is realized using linear feedback shift register, specifically: it is linear by first
Feedback shift register LFSR_1 generates all line numbers;Corresponding each line number generated, is posted by the second linear feedback shift
Storage LFSR_2 generates all row numbers to determine the position of embedding information;In each row, the second linear feedback shift register
The tap sequence of device LFSR_2 is all different;
5) when extracting secret information, referring initially to the P of step 1)-step 3) palette image that calculates that treatedxy, then use phase
With the pseudorandom migration mode establish corresponding relationship with the pixel in treated palette image, then take out corresponding picture
The P of elementx1Value.
2. the file according to claim 1 that melts is in the camouflage encryption method of image, which is characterized in that the initial table collection
Close PxyIn x value range are as follows: x=0,1,2 ..., 255;Y value range are as follows: y=0,1;The color ckIn k value model
It encloses are as follows: k=0,1,2 ..., 255.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310215112.4A CN104348611B (en) | 2013-08-06 | 2013-08-06 | Melt file in the camouflage encryption method of image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310215112.4A CN104348611B (en) | 2013-08-06 | 2013-08-06 | Melt file in the camouflage encryption method of image |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104348611A CN104348611A (en) | 2015-02-11 |
CN104348611B true CN104348611B (en) | 2018-12-28 |
Family
ID=52503496
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310215112.4A Active CN104348611B (en) | 2013-08-06 | 2013-08-06 | Melt file in the camouflage encryption method of image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104348611B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106357385A (en) * | 2016-08-31 | 2017-01-25 | 北海市蕴芯电子科技有限公司 | Encryption method and encryption device |
CN109446827B (en) * | 2018-11-01 | 2020-09-29 | 东莞华贝电子科技有限公司 | Data encryption and decryption method and system |
CN110417551B (en) * | 2019-08-02 | 2022-03-01 | 陕西师范大学 | Character and picture generation type camouflage and recovery method combined with error diffusion |
CN111814160B (en) * | 2020-06-17 | 2023-11-21 | 上海健康医学院 | Ciphertext domain reversible information hiding system and method for DICOM file |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102609889A (en) * | 2011-01-20 | 2012-07-25 | 北京中盈信安科技发展有限责任公司 | Image digital watermark embedding method and image digital watermark detecting method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9825761B2 (en) * | 2010-04-06 | 2017-11-21 | King Saud University | Systems and methods improving cryptosystems with biometrics |
-
2013
- 2013-08-06 CN CN201310215112.4A patent/CN104348611B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102609889A (en) * | 2011-01-20 | 2012-07-25 | 北京中盈信安科技发展有限责任公司 | Image digital watermark embedding method and image digital watermark detecting method |
Non-Patent Citations (3)
Title |
---|
一种改进型的OPA密写算法;符强等;《计算机工程与应用》;20100421;第46卷(第12期);第103页-105页 * |
基于m序列的图像置乱技术;张鹏等;《苏州大学学报》;20080229;第28卷(第1期);第70页-72页 * |
基于距离和的隐写分析;刘祖根等;《中国图象图形学报》;20090228;第2卷(第2期);第267页-274页 * |
Also Published As
Publication number | Publication date |
---|---|
CN104348611A (en) | 2015-02-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Xu et al. | A novel bit-level image encryption algorithm based on chaotic maps | |
Zhou et al. | A novel image encryption algorithm based on chaos and Line map | |
Wu et al. | Design of image cipher using latin squares | |
CN106910156B (en) | A kind of New chaotic image encryption method with plaintext association key stream generting machanism | |
Kumar et al. | An RGB image encryption using diffusion process associated with chaotic map | |
CN105631796B (en) | Quantum chaos image encryption method based on bit scramble | |
Jolfaei et al. | Survey: image encryption using Salsa20 | |
RU2374770C1 (en) | Method for steganographical cloaking of information | |
CN108319859A (en) | A kind of grade synchronizes scramble diffusion and Pixel-level annular diffusion image encryption method | |
CN104348611B (en) | Melt file in the camouflage encryption method of image | |
Hanif et al. | A novel and efficient multiple RGB images cipher based on chaotic system and circular shift operations | |
CN107633474B (en) | A kind of chaos color image encrypting method with fast key stream generating process | |
Ramírez-Torres et al. | Image encryption with an improved cryptosystem based on a matrix approach | |
Chen et al. | CIE-LSCP: color image encryption scheme based on the lifting scheme and cross-component permutation | |
Ye | A novel image encryption scheme based on generalized multi-sawtooth maps | |
Ahadpour et al. | A chaos-based image encryption scheme using chaotic coupled map lattices | |
Ganesan et al. | Image encryption using eight dimensional chaotic cat map | |
Patanwadia et al. | Divide and Scramble-A Recursive Image Scrambling algorithm utilizing Rubik's Cube | |
He et al. | A method for image encryption based on fractional-order hyperchaotic systems | |
Ramesh et al. | Hybrid image encryption using pseudo random number generators, and transposition and substitution techniques | |
Jasem et al. | Multiple random keys for image encryption based on sensitivity of a new 6D chaotic system | |
Ye et al. | An efficient chaos-based image encryption scheme using affine modular maps | |
Cheng et al. | Novel One‐Dimensional Chaotic System and Its Application in Image Encryption | |
Brindha | Periodicity analysis of Arnold Cat Map and its application to image encryption | |
Abraham et al. | An improved color image encryption algorithm with Pixel permutation and bit substitution |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 519000, Zhuhai, Guangdong Province before the hill Fu River GEIL Tatsu building Patentee after: JINBANGDA Co.,Ltd. Address before: 519000, Zhuhai, Guangdong Province before the hill Fu River GEIL Tatsu building Patentee before: ZHUHAI GOLDPAC CONFIDENTAL CARD Co.,Ltd. |