A kind of text information transmission method, apparatus and system

文档序号:1744523 发布日期:2019-11-26 浏览:8次 中文

阅读说明:本技术 一种文本信息传输方法、装置及系统 (A kind of text information transmission method, apparatus and system ) 是由 王忠儒 姜海 李斌 于 2019-08-23 设计创作,主要内容包括:本发明提供了一种文本信息传输方法、装置及系统,发送方终端对设置有效期后的原始文本进行加密,得到机密文本,并将机密文本隐写到正常图片中,得到目标图片,将目标图片上传至图床网站,并将图床网站生成的目标图片的URL发送至接收方终端,接收方终端利用目标图片的URL从图床网站中提取目标图片,从目标图片中提取隐写的机密文本,对机密文本进行解密,得到设置有效期后的原始文本,通过验证原始文本信息是否在有效期内,得到安全的原始文本。本发明结合加密技术和信息隐藏技术,实现文本信息的安全、完整、有效传输。(The present invention provides a kind of text information transmission methods, apparatus and system, sending side terminal encrypts the urtext after setting validity period, obtain secret text, and by secret text steganography into normal picture, obtain Target Photo, Target Photo is uploaded to figure bed net station, and the URL for the Target Photo that figure bed net station generates is sent to receiving side terminal, receiving side terminal extracts Target Photo from figure bed net station using the URL of Target Photo, the secret text of steganography is extracted from Target Photo, secret text is decrypted, urtext after obtaining setting validity period, whether before the deadline by verifying urtext information, obtain safe urtext.Combining encryption technology and information concealing technology of the present invention realizes safe, complete, effective transmission of text information.)

1. a kind of text information transmission method, which is characterized in that be applied to sending side terminal, which comprises

Using the encryption rule arranged with receiving side terminal, the urtext after setting validity period is encrypted, secret is obtained Text;

Mesh is obtained by the secret text steganography into normal picture using the steganography method arranged with the receiving side terminal It marks on a map piece;

The Target Photo is uploaded to figure bed net station, and extracts the URL of the Target Photo of figure bed net station generation, In, figure bed net station does not carry out compression processing to the Target Photo;

The URL of the Target Photo is sent to the receiving side terminal.

2. the method according to claim 1, wherein described using the encryption rule arranged with receiving side terminal, Urtext information after setting validity period is encrypted, secret text is obtained, comprising:

MD5 hashing is carried out to the urtext after setting validity period;

It is signed using private key to the text after MD5 hashing;

Base64 coded treatment is carried out to the text after signature;

Using default bound symbol, the text after Base64 coded treatment is spelled with the urtext after setting validity period It connects;

Base64 coded treatment and AES encryption processing are successively carried out to the text that splicing obtains, obtain secret text.

3. the method according to claim 1, wherein the normal picture be RGB picture, it is described using with it is described The steganography method of receiving side terminal agreement obtains Target Photo by the secret text steganography into normal picture, comprising:

The red that the N bit value for indicating the length of the ciphertext is sequentially written in the normal picture top n pixel is led to Road lowest order;

The numerical value of the secret text every is sequentially written in the normal picture M pixel after top n pixel Red channel lowest order, wherein the length of the secret text be M.

4. a kind of text information transmission method, which is characterized in that be applied to receiving side terminal, which comprises

The URL of Target Photo in the figure bed net station that sending side terminal is sent is received, and using the URL of the Target Photo from described Figure bed net extracts the Target Photo in station;

Using the extracting method arranged with sending side terminal, the secret text of steganography is extracted from the Target Photo;

Using the decryption rule arranged with described sender terminal, the secret text is decrypted, setting validity period is obtained Urtext afterwards;

Whether before the deadline the urtext information is verified, if before the deadline, obtaining safe urtext.

5. according to the method described in claim 4, it is characterized in that, described using the extracting method arranged with sending side terminal, The secret text of steganography is extracted from the Target Photo, comprising:

The value for extracting the red channel lowest order of the Target Photo top n pixel obtains the length M of the secret text;

The value for extracting the red channel lowest order of M pixel after the Target Photo top n pixel, obtains the machine Ciphertext sheet.

6. according to the method described in claim 4, it is characterized in that, described advised using the decryption arranged with described sender terminal Then, the secret text is decrypted, the urtext after obtaining setting validity period, comprising:

AES decryption and Base64 decoding are successively carried out to the secret text;

Urtext and Base64 using default bound symbol, after extracting the setting validity period in the decoded text of Base64 Encoded information;

Base64 decoding is carried out to the Base64 encoded information, obtains signing messages;

MD5 hashing is carried out to the urtext after setting validity period;

It is signed using private key to the text after MD5 hashing, is verified signing messages;

Judge whether the signing messages and the verifying signing messages are consistent, if unanimously, it is original after determining setting validity period Text is effective information.

7. a kind of text information transmitting device, which is characterized in that be set to sending side terminal, described device includes:

Text encryption unit, for using the encryption rule arranged with receiving side terminal, to the urtext after setting validity period It is encrypted, obtains secret text;

Text steganography unit, for using the steganography method arranged with the receiving side terminal, the secret text steganography to be arrived In normal picture, Target Photo is obtained;

Picture uploading unit for the Target Photo to be uploaded to figure bed net station, and extracts the institute of figure bed net station generation State the URL of Target Photo, wherein figure bed net station does not carry out compression processing to the Target Photo;

URL transmission unit, for the URL of the Target Photo to be sent to the receiving side terminal.

8. device according to claim 7, which is characterized in that the text encryption unit is specifically used for:

MD5 hashing is carried out to the urtext after setting validity period;

It is signed using private key to the text after MD5 hashing;

Base64 coded treatment is carried out to the text after signature;

Using default bound symbol, the text after Base64 coded treatment is spelled with the urtext after setting validity period It connects;

Base64 coded treatment and AES encryption processing are successively carried out to the text that splicing obtains, obtain secret text.

9. a kind of text information transmitting device, which is characterized in that be set to receiving side terminal, described device includes:

Picture extraction unit for receiving the URL of Target Photo in the figure bed net station that sending side terminal is sent, and utilizes the mesh The URL of piece of marking on a map extracts the Target Photo from figure bed net station;

Text Feature Extraction unit, for extracting steganography from the Target Photo using the extracting method arranged with sending side terminal Secret text;

Text decryption unit, for being solved to the secret text using the decryption rule arranged with described sender terminal Close, after obtaining setting validity period urtext;

Validity verification unit, for whether before the deadline to verify the urtext information, if before the deadline, being pacified Full urtext.

10. a kind of text information Transmission system, which is characterized in that including sending side terminal and receiving side terminal;

Described sender terminal is used to execute the text information transmission method as described in claims 1 to 3;

The receiving side terminal is used to execute the text information transmission method as described in claim 4~6.

Technical field

The present invention relates to field of information security technology, more particularly to a kind of text information transmission method, device and being System.

Background technique

It applies with the popularity of the internet, more and more information need how to guarantee important information by network transmission Safe transmission is carried out in insecure network becomes particularly important.Therefore, realize that the covert communications of message increasingly cause people Concern.

In general, when transmitting confidential information, sender is transferred out again after encrypting information to improve information The safety of transmission.Encryption technology is that the common information being understood that is converted into the impenetrable ciphertext of messy code, at present Common encryption technology has symmetric cryptosystem (DES, AES etc.), asymmetric encryption techniques (RSA, ECC etc.) and Hybrid Encryption skill Art etc..But in the transmission process of ciphertext, a string of messy codes are easy to wake suspicion, in addition continuous with computer hardware It updates and the continuous development of distributed computing, breaking cryptographic keys time-consuming is shorter and shorter.

As it can be seen that cannot be guaranteed the safety of important information transmission by encryption information.

Summary of the invention

In view of this, the invention discloses a kind of text information transmission methods, apparatus and system, after important text is encrypted Steganography such as normal picture, and figure bed net station is uploaded to, realize safe, complete, effective transmission of text information.

In order to achieve the above-mentioned object of the invention, specific technical solution provided by the invention is as follows:

A kind of text information transmission method is applied to sending side terminal, which comprises

Using the encryption rule arranged with receiving side terminal, the urtext after setting validity period is encrypted, is obtained Secret text;

It is obtained by the secret text steganography into normal picture using the steganography method arranged with the receiving side terminal To Target Photo;

The Target Photo is uploaded to figure bed net station, and extract the Target Photo of figure bed net station generation URL, wherein figure bed net station does not carry out compression processing to the Target Photo;

The URL of the Target Photo is sent to the receiving side terminal.

Optionally, described using the encryption rule arranged with receiving side terminal, the urtext after setting validity period is believed Breath is encrypted, and secret text is obtained, comprising:

MD5 hashing is carried out to the urtext after setting validity period;

It is signed using private key to the text after MD5 hashing;

Base64 coded treatment is carried out to the text after signature;

Using default bound symbol, the text after Base64 coded treatment and the urtext after setting validity period are carried out Splicing;

Base64 coded treatment and AES encryption processing are successively carried out to the text that splicing obtains, obtain secret text.

Optionally, the normal picture is RGB picture, described to use the steganography method arranged with the receiving side terminal, By the secret text steganography into normal picture, Target Photo is obtained, comprising:

The N bit value for indicating the length of the ciphertext is sequentially written in the red of the normal picture top n pixel Chrominance channel lowest order;

The numerical value of the secret text every is sequentially written in the normal picture M picture after top n pixel The red channel lowest order of vegetarian refreshments, wherein the length of the secret text is M.

A kind of text information transmission method is applied to receiving side terminal, which comprises

Receive sending side terminal send figure bed net station in Target Photo URL, and using the Target Photo URL from The figure bed net extracts the Target Photo in station;

Using the extracting method arranged with sending side terminal, the secret text of steganography is extracted from the Target Photo;

Using the decryption rule arranged with described sender terminal, the secret text is decrypted, is provided with Urtext after the effect phase;

Whether before the deadline the urtext information is verified, if before the deadline, obtaining safe urtext.

Optionally, described using the extracting method arranged with sending side terminal, steganography is extracted from the Target Photo Secret text, comprising:

The value for extracting the red channel lowest order of the Target Photo top n pixel, obtains the length of the secret text Spend M;

The value for extracting the red channel lowest order of M pixel after the Target Photo top n pixel, obtains institute State secret text.

It is optionally, described that the secret text is decrypted using the decryption arranged with described sender terminal rule, Urtext after obtaining setting validity period, comprising:

AES decryption and Base64 decoding are successively carried out to the secret text;

Using default bound symbol, urtext after extracting the setting validity period in the decoded text of Base64 and Base64 encoded information;

Base64 decoding is carried out to the Base64 encoded information, obtains signing messages;

MD5 hashing is carried out to the urtext after setting validity period;

It is signed using private key to the text after MD5 hashing, is verified signing messages;

Judge whether the signing messages and the verifying signing messages are consistent, if unanimously, after determining setting validity period Urtext is effective information.

A kind of text information transmitting device, is set to sending side terminal, and described device includes:

Text encryption unit, for using the encryption rule arranged with receiving side terminal, to original after setting validity period Text is encrypted, and secret text is obtained;

Text steganography unit, it is for using the steganography method arranged with the receiving side terminal, the secret text is hidden It writes in normal picture, obtains Target Photo;

Picture uploading unit for the Target Photo to be uploaded to figure bed net station, and extracts the generation of figure bed net station The Target Photo URL, wherein figure bed net station not to the Target Photo carry out compression processing;

URL transmission unit, for the URL of the Target Photo to be sent to the receiving side terminal.

Optionally, the text encryption unit, is specifically used for:

MD5 hashing is carried out to the urtext after setting validity period;

It is signed using private key to the text after MD5 hashing;

Base64 coded treatment is carried out to the text after signature;

Using default bound symbol, the text after Base64 coded treatment and the urtext after setting validity period are carried out Splicing;

Base64 coded treatment and AES encryption processing are successively carried out to the text that splicing obtains, obtain secret text.

Optionally, when the normal picture is RGB picture, the text steganography unit is specifically used for:

The N bit value for indicating the length of the ciphertext is sequentially written in the red of the normal picture top n pixel Chrominance channel lowest order;

The numerical value of the secret text every is sequentially written in the normal picture M picture after top n pixel The red channel lowest order of vegetarian refreshments, wherein the length of the secret text is M.

A kind of text information transmitting device, is set to receiving side terminal, and described device includes:

Picture extraction unit for receiving the URL of Target Photo in the figure bed net station that sending side terminal is sent, and utilizes institute The URL for stating Target Photo extracts the Target Photo from figure bed net station;

Text Feature Extraction unit, for being extracted from the Target Photo using the extracting method arranged with sending side terminal The secret text of steganography;

Text decryption unit, for regular using decryption arrange with described sender terminal, to the secret text into Row decryption, the urtext after obtaining setting validity period;

Validity verification unit, for whether before the deadline to verify the urtext information, if before the deadline, obtaining To the urtext of safety.

