[go: up one dir, main page]

CN109784454A - A kind of information concealing method based on two dimensional code, device and electronic equipment - Google Patents

A kind of information concealing method based on two dimensional code, device and electronic equipment Download PDF

Info

Publication number
CN109784454A
CN109784454A CN201910041349.2A CN201910041349A CN109784454A CN 109784454 A CN109784454 A CN 109784454A CN 201910041349 A CN201910041349 A CN 201910041349A CN 109784454 A CN109784454 A CN 109784454A
Authority
CN
China
Prior art keywords
information
color
data
module
dimensional code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910041349.2A
Other languages
Chinese (zh)
Inventor
王诗会
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201910041349.2A priority Critical patent/CN109784454A/en
Publication of CN109784454A publication Critical patent/CN109784454A/en
Pending legal-status Critical Current

Links

Landscapes

  • Editing Of Facsimile Originals (AREA)

Abstract

The present embodiments relate to field of information security technology, and in particular to a kind of information concealing method based on two dimensional code, device and electronic equipment.The information concealing method includes: to obtain information to be concealed, includes cryptographic information in the information to be concealed;The pre-selection data module in the first two dimensional code is modulated according to preset data module color modulation rule according to information to be concealed, to obtain the second two dimensional code containing cryptographic information and cleartext information simultaneously;First two dimensional code is the two dimensional code generated according to the cleartext information, and preparatory data module is the module chosen from first two dimensional code according to the data volume of cryptographic information;Wherein, the recognizer that the cryptographic information in second two dimensional code can be predetermined is identified according to preset data module color modulation rule.Advantage of the embodiment of the present invention: will not be suspect to be special two dimensional code, to will not cause attacker's note that avoid the possibility attacked from source.

Description

Information hiding method and device based on two-dimensional code and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of information security, in particular to an information hiding method and device based on two-dimensional codes and electronic equipment.
Background
At present, the two-dimension code technology becomes the most important hotspot technology for the development of technologies and applications such as automatic identification technology, commodity identification, mobile marketing, product tracing and the like. The two-dimensional code technology, especially the matrix type two-dimensional code represented by Chinese-sensible code and QR code, is a special structural graph essentially, the graph distinguishes the two-dimensional code from other two-dimensional codes, and the two-dimensional code is composed of a characteristic graph framework with macroscopic characteristics and a data module sequence or combination distributed in the graph framework and having a specific information arrangement mode and code definition. The data acquisition mode of the two-dimensional code is acquired by an image acquisition device such as a camera, acquired images are analyzed and processed, and characteristic graphs of the two-dimensional code are searched in the images, so that basic information such as the position and orientation of the images of the two-dimensional code is acquired by detection, and an information coding matrix in the two-dimensional code is acquired by utilizing an information arrangement mode defined in a two-dimensional code standard from a graph framework of the two-dimensional code.
With the wide application of the two-dimensional code, particularly the rapid maturity and large-scale application of the application mode of the novel two-dimensional code technology, in which the two-dimensional code is directly related to consumers in goods, mobile marketing, advertisements and the like, information can be directly acquired through a network, new challenges are brought to the two-dimensional code technology, namely how to judge whether the two-dimensional code is sent by an authorized party, namely, a true two-dimensional code. The two-dimension code systems such as Chinese-sensible code, QR code and the like are generally defined in detail by the code system standard in the processes of generation and reading, and generally, the related information becomes unreadable by adopting information security strategies such as encryption, signature addition and the like, so that the two-dimension code is exposed to be a special two-dimension code, and guidance is provided for an unauthorized party to break through the security strategy.
Disclosure of Invention
Therefore, the embodiment of the invention provides an information hiding method and device based on a two-dimension code and an electronic device, so as to solve the problem that a special two-dimension code is easy to break in the prior art.
In order to achieve the above object, an embodiment of the present invention provides the following:
in a first aspect of embodiments of the present invention, there is provided an information hiding method based on a two-dimensional code, the information hiding method including: acquiring information to be hidden, wherein the information to be hidden comprises hidden information; modulating a preselected data module in the first two-dimensional code according to the information to be hidden and a preset data module color modulation rule to obtain a second two-dimensional code simultaneously containing the hidden information and the plaintext information; the first two-dimensional code is a two-dimensional code generated according to the plaintext information, and the pre-data module is a module selected from the first two-dimensional code according to the data volume of the plaintext information; and the hidden information in the second two-dimensional code can be identified by a preset identifier according to a preset data module color modulation rule.
In one embodiment of the invention, the preselected data module comprises a continuous black module or a continuous white module; the continuous black module is composed of at least two black data modules which are sequentially connected, and the continuous white module is composed of at least two white data modules which are sequentially connected.
In one embodiment of the present invention, when the preliminary data block includes a continuous black block, the preset data block color modulation rule includes: modulating the color of one or more black data modules in the continuous black module, wherein the color difference between the color of the modulated data module and the color of the black data module before modulation is less than or equal to a first threshold value; when the preliminary data block includes a continuous white block, the preset data block color modulation rule includes: and modulating the color of one or more white data modules in the continuous white modules, wherein the color difference between the color of the modulated data module and the color of the white data module before modulation is less than or equal to a second threshold value.
In one embodiment of the invention, the preselected data block comprises a plurality of non-adjacent black data blocks or a plurality of non-adjacent white data blocks.
In an embodiment of the present invention, when the pre-data module includes a plurality of non-adjacent black data modules, the preset data module color modulation rule includes: modulating the color of one or more black data modules in the plurality of nonadjacent black data modules, wherein the color difference between the color of the modulated data module and the color of the black data module before modulation is less than or equal to a first threshold value; when the pre-data module includes a plurality of non-adjacent white data modules, the preset data module color modulation rule includes: and modulating the color of one or more white data modules in the plurality of non-adjacent white data modules, wherein the color difference between the color of the modulated data module and the color of the white data module before modulation is less than or equal to a second threshold value.
In one embodiment of the invention, the first threshold and the second threshold are color difference values associated with the printing system;
the modulating colors of one or more of the consecutive black modules comprises: replacing the black of one or more black data modules in the continuous black module by one CMY printing primary color or printing spot color, or respectively replacing the black of a plurality of black data modules in the continuous black module by a plurality of CMY printing primary colors or printing spot colors; or,
the modulating colors of one or more of the consecutive white modules comprises: adding one or more CMY printing process colors or printing spot colors to the white color of one or more white data modules in the continuous white module, or adding a plurality of CMY printing process colors or printing spot colors to the white color of one or more white data modules in the continuous white module respectively; or,
the modulating the color of one or more of the plurality of non-adjacent black data blocks comprises: replacing the black of one or more black data modules in the plurality of non-adjacent black data modules by one CMY printing primary color or printing spot color, or replacing the black of a plurality of black data modules in the plurality of non-adjacent black data modules by a plurality of CMY printing primary colors or printing spot colors respectively; or,
the modulating the color of one or more of the plurality of non-adjacent white data blocks comprises: one or more CMY process colors or print spot colors are added to the white color of one or more of the plurality of non-adjacent white data blocks, or the plurality of CMY process colors or print spot colors are added to the white color of one or more of the plurality of non-adjacent white data blocks, respectively.
In an embodiment of the present invention, the preset data module color modulation rule includes: according to (0) in the coding information corresponding to the cryptograph informationbinOr (1)binAnd modulating the pre-selection data module.
In an embodiment of the present invention, the information to be hidden further includes additional check information or error correction information generated according to the hidden information, and the additional check information or error correction information is used to provide check and error correction information protection for the hidden information.
In a second aspect of embodiments of the present invention, there is provided an information hiding apparatus based on a two-dimensional code, the information hiding apparatus including: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring information to be hidden, and the information to be hidden comprises hidden information; the modulation unit is used for modulating a preselected data module in the first two-dimensional code according to the information to be hidden and a preset data module color modulation rule so as to obtain a second two-dimensional code simultaneously containing the ciphertext information and the plaintext information; the first two-dimensional code is a two-dimensional code generated according to the plaintext information, and the pre-data module is a module selected from the first two-dimensional code according to the data volume of the plaintext information; and the hidden information in the second two-dimensional code can be identified by a preset identifier according to a preset data module color modulation rule.
In a third aspect of embodiments of the present invention, there is provided an electronic apparatus comprising: a processor, a memory; the memory stores code; the processor executes the code for performing the information hiding method of the first aspect.
In a fourth aspect of embodiments of the present invention, there is provided a computer-readable storage medium storing a program, the program including instructions that, when executed by a computer, cause the computer to perform the information hiding method of the first aspect.
According to the embodiment of the invention, the two-dimensional code-based information hiding method, the two-dimensional code-based information hiding device and the electronic equipment provided by the embodiment of the invention have the following advantages: the two-dimensional code containing the hidden information also contains the plaintext information, and a non-specific recognizer can recognize the plaintext information in the hidden information, so that the two-dimensional code is still a normal two-dimensional code on the surface and is not suspected to be a special two-dimensional code, the attention of an attacker cannot be attracted, and the possibility of being attacked is avoided from the source.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the drawings in the following description are merely exemplary, and that other embodiments can be derived from the drawings provided by those of ordinary skill in the art without inventive effort.
Fig. 1 is a flowchart of an information hiding method based on two-dimensional codes according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an information hiding device based on a two-dimensional code according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to another embodiment of the present invention.
In the figure: 21. an obtaining unit, 22, a modulation unit, 31, a processor, 32, a memory.
Detailed Description
The present invention is described in terms of particular embodiments, other advantages and features of the invention will become apparent to those skilled in the art from the following disclosure, and it is to be understood that the described embodiments are merely exemplary of the invention and that it is not intended to limit the invention to the particular embodiments disclosed. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention adopts an information security strategy completely different from the prior art, is suitable for various two-dimensional codes such as Hanxin codes and the like, increases visible or invisible color disturbance by changing the color of a selected data module in the two-dimensional codes, and superposes and stores the hidden information in the data module with the color disturbance, wherein the color disturbance generally does not attract attention or is similar to printing errors, so that people can not consider the two-dimensional codes to be special two-dimensional codes.
Next, the information hiding method based on the two-dimensional code provided by the present invention is specifically described.
Example 1
The embodiment provides an information hiding method based on a two-dimensional code, and an execution main body of the information hiding method can be an electronic device with computing and processing capabilities. As shown in fig. 1, the information hiding method includes the following steps.
And step 11, obtaining information to be hidden, wherein the information to be hidden comprises hidden information.
The hidden information is information that the user wants to hide, for example, information for proving that the two-dimensional code is a two-dimensional code sent by an authorized party.
Step 12, modulating a preselected data module in the first two-dimensional code according to the information to be hidden and a preset data module color modulation rule to obtain a second two-dimensional code simultaneously containing the ciphertext information and the plaintext information; the first two-dimensional code is a two-dimensional code generated according to the plaintext information, and the pre-data module is a module selected from the first two-dimensional code according to the data volume of the plaintext information.
The hidden message in the second two-dimensional code can be identified by a preset identifier according to a preset data module color modulation rule.
The preset data module color modulation rule is a preset modulation rule, and after the data module in the existing two-dimensional code containing the plaintext information is modulated according to the rule, the plaintext information is modulated into the two-dimensional code under the condition of not influencing the recognition of the plaintext information.
The hidden information may be stored in a selected region in a map of the two-dimensional code according to the data amount of the hidden information. The visible or invisible disturbance can be increased through the color characteristics of the data module or the specific functional graph in the selected area, and the digital information corresponding to the hidden information is stored in the two-dimensional code in an overlapping mode. The data module in the foregoing refers to a module in a two-dimensional code map, and in this embodiment, the data module is divided into a black data module and a white data module, and arrangement and combination between different black data modules and different white data modules are used to represent information represented by a two-dimensional code.
The data module refers to an independent data module, and the specific functional graph refers to a two-dimensional code characteristic graph formed by two or more connected non-data modules. That is, in the present embodiment, the preselected data block may include a continuous black block or a continuous white block; the continuous black module is composed of at least two black data modules which are sequentially connected, and the continuous white module is composed of at least two white data modules which are sequentially connected. The preselected data block may also include a plurality of non-adjacent black data blocks or a plurality of non-adjacent white data blocks.
In this embodiment, the difference between the addition of color disturbance and the conventional image information hiding technique is that color disturbance is performed in units of data blocks or data block combinations, and the data blocks related to the hidden information are visible to the naked eye. The color trimming of a data module or a combination of data modules in this embodiment is very similar to a printing error (or a specific printing error can be intentionally introduced), and it is difficult for a counterfeiter (attacker) to notice the existence of the disturbance, or even if the existence of the disturbance is noticed, the printing error or the beautification is considered to be involved, and the related disturbance is not considered to bear information, so that the possibility of being attacked is fundamentally avoided.
When the pre-data module comprises a continuous black module, the preset data module color modulation rule comprises: and modulating the color of one or more black data modules in the continuous black module, wherein the color difference between the color of the modulated data module and the color of the black data module before modulation is less than or equal to a first threshold value.
The first threshold is a preset threshold. When the color difference between the color of the modulated black data module and the color of the black data module before modulation is less than or equal to a first threshold value, the color of the modulated black data module is similar to the color of the black data module before modulation, and the modulated black data module can be identified as the black data module before modulation by the universal identifier, so that the common identifier can only identify plaintext information. However, the black data module after modulation and the black data module before modulation can be distinguished by the high-resolution identification device, that is, the black data module after modulation can be identified by the high-resolution identification device. Therefore, in this embodiment, a dedicated reader is provided, which belongs to a high resolution identification device in terms of hardware, and the dedicated reader further sets a preset data module color modulation rule, so that after the modulated data module is identified, the ciphertext information represented by the modulated data module can be decoded according to the preset data module color modulation rule.
The first threshold value can be a color difference value matched with a printing system, the specific value of the first threshold value can be determined according to experience or experiments, a plurality of different CMY printing primary colors or symbols modulated by printing spot colors can be prepared, visual effects (attractive and unobtrusive), recognition effects (such as high recognition speed) and detection results (high symbol printing quality level) can be found through visual observation, equipment recognition and detection, one color or color combination is selected comprehensively, and the color difference value between the found CMY printing primary colors or printing spot colors and black is set as the first threshold value.
In the case of printing color deviation too large or affecting visual effect too much or poor reading condition, etc., resulting in the CMY printing process being unsuitable, it is possible to determine and adopt composite color, etc. as a modulation scheme through experiments. The experimental procedures can be referred to the above description and will not be described herein.
When the preliminary data block includes a continuous white block, the preset data block color modulation rule includes: and modulating the color of one or more white data modules in the continuous white modules, wherein the color difference between the color of the modulated data module and the color of the white data module before modulation is less than or equal to a second threshold value.
The second threshold is a preset threshold. When the color difference between the color of the modulated white data module and the color of the white data module before modulation is less than or equal to the second threshold value, the color of the modulated white data module is similar to the color of the white data module before modulation, and the modulated white data module can be identified as the white data module before modulation by the common identifier, so that the common identifier can only identify plaintext information. However, the modulated white data module and the white data module before modulation can be distinguished by the high-resolution identification device, that is, the modulated white data module can be identified by the high-resolution identification device. Therefore, in this embodiment, a dedicated reader is provided, which belongs to a high resolution identification device in terms of hardware, and the dedicated reader further sets a preset data module color modulation rule, so that after the modulated data module is identified, the ciphertext information represented by the modulated data module can be decoded according to the preset data module color modulation rule.
The second threshold may be a color difference value associated with the printing system, the specific value of the first threshold may be determined empirically or experimentally, and specifically, the modulated symbol may be prepared from different CMY printing process colors or printing spot colors, and through visual observation, device identification and detection, the visual effect (aesthetic and unobtrusive), the recognition effect (e.g., high recognition speed) and the detection result (high quality level of symbol printing) are found, and a color or a color combination is selected comprehensively, and the color difference value between the found CMY printing process colors or printing spot colors and white is set as the second threshold.
In the case of printing color deviation too large or affecting visual effect too much or poor reading condition, etc., resulting in the CMY printing process being unsuitable, it is possible to determine and adopt composite color, etc. as a modulation scheme through experiments. The experimental procedures can be referred to the above description and will not be described herein.
The CMY process colors or spot colors may be colors.
For the continuous black module or the continuous white module, the continuous black module or the continuous white module may be modulated to be the same color, or modulated to be different colors, or modulated to be the same color interval (jumping among a plurality of colors), so as to carry the hidden information.
In one example, the modulating the color of one or more of the consecutive black modules comprises: and replacing the black of one or more black data modules in the continuous black module by one CMY printing primary color or printing spot color, or replacing the black of a plurality of black data modules in the continuous black module by a plurality of CMY printing primary colors or printing spot colors respectively.
In one example, the modulating the color of one or more of the consecutive white modules comprises: one or more CMY process colors or print spot colors are added to the white color of one or more of the white data blocks in the continuous white module, or alternatively, a plurality of CMY process colors or print spot colors are added to the white color of one or more of the white data blocks in the continuous white module, respectively.
When the pre-data module includes a plurality of non-adjacent black data modules, the preset data module color modulation rule includes: modulating the color of one or more black data modules in the plurality of nonadjacent black data modules, wherein the color difference between the color of the modulated data module and the color of the black data module before modulation is less than or equal to a first threshold value; when the pre-data module includes a plurality of non-adjacent white data modules, the preset data module color modulation rule includes: and modulating the color of one or more white data modules in the plurality of non-adjacent white data modules, wherein the color difference between the color of the modulated data module and the color of the white data module before modulation is less than or equal to a second threshold value.
The first threshold and the second threshold may refer to the above description, and are not described herein again.
In one example, the modulating the color of one or more of the plurality of non-adjacent black data blocks comprises: and replacing the black of one or more black data modules in the plurality of non-adjacent black data modules by one CMY printing primary color or printing spot color, or replacing the black of a plurality of black data modules in the plurality of non-adjacent black data modules by a plurality of CMY printing primary colors or printing spot colors respectively.
In one example, the modulating the color of one or more of the plurality of non-adjacent white data modules comprises: one or more CMY process colors or print spot colors are added to the white color of one or more of the plurality of non-adjacent white data blocks, or the plurality of CMY process colors or print spot colors are added to the white color of one or more of the plurality of non-adjacent white data blocks, respectively.
In one example, the preset data module color modulation rule includes: according to (0) in the coding information corresponding to the cryptograph informationbinOr (1)binAnd modulating the pre-selection data module.
Next, taking plaintext information "1234567890 ABCDEFGabcdefg, Han Xin Code" and plaintext information "123" as an example, the information hiding method provided in this embodiment is specifically described.
And generating a two-dimensional code according to the plaintext information and the international standard of Chinese-sensible code ISO/IEC 20830, wherein the gray levels of a black module and a white module in the two-dimensional code map are 255 and 0 respectively (namely, the two-dimensional code is a monochromatic map).
In order to hide the hidden information in the two-dimensional code, a han-xin code symbol of the hidden information needs to be generated first. A BCD (Binary-Coded Decimal) coding mode can be adopted, and the value of 12 information modulation bits is obtained by compiling 000100100011 for the hidden information "123".
The data modules can be selected according to the values of the information modulation bits, and the data modules in specific positions or unspecified positions can be selected, for example, in the example, a continuous white module sequence starting from the 20 th module, a continuous white module sequence starting from the 23 th module, and a continuous white module sequence … … starting from the 34 th module on the two-dimensional code map are selected as modulation objects to be modulated, wherein the 20 th module, the 23 th module, and the 34 th module can be referred to as initial modules. The sequence of consecutive white modules is the consecutive white modules above. The condition is chosen to have 2-3 consecutive white data blocks starting from the initial block.
A sequence of consecutive white modules, if the information to be encoded is (0)binThen, one module in the continuous white module sequence is modulated to light blue, another module is modulated to light blue, and another module is modulated to magenta, or two or more modules can be simultaneously modulated to light blue, light green or magenta.
If the information to be coded is (1)binThen no correlation modulation is performed. The modulated Chinese-sensible code symbols are almost the same as the unmodulated Chinese-sensible code symbols, and the symbols can be accurately printed by adopting a general printing technology (laser printing and the like).
When the Chinese-sensible code is read, through a mobile phone and other general reading equipment, as related modulation does not affect the binarization of the module (whether global binarization or local binarization is adopted, the light colors, namely light blue, light blue and carmine, can be recognized as white), or even if the dark color appears, the information can be normally recovered through the error correction function of the two-dimensional code, the Chinese-sensible code can still be normally read without being affected.
However, after the Chinese-sensible code symbol image is collected and read after uniform light supplement is carried out by adopting special high-resolution verification equipment (a special reader), the continuous white module starting from the 20 th bit is processed in the original image (according to a coordinate system determined in the Chinese-sensible code reading process)The sequence, the sequence of consecutive white modules starting with block 23, the sequence of consecutive white modules starting with block 34, and the sequence … … of consecutive white modules, the grey values of which are analyzed, if they are found to be color-modulated, i.e. if they are found to be light-blue-modulated and/or light-green-modulated and/or magenta-modulated as described above, the position-coding information can be determined to be (0)binOtherwise, the position coding information is (1)binAnd acquiring and linking 01 sequences of all relevant positions to obtain 000100100011 binary sequences, and acquiring hidden information of the binary sequences as '123' according to BCD coding.
For a region formed by a plurality of nonadjacent black data modules (which are easy to understand, and white data modules are arranged between a plurality of nonadjacent black data modules) or white data modules (which are easy to understand, and black data modules are arranged between a plurality of nonadjacent white data modules), the modulation method of the region can simultaneously perform color modulation on the black data modules and the white data modules, can also only perform color modulation on the black data modules, and can also only perform color modulation on the white data modules.
It should be noted that in the color coding process, it is necessary to ensure that at least two data modules have changed states, so as to avoid reading errors caused by scatter errors introduced in the generation or reading process.
In one example, the information to be hidden includes, in addition to the hidden information, additional check information or error correction information generated according to the hidden information, and the additional check information or error correction information is used to provide check and error correction information protection for the hidden information.
In the aspect of information redundancy, in order to ensure that the color-coded information can still be recovered, the color-coded information can be protected by adopting modes such as CRC check characters, BCH coding, RS coding and the like.
The method comprises the steps of acquiring plaintext information of the Chinese-sensible code (two-dimensional code) by adopting general recognition software and a recognition system, and recording information content, data module positions and module arrangement content of the two-dimensional code (Chinese-sensible code) in detail. The process is the same as the general two-dimensional code reading process, and related general equipment or general (mobile phone) software is adopted for reading.
For the identification of the hidden information, a specific recognizer is required to ensure uniform illumination, and an imaging system is required to ensure that the imaging pixel number of each data module is not less than 5 × 5 pixels. The specific recognizer searches and recognizes the plaintext information of the Chinese-sensible code (two-dimensional code) in a view field according to a code system recognition algorithm, and records the information content, the module position and the module arrangement content of the two-dimensional code (Chinese-sensible code) in detail. On the acquired high-resolution color image, a coordinate system is established according to position coordinates established by a recognition algorithm, modulation areas are searched at fixed positions according to different settings of a specific recognizer (the settings can be performed according to corresponding preset data module color modulation rules), and color state information of each corresponding coding area is acquired.
The color value of the data module is extracted by verifying and acquiring color modulation information (one Bit for each region) modulated by each coding region according to the setting of a specific reader of the region, and the color modulation information of each region is connected in series to form a steganographic information Bit stream. Note that the information recovery process performed here requires that the color modulation information be recovered according to different color coding and position arrangement methods pre-stored by a specific reader. And then, restoring the hidden information bit stream into the hidden information according to the inverse algorithm of the hidden coding algorithm.
And continuous black or white data modules or parts of symbol function graphs for determining positions according to the Chinese-sensible codes read at this time. The method for extracting information is the same as the above, the color modulation information of each region is connected in series to form a hidden information bit stream, and then the hidden information bit stream is reduced into the hidden information according to the inverse algorithm of the hidden coding algorithm.
If the hidden message has related protection code words, such as check characters, CRC and error correction characters, the related original hidden message is output after check error correction.
The two-dimensional code-based information hiding method provided by the embodiment of the invention has the following advantages: the two-dimensional code containing the hidden information also contains the plaintext information, and a non-specific recognizer can recognize the plaintext information in the hidden information, so that the two-dimensional code is still a normal two-dimensional code on the surface and is not suspected to be a special two-dimensional code, the attention of an attacker cannot be attracted, and the possibility of being attacked is avoided from the source.
Example 2
The embodiment provides an information hiding device based on a two-dimensional code. As shown in fig. 2, the information hiding apparatus includes:
the information hiding apparatus includes:
an obtaining unit 21, configured to obtain information to be hidden, where the information to be hidden includes hidden information;
the modulation unit 22 is configured to modulate a preselected data module in the first two-dimensional code according to a preset data module color modulation rule according to the information to be hidden, so as to obtain a second two-dimensional code simultaneously containing the ciphertext information and the plaintext information; the first two-dimensional code is a two-dimensional code generated according to the plaintext information, and the pre-data module is a module selected from the first two-dimensional code according to the data volume of the plaintext information; wherein,
and the hidden message in the second two-dimensional code can be identified by a preset identifier according to a preset data module color modulation rule.
The functional units of the information hiding device provided in this embodiment can be implemented by referring to the content described in embodiment 1, and are not described herein again.
The information hiding device based on the two-dimensional code provided by the embodiment of the invention has the following advantages: the two-dimensional code containing the hidden information also contains the plaintext information, and a non-specific recognizer can recognize the plaintext information in the hidden information, so that the two-dimensional code is still a normal two-dimensional code on the surface and is not suspected to be a special two-dimensional code, the attention of an attacker cannot be attracted, and the possibility of being attacked is avoided from the source.
Example 3
The present embodiment provides an electronic device, including: a processor 31, a memory 32; the memory 32 stores code; the processor 31 executes the code for performing the information hiding method described in embodiment 1.
The electronic device provided by the embodiment of the invention has the following advantages: the two-dimensional code containing the hidden information also contains the plaintext information, and a non-specific recognizer can recognize the plaintext information in the hidden information, so that the two-dimensional code is still a normal two-dimensional code on the surface and is not suspected to be a special two-dimensional code, the attention of an attacker cannot be attracted, and the possibility of being attacked is avoided from the source.
Example 4
The present embodiment provides a computer-readable storage medium storing a program including instructions that, when executed by a computer, cause the computer to execute the information hiding method described in embodiment 1.
The computer-readable storage medium provided by the embodiment has the following advantages: the two-dimensional code containing the hidden information also contains the plaintext information, and a non-specific recognizer can recognize the plaintext information in the hidden information, so that the two-dimensional code is still a normal two-dimensional code on the surface and is not suspected to be a special two-dimensional code, the attention of an attacker cannot be attracted, and the possibility of being attacked is avoided from the source.
Although the invention has been described in detail above with reference to a general description and specific examples, it will be apparent to one skilled in the art that modifications or improvements may be made thereto based on the invention. Accordingly, such modifications and improvements are intended to be within the scope of the invention as claimed.

Claims (11)

1. An information hiding method based on two-dimensional codes is characterized by comprising the following steps:
acquiring information to be hidden, wherein the information to be hidden comprises hidden information;
modulating a preselected data module in the first two-dimensional code according to the information to be hidden and a preset data module color modulation rule to obtain a second two-dimensional code simultaneously containing the hidden information and the plaintext information; the first two-dimensional code is a two-dimensional code generated according to the plaintext information, and the pre-data module is a module selected from the first two-dimensional code according to the data volume of the plaintext information; wherein,
and the hidden message in the second two-dimensional code can be identified by a preset identifier according to a preset data module color modulation rule.
2. The information hiding method according to claim 1, wherein the preselected data block comprises a continuous black block or a continuous white block;
the continuous black module is composed of at least two black data modules which are sequentially connected, and the continuous white module is composed of at least two white data modules which are sequentially connected.
3. The information hiding method according to claim 2, wherein when the pre-data module comprises a continuous black module, the preset data module color modulation rule comprises: modulating the color of one or more black data modules in the continuous black module, wherein the color difference between the color of the modulated data module and the color of the black data module before modulation is less than or equal to a first threshold value;
when the preliminary data block includes a continuous white block, the preset data block color modulation rule includes: and modulating the color of one or more white data modules in the continuous white modules, wherein the color difference between the color of the modulated data module and the color of the white data module before modulation is less than or equal to a second threshold value.
4. The information hiding method as claimed in claim 1, wherein the preselected data block comprises a plurality of non-adjacent black data blocks or a plurality of non-adjacent white data blocks.
5. The information hiding method according to claim 4, wherein when the pre-data module comprises a plurality of non-adjacent black data modules, the preset data module color modulation rule comprises: modulating the color of one or more black data modules in the plurality of nonadjacent black data modules, wherein the color difference between the color of the modulated data module and the color of the black data module before modulation is less than or equal to a first threshold value;
when the pre-data module includes a plurality of non-adjacent white data modules, the preset data module color modulation rule includes: and modulating the color of one or more white data modules in the plurality of non-adjacent white data modules, wherein the color difference between the color of the modulated data module and the color of the white data module before modulation is less than or equal to a second threshold value.
6. The information hiding method according to claim 3 or 5, wherein the first threshold value and the second threshold value are color differences associated with a printing system;
the modulating colors of one or more of the consecutive black modules comprises: replacing the black of one or more black data modules in the continuous black module by one CMY printing primary color or printing spot color, or respectively replacing the black of a plurality of black data modules in the continuous black module by a plurality of CMY printing primary colors or printing spot colors; or,
the modulating colors of one or more of the consecutive white modules comprises: adding one or more CMY printing process colors or printing spot colors to the white color of one or more white data modules in the continuous white module, or adding a plurality of CMY printing process colors or printing spot colors to the white color of one or more white data modules in the continuous white module respectively; or,
the modulating the color of one or more of the plurality of non-adjacent black data blocks comprises: replacing the black of one or more black data modules in the plurality of non-adjacent black data modules by one CMY printing primary color or printing spot color, or replacing the black of a plurality of black data modules in the plurality of non-adjacent black data modules by a plurality of CMY printing primary colors or printing spot colors respectively; or,
the modulating the color of one or more of the plurality of non-adjacent white data blocks comprises: one or more CMY process colors or print spot colors are added to the white color of one or more of the plurality of non-adjacent white data blocks, or the plurality of CMY process colors or print spot colors are added to the white color of one or more of the plurality of non-adjacent white data blocks, respectively.
7. The information hiding method according to claim 1, wherein the preset data module color modulation rule comprises:
according to (0) in the coding information corresponding to the cryptograph informationbinOr (1)binAnd modulating the pre-selection data module.
8. The information hiding method according to claim 1, wherein the information to be hidden further comprises additional check information or error correction information generated according to the hidden information, and the additional check information or error correction information is used for providing check and error correction information protection for the hidden information.
9. An information hiding device based on a two-dimensional code, the information hiding device comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring information to be hidden, and the information to be hidden comprises hidden information;
the modulation unit is used for modulating a preselected data module in the first two-dimensional code according to the information to be hidden and a preset data module color modulation rule so as to obtain a second two-dimensional code simultaneously containing the ciphertext information and the plaintext information; the first two-dimensional code is a two-dimensional code generated according to the plaintext information, and the pre-data module is a module selected from the first two-dimensional code according to the data volume of the plaintext information; wherein,
and the hidden message in the second two-dimensional code can be identified by a preset identifier according to a preset data module color modulation rule.
10. An electronic device, characterized in that the electronic device comprises: a processor, a memory;
the memory stores code;
the processor executes the code for performing the information hiding method of any one of claims 1-8.
11. A computer-readable storage medium storing a program, the program comprising instructions that, when executed by a computer, cause the computer to perform the information hiding method according to any one of claims 1 to 8.
CN201910041349.2A 2019-01-16 2019-01-16 A kind of information concealing method based on two dimensional code, device and electronic equipment Pending CN109784454A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910041349.2A CN109784454A (en) 2019-01-16 2019-01-16 A kind of information concealing method based on two dimensional code, device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910041349.2A CN109784454A (en) 2019-01-16 2019-01-16 A kind of information concealing method based on two dimensional code, device and electronic equipment

Publications (1)

Publication Number Publication Date
CN109784454A true CN109784454A (en) 2019-05-21

Family

ID=66500768

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910041349.2A Pending CN109784454A (en) 2019-01-16 2019-01-16 A kind of information concealing method based on two dimensional code, device and electronic equipment

Country Status (1)

Country Link
CN (1) CN109784454A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110517051A (en) * 2019-08-26 2019-11-29 北京太和互邦科技有限公司 A kind of two dimension code generation method, coding/decoding method, two dimensional code and readable storage medium storing program for executing

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101149813A (en) * 2007-07-13 2008-03-26 中兴通讯股份有限公司 Matrix type colorful two-dimensional bar code encoding and decoding method
CN102184380A (en) * 2011-05-10 2011-09-14 华南农业大学 Color-superposition two-dimension code system and application method thereof
CN102916804A (en) * 2012-08-28 2013-02-06 华南农业大学 Two-dimension code coding and decoding method and device based on local color verification
CN103632179A (en) * 2012-08-22 2014-03-12 上海育郡信息科技有限公司 Three-dimensional bar code encoding and decoding method and device
CN104933386A (en) * 2015-06-12 2015-09-23 矽照光电(厦门)有限公司 Multi-grayscale invisible two-dimensional code recognizing method
CN104951828A (en) * 2015-06-12 2015-09-30 矽照光电(厦门)有限公司 Generation method for color high-order invisible image code

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101149813A (en) * 2007-07-13 2008-03-26 中兴通讯股份有限公司 Matrix type colorful two-dimensional bar code encoding and decoding method
CN102184380A (en) * 2011-05-10 2011-09-14 华南农业大学 Color-superposition two-dimension code system and application method thereof
CN103632179A (en) * 2012-08-22 2014-03-12 上海育郡信息科技有限公司 Three-dimensional bar code encoding and decoding method and device
CN102916804A (en) * 2012-08-28 2013-02-06 华南农业大学 Two-dimension code coding and decoding method and device based on local color verification
CN104933386A (en) * 2015-06-12 2015-09-23 矽照光电(厦门)有限公司 Multi-grayscale invisible two-dimensional code recognizing method
CN104951828A (en) * 2015-06-12 2015-09-30 矽照光电(厦门)有限公司 Generation method for color high-order invisible image code

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
柏森: "《信息隐藏算法及应用》", 30 September 2015 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110517051A (en) * 2019-08-26 2019-11-29 北京太和互邦科技有限公司 A kind of two dimension code generation method, coding/decoding method, two dimensional code and readable storage medium storing program for executing

Similar Documents

Publication Publication Date Title
JP4557866B2 (en) Mixed code, mixed code generation method and apparatus, and recording medium
CN101273367B (en) Covert and robust mark for media identification
CA2586274C (en) Mixed code, and method and apparatus for generating the same, and method and apparatus for decoding the same
CN111784556B (en) Method, device, terminal and storage medium for adding digital watermark in image
JP4515999B2 (en) Mixed code decoding method and apparatus, and recording medium
US9805296B2 (en) Method and apparatus for decoding or generating multi-layer color QR code, method for recommending setting parameters in generation of multi-layer QR code, and product comprising multi-layer color QR code
KR100653885B1 (en) Mixed-code decoding method and apparatus
US9589217B2 (en) Augmenting barcodes with secondary encoding for anti-counterfeiting
CN110766594A (en) Information hiding method and device, detection method and device and anti-counterfeiting tracing method
Yang et al. ARTcode: preserve art and code in any image
KR20120070664A (en) System for tracking illegal distributeur and preventing distribution of illegal content and method thereof
CN101359360A (en) Graphics context fused electronic ticket coding/decoding method
CN113988242A (en) Multi-region-based anti-counterfeiting code generation and verification method, system, equipment and medium
CN109816077A (en) A kind of hidden method of two-dimensional barcode information, device, electronic equipment and storage medium
CN109840574B (en) Two-dimensional code information hiding method and device, electronic equipment and storage medium
CN106934756B (en) Method and system for embedding information in single-color or special-color image
CN109784454A (en) A kind of information concealing method based on two dimensional code, device and electronic equipment
KR102180924B1 (en) System and Method for Embedding and Extracting Digital Watermark Using QR Code
CN109829844B (en) Information hiding method and device based on two-dimension code and electronic equipment
CN113988243A (en) Three-dimensional code generation and verification method, system, equipment and medium with verification code
CN114330621A (en) Two-dimensional code anti-counterfeiting method and device based on identification information and storage medium
CN112418371A (en) Secure three-dimensional code for blockchains and methods of generating and decoding
CN120449914A (en) Pattern encoding method, pattern decoding method, device, medium and equipment
WO2025038396A1 (en) Digital watermarking for digital image protection and manifest swapping detection
CN116911872A (en) Article verification method, detection method for screen acquisition and label printed with graphic code

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190521