CN110418029A - Text Secret Information Hiding and Extracting Method Based on Unicode Encoding - Google Patents
Text Secret Information Hiding and Extracting Method Based on Unicode Encoding Download PDFInfo
- Publication number
- CN110418029A CN110418029A CN201910591575.8A CN201910591575A CN110418029A CN 110418029 A CN110418029 A CN 110418029A CN 201910591575 A CN201910591575 A CN 201910591575A CN 110418029 A CN110418029 A CN 110418029A
- Authority
- CN
- China
- Prior art keywords
- secret information
- string
- binary
- key
- text
- 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 24
- 238000003079 width control Methods 0.000 claims abstract description 8
- 238000000605 extraction Methods 0.000 claims description 9
- 238000004364 calculation method Methods 0.000 claims description 8
- 238000004422 calculation algorithm Methods 0.000 claims description 7
- 230000005540 biological transmission Effects 0.000 abstract description 4
- 238000005516 engineering process Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 2
- 238000007620 mathematical function Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/0435—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3236—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
-
- 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
- H04N1/4446—Hiding of documents or document information
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Multimedia (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Storage Device Security (AREA)
Abstract
本发明公开了一种基于Unicode编码的文本秘密信息隐藏和提取方法。该方法为:首先发送方将秘密信息的每个字符使用哥德尔函数编码替换为二进制字符串,获取发送方对称密钥,组合在秘密信息二进制字符串前面,基于发送方对称密钥对秘密信息二进制字符串进行散列加密,将散列加密后的秘密信息二进制字符串用设定的规则替换为Unicode零宽度控制字符,形成不可见字符串,并嵌入封面文本的前面;然后接收方检测载体文本中的零宽度字符串,按照设定的规则还原二进制字符串,获取接收方密钥,基于接收方密钥对二进制字符串进行哈希解码;最后认证并进行哥德尔函数解码,输出秘密信息。本发明提高了文本秘密信息的传输安全性和隐私保护能力。
The invention discloses a method for hiding and extracting text secret information based on Unicode encoding. The method is: first, the sender replaces each character of the secret information with a binary string using Gödel function encoding, obtains the sender's symmetric key, combines it in front of the binary string of the secret information, and pairs the secret information based on the sender's symmetric key. The binary string is hashed and encrypted, and the hash-encrypted binary string of secret information is replaced by Unicode zero-width control characters with the set rules to form an invisible string and embedded in front of the cover text; then the receiver detects the carrier For the zero-width string in the text, restore the binary string according to the set rules, obtain the receiver's key, and hash and decode the binary string based on the receiver's key; finally authenticate and decode the Gödel function, and output the secret information . The invention improves the transmission security and privacy protection capability of text secret information.
Description
技术领域technical field
本发明属于信息隐藏技术领域,特别是一种基于Unicode编码的文本秘密信息隐藏和提取方法。The invention belongs to the technical field of information hiding, in particular to a method for hiding and extracting text secret information based on Unicode encoding.
背景技术Background technique
信息隐藏技术是在原始数据中嵌入秘密信息,比如需要隐藏的敏感信息的技术。信息隐藏技术不仅能够被检测和提取,同时也能够防止网络以及文本攻击。信息隐藏技术包括隐藏信息的嵌入以及提取。在嵌入阶段,首先需要生成包含需要隐藏的信息的字符串(如作者姓名、出版社或敏感信息),然后根据相应的算法生成不可见的字符串并将其嵌入到封面文本中的特殊位置,如文献1(M.Pal.A survey on digital watermarking and itsapplication[J].International Journal of Advanced Computer Science andApplications,2016,7(1):153–156.)。嵌入有秘密信息的文本在互联网中传输、分享,当需获取该文本的秘密信息时,能够检测并且提取出该秘密信息。在敏感信息嵌入后以及提取前,被隐藏的秘密信息应该能够抵御各种攻击。Information hiding technology is a technology that embeds secret information in original data, such as sensitive information that needs to be hidden. Information hiding techniques can not only be detected and extracted, but also prevent network and text attacks. Information hiding techniques include the embedding and extraction of hidden information. In the embedding stage, it is first necessary to generate a string containing the information that needs to be hidden (such as the author's name, publisher or sensitive information), and then generate the invisible string according to the corresponding algorithm and embed it in a special position in the cover text, For example, document 1 (M.Pal.A survey on digital watermarking and its application[J].International Journal of Advanced Computer Science and Applications, 2016,7(1):153–156.). Text embedded with secret information is transmitted and shared in the Internet. When the secret information of the text needs to be obtained, the secret information can be detected and extracted. After the sensitive information is embedded and before extraction, the hidden secret information should be able to resist various attacks.
针对文本的隐藏以及伪装问题,一些与Unicode编码相关的文本水印研究技术被研究者们提出。比如文献2(L.Y.Por,K.Wong,K.O.Chee,“A text-based data hidingmethod using Unicode space characters”,The Journal of Systems and Software,2012,Vol.85,No.5,pp.1075-1082.Doi:10.1016/j.jss.2011.12.023.)在2012年提出了一种名为UniSpaCh的数据隐藏方法,它采用Unicode编码的特殊空间来把秘密信息隐藏在Word中。这种方法利用特定的位置和双空格的组合来隐藏秘密信息,其优点是充分利用了空间的组合,所以提供了更高的嵌入容量。但这种方法在封面文本中产生了一些特殊的空白,而且容易受到篡改和重新格式化类型的攻击。Aiming at the problems of text hiding and camouflage, some text watermarking techniques related to Unicode encoding have been proposed by researchers. For example, document 2 (L.Y.Por, K.Wong, K.O.Chee, "A text-based data hiding method using Unicode space characters", The Journal of Systems and Software, 2012, Vol.85, No.5, pp.1075-1082. Doi:10.1016/j.jss.2011.12.023.) proposed a data hiding method called UniSpaCh in 2012, which uses a special space encoded by Unicode to hide secret information in Word. This method utilizes a combination of specific positions and double spaces to hide secret information. The advantage is that the combination of spaces is fully utilized, so it provides higher embedding capacity. But this approach produces some special whitespace in the cover text and is vulnerable to tampering and reformatting types of attacks.
目前的文本隐藏技术存在三点不足:一是文本秘密信息的嵌入容量不高,二是秘密信息抵御攻击的鲁棒性较低,三是秘密信息可能会影响文本的结构甚至内容,且有的技术并没有好的透明性,可能会产生被攻击者注意到的问题。The current text hiding technology has three shortcomings: first, the embedding capacity of text secret information is not high; second, the robustness of secret information against attacks is low; third, secret information may affect the structure and even content of the text, and some The technology does not have good transparency and may create problems that are noticed by attackers.
发明内容SUMMARY OF THE INVENTION
本发明的目的在于提供一种能够在社交媒体中保障秘密信息传输的基于Unicode编码的文本秘密信息隐藏和提取方法,从而为短信以及社交媒体用户带来端到端的安全保障。The purpose of the present invention is to provide a method for hiding and extracting text secret information based on Unicode encoding that can ensure the transmission of secret information in social media, thereby bringing end-to-end security guarantees for SMS and social media users.
实现本发明目的的技术解决方案为:一种基于Unicode编码的文本秘密信息隐藏和提取方法,包括以下步骤:The technical solution for realizing the object of the present invention is: a method for hiding and extracting text secret information based on Unicode encoding, comprising the following steps:
步骤1、发送方将秘密信息的每个字符使用哥德尔函数编码替换为二进制字符串;Step 1. The sender replaces each character of the secret message with a binary string using the Gödel function encoding;
步骤2、获取发送方对称密钥,组合在秘密信息二进制字符串前面;Step 2. Obtain the sender's symmetric key and combine it in front of the secret information binary string;
步骤3、基于发送方对称密钥对秘密信息二进制字符串进行散列加密;Step 3, hashing and encrypting the binary string of the secret information based on the sender's symmetric key;
步骤4、将散列加密后的秘密信息二进制字符串用设定的规则替换为Unicode零宽度控制字符,形成不可见字符串,并嵌入封面文本的前面;Step 4. Replace the hash-encrypted binary string of secret information with Unicode zero-width control characters with the set rules to form an invisible string and embed it in front of the cover text;
步骤5、接收方检测载体文本中的零宽度字符串,按照设定的规则还原二进制字符串;Step 5. The receiver detects the zero-width character string in the carrier text, and restores the binary character string according to the set rule;
步骤6、获取接收方密钥;Step 6. Obtain the recipient's key;
步骤7、基于接收方密钥对二进制字符串进行哈希解码;Step 7, hash decoding the binary string based on the receiver key;
步骤8、认证并进行哥德尔函数解码,输出秘密信息。Step 8: Authenticate and decode the Gödel function, and output the secret information.
进一步地,步骤1中所述的发送方将秘密信息的每个字符使用哥德尔函数编码替换为二进制字符串,具体如下:Further, the sender described in step 1 replaces each character of the secret information with a binary string using Gödel function encoding, as follows:
步骤1.1、设定η为任何给定的数,则存在唯一解<α,β>,令η为字母的ASCII码,则<α,β>为SM的每个字符唯一的数字对:Step 1.1. Set η to be any given number, then there is a unique solution <α, β>, let η be the ASCII code of the letter, then <α, β> is the unique number pair of each character of SM:
<α,β>=2α(2β+1)-1 (1)< α ,β>=2α(2β+1)-1 (1)
且2α(2β+1)≠0and 2 α (2β+1)≠0
其中,是自然数,存在使得2α×k=η+1;in, is a natural number, exists Make 2 α ×k=η+1;
等式(2)中,为奇数;In equation (2), is an odd number;
嵌入算法为秘密信息的每个字符使用等式(2)和(3)来计算<α,β>对;The embedding algorithm uses equations (2) and (3) to compute <α,β> pairs for each character of the secret message;
步骤1.2、将α、β分别转换为6位二进制字符串,并连接在一起,为每个字母生成一个12位二进制字符串;Step 1.2. Convert α and β into 6-bit binary strings respectively, and connect them together to generate a 12-bit binary string for each letter;
步骤1.3、将每个字母的二进制字符串拼接到一起,形成秘密信息的二进制字符串。Step 1.3, splicing the binary strings of each letter together to form a binary string of secret information.
进一步地,步骤2中所述的获取发送方对称密钥,组合在秘密信息二进制字符串前面,具体如下:Further, obtaining the sender's symmetric key described in step 2 is combined in front of the secret information binary string, as follows:
步骤2.1、散列函数将发送时间即生成隐藏信息的时间作为发送方密钥,并省略该时间的第4位;Step 2.1. The hash function uses the sending time, that is, the time when the hidden information is generated, as the sender's key, and omits the fourth bit of the time;
步骤2.2、创建一个数字,并将该数字转换为8位二进制字符串,即发送方密钥,组合在秘密信息二进制字符串前面。Step 2.2. Create a number and convert the number into an 8-bit binary string, that is, the sender's key, which is combined in front of the secret message binary string.
进一步地,步骤3所述的基于发送方对称密钥对秘密信息二进制字符串进行散列加密,具体如下:Further, performing hash encryption on the binary string of the secret information based on the sender's symmetric key described in step 3 is as follows:
步骤3.1、散列函数重复NC次复制密钥二进制字符串,形成散列位置位,NC计算公式如下:Step 3.1. The hash function repeats NC times to copy the key binary string to form a hash bit. The NC calculation formula is as follows:
式中,LS为秘密信息的长度,单位为字符;LSK为密钥二进制字符串的长度,单位为位;In the formula, LS is the length of the secret information, in characters; LSK is the length of the key binary string, in bits;
步骤3.2、散列函数根据散列位置位或秘密信息二进制字符串,产生散列秘密信息二进制字符串。Step 3.2, the hash function generates the hashed secret information binary string according to the hash bit or the secret information binary string.
进一步地,步骤4所述的将散列加密后的秘密信息二进制字符串用设定的规则替换为Unicode零宽度控制字符,具体如下:Further, the binary string of the secret information after hash encryption described in step 4 is replaced with the Unicode zero-width control character by the set rule, as follows:
将二进制字符串的每连续2位分为一个小组,将每个小组中的“00”,“01”,“10”,“11”分别替换为“0x200C”,“0x202C”,“0x202D”,“0x200E”,从而形成不可见字符串。Divide each consecutive 2 bits of the binary string into a group, replace "00", "01", "10", "11" in each group with "0x200C", "0x202C", "0x202D" respectively, "0x200E", thus forming an invisible string.
进一步地,步骤5所述的接收方检测载体文本中的零宽度字符串,按照设定的规则还原二进制字符串,具体如下:Further, the receiver described in step 5 detects the zero-width character string in the carrier text, and restores the binary character string according to the set rule, as follows:
接收方检测载体文本中的零宽度字符串,按照“0x200C”,“0x202C”,“0x202D”,“0x200E”对应“00”,“01”,“10”,“11”的规则还原二进制字符串。The receiver detects the zero-width string in the carrier text, and restores the binary string according to the rules of "0x200C", "0x202C", "0x202D", "0x200E" corresponding to "00", "01", "10", "11" .
进一步地,步骤6所述的获取接收方密钥,具体如下:Further, obtaining the receiver's key described in step 6 is as follows:
步骤6.1、散列函数将接收时间作为接收方密钥,并省略该时间的第4位;Step 6.1. The hash function uses the receiving time as the receiver's key, and omits the fourth digit of the time;
步骤6.2、创建一个数字并将其转换为8位二进制字符串,即接收方密钥。Step 6.2. Create a number and convert it to an 8-bit binary string, the receiver key.
进一步地,步骤7所述的基于接收方密钥对对二进制字符串进行哈希解码,具体如下:Further, performing hash decoding on the binary string based on the receiver's key pair described in step 7 is as follows:
根据公式(4)计算NC,并复制NC次密钥二进制字符串形成散列位置位,将散列位置位与需要解密的秘密信息二进制字符串进行异或计算。Calculate NC according to formula (4), and copy the NC secondary key binary string to form a hash bit set, and perform XOR calculation with the hash bit bit and the secret information binary string to be decrypted.
进一步地,步骤8中所述的认证并进行哥德尔函数解码,输出秘密信息,具体如下:Further, the authentication described in step 8 and the decoding of the Gödel function are performed, and the secret information is output, as follows:
比较解码后的发送方密钥与接收方密钥是否相同,若相同,则对秘密信息二进制字符串进行哥德尔函数解码,然后输出秘密信息;若不同,则提示秘密信息提取失败。Compare whether the decoded sender's key and the receiver's key are the same. If they are the same, perform Gödel function decoding on the binary string of the secret information, and then output the secret information; if they are different, it indicates that the extraction of the secret information failed.
本发明与现有技术相比,其显著优点为:(1)能够在短封面消息中隐藏大量的保密消息,并且嵌入的信息是不可见的,提高了秘密信息的保密性;(2)利用对秘密信息的智能双重编码及加密,提高了文本秘密信息的传输安全性和便捷性;(3)组合了数学函数编码和对称密钥加密算法,不同时间产生的秘密信息加密后的字符串不同,可以抵御多种网络攻击。Compared with the prior art, the present invention has the following significant advantages: (1) it can hide a large number of secret messages in the short cover message, and the embedded information is invisible, which improves the confidentiality of secret information; (2) utilizes The intelligent double encoding and encryption of secret information improves the transmission security and convenience of text secret information; (3) Combining mathematical function encoding and symmetric key encryption algorithm, the encrypted strings of secret information generated at different times are different , can defend against a variety of network attacks.
附图说明Description of drawings
图1是本发明基于Unicode编码的文本秘密信息隐藏和提取方法的流程示意图。FIG. 1 is a schematic flow chart of a method for hiding and extracting text secret information based on Unicode encoding according to the present invention.
图2是本发明的文本信息隐藏应用场景图。FIG. 2 is an application scene diagram of text information hiding of the present invention.
图3是本发明实施例中文本秘密信息隐藏的流程示意图。FIG. 3 is a schematic flowchart of text secret information hiding in an embodiment of the present invention.
具体实施方式Detailed ways
结合图1,本发明基于Unicode编码的文本秘密信息隐藏和提取方法,步骤为:In conjunction with Fig. 1, the present invention is based on the text secret information hiding and extraction method of Unicode encoding, and the steps are:
步骤1、发送方将秘密信息的每个字符使用哥德尔函数编码替换为二进制字符串;Step 1. The sender replaces each character of the secret message with a binary string using the Gödel function encoding;
步骤2、获取发送方对称密钥,组合在秘密信息二进制字符串前面;Step 2. Obtain the sender's symmetric key and combine it in front of the secret information binary string;
步骤3、基于发送方对称密钥对秘密信息二进制字符串进行散列加密;Step 3, hashing and encrypting the binary string of the secret information based on the sender's symmetric key;
步骤4、将散列加密后的秘密信息二进制字符串用设定的规则替换为Unicode零宽度控制字符,形成不可见字符串,并嵌入封面文本的前面;Step 4. Replace the hash-encrypted binary string of secret information with Unicode zero-width control characters with the set rules to form an invisible string and embed it in front of the cover text;
步骤5、接收方检测载体文本中的零宽度字符串,按照设定的规则还原二进制字符串;Step 5. The receiver detects the zero-width character string in the carrier text, and restores the binary character string according to the set rule;
步骤6、获取接收方密钥;Step 6. Obtain the recipient's key;
步骤7、基于接收方密钥对二进制字符串进行哈希解码;Step 7, hash decoding the binary string based on the receiver key;
步骤8、认证并进行哥德尔函数解码,输出秘密信息。Step 8: Authenticate and decode the Gödel function, and output the secret information.
进一步地,步骤1中所述的发送方将秘密信息的每个字符使用哥德尔函数编码替换为二进制字符串,具体如下:Further, the sender described in step 1 replaces each character of the secret information with a binary string using Gödel function encoding, as follows:
步骤1.1、设定η为任何给定的数,则存在唯一解<α,β>,令η为字母的ASCII码,则<α,β>为SM的每个字符唯一的数字对:Step 1.1. Set η to be any given number, then there is a unique solution <α, β>, let η be the ASCII code of the letter, then <α, β> is the unique number pair of each character of SM:
<α,β>=2α(2β+1)-1 (1)< α ,β>=2α(2β+1)-1 (1)
且2α(2β+1)≠0and 2 α (2β+1)≠0
其中,是自然数,存在使得2α×k=η+1。in, is a natural number, exists Let 2α×k = η+1.
等式(2)中,为奇数;In equation (2), is an odd number;
嵌入算法为秘密信息的每个字符使用等式(2)和(3)来计算<α,β>对;The embedding algorithm uses equations (2) and (3) to compute <α,β> pairs for each character of the secret message;
步骤1.2、将α、β分别转换为6位二进制字符串,并连接在一起,为每个字母生成一个12位二进制字符串;Step 1.2. Convert α and β into 6-bit binary strings respectively, and connect them together to generate a 12-bit binary string for each letter;
步骤1.3、将每个字母的二进制字符串拼接到一起,形成秘密信息的二进制字符串。Step 1.3, splicing the binary strings of each letter together to form a binary string of secret information.
进一步地,步骤2中所述的获取发送方对称密钥,组合在秘密信息二进制字符串前面,具体如下:Further, obtaining the sender's symmetric key described in step 2 is combined in front of the secret information binary string, as follows:
步骤2.1、散列函数将发送时间即生成隐藏信息的时间作为发送方密钥,并省略该时间的第4位;Step 2.1. The hash function uses the sending time, that is, the time when the hidden information is generated, as the sender's key, and omits the fourth bit of the time;
步骤2.2、创建一个数字,并将该数字转换为8位二进制字符串,即发送方密钥,组合在秘密信息二进制字符串前面。Step 2.2. Create a number and convert the number into an 8-bit binary string, that is, the sender's key, which is combined in front of the secret message binary string.
进一步地,步骤3所述的基于发送方对称密钥对秘密信息二进制字符串进行散列加密,具体如下:Further, performing hash encryption on the binary string of the secret information based on the sender's symmetric key described in step 3 is as follows:
步骤3.1、散列函数重复NC次复制密钥二进制字符串,形成散列位置位,NC计算公式如下:Step 3.1. The hash function repeats NC times to copy the key binary string to form a hash bit. The NC calculation formula is as follows:
式中,LS为秘密信息的长度,单位为字符;LSK为密钥二进制字符串的长度,单位为位;In the formula, LS is the length of the secret information, in characters; LSK is the length of the key binary string, in bits;
步骤3.2、散列函数根据散列位置位或秘密信息二进制字符串,产生散列秘密信息二进制字符串。Step 3.2, the hash function generates the hashed secret information binary string according to the hash bit or the secret information binary string.
进一步地,步骤4所述的将散列加密后的秘密信息二进制字符串用设定的规则替换为Unicode零宽度控制字符,具体如下:Further, the binary string of the secret information after hash encryption described in step 4 is replaced with the Unicode zero-width control character by the set rule, as follows:
将二进制字符串的每连续2位分为一个小组,将每个小组中的“00”,“01”,“10”,“11”分别替换为“0x200C”,“0x202C”,“0x202D”,“0x200E”,从而形成不可见字符串。Divide each consecutive 2 bits of the binary string into a group, replace "00", "01", "10", "11" in each group with "0x200C", "0x202C", "0x202D" respectively, "0x200E", thus forming an invisible string.
进一步地,步骤5所述的接收方检测载体文本中的零宽度字符串,按照设定的规则还原二进制字符串,具体如下:Further, the receiver described in step 5 detects the zero-width character string in the carrier text, and restores the binary character string according to the set rule, as follows:
接收方检测载体文本中的零宽度字符串,按照“0x200C”,“0x202C”,“0x202D”,“0x200E”对应“00”,“01”,“10”,“11”的规则还原二进制字符串。The receiver detects the zero-width string in the carrier text, and restores the binary string according to the rules of "0x200C", "0x202C", "0x202D", "0x200E" corresponding to "00", "01", "10", "11" .
进一步地,步骤6所述的获取接收方密钥,具体如下:Further, obtaining the receiver's key described in step 6 is as follows:
步骤6.1、散列函数将接收时间作为接收方密钥,并省略该时间的第4位;Step 6.1. The hash function uses the receiving time as the receiver's key, and omits the fourth digit of the time;
步骤6.2、创建一个数字并将其转换为8位二进制字符串,即接收方密钥。Step 6.2. Create a number and convert it to an 8-bit binary string, the receiver key.
进一步地,步骤7所述的基于接收方密钥对对二进制字符串进行哈希解码,具体如下:Further, performing hash decoding on the binary string based on the receiver's key pair described in step 7 is as follows:
根据公式(4)计算NC,并复制NC次密钥二进制字符串形成散列位置位,将散列位置位与需要解密的秘密信息二进制字符串进行异或计算。Calculate NC according to formula (4), and copy the NC secondary key binary string to form a hash bit set, and perform XOR calculation with the hash bit bit and the secret information binary string to be decrypted.
进一步地,步骤8中所述的认证并进行哥德尔函数解码,输出秘密信息,具体如下:Further, the authentication described in step 8 and the decoding of the Gödel function are performed, and the secret information is output, as follows:
比较解码后的发送方密钥与接收方密钥是否相同,若相同,则对秘密信息二进制字符串进行哥德尔函数解码,然后输出秘密信息;若不同,则提示秘密信息提取失败。Compare whether the decoded sender's key and the receiver's key are the same. If they are the same, perform Gödel function decoding on the binary string of the secret information, and then output the secret information; if they are different, it indicates that the extraction of the secret information failed.
下面结合实施例对本发明作进行的详细说明。The present invention will be described in detail below in conjunction with the embodiments.
实施例Example
对文本隐藏信息的嵌入以及检测提取的具体场景图如图2所示,其中,SM代表秘密信息,CM代表封面文本,key为密钥,CMHM为载有秘密信息的文本,首先发送方输入封面文本和秘密信息,对秘密信息进行处理后,在封面文本中嵌入隐藏的秘密信息,然后载有隐藏信息的载体文本通过社交媒体或短信传输给接收方;接收方输入需检测的载体文本,利用密钥进行第一层解密,然后进行对比密钥认证,若认证成功则输出秘密信息,否则提示秘密提取失败,结合图1的流程图,具体步骤如下:The specific scene diagram of the embedding of text hidden information and detection and extraction is shown in Figure 2, where SM represents secret information, CM represents cover text, key is the key, and CM HM is the text containing the secret information. Cover text and secret information. After the secret information is processed, the hidden secret information is embedded in the cover text, and then the carrier text containing the hidden information is transmitted to the receiver through social media or SMS; the receiver enters the carrier text to be detected, Use the key to decrypt the first layer, and then perform the comparison key authentication. If the authentication is successful, output the secret information, otherwise it will prompt that the secret extraction fails. Combined with the flowchart in Figure 1, the specific steps are as follows:
步骤1、发送方将秘密信息的每个字符使用哥德尔函数编码替换为二进制字符串,具体如下:Step 1. The sender replaces each character of the secret message with a binary string using the Gödel function encoding, as follows:
步骤1.1、设定η为任何给定的数,则存在唯一解<α,β>,令η为字母的ASCII码,则<α,β>为SM的每个字符唯一的数字对:Step 1.1. Set η to be any given number, then there is a unique solution <α, β>, let η be the ASCII code of the letter, then <α, β> is the unique number pair of each character of SM:
<α,β>=2α(2β+1)-1 (1)< α ,β>=2α(2β+1)-1 (1)
且 and
等式(2)中,为奇数;In equation (2), is an odd number;
嵌入算法为秘密信息的每个字符使用等式(2)和(3)来计算<α,β>对;The embedding algorithm uses equations (2) and (3) to compute <α,β> pairs for each character of the secret message;
例如,“z”的ASCII码为122,即η=122,首先,通过计算的最大数来获得α: For example, the ASCII code of "z" is 122, that is, n=122. First, by calculating the maximum number of to obtain α:
步骤1.2、将α、β分别转换为6位二进制字符串,并连接在一起,为每个字母生成一个12位二进制字符串;Step 1.2. Convert α and β into 6-bit binary strings respectively, and connect them together to generate a 12-bit binary string for each letter;
步骤1.3、将每个字母的二进制字符串拼接到一起,形成秘密信息的二进制字符串。Step 1.3, splicing the binary strings of each letter together to form a binary string of secret information.
步骤2、获取发送方对称密钥,组合在秘密信息二进制字符串前面,具体如下:Step 2. Obtain the sender's symmetric key and combine it in front of the secret information binary string, as follows:
步骤2.1、将散列函数将发送时间,即生成隐藏信息的时间作为发送方密钥,如“10:12”,并省略该时间的第4位;Step 2.1. Use the hash function to use the sending time, that is, the time when the hidden information is generated, as the sender's key, such as "10:12", and omit the fourth bit of the time;
步骤2.2、创建一个数字,如“101”,并将其转换为8位二进制字符串,即发送方密钥,组合在秘密信息二进制字符串前面。Step 2.2. Create a number, such as "101", and convert it into an 8-bit binary string, which is the sender's key, and combine it in front of the secret message binary string.
步骤3、基于发送方对称密钥对秘密信息二进制字符串进行散列加密,具体如下:Step 3. Hash and encrypt the binary string of the secret information based on the sender's symmetric key, as follows:
步骤3.1、散列函数重复NC次复制密钥二进制字符串,形成散列位置位,NC计算公式如下:Step 3.1. The hash function repeats NC times to copy the key binary string to form a hash bit. The NC calculation formula is as follows:
式中,LS为秘密信息的长度,单位为字符;LSK为密钥二进制字符串的长度,单位为位;In the formula, LS is the length of the secret information, in characters; LSK is the length of the key binary string, in bits;
步骤3.2、散列函数根据散列位置位或秘密信息二进制字符串,产生散列秘密信息二进制字符串。Step 3.2, the hash function generates the hashed secret information binary string according to the hash bit or the secret information binary string.
步骤4、将散列加密后的秘密信息二进制字符串用设定的规则替换为Unicode零宽度控制字符,形成不可见字符串,并嵌入封面文本的前面,具体如下:Step 4. Replace the hash-encrypted binary string of secret information with Unicode zero-width control characters using the set rules to form an invisible string and embed it in front of the cover text, as follows:
结合图3的文本秘密信息隐藏示例,将二进制字符串的每连续2位分为一个小组,每个小组中“00”,“01”,“10”,“11”分别替换为“0x200C”,“0x202C”,“0x202D”,“0x200E”,替换方案如表1所示:Combined with the example of text secret information hiding in Figure 3, each consecutive 2 bits of the binary string are divided into a group, and "00", "01", "10", and "11" in each group are respectively replaced with "0x200C", "0x202C", "0x202D", "0x200E", the replacement scheme is shown in Table 1:
表1 Unicode零宽度字符表及替换方案Table 1 Unicode zero-width character table and replacement scheme
步骤5、接收方检测载体文本中的零宽度字符串,按照设定的规则还原二进制字符串,具体如下:检测载体文本中的零宽度字符串,按照“0x200C”,“0x202C”,“0x202D”,“0x200E”对应“00”,“01”,“10”,“11”的规则还原二进制字符串。Step 5. The receiver detects the zero-width character string in the carrier text, and restores the binary string according to the set rules, as follows: Detecting the zero-width character string in the carrier text, according to "0x200C", "0x202C", "0x202D" , "0x200E" corresponds to "00", "01", "10", "11" rules to restore binary strings.
步骤6、获取接收方密钥,具体如下:Step 6. Obtain the receiver's key, as follows:
步骤6.1、散列函数将接收时间作为接收方密钥,如“10:12”,并省略该时间的第4位;Step 6.1. The hash function uses the receiving time as the receiver's key, such as "10:12", and omits the fourth bit of the time;
步骤6.2、创建一个数字,如“101”,将其转换为8位二进制字符串,即接收方密钥。Step 6.2. Create a number, such as "101", and convert it into an 8-bit binary string, which is the receiver's key.
骤7、步骤7、基于接收方密钥对二进制字符串进行哈希解码,具体如下:Step 7, Step 7, hash decoding the binary string based on the receiver key, as follows:
根据公式(4)计算NC,并复制NC次密钥二进制字符串形成散列位置位,将其与需要解密的秘密信息二进制字符串进行异或计算。Calculate NC according to formula (4), and copy the NC secondary key binary string to form a hash bit, and perform XOR calculation with the binary string of secret information to be decrypted.
步骤8、认证并进行哥德尔函数解码,输出秘密信息,具体如下:Step 8: Authenticate and decode the Gödel function, and output the secret information, as follows:
比较解码后的发送方密钥与接收方密钥是否相同,若相同,则对秘密信息二进制字符串进行哥德尔函数解码,然后输出秘密信息;若不同,则提示秘密信息提取失败。Compare whether the decoded sender's key and the receiver's key are the same. If they are the same, perform Gödel function decoding on the binary string of the secret information, and then output the secret information; if they are different, it indicates that the extraction of the secret information failed.
本发明能够在短封面消息中隐藏大量的保密消息,并且嵌入的信息是不可见的,提高了秘密信息的保密性;利用对秘密信息的智能双重编码及加密,提高了文本秘密信息的传输安全性和便捷性;组合了数学函数编码和对称密钥加密算法,不同时间产生的秘密信息加密后的字符串不同,可以抵御多种网络攻击。The invention can hide a large number of secret messages in the short cover message, and the embedded information is invisible, which improves the confidentiality of the secret information; the intelligent double encoding and encryption of the secret information improves the transmission security of the text secret information It combines mathematical function encoding and symmetric key encryption algorithm, and the encrypted strings of secret information generated at different times are different, which can resist various network attacks.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910591575.8A CN110418029A (en) | 2019-07-02 | 2019-07-02 | Text Secret Information Hiding and Extracting Method Based on Unicode Encoding |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910591575.8A CN110418029A (en) | 2019-07-02 | 2019-07-02 | Text Secret Information Hiding and Extracting Method Based on Unicode Encoding |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110418029A true CN110418029A (en) | 2019-11-05 |
Family
ID=68358838
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910591575.8A Pending CN110418029A (en) | 2019-07-02 | 2019-07-02 | Text Secret Information Hiding and Extracting Method Based on Unicode Encoding |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110418029A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111294340A (en) * | 2020-01-17 | 2020-06-16 | 河南芯盾网安科技发展有限公司 | Encryption information steganography method based on zero-width characters |
CN111447188A (en) * | 2020-03-20 | 2020-07-24 | 青岛大学 | Carrier-free text steganography method based on language steganography feature space |
CN111538923A (en) * | 2020-03-16 | 2020-08-14 | 北京三快在线科技有限公司 | Information source determining method and device and electronic equipment |
CN112199248A (en) * | 2020-09-14 | 2021-01-08 | 中标慧安信息技术股份有限公司 | Operation and maintenance method based on artificial intelligence edge equipment |
CN112583823A (en) * | 2020-12-11 | 2021-03-30 | 广东工业大学 | Encoding encryption and decoding decryption processing method |
CN113992345A (en) * | 2021-09-13 | 2022-01-28 | 百度在线网络技术(北京)有限公司 | Method and device for encrypting and decrypting webpage sensitive data, electronic equipment and storage medium |
CN114584407A (en) * | 2022-05-09 | 2022-06-03 | 御天守(江苏)信息科技有限公司 | System for embedding and extracting multilingual hidden data in online message |
WO2022123093A1 (en) | 2020-12-09 | 2022-06-16 | Telefonica Cibersecurity Tech, S.L.U. | Method and system for encoding and decoding information in texts |
CN118316681A (en) * | 2024-04-15 | 2024-07-09 | 北京卓鸷科技有限责任公司 | Communication encryption and decryption method and system based on special character Base64 algorithm |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104699661A (en) * | 2015-01-29 | 2015-06-10 | 中国科学院信息工程研究所 | Selecting method and system of privacy code words facing Unicode coded documents |
CN107609356A (en) * | 2017-08-09 | 2018-01-19 | 南京信息工程大学 | Text carrier-free information concealing method based on label model |
CN108090329A (en) * | 2018-01-17 | 2018-05-29 | 上海海笛数字出版科技有限公司 | A kind of method and device that digital watermarking encipherment protection is carried out to content of text |
-
2019
- 2019-07-02 CN CN201910591575.8A patent/CN110418029A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104699661A (en) * | 2015-01-29 | 2015-06-10 | 中国科学院信息工程研究所 | Selecting method and system of privacy code words facing Unicode coded documents |
CN107609356A (en) * | 2017-08-09 | 2018-01-19 | 南京信息工程大学 | Text carrier-free information concealing method based on label model |
CN108090329A (en) * | 2018-01-17 | 2018-05-29 | 上海海笛数字出版科技有限公司 | A kind of method and device that digital watermarking encipherment protection is carried out to content of text |
Non-Patent Citations (2)
Title |
---|
张震宇;李千目;戚湧: "《基于不可见字符的文本水印设计》", 《南京理工大学学报》 * |
陈旖旎,李千目,吕超贤,桑笑楠,董潇: "《不可见字符的文本安全隐藏算法研究》", 《网络空间安全》 * |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111294340A (en) * | 2020-01-17 | 2020-06-16 | 河南芯盾网安科技发展有限公司 | Encryption information steganography method based on zero-width characters |
CN111538923A (en) * | 2020-03-16 | 2020-08-14 | 北京三快在线科技有限公司 | Information source determining method and device and electronic equipment |
CN111447188A (en) * | 2020-03-20 | 2020-07-24 | 青岛大学 | Carrier-free text steganography method based on language steganography feature space |
CN111447188B (en) * | 2020-03-20 | 2022-03-18 | 青岛大学 | Vectorless text steganography method based on language steganography feature space |
CN112199248A (en) * | 2020-09-14 | 2021-01-08 | 中标慧安信息技术股份有限公司 | Operation and maintenance method based on artificial intelligence edge equipment |
WO2022123093A1 (en) | 2020-12-09 | 2022-06-16 | Telefonica Cibersecurity Tech, S.L.U. | Method and system for encoding and decoding information in texts |
EP4261714A4 (en) * | 2020-12-09 | 2024-07-17 | Telefonica Cibersecurity Tech, S.L.U. | METHOD AND SYSTEM FOR ENCODING AND DECODING INFORMATION IN TEXTS |
CN112583823A (en) * | 2020-12-11 | 2021-03-30 | 广东工业大学 | Encoding encryption and decoding decryption processing method |
CN113992345A (en) * | 2021-09-13 | 2022-01-28 | 百度在线网络技术(北京)有限公司 | Method and device for encrypting and decrypting webpage sensitive data, electronic equipment and storage medium |
CN113992345B (en) * | 2021-09-13 | 2024-05-28 | 百度在线网络技术(北京)有限公司 | Webpage sensitive data encryption and decryption method and device, electronic equipment and storage medium |
CN114584407A (en) * | 2022-05-09 | 2022-06-03 | 御天守(江苏)信息科技有限公司 | System for embedding and extracting multilingual hidden data in online message |
CN118316681A (en) * | 2024-04-15 | 2024-07-09 | 北京卓鸷科技有限责任公司 | Communication encryption and decryption method and system based on special character Base64 algorithm |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110418029A (en) | Text Secret Information Hiding and Extracting Method Based on Unicode Encoding | |
Ahvanooey et al. | AITSteg: An innovative text steganography technique for hidden transmission of text message via social media | |
CN109547663B (en) | An Improved LSB Image Steganography Method Combined with Cryptography | |
CN106506487A (en) | A kind of information Encrypt and Decrypt method and device | |
CN108683491B (en) | Information hiding method based on encryption and natural language generation | |
CN114726538B (en) | Hidden communication method based on block link signature | |
Singh et al. | Digital signature verification scheme for image authentication | |
CN103942500B (en) | Hash ciphertext re-encryption method based on noise and decryption method after re-encryption | |
Amine | Diffie-Hellman key exchange through Steganographied images | |
CN104881838A (en) | A GF(23)-based (K,N) Meaningful Non-dilation Image Sharing and Reconstruction Method | |
KR20070042511A (en) | Digital Content Security System and Method | |
Yan et al. | Public key based bidirectional shadow image authentication without pixel expansion in image secret sharing | |
Thomas et al. | Advanced cryptographic steganography using multimedia files | |
Tripathi et al. | Enhancing Security of PGP with Steganography | |
Dubey et al. | An innovative data security techniques using cryptography and steganographic techniques | |
CN116866052A (en) | An efficient blockchain covert communication method based on address coding | |
Walidaniy et al. | Improvement of PSNR by using Shannon-fano compression technique in AES-LSB StegoCrypto | |
Srinivasan et al. | Android-Stego: A Novel Service Provider Imperceptible MMS Steganography Technique Robust to Message Loss. | |
CN114584407A (en) | System for embedding and extracting multilingual hidden data in online message | |
CN115643015A (en) | Digital watermark tracing method | |
CN115883744A (en) | Watermark method, device and storage medium based on fractional order chaotic mapping | |
Abd Elminaam et al. | Secure data storage in the cloud by using DNA and chaos cryptography | |
Sharma et al. | Steganography techniques using cryptography-a review paper | |
Rao et al. | A Novel Image Encryption Algorithm with Image Integrity Check | |
Patil et al. | A secure data communication system using enhanced cryptography and steganography |
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 |
Application publication date: 20191105 |
|
RJ01 | Rejection of invention patent application after publication |