Optionally, the Text Feature Extraction unit, is specifically used for:

The value for extracting the red channel lowest order of the Target Photo top n pixel, obtains the length of the secret text Spend M;

The value for extracting the red channel lowest order of M pixel after the Target Photo top n pixel, obtains institute State secret text.

Optionally, the text decryption unit, is specifically used for:

AES decryption and Base64 decoding are successively carried out to the secret text;

Using default bound symbol, urtext after extracting the setting validity period in the decoded text of Base64 and Base64 encoded information;

Base64 decoding is carried out to the Base64 encoded information, obtains signing messages;

MD5 hashing is carried out to the urtext after setting validity period;

It is signed using private key to the text after MD5 hashing, is verified signing messages;

Judge whether the signing messages and the verifying signing messages are consistent, if unanimously, after determining setting validity period Urtext is effective information.

A kind of text information Transmission system, including sending side terminal and receiving side terminal.

Compared with the existing technology, beneficial effects of the present invention are as follows:

A kind of text information transmission method disclosed by the invention, combining encryption technology and information concealing technology, by original text Steganography enters in normal picture after this encryption, will not wake suspicion, and non-reception side's terminal can not learn encryption rule and text steganography Method can not crack text, ensure that text information transmission safety, by Target Photo be uploaded to not to picture into The figure bed net station of row compression processing, ensure that text information is not damaged in transmission process, ensure that text information transmission Integrality, and by validity verification, guarantee text information before the deadline, avoid by Replay Attack, and passes through figure bed net It stands and stores Target Photo, save local server space, solve the problems such as picture access is slow.

Detailed description of the invention

In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.

Fig. 1 is that a kind of process of the text information transmission method applied to sending side terminal disclosed by the embodiments of the present invention is shown It is intended to;

Fig. 2 is that a kind of process of the text information transmission method applied to receiving side terminal disclosed by the embodiments of the present invention is shown It is intended to;

Fig. 3 is that a kind of structure for the text information transmitting device for being set to sending side terminal disclosed by the embodiments of the present invention is shown It is intended to;

Fig. 4 is that a kind of structure for the text information transmitting device for being set to receiving side terminal disclosed by the embodiments of the present invention is shown It is intended to;

Fig. 5 is a kind of structural schematic diagram of text information Transmission system disclosed by the embodiments of the present invention.

Specific embodiment

Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.

Present embodiment discloses a kind of text information transmission methods, are applied to sending side terminal, and sending side terminal can be Terminal device with data processing and image processing function, referring to Fig. 1, text information transmission method disclosed in the present embodiment Specifically includes the following steps:

S101: using the encryption rule arranged with receiving side terminal, encrypting the urtext after setting validity period, Obtain secret text;

Optionally, a kind of encryption rule is as follows:

MD5 hashing is carried out to the urtext after setting validity period;

It is signed using private key to the text after MD5 hashing;

Base64 coded treatment is carried out to the text after signature;

Using default bound symbol, the text after Base64 coded treatment and the urtext after setting validity period are carried out Splicing;

Base64 coded treatment and AES encryption processing are successively carried out to the text that splicing obtains, obtain secret text.

To sum up, the formalized description of secret text content is as follows:

AES (Base64 (Base64 (private key signature (MD5 (urtext ^ validity period))) # urtext ^ validity period))

With urtext " { " username ": " sophia ", " password ": " dhwfi123djs " } " for, it is specific to walk It is rapid as follows.

Step 1: validity period is set behind urtext information, and it is intermediate to be divided with No. ^, it is original after validity period is set The content of text is as follows.

{“username”:“sophia”,“password”:”dhwfi123djs”}^2019-04-14_2019-04-19

Step 2: carrying out MD5 hashing to the urtext after setting validity period, disappeared with the private key of preservation to formation Breath abstract is signed, and Base64 coded treatment, and treated, and content is as follows.

CTphSDFd/6NLtWiB8N52DUjZarRs4GPL7Q+gvxu3cQ4lIJzR6nYVQRuFowUI8Opyhrro Otf3rS+hPh6sQ8hyDImP8DWDEuMNqykZXWfUSu8q4sQqDtt1DFHOOOfBTvkVdak6uVT5NHeqzFMp GF+sE/VJL3iUVkQkvZYFPt1Sdjs=

Step 3: by the first step together with the string-concatenation in second step, intermediate the reason of being divided with #, being done so It is content when receiving side terminal verifying is signed, before needing to sign and after signature.One is also then done to spliced content Secondary Base64 coding.Wherein, the content not yet handled through Base64 is as follows.

CTphSDFd/6NLtWiB8N52DUjZarRs4GPL7Q+gvxu3cQ4lIJzR6nYVQRuFowUI8Opyhrro Otf3rS+hPh6sQ8hyDImP8DWDEuMNqykZXWfUSu8q4sQqDtt1DFHOOOfBTvkVdak6uVT5NHeqzFMp GF+sE/VJL3iUVkQkvZYFPt1Sdjs=# { " username ": " sophia ", " password ": " dhwfi123djs " } ^ 2019-04-14_2019-04-19

Step 4: the text of third step is successively carried out to Base64 coding and AES encryption processing, treated text, i.e., Final secret text content is as follows.

Zsux0tLATO0GoxD62SLWjK75mXO7CHATBXBgaPYCyIXErWpB3Lg+ TNjrImW1API1EvbcN9VGx0gd/fAFRsYC6zckb2Q4OYHTi1g9/FwUWUfI+WJcDZsizRDUqDWEk15R punloEBPTc1gbiy9+CL6XToMvb1xhcjybY3Iyt6m2RSSeqt/MVHndENRINxL/yxRhQPczuVT3Hdd eACbnEG0sHgCyhQZaPYg82rrDXvOn+yHcqjGopFpw3dyXyfDD3oSqZqGLaHUJpgrmJAhel5loHDK jnAjKn85HfD7vJ9M5z+97Xig0Pdzn2H2SNLOO91Veq8l+BwVAb5Kc15gD3fxQxdDTMJ82bUmJrp9 qmyZmxhdT4F5+cCOhkb5966eIBQqnZVrRm6hASzIg0XmqqPKklRYxCxw/wtgRYrDY9RoB43Pw3T2 jZuKsVs08x9HAEvu

S102: using the steganography method arranged with the receiving side terminal, by the secret text steganography to normal picture In, obtain Target Photo;

Wherein, when normal picture is RGB picture, steganography method is as follows:

The N bit value for indicating the length of the ciphertext is sequentially written in the red of the normal picture top n pixel Chrominance channel lowest order;

The numerical value of the secret text every is sequentially written in the normal picture M picture after top n pixel The red channel lowest order of vegetarian refreshments, wherein the length of the secret text is M.

S103: being uploaded to figure bed net station for the Target Photo, and extracts the target figure of figure bed net station generation The URL of piece;

Wherein, figure bed net station does not carry out compression processing to the Target Photo.

It should be noted that compression processing was the necessity for is not carried out to picture in the selection at figure bed net station, because If figure bed net station carries out compression processing to original image, the structure of picture will be destroyed, causes secret text impaired because of format And it loses.There are imgbb, sm.ms, upload.cc and Baidu's knowledge figure etc. in available figure bed net station.

S104: the URL of the Target Photo is sent to the receiving side terminal.

During concrete implementation, S104 is based primarily upon the exploitation of the network library Requests in Python and realizes.Firstly, The Target Photo of Hiding Secret text is locally obtained from sending side terminal using open method.Then requests.post is used Target Photo is uploaded to the interface IP address at figure bed net station by method.The URL chain of generation is finally extracted from the response of return It connects.

The disclosed text information transmission method for being applied to sending side terminal based on the above embodiment, the present embodiment are corresponding public A kind of transmission method of text information applied to receiving side terminal is opened, wherein receiving side terminal is with data processing function With the terminal device of image processing function, referring to Fig. 2, text information transferring method specifically includes the following steps:

S201: the URL of Target Photo in the figure bed net station that sending side terminal is sent is received, and utilizes the Target Photo URL extracts the Target Photo from figure bed net station;

S202: using the extracting method arranged with sending side terminal, the secret text of steganography is extracted from the Target Photo This;

Firstly, obtaining the pixel in Target Photo using the library PIL getpixel method.Then it is obtained most from red channel The hiding information (binary system) of low level, and be stitched together and be stored in character string.Finally, converting the binary system in character string to Decimal system ASCII character is stored in a new character string, and secret text information is just extracted.

When Target Photo is RGB picture, specific extracting method is as follows:

The value for extracting the red channel lowest order of the Target Photo top n pixel, obtains the length of the secret text Spend M;

The value for extracting the red channel lowest order of M pixel after the Target Photo top n pixel, obtains institute State secret text.

S203: using the decryption rule arranged with described sender terminal, the secret text is decrypted, is set Urtext after being set effective the phase;

AES decryption and Base64 decoding are successively carried out to the secret text;

Using default bound symbol, urtext after extracting the setting validity period in the decoded text of Base64 and Base64 encoded information;

Base64 decoding is carried out to the Base64 encoded information, obtains signing messages;

MD5 hashing is carried out to the urtext after setting validity period;

It is signed using private key to the text after MD5 hashing, is verified signing messages;

Judge whether the signing messages and the verifying signing messages are consistent, if unanimously, after determining setting validity period Urtext is effective information.

Whether before the deadline S204: verifying the urtext information, if before the deadline, obtaining safe original text This.

As it can be seen that the present embodiment discloses a kind of text information transmission method, combining encryption technology and information concealing technology is sent Steganography enters in normal picture after square terminal encrypts urtext, will not wake suspicion, and non-reception side's terminal can not learn encryption Rule and text steganography method, can not crack text, ensure that the safety of text information transmission, will be on Target Photo The figure bed net station for not carrying out compression processing to picture is reached, ensure that text information is not damaged in transmission process, ensure that The integrality of text information transmission, receiving side terminal is extracting the secret text in Target Photo, and passes through the decryption side of agreement After method is decrypted, by signature verification and validity verification, guarantee the safety and integrality and in validity period of text information It is interior, it avoids by Replay Attack.Target Photo is stored by figure bed net station simultaneously, local server space is saved, solves The problems such as picture access is slow improves text information efficiency of transmission.

A kind of disclosed text information transmission method applied to sending side terminal, the present embodiment are public based on the above embodiment A kind of text information transmitting device has been opened, sending side terminal is set to, referring to Fig. 3, described device includes:

Text encryption list 301, for using the encryption rule arranged with receiving side terminal, to original after setting validity period Text is encrypted, and secret text is obtained;

Text steganography unit 302, for using the steganography method arranged with the receiving side terminal, by the secret text Steganography obtains Target Photo into normal picture;

Picture uploading unit 303, for the Target Photo to be uploaded to figure bed net station, and it is raw to extract figure bed net station At the Target Photo URL, wherein figure bed net station not to the Target Photo carry out compression processing;

URL transmission unit 304, for the URL of the Target Photo to be sent to the receiving side terminal.

Optionally, the text encryption unit 301, is specifically used for:

MD5 hashing is carried out to the urtext after setting validity period;

It is signed using private key to the text after MD5 hashing;

Base64 coded treatment is carried out to the text after signature;

Using default bound symbol, the text after Base64 coded treatment and the urtext after setting validity period are carried out Splicing;

Base64 coded treatment and AES encryption processing are successively carried out to the text that splicing obtains, obtain secret text.

Optionally, when the normal picture is RGB picture, the text steganography unit 302 is specifically used for:

The N bit value for indicating the length of the ciphertext is sequentially written in the red of the normal picture top n pixel Chrominance channel lowest order;

The numerical value of the secret text every is sequentially written in the normal picture M picture after top n pixel The red channel lowest order of vegetarian refreshments, wherein the length of the secret text is M.

Disclosed a kind of text information transmission method applied to receiving side terminal based on the above embodiment, the present embodiment pair A kind of text information transmitting device should be disclosed, receiving side terminal is set to, referring to Fig. 4, described device includes:

Picture extracts single 401, the URL of Target Photo in the figure bed net station for receiving sending side terminal transmission, and utilizes The URL of the Target Photo extracts the Target Photo from figure bed net station;

Text Feature Extraction unit 402, for being mentioned from the Target Photo using the extracting method arranged with sending side terminal Take the secret text of steganography;

Text decryption unit 403, for regular using the decryption arranged with described sender terminal, to the secret text It is decrypted, the urtext after obtaining setting validity period;

Validity verification unit 404, for whether before the deadline to verify the urtext information, if in validity period It is interior, obtain safe urtext.

Optionally, the Text Feature Extraction unit 401, is specifically used for:

The value for extracting the red channel lowest order of the Target Photo top n pixel, obtains the length of the secret text Spend M;

The value for extracting the red channel lowest order of M pixel after the Target Photo top n pixel, obtains institute State secret text.

Optionally, the text decryption unit 402, is specifically used for:

AES decryption and Base64 decoding are successively carried out to the secret text;

Using default bound symbol, urtext after extracting the setting validity period in the decoded text of Base64 and Base64 encoded information;

Base64 decoding is carried out to the Base64 encoded information, obtains signing messages;

MD5 hashing is carried out to the urtext after setting validity period;

It is signed using private key to the text after MD5 hashing, is verified signing messages;

Judge whether the signing messages and the verifying signing messages are consistent, if unanimously, after determining setting validity period Urtext is effective information.

Based on above-mentioned all embodiments, referring to Fig. 5, present embodiment discloses a kind of text information Transmission systems, including Sending side terminal 501 and receiving side terminal 502.

Wherein, sending side terminal 501 is for executing following text information transferring method:

Using the encryption rule arranged with receiving side terminal, the urtext after setting validity period is encrypted, is obtained Secret text;

It is obtained by the secret text steganography into normal picture using the steganography method arranged with the receiving side terminal To Target Photo;

The Target Photo is uploaded to figure bed net station, and extract the Target Photo of figure bed net station generation URL, wherein figure bed net station does not carry out compression processing to the Target Photo;

The URL of the Target Photo is sent to the receiving side terminal.

Further, described using the encryption rule arranged with receiving side terminal, the urtext after setting validity period is believed Breath is encrypted, and secret text is obtained, comprising:

MD5 hashing is carried out to the urtext after setting validity period;

It is signed using private key to the text after MD5 hashing;

Base64 coded treatment is carried out to the text after signature;

Using default bound symbol, the text after Base64 coded treatment and the urtext after setting validity period are carried out Splicing;

Base64 coded treatment and AES encryption processing are successively carried out to the text that splicing obtains, obtain secret text.

Further, the normal picture is RGB picture, described to use the steganography method arranged with the receiving side terminal, By the secret text steganography into normal picture, Target Photo is obtained, comprising:

The N bit value for indicating the length of the ciphertext is sequentially written in the red of the normal picture top n pixel Chrominance channel lowest order;

The numerical value of the secret text every is sequentially written in the normal picture M picture after top n pixel The red channel lowest order of vegetarian refreshments, wherein the length of the secret text is M.

Receiving side terminal 502 is for executing following text information transferring method:

Receive sending side terminal send figure bed net station in Target Photo URL, and using the Target Photo URL from The figure bed net extracts the Target Photo in station;

Using the extracting method arranged with sending side terminal, the secret text of steganography is extracted from the Target Photo;

Using the decryption rule arranged with described sender terminal, the secret text is decrypted, is provided with Urtext after the effect phase;

Whether before the deadline the urtext information is verified, if before the deadline, obtaining safe urtext.

Further, described using the extracting method arranged with sending side terminal, steganography is extracted from the Target Photo Secret text, comprising:

The value for extracting the red channel lowest order of the Target Photo top n pixel, obtains the length of the secret text Spend M;

The value for extracting the red channel lowest order of M pixel after the Target Photo top n pixel, obtains institute State secret text.

It is further, described that the secret text is decrypted using the decryption arranged with described sender terminal rule, Urtext after obtaining setting validity period, comprising:

AES decryption and Base64 decoding are successively carried out to the secret text;

Using default bound symbol, urtext after extracting the setting validity period in the decoded text of Base64 and Base64 encoded information;

Base64 decoding is carried out to the Base64 encoded information, obtains signing messages;

MD5 hashing is carried out to the urtext after setting validity period;

It is signed using private key to the text after MD5 hashing, is verified signing messages;

Judge whether the signing messages and the verifying signing messages are consistent, if unanimously, after determining setting validity period Urtext is effective information.

A kind of text information Transmission system disclosed by the invention, sending side terminal to setting validity period after urtext into Row encryption, obtains secret text, and secret text steganography is obtained Target Photo into normal picture, Target Photo is uploaded It is sent to receiving side terminal to figure bed net station, and by the URL for the Target Photo that figure bed net station generates, receiving side terminal utilizes target The URL of picture extracts Target Photo from figure bed net station, from Target Photo extract steganography secret text, to secret text into Whether before the deadline by verifying urtext information row decryption, the urtext after obtaining setting validity period obtain safety Urtext.Combining encryption technology and information concealing technology of the present invention realizes safe, complete, effective transmission of text information.

The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于国密算法的安卓信息加密系统及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!