CN106487659B - Information encryption method, information encryption device and terminal - Google Patents

Information encryption method, information encryption device and terminal Download PDF

Info

Publication number
CN106487659B
CN106487659B CN201610919705.2A CN201610919705A CN106487659B CN 106487659 B CN106487659 B CN 106487659B CN 201610919705 A CN201610919705 A CN 201610919705A CN 106487659 B CN106487659 B CN 106487659B
Authority
CN
China
Prior art keywords
information
instant messaging
encryption
ciphertext data
target receiving
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610919705.2A
Other languages
Chinese (zh)
Other versions
CN106487659A (en
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.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201610919705.2A priority Critical patent/CN106487659B/en
Priority to PCT/CN2016/108024 priority patent/WO2018072261A1/en
Publication of CN106487659A publication Critical patent/CN106487659A/en
Application granted granted Critical
Publication of CN106487659B publication Critical patent/CN106487659B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network 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/0435Network 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides an information encryption method, an information encryption terminal and an information encryption device, wherein the information encryption method comprises the following steps: when the operation of sending instant messaging information to a target receiving end is detected, encrypting the instant messaging information to obtain a ciphertext data packet, wherein the ciphertext data packet comprises a random number used for encryption and ciphertext data obtained through encryption; and sending the ciphertext data packet to the target receiving end. By the technical scheme, the instant messaging information can be encrypted and then transmitted, so that other people can hardly steal related information, the security of instant messaging information transmission is ensured, and the privacy of a user is effectively guaranteed.

Description

Information encryption method, information encryption device and terminal
Technical Field
The present invention relates to the field of information security technologies, and in particular, to an information encryption method, an information encryption apparatus, and a terminal.
Background
With the continuous expansion of the functions of the intelligent terminal and the diversification of the application programs of the intelligent terminal, the intelligent terminal becomes a normal state of work and life of people, and instant messaging such as WeChat and QQ becomes a main tool for communication and communication of people, but the existing communication is carried out in a public network provided by an operator, the communication mode adopts a plaintext mode for transmission, the chatting records are also stored in the plaintext mode and can be easily stolen by other people, so that great potential safety hazards are brought to users, and the leakage consequences of confidential information are not considered particularly for certain specific groups, such as government, institutions, scientific research and other confidential units.
Therefore, how to ensure the security of information transmission becomes an urgent technical problem to be solved.
Disclosure of Invention
Based on at least one of the above technical problems, the present invention provides a new information encryption scheme, which can encrypt and transmit the instant messaging information, so that other people can hardly steal the related information, thereby ensuring the security of the instant messaging information transmission and effectively ensuring the privacy of users.
The invention also provides a new information decryption scheme, which can decrypt and display the received ciphertext data packet in real time, delete the read instant messaging information in real time and effectively avoid the leakage of the instant messaging information.
In view of this, the present invention provides an information encryption method, including: when the operation of sending the instant messaging information to a target receiving end is detected, encrypting the instant messaging information to obtain a ciphertext data packet, wherein the ciphertext data packet comprises a random number used for encryption and ciphertext data obtained through encryption; and sending the ciphertext data packet to the target receiving end.
In the technical scheme, when the operation of sending the instant messaging information to the target receiving terminal is detected, the instant messaging information is encrypted to obtain a ciphertext data packet, and the ciphertext data packet is sent to the target receiving terminal, wherein the ciphertext data packet comprises the random number used in encryption and the ciphertext data obtained in encryption, so that other people are difficult to decrypt the ciphertext data packet to steal the related information, the transmission safety of the instant messaging information is ensured, and the user privacy is effectively ensured.
In the foregoing technical solution, preferably, the step of encrypting the instant messaging information specifically includes: generating the random number, and calculating an encryption key of the instant messaging information based on the random number; and encrypting the instant messaging information by a symmetric encryption algorithm by using the encryption key.
In the technical scheme, the random number is generated, the encryption key of the instant messaging information is calculated based on the random number, the encryption key is used, the instant messaging information is encrypted through a symmetric encryption algorithm, the encryption key used when the instant messaging information is encrypted each time is different due to the fact that the random numbers generated during encryption are different, the security of instant messaging information transmission is ensured to a greater extent, meanwhile, the encryption key is randomly generated, and the two communication parties do not need to share the key in advance.
In any one of the above technical solutions, preferably, before the step of encrypting the instant messaging information, the method further includes: detecting whether the target receiving end has the decryption authority for the instant messaging information; executing the step of encrypting the instant communication information when the target receiving end is determined to have the decryption right; and outputting prompt information when the target receiving end is determined not to have the decryption right.
In the technical scheme, whether the target receiving end has the decryption authority for the instant messaging information is detected, the target receiving end is determined to have the decryption authority, then encryption processing is carried out, the safety of instant messaging information transmission is guaranteed, meanwhile, the target receiving end can decrypt the instant messaging information, so that the instant messaging information can be timely sent, the embarrassment that the target receiving end cannot decrypt the encrypted data packet is avoided, when the target receiving end is determined to have no decryption authority, prompt information is output, and a user at the transmitting end can timely know the situation and carry out corresponding processing.
In any one of the above technical solutions, preferably, the step of detecting whether the target receiving end has a decryption right for the instant messaging information specifically includes: acquiring identification information of the target receiving terminal; judging whether the identification information is matched with prestored identification information or not; when the identification information is matched with the pre-stored identification information, determining that the target receiving end has the decryption authority; and when the identification information is not matched with the prestored identification information, determining that the target receiving terminal has no decryption authority.
In the technical scheme, whether the target receiving end has the decryption authority for the instant messaging information or not can be judged according to the identification information of the target receiving end, and the accuracy of the judgment result of whether the target receiving end has the decryption authority or not is ensured. The identification information and the pre-stored identification information may both include a name of the target receiving end, an encryption/decryption capability parameter, and the like.
In any one of the above technical solutions, preferably, the instant messaging information includes any one of: weChat information, QQ information, MSN information.
According to a second aspect of the present invention, there is provided an information decryption method, comprising: receiving a ciphertext data packet sent by a sending end, wherein the ciphertext data packet is obtained by encrypting the instant messaging information when the sending end detects an operation of sending the instant messaging information, and the ciphertext data comprises a random number used for encryption and ciphertext data obtained by encryption; and when a viewing instruction of the ciphertext data packet is received, decrypting the ciphertext data packet to obtain instant messaging information corresponding to the ciphertext data packet, displaying the instant messaging information corresponding to the ciphertext data packet, and deleting the instant messaging information when the viewing of the instant messaging information is finished.
In the technical scheme, the ciphertext data packet sent by the sending end is received, when the checking instruction of the ciphertext data packet is received, the ciphertext data packet is decrypted to obtain the instant messaging information corresponding to the ciphertext data packet, the instant messaging information corresponding to the ciphertext data packet is displayed, and when the checking of the instant messaging information is finished, the instant messaging information is deleted, so that the received ciphertext data packet can be instantly decrypted and displayed, the read instant messaging information is instantly deleted, and the leakage of the instant messaging information is effectively avoided.
In the foregoing technical solution, preferably, the step of decrypting the ciphertext data packet specifically includes: extracting the random number from the ciphertext data packet, and calculating a decryption key of the ciphertext data packet based on the random number; and decrypting the ciphertext data through a symmetric decryption algorithm by using the decryption key.
In the technical scheme, the random number is extracted from the ciphertext data packet, the decryption key of the ciphertext data packet is calculated based on the random number, the decryption key is used for decrypting the ciphertext data through a symmetric decryption algorithm, and the ciphertext data packet can be decrypted without the need of the two communication parties to share the key in advance.
In any one of the above technical solutions, preferably, the method further includes: and storing the received ciphertext data packet so as to decrypt the ciphertext data packet again when the viewing instruction of the ciphertext data packet is received again.
In the technical scheme, the ciphertext data packet is stored, so that the instant messaging information in the communication record is displayed in the form of the ciphertext data packet, is decrypted immediately when needing to be checked and is displayed immediately, the safety of the instant messaging information is ensured, and the privacy leakage of a user is avoided.
According to a third aspect of the present invention, there is provided an information encryption apparatus comprising: the system comprises an encryption unit, a target receiving end and a processing unit, wherein the encryption unit is used for encrypting instant messaging information to obtain a ciphertext data packet when the operation of sending the instant messaging information to the target receiving end is detected, and the ciphertext data packet comprises a random number used for encryption and ciphertext data obtained through encryption; and the sending unit is used for sending the ciphertext data packet to the target receiving end.
In the technical scheme, when the operation of sending the instant messaging information to the target receiving terminal is detected, the instant messaging information is encrypted to obtain a ciphertext data packet, and the ciphertext data packet is sent to the target receiving terminal, wherein the ciphertext data packet comprises the random number used in encryption and the ciphertext data obtained in encryption, so that other people are difficult to decrypt the ciphertext data packet to steal the related information, the transmission safety of the instant messaging information is ensured, and the user privacy is effectively ensured.
In any one of the above technical solutions, preferably, the encryption unit is specifically configured to: generating the random number, and calculating an encryption key of the instant messaging information based on the random number; and encrypting the instant messaging information through a symmetric encryption algorithm by using the encryption key.
In the technical scheme, the random number is generated, the encryption key of the instant messaging information is calculated based on the random number, the encryption key is used, the instant messaging information is encrypted through a symmetric encryption algorithm, the encryption key used when the instant messaging information is encrypted each time is different due to the fact that the random numbers generated during encryption are different, the security of instant messaging information transmission is ensured to a greater extent, meanwhile, the encryption key is randomly generated, and the two communication parties do not need to share the key in advance.
In any one of the above technical solutions, preferably, the method further includes: the detection unit is used for detecting whether the target receiving end has the decryption authority to the instant messaging information; the encryption unit is specifically configured to encrypt the instant messaging information when the detection unit determines that the target receiving end has the decryption right; and the prompting unit is used for outputting prompting information when the detection unit determines that the target receiving end does not have the decryption right.
In the technical scheme, whether the target receiving end has the decryption authority for the instant messaging information is detected, the target receiving end is determined to have the decryption authority, then encryption processing is carried out, the safety of instant messaging information transmission is guaranteed, meanwhile, the target receiving end can decrypt the instant messaging information, the instant messaging information is conveniently and timely sent, the embarrassment situation that the target receiving end cannot decrypt the encrypted data package when receiving the encrypted data package is avoided, when the target receiving end is determined not to have the decryption authority, prompt information is output, and a sending end user can timely know the situation and carry out corresponding processing.
In any one of the above technical solutions, preferably, the detection unit is specifically configured to: acquiring identification information of the target receiving terminal; judging whether the identification information is matched with pre-stored identification information or not; when the identification information is matched with the pre-stored identification information, determining that the target receiving end has the decryption authority; and when the identification information is not matched with the prestored identification information, determining that the target receiving terminal has no decryption authority.
In the technical scheme, whether the target receiving end has the decryption authority for the instant messaging information or not can be judged according to the identification information of the target receiving end, and the accuracy of the judgment result of whether the target receiving end has the decryption authority or not is ensured. The identification information and the pre-stored identification information may both include a name of the target receiving end, an encryption/decryption capability parameter, and the like.
According to a fourth aspect of the present invention, there is provided an information decrypting apparatus comprising: the receiving unit is used for receiving a ciphertext data packet sent by a sending end, wherein the ciphertext data packet is obtained by encrypting the instant messaging information when the sending end detects an operation of sending the instant messaging information, and the ciphertext data comprises a random number used for encryption and ciphertext data obtained by encryption; and the processing unit is used for decrypting the ciphertext data packet to obtain instant messaging information corresponding to the ciphertext data packet when a viewing instruction of the ciphertext data packet is received, displaying the instant messaging information corresponding to the ciphertext data packet, and deleting the instant messaging information when the viewing of the instant messaging information is finished.
In the technical scheme, the ciphertext data packet sent by the sending end is received, when the checking instruction of the ciphertext data packet is received, the ciphertext data packet is decrypted to obtain the instant messaging information corresponding to the ciphertext data packet, the instant messaging information corresponding to the ciphertext data packet is displayed, and when the checking of the instant messaging information is finished, the instant messaging information is deleted, so that the received ciphertext data packet can be instantly decrypted and displayed, the read instant messaging information is instantly deleted, and the leakage of the instant messaging information is effectively avoided.
In the foregoing technical solution, preferably, the processing unit is specifically configured to: extracting the random number from the ciphertext data packet, and calculating a decryption key of the ciphertext data packet based on the random number; and decrypting the ciphertext data through a symmetric decryption algorithm by using the decryption key.
In the technical scheme, the random number is extracted from the ciphertext data packet, the decryption key of the ciphertext data packet is calculated based on the random number, the decryption key is used for decrypting the ciphertext data through a symmetric decryption algorithm, and the ciphertext data packet can be decrypted without the need of the two communication parties to share the key in advance.
In any one of the above technical solutions, preferably, the method further includes: and the storage unit is used for storing the received ciphertext data packet so as to decrypt the ciphertext data packet again when receiving the viewing instruction of the ciphertext data packet again.
In the technical scheme, the ciphertext data packet is stored, so that the instant messaging information in the communication record is displayed in the form of the ciphertext data packet, is decrypted immediately when needing to be checked and is displayed immediately, the safety of the instant messaging information is ensured, and the privacy leakage of a user is avoided.
According to a fifth aspect of the present invention, there is provided a terminal comprising: the information encryption device according to any one of the above aspects; and an information decryption apparatus according to any one of the above-described embodiments.
By the technical scheme, the instant messaging information can be encrypted, so that other people can hardly steal related information, the security of instant messaging information transmission is ensured, decryption can be performed without the need of sharing a secret key by two communication parties in advance, the instant messaging information can be displayed in an instant manner, the read instant messaging information can be deleted in an instant manner, and the leakage of the instant messaging information is effectively avoided.
Drawings
FIG. 1 shows a schematic flow diagram of an information encryption method according to an embodiment of the invention;
FIG. 2 shows a schematic flow diagram of an information decryption method according to an embodiment of the invention;
FIG. 3 shows a schematic block diagram of an information encryption apparatus according to an embodiment of the present invention;
fig. 4 shows a schematic block diagram of an information decryption apparatus according to an embodiment of the present invention;
fig. 5 shows a schematic block diagram of a terminal according to an embodiment of the invention;
fig. 6 shows a block diagram illustrating a structure of a terminal according to an embodiment of the present invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
Fig. 1 shows a schematic flow diagram of an information encryption method according to an embodiment of the invention.
As shown in fig. 1, an information encryption method according to an embodiment of the present invention includes:
step 102, when detecting an operation of sending instant messaging information to a target receiving end, encrypting the instant messaging information to obtain a ciphertext data packet, wherein the ciphertext data packet comprises a random number used for encryption and ciphertext data obtained through encryption.
And 104, transmitting the ciphertext data packet to the target receiving end.
In the technical scheme, when the operation of sending the instant messaging information to the target receiving terminal is detected, the instant messaging information is encrypted to obtain a ciphertext data packet, and the ciphertext data packet is sent to the target receiving terminal, wherein the ciphertext data packet comprises the random number used in encryption and the ciphertext data obtained in encryption, so that other people are difficult to decrypt the ciphertext data packet to steal the related information, the transmission safety of the instant messaging information is ensured, and the user privacy is effectively ensured.
In the foregoing technical solution, preferably, the step of encrypting the instant messaging information specifically includes: generating the random number, and calculating an encryption key of the instant messaging information based on the random number; and encrypting the instant messaging information by a symmetric encryption algorithm by using the encryption key.
In the technical scheme, the random number is generated, the encryption key of the instant messaging information is calculated based on the random number, the encryption key is used, the instant messaging information is encrypted through a symmetric encryption algorithm, and the encryption keys obtained are different due to different random numbers generated during encryption, so that the encryption key used during encryption of the instant messaging information is different every time, the security of instant messaging information transmission is ensured to a greater extent, meanwhile, the encryption key is generated randomly, and the two communication parties do not need to share the key in advance.
In any one of the above technical solutions, preferably, before the step of encrypting the instant messaging information, the method further includes: detecting whether the target receiving end has the decryption authority for the instant messaging information; executing the step of encrypting the instant communication information when the target receiving end is determined to have the decryption right; and outputting prompt information when the target receiving end is determined not to have the decryption right.
In the technical scheme, whether the target receiving end has the decryption authority for the instant messaging information is detected, the target receiving end is determined to have the decryption authority, then encryption processing is carried out, the safety of instant messaging information transmission is guaranteed, meanwhile, the target receiving end can decrypt the instant messaging information, so that the instant messaging information can be timely sent, the embarrassment that the target receiving end cannot decrypt the encrypted data packet is avoided, when the target receiving end is determined to have no decryption authority, prompt information is output, and a user at the transmitting end can timely know the situation and carry out corresponding processing.
In any one of the above technical solutions, preferably, the step of detecting whether the target receiving end has a decryption right for the instant messaging information specifically includes: acquiring identification information of the target receiving terminal; judging whether the identification information is matched with prestored identification information or not; when the identification information is matched with the pre-stored identification information, determining that the target receiving end has the decryption authority; and when the identification information is not matched with the pre-stored identification information, determining that the target receiving end has no decryption authority.
In the technical scheme, whether the target receiving end has the decryption authority for the instant messaging information or not can be judged according to the identification information of the target receiving end, and the accuracy of the judgment result of whether the target receiving end has the decryption authority or not is ensured. The identification information and the pre-stored identification information may both include a name of the target receiving end, an encryption/decryption capability parameter, and the like.
In any one of the above technical solutions, preferably, the instant messaging information includes any one of: weChat information, QQ information, MSN information.
Fig. 2 shows a schematic flow diagram of an information decryption method according to an embodiment of the invention.
As shown in fig. 2, the information decryption method according to the embodiment of the present invention includes:
step 202, receiving a ciphertext data packet sent by a sending end, where the ciphertext data packet is obtained by encrypting the instant messaging information when the sending end detects an operation of sending the instant messaging information, and the ciphertext data includes a random number used for encryption and ciphertext data obtained by encryption.
And 204, when receiving a viewing instruction of the ciphertext data packet, decrypting the ciphertext data packet to obtain instant messaging information corresponding to the ciphertext data packet, displaying the instant messaging information corresponding to the ciphertext data packet, and deleting the instant messaging information when viewing of the instant messaging information is finished.
In the technical scheme, the ciphertext data packet sent by the sending end is received, when the checking instruction of the ciphertext data packet is received, the ciphertext data packet is decrypted to obtain the instant messaging information corresponding to the ciphertext data packet, the instant messaging information corresponding to the ciphertext data packet is displayed, and when the checking of the instant messaging information is finished, the instant messaging information is deleted, so that the received ciphertext data packet can be instantly decrypted and instantly displayed, the read instant messaging information is instantly deleted, and the leakage of the instant messaging information is effectively avoided.
In the foregoing technical solution, preferably, the step of decrypting the ciphertext data packet specifically includes: extracting the random number from the ciphertext data packet, and calculating a decryption key of the ciphertext data packet based on the random number; and decrypting the ciphertext data through a symmetric decryption algorithm by using the decryption key.
In the technical scheme, the random number is extracted from the ciphertext data packet, the decryption key of the ciphertext data packet is calculated based on the random number, the decryption key is used for decrypting the ciphertext data through a symmetric decryption algorithm, and the ciphertext data packet can be decrypted without the need of the two communication parties to share the key in advance.
In any one of the above technical solutions, preferably, the method further includes: and storing the received ciphertext data packet so as to decrypt the ciphertext data packet again when the viewing instruction of the ciphertext data packet is received again.
In the technical scheme, the ciphertext data packet is stored, so that the instant messaging information in the communication record is displayed in the form of the ciphertext data packet, is decrypted immediately when needing to be checked and is displayed immediately, the safety of the instant messaging information is ensured, and the privacy leakage of a user is avoided.
Fig. 3 shows a schematic block diagram of an information encryption apparatus according to an embodiment of the present invention.
As shown in fig. 3, an information encrypting apparatus 300 according to an embodiment of the present invention includes: an encryption unit 302 and a transmission unit 304.
The encryption unit 302 is configured to, when an operation of sending instant messaging information to a target receiving end is detected, encrypt the instant messaging information to obtain a ciphertext data packet, where the ciphertext data packet includes a random number used in encryption processing and ciphertext data obtained through encryption processing; the sending unit 304 is configured to send the ciphertext data packet to the target receiving end.
In the technical scheme, when the operation of sending the instant messaging information to the target receiving terminal is detected, the instant messaging information is encrypted to obtain a ciphertext data packet, and the ciphertext data packet is sent to the target receiving terminal, wherein the ciphertext data packet comprises the random number used in encryption and the ciphertext data obtained in encryption, so that other people are difficult to decrypt the ciphertext data packet to steal the related information, the transmission safety of the instant messaging information is ensured, and the user privacy is effectively ensured.
In any one of the above technical solutions, preferably, the encryption unit 302 is specifically configured to: generating the random number, and calculating an encryption key of the instant messaging information based on the random number; and encrypting the instant messaging information by a symmetric encryption algorithm by using the encryption key.
In the technical scheme, the random number is generated, the encryption key of the instant messaging information is calculated based on the random number, the encryption key is used, the instant messaging information is encrypted through a symmetric encryption algorithm, the encryption key used when the instant messaging information is encrypted each time is different due to the fact that the random numbers generated during encryption are different, the security of instant messaging information transmission is ensured to a greater extent, meanwhile, the encryption key is randomly generated, and the two communication parties do not need to share the key in advance.
In any one of the above technical solutions, preferably, the method further includes: a detecting unit 306, configured to detect whether the target receiving end has a decryption right for the instant messaging information; the encryption unit 302 is specifically configured to encrypt the instant messaging information when the detection unit determines that the target receiving end has the decryption right; a prompting unit 308, configured to output a prompting message when the detecting unit determines that the target receiving end does not have the decryption right.
In the technical scheme, whether the target receiving end has the decryption authority for the instant messaging information is detected, the target receiving end is determined to have the decryption authority, then encryption processing is carried out, the safety of instant messaging information transmission is guaranteed, meanwhile, the target receiving end can decrypt the instant messaging information, so that the instant messaging information can be timely sent, the embarrassment that the target receiving end cannot decrypt the encrypted data packet is avoided, when the target receiving end is determined to have no decryption authority, prompt information is output, and a user at the transmitting end can timely know the situation and carry out corresponding processing.
In any one of the above technical solutions, preferably, the detecting unit 306 is specifically configured to: acquiring identification information of the target receiving terminal; judging whether the identification information is matched with pre-stored identification information or not; when the identification information is matched with the pre-stored identification information, determining that the target receiving end has the decryption authority; and when the identification information is not matched with the prestored identification information, determining that the target receiving terminal has no decryption authority.
In the technical scheme, whether the target receiving end has the decryption authority for the instant messaging information or not can be judged according to the identification information of the target receiving end, and the accuracy of the judgment result of whether the target receiving end has the decryption authority or not is ensured. The identification information and the pre-stored identification information may both include a name of the target receiving end, an encryption/decryption capability parameter, and the like.
Fig. 4 shows a schematic block diagram of an information decrypting apparatus according to an embodiment of the present invention.
As shown in fig. 4, the information decrypting apparatus 400 according to the embodiment of the present invention includes: a receiving unit 402 and a processing unit 404.
The receiving unit 402 is configured to receive a ciphertext data packet sent by a sending end, where the ciphertext data packet is obtained by encrypting, by the sending end, instant messaging information when the sending end detects an operation of sending the instant messaging information, and the ciphertext data includes a random number used for encryption and ciphertext data obtained by encryption; the processing unit 404 is configured to decrypt the ciphertext data packet when receiving a viewing instruction for the ciphertext data packet, to obtain instant messaging information corresponding to the ciphertext data packet, display instant messaging information corresponding to the ciphertext data packet, and delete the instant messaging information when viewing of the instant messaging information is finished.
In the technical scheme, the ciphertext data packet sent by the sending end is received, when the checking instruction of the ciphertext data packet is received, the ciphertext data packet is decrypted to obtain the instant messaging information corresponding to the ciphertext data packet, the instant messaging information corresponding to the ciphertext data packet is displayed, and when the checking of the instant messaging information is finished, the instant messaging information is deleted, so that the received ciphertext data packet can be instantly decrypted and displayed, the read instant messaging information is instantly deleted, and the leakage of the instant messaging information is effectively avoided.
In the foregoing technical solution, preferably, the processing unit 404 is specifically configured to: extracting the random number from the ciphertext data packet, and calculating a decryption key of the ciphertext data packet based on the random number; and decrypting the ciphertext data through a symmetric decryption algorithm by using the decryption key.
In the technical scheme, the random number is extracted from the ciphertext data packet, the decryption key of the ciphertext data packet is calculated based on the random number, the decryption key is used for decrypting ciphertext data through a symmetric decryption algorithm, and the ciphertext data packet can be decrypted without the need of the two communication parties sharing the key in advance.
In any one of the above technical solutions, preferably, the method further includes: the storage unit 406 is configured to store the received ciphertext data packet, so as to decrypt the ciphertext data packet again when the viewing instruction for the ciphertext data packet is received again.
In the technical scheme, the ciphertext data packet is stored, so that the instant messaging information in the communication record is displayed in the form of the ciphertext data packet, is decrypted immediately when needing to be checked and is displayed immediately, the safety of the instant messaging information is ensured, and the privacy leakage of a user is avoided.
Fig. 5 shows a schematic block diagram of a terminal according to an embodiment of the invention.
As shown in fig. 5, a terminal 500 according to an embodiment of the present invention includes: an information encryption apparatus 300 as shown in fig. 3; and an information decrypting apparatus 400 as shown in fig. 4.
The instant messaging information includes WeChat information and QQ information, and the technical scheme of the present invention is further explained below by taking the WeChat information as an example.
In this embodiment, the WeChat encryption system includes: the system comprises a system control module, a user input module, a data receiving module, a data sending module, a message display module, a data storage module and a safety module.
The system control module is responsible for communication with other modules and maintains the operation of the whole application; the user input module processes the input of user data; the data sending module is responsible for sending out the data input by the user; the data receiving module is responsible for receiving the message content; the message display module is responsible for displaying the content sent by the data sending module; the data storage module is responsible for storing the content sent by the data sending module; the safety module is responsible for realizing the safety functions of the WeChat, including the functions of random number generation, secret key generation, encryption and decryption and the like, wherein the secret key generation algorithm is not externally disclosed, the secret key generation algorithm is built in the factory of an intelligent terminal manufacturer, the upgrade and the update can be carried out at the later stage, and the encryption and decryption algorithm adopts a symmetric algorithm.
The specific WeChat encryption sending process comprises the following steps:
(1) The system control module realizes the input of the sending data through the user input module;
(2) The system control module sends the user input data to the message display module for display;
(3) The system control module calls the security module to complete the following operations: firstly, a random number is generated, an encryption key is generated through a key generation algorithm, and then the encryption algorithm is called to encrypt data to be transmitted by using the encryption key.
(4) The system Control module calls a Data sending module to package the random number and the ciphertext Data and then sends the random number and the ciphertext Data out together according to a Transmission Protocol, wherein the Transmission Protocol comprises a Transmission Control Protocol (TCP), a User Data Protocol (UDP) and the like;
(5) And the system control module stores the transmitted data to the data storage module in a ciphertext state.
The WeChat encryption receiving and decryption process comprises the following steps:
(1) The system control module receives the message content through the data receiving module;
(2) The system control module analyzes the WeChat ciphertext data according to the transmission protocol and stores the WeChat ciphertext data in the data storage module;
(3) The system control module calls the security module to complete the following operations: and extracting a random number from the WeChat ciphertext data, generating a decryption key through a key generation algorithm, and then calling the decryption algorithm to decrypt the ciphertext data by using the decryption key.
(4) And the system control module sends the decrypted plaintext data to the message display module for display, and deletes the plaintext data when the viewing is finished so as to achieve the purposes of instant decryption, instant display and instant incineration after reading when viewing the chatting records.
In the embodiment, the encryption key is randomly generated, a user does not need to manage a complex key and share the key in advance by two communication parties, the user experience is enhanced, the key security of the secret communication and the secret storage is based on the key generation algorithm of the security module, the secret communication and the secret storage are factory built, the secret communication and the secret storage can be customized and updated, the same manufacturer with the same function cannot decrypt the secret key even if the algorithms of the intelligent terminals are different, the communication records are encrypted and stored, the secret key is in a ciphertext state from the intelligent terminal, the plaintext cannot be illegally obtained, the privacy of the user is protected, one time of password is sent, the password is updated once, and the security is enhanced.
As shown in fig. 6, fig. 6 is a schematic block diagram of a terminal according to an embodiment of the present invention, and the terminal 600 shown in fig. 6 may be used to implement the method implemented by the embodiments of the present invention shown in fig. 1 and fig. 2, for convenience of description, only the parts related to the embodiments of the present invention are shown, and details of the technology are not disclosed, please refer to the embodiments of the present invention shown in fig. 1 and fig. 2. The terminal 600 shown in fig. 6 may include:
a processor 602 and a memory 606 coupled to processor 602 by bus 604. Wherein the memory 606 is used for storing program codes, and the processor 602 is used for calling the program codes stored in the memory 606 and executing the following operations:
when the operation of sending instant messaging information to a target receiving end is detected, encrypting the instant messaging information to obtain a ciphertext data packet, wherein the ciphertext data packet comprises a random number used for encryption and ciphertext data obtained through encryption;
and sending the ciphertext data packet to the target receiving end.
In the above technical solution, preferably, the processor 602 is further configured to:
generating the random number, and calculating an encryption key of the instant messaging information based on the random number;
and encrypting the instant messaging information by a symmetric encryption algorithm by using the encryption key.
In the above technical solution, preferably, the processor 602 is further configured to:
detecting whether the target receiving end has the decryption authority to the instant messaging information;
when the target receiving end is determined to have the decryption right, the encryption processing of the instant messaging information is executed;
and outputting prompt information when the target receiving end is determined not to have the decryption right.
In the above technical solution, preferably, the processor 602 is further configured to:
acquiring identification information of the target receiving terminal;
judging whether the identification information is matched with pre-stored identification information or not;
when the identification information is matched with the pre-stored identification information, determining that the target receiving end has the decryption authority;
and when the identification information is not matched with the prestored identification information, determining that the target receiving terminal has no decryption authority.
In the above technical solution, preferably, the processor 602 is further configured to:
receiving a ciphertext data packet sent by a sending end, wherein the ciphertext data packet is obtained by encrypting the instant messaging information when the sending end detects an operation of sending the instant messaging information, and the ciphertext data comprises a random number used for encryption and ciphertext data obtained by encryption;
and when a viewing instruction of the ciphertext data packet is received, decrypting the ciphertext data packet to obtain instant messaging information corresponding to the ciphertext data packet, displaying the instant messaging information corresponding to the ciphertext data packet, and deleting the instant messaging information when the viewing of the instant messaging information is finished.
In the above technical solution, preferably, the processor 602 is further configured to:
extracting the random number from the ciphertext data packet, and calculating a decryption key of the ciphertext data packet based on the random number;
and decrypting the ciphertext data through a symmetric decryption algorithm by using the decryption key.
In the above technical solution, preferably, the processor 602 is further configured to:
and storing the received ciphertext data packet so as to decrypt the ciphertext data packet again when the viewing instruction of the ciphertext data packet is received again.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs.
The units in the terminal of the embodiment of the invention can be merged, divided and deleted according to actual needs.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be implemented by program instructions associated with hardware, and the program may be stored in a computer-readable storage medium, which includes Read-Only Memory (ROM), random Access Memory (RAM), programmable Read-Only Memory (PROM), erasable Programmable Read-Only Memory (EPROM), one-time Programmable Read-Only Memory (OTPROM), electrically Erasable Programmable Read-Only Memory (EEPROM), an optical Disc-Read-Only Memory (CD-ROM) or other storage medium, a magnetic tape, or any other medium capable of storing data for a computer or other computer.
The technical scheme of the invention is described in detail in the above with reference to the accompanying drawings, and provides a new information encryption scheme, which can encrypt instant messaging information, so that other people can hardly steal related information, and the security of instant messaging information transmission is ensured.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. An information encryption method, comprising:
when the operation of sending instant messaging information to a target receiving end is detected, a random number is generated from the local, and the instant messaging information is encrypted according to the random number to obtain a ciphertext data packet, wherein the ciphertext data packet comprises the random number used for encryption and ciphertext data obtained through encryption;
sending the ciphertext data packet to the target receiving end;
before the step of encrypting the instant communication information, the method further comprises the following steps:
detecting whether the target receiving end has the decryption authority for the instant messaging information;
the step of detecting whether the target receiving end has the decryption authority for the instant messaging information specifically includes:
acquiring identification information of the target receiving terminal;
judging whether the identification information is matched with pre-stored identification information or not;
when the identification information is matched with the pre-stored identification information, determining that the target receiving end has the decryption authority;
when the identification information is not matched with the pre-stored identification information, determining that the target receiving end has no decryption authority;
before the step of encrypting the instant communication information, the method further comprises the following steps:
when the target receiving end is determined to have the decryption authority, the step of encrypting the instant messaging information is executed;
and outputting prompt information when the target receiving end is determined not to have the decryption right.
2. The information encryption method according to claim 1, wherein the step of encrypting the instant messaging information specifically includes:
generating the random number, and calculating an encryption key of the instant messaging information based on the random number;
and encrypting the instant messaging information through a symmetric encryption algorithm by using the encryption key.
3. The information encryption method according to claim 1 or 2, wherein the instant communication information includes any one of:
WeChat information, QQ information, MSN information.
4. An information encryption apparatus, comprising:
the system comprises an encryption unit, a target receiving end and a processing unit, wherein the encryption unit is used for encrypting instant messaging information to obtain a ciphertext data packet when the operation of sending the instant messaging information to the target receiving end is detected, and the ciphertext data packet comprises a random number used for encryption and ciphertext data obtained through encryption;
a sending unit, configured to send the ciphertext data packet to the target receiving end;
the detection unit is used for detecting whether the target receiving end has the decryption authority for the instant messaging information;
the detection unit is specifically configured to:
acquiring identification information of the target receiving terminal;
judging whether the identification information is matched with pre-stored identification information or not;
when the identification information is matched with the pre-stored identification information, determining that the target receiving end has the decryption authority;
when the identification information is not matched with the pre-stored identification information, determining that the target receiving end has no decryption authority;
the encryption unit is specifically configured to encrypt the instant messaging information when the detection unit determines that the target receiving end has the decryption right;
and the prompting unit is used for outputting prompting information when the detection unit determines that the target receiving end does not have the decryption right.
5. The information encryption device according to claim 4, wherein the encryption unit is specifically configured to:
generating the random number, and calculating an encryption key of the instant messaging information based on the random number;
and encrypting the instant messaging information by a symmetric encryption algorithm by using the encryption key.
6. A terminal, comprising:
the information encryption apparatus according to claim 4 or 5.
CN201610919705.2A 2016-10-20 2016-10-20 Information encryption method, information encryption device and terminal Active CN106487659B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610919705.2A CN106487659B (en) 2016-10-20 2016-10-20 Information encryption method, information encryption device and terminal
PCT/CN2016/108024 WO2018072261A1 (en) 2016-10-20 2016-11-30 Information encryption method and device, information decryption method and device, and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610919705.2A CN106487659B (en) 2016-10-20 2016-10-20 Information encryption method, information encryption device and terminal

Publications (2)

Publication Number Publication Date
CN106487659A CN106487659A (en) 2017-03-08
CN106487659B true CN106487659B (en) 2022-12-20

Family

ID=58270422

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610919705.2A Active CN106487659B (en) 2016-10-20 2016-10-20 Information encryption method, information encryption device and terminal

Country Status (2)

Country Link
CN (1) CN106487659B (en)
WO (1) WO2018072261A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3247081A1 (en) 2016-05-19 2017-11-22 MyBlix Software GmbH Method and system for providing encoded communication between users of a network
CN108270771A (en) * 2017-12-22 2018-07-10 中国电子科技集团公司第三十研究所 A kind of shellcode encoding and decoding deformation method
CN109598143A (en) * 2018-12-06 2019-04-09 叶云龙 A kind of the Internet chat method for secret protection, device, equipment and storage medium
CN111814159B (en) * 2020-06-16 2023-06-13 上海中通吉网络技术有限公司 Picture viewing method, device and system
CN113572743B (en) * 2021-07-02 2023-07-28 深圳追一科技有限公司 Data encryption and decryption methods and devices, computer equipment and storage medium
CN115037711B (en) * 2022-06-07 2024-03-29 元心信息科技集团有限公司 Data processing method, device, electronic equipment and computer readable storage medium
CN115544498B (en) * 2022-11-24 2023-05-23 华控清交信息科技(北京)有限公司 Ciphertext data visual monitoring method and device and electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101001142A (en) * 2007-01-17 2007-07-18 张建华 Encipher-decipher method based on iterative random number generator
CN101764841A (en) * 2009-12-16 2010-06-30 中兴通讯股份有限公司 Method and device for synchronizing user data
CN104158657A (en) * 2014-07-16 2014-11-19 中兴通讯股份有限公司 Information processing method and device, as well as encryption equipment
CN104410619A (en) * 2014-11-21 2015-03-11 中国联合网络通信集团有限公司 Instant messaging method and instant messaging system
CN104980397A (en) * 2014-04-03 2015-10-14 腾讯科技(深圳)有限公司 Instant messaging method, system and terminal
CN105245505A (en) * 2015-09-14 2016-01-13 深圳市优友互联有限公司 Data transmitting method and device, data receiving method and device, and receiving-transmitting system
CN105471876A (en) * 2015-12-02 2016-04-06 东莞见达信息技术有限公司 Encryption communication method and device
CN105763331A (en) * 2014-12-19 2016-07-13 北大方正集团有限公司 Data encryption method, device, data decryption method and device
CN106027530A (en) * 2016-05-25 2016-10-12 天津光电安辰信息技术有限公司 Instant message encryption system based on smartphone and implementation method thereof

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588237A (en) * 2008-05-23 2009-11-25 华为技术有限公司 Method, device and system for encrypting terminal communication based on active network technology
CN101854594A (en) * 2009-04-03 2010-10-06 北京航空航天大学 Method and device for transmitting information and method and device for receiving information
CN102263637B (en) * 2010-05-28 2015-03-11 陈勇 Information encryption method and equipment thereof
CN103338437B (en) * 2013-07-11 2016-06-08 成都三零瑞通移动通信有限公司 The encryption method of a kind of mobile instant message and system
US10419223B2 (en) * 2015-01-07 2019-09-17 Cyph, Inc. Method of using symmetric cryptography for both data encryption and sign-on authentication
CN105100083B (en) * 2015-07-06 2019-04-30 河海大学 A kind of secret protection and support user's revocation based on encryption attribute method and system
CN105743917B (en) * 2016-04-05 2020-05-19 腾讯科技(深圳)有限公司 Message transmission method and terminal
CN105791105A (en) * 2016-05-20 2016-07-20 北京北信源软件股份有限公司 Method for burning after reading instant messaging information

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101001142A (en) * 2007-01-17 2007-07-18 张建华 Encipher-decipher method based on iterative random number generator
CN101764841A (en) * 2009-12-16 2010-06-30 中兴通讯股份有限公司 Method and device for synchronizing user data
CN104980397A (en) * 2014-04-03 2015-10-14 腾讯科技(深圳)有限公司 Instant messaging method, system and terminal
CN104158657A (en) * 2014-07-16 2014-11-19 中兴通讯股份有限公司 Information processing method and device, as well as encryption equipment
CN104410619A (en) * 2014-11-21 2015-03-11 中国联合网络通信集团有限公司 Instant messaging method and instant messaging system
CN105763331A (en) * 2014-12-19 2016-07-13 北大方正集团有限公司 Data encryption method, device, data decryption method and device
CN105245505A (en) * 2015-09-14 2016-01-13 深圳市优友互联有限公司 Data transmitting method and device, data receiving method and device, and receiving-transmitting system
CN105471876A (en) * 2015-12-02 2016-04-06 东莞见达信息技术有限公司 Encryption communication method and device
CN106027530A (en) * 2016-05-25 2016-10-12 天津光电安辰信息技术有限公司 Instant message encryption system based on smartphone and implementation method thereof

Also Published As

Publication number Publication date
WO2018072261A1 (en) 2018-04-26
CN106487659A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
CN106487659B (en) Information encryption method, information encryption device and terminal
CN105978917B (en) A kind of system and method for trusted application safety certification
EP3220573B1 (en) Method and system for controlling encryption of information and analyzing information as well as terminal
EP3324572B1 (en) Information transmission method and mobile device
CN107026824B (en) A kind of message encryption, decryption method and device
CN103929307A (en) Password input method, intelligent secret key device and client device
CN104270353B (en) information security transmission method and system, receiving terminal and sending terminal
WO2022022009A1 (en) Message processing method and apparatus, device, and storage medium
CN108197485A (en) terminal data encryption method and system, terminal data decryption method and system
CN104464048B (en) A kind of electronic password lock method for unlocking and device
CN108199847B (en) Digital security processing method, computer device, and storage medium
CN111178884A (en) Information processing method, device, equipment and readable storage medium
CN107579903B (en) Picture message secure transmission method and system based on mobile device
CN113794734A (en) Vehicle-mounted CAN bus encryption communication method, control device and readable storage medium
US20180083935A1 (en) Method and system for secure sms communications
CN115065472A (en) Multi-key encryption and decryption-based security chip encryption and decryption method and device
CN112003697A (en) Encryption and decryption method and device for cryptographic module, electronic equipment and computer storage medium
CN113722741A (en) Data encryption method and device and data decryption method and device
CN112243000A (en) Application data processing method and device, computer equipment and storage medium
CN111818466A (en) Information sending and receiving method and device, electronic equipment and readable storage medium
CN105451201A (en) Mobile terminal, remote control method of mobile terminal, remote control device of mobile terminal and remote control system of mobile terminal
CN107889102B (en) Method and device for encrypting and decrypting information in short message
CN113505364B (en) Password protection method, electronic device and computer-readable storage medium
CN111145461B (en) Tax-controlled encryptor, tax return verification method and apparatus, and storage medium
CN115276991B (en) Secure chip dynamic key generation method, secure chip device, equipment and medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant