CN113852604A - Plaintext data transmission method and apparatus, storage medium, and electronic apparatus - Google Patents

Plaintext data transmission method and apparatus, storage medium, and electronic apparatus Download PDF

Info

Publication number
CN113852604A
CN113852604A CN202110932765.9A CN202110932765A CN113852604A CN 113852604 A CN113852604 A CN 113852604A CN 202110932765 A CN202110932765 A CN 202110932765A CN 113852604 A CN113852604 A CN 113852604A
Authority
CN
China
Prior art keywords
plaintext data
end application
encrypted
application
public key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110932765.9A
Other languages
Chinese (zh)
Inventor
石斐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202110932765.9A priority Critical patent/CN113852604A/en
Publication of CN113852604A publication Critical patent/CN113852604A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/0442Network 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 asymmetric encryption, i.e. different keys for encryption and decryption
    • 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/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a plaintext data sending method and device, a storage medium and an electronic device, wherein the method comprises the following steps: determining first plaintext data to be sent by a front-end application; encrypting the first plaintext data according to a pre-acquired back-end public key of a back-end application to obtain encrypted first plaintext data; and sending the encrypted first plaintext data to the back-end application to instruct the back-end application to analyze the encrypted first plaintext data according to a back-end private key of the back-end application to obtain the first plaintext data. By adopting the technical scheme, the problem that communication data is easily acquired by a third party in the process of communication between the front-end application and the back-end application is solved.

Description

Plaintext data transmission method and apparatus, storage medium, and electronic apparatus
Technical Field
The present invention relates to the field of communications, and in particular, to a plaintext data transmitting method and apparatus, a storage medium, and an electronic apparatus.
Background
With the rapid development of networks, data on the networks become more and more, and how to ensure the data security, it becomes important to ensure that the data are not acquired by outsiders and are not randomly tampered.
For example, in the front-end application, the network communication with the service end is often very frequent, and the data content of the front-end and back-end communication can be intercepted through a developer panel of a browser or some package-grabbing tool, firstly, most content developers do not want to be identified by a third party, secondly, once the plaintext transmission data is intercepted, there is a possibility of being tampered, for example, the commodity price is 100 yuan, and if the plaintext transmission data is correctly identified, then the plaintext transmission data is tampered to 1 yuan, and the service end does not have a strict verification mechanism, which causes practical loss.
The existing solution is to adopt non-semantic naming for data fields of data, for example, price fields do not use price, but use abbreviations such as pp and the like for substitution, so that even if data is intercepted, the difficulty of data tampering is greatly improved because an interceptor cannot accurately identify the meaning of the fields. But theoretically, the complete identification data can still be obtained as long as the interceptor can know the meaning of the field abbreviation. And the maintenance cost to the front end and the back end is high, and the real meaning of each abbreviated field needs to be continuously contrasted and identified in the joint debugging process of developers at the front end and the back end, so that the workload is increased, and errors are easy to occur.
In the prior art, an effective solution is not provided at present for the problem that communication data is easily acquired by a third party in the process of communication between a front-end application and a back-end application.
Accordingly, there is a need for improvement in the related art to overcome the disadvantages of the related art.
Disclosure of Invention
The embodiment of the invention provides a plaintext data sending method and device, a storage medium and an electronic device, and aims to at least solve the problem that communication data is easily acquired by a third party in the process of communication between a front-end application and a back-end application.
According to an aspect of the embodiments of the present invention, there is provided a method for transmitting plaintext data, including: determining first plaintext data to be sent by a front-end application; encrypting the first plaintext data according to a pre-acquired back-end public key of a back-end application to obtain encrypted first plaintext data; and sending the encrypted first plaintext data to the back-end application to instruct the back-end application to analyze the encrypted first plaintext data according to a back-end private key of the back-end application to obtain the first plaintext data.
Further, before determining that the front end applies the first plaintext data to be sent, the method further includes: generating a back-end public key of the back-end application and a back-end private key of the back-end application, and a front-end public key of the front-end application and a front-end private key of the front-end application by an asymmetric encryption algorithm; and sending the front-end public key to the back-end application, and receiving the back-end public key sent by the back-end application.
Further, encrypting the first plaintext data according to a pre-obtained backend public key of a backend application to obtain encrypted first plaintext data includes: converting the first plaintext data into a first string; and encrypting the first character string through the rear-end public key to obtain encrypted first plaintext data.
Further, the method further comprises: receiving encrypted second plaintext data sent by the backend application, wherein the encrypted second plaintext data is determined by the following method: the back-end application encrypts second plaintext data according to a front-end public key of the front-end application; and analyzing the encrypted second plaintext data according to a front-end private key applied by the front end to obtain the second plaintext data.
Further, analyzing the encrypted second plaintext data according to a front-end private key applied by the front end to obtain the second plaintext data, including: analyzing the encrypted second plaintext data according to the front-end private key to obtain a second character string, wherein the second character string is obtained by converting the second plaintext data by the back-end application; and converting the second character string to obtain the second plaintext data.
Further, determining the first plaintext data to be sent by the front-end application includes: establishing network communication transmission channels of the front-end application and the back-end application; receiving a data request of the back-end application through the network communication transmission channel; and responding to the data request, and determining first plaintext data corresponding to the data request to be sent by the front-end application.
According to another aspect of the embodiments of the present invention, there is also provided a plaintext data transmitting apparatus, including: the determining module is used for determining first plaintext data to be sent by a front-end application; the encryption module is used for encrypting the first plaintext data according to a pre-acquired back-end public key of a back-end application to obtain encrypted first plaintext data; the sending module is configured to send the encrypted first plaintext data to the back-end application to instruct the back-end application to analyze the encrypted first plaintext data according to a back-end private key of the back-end application, so as to obtain the first plaintext data.
Further, the determining module is further configured to generate a back-end public key of the back-end application and a back-end private key of the back-end application, and a front-end public key of the front-end application and a front-end private key of the front-end application through an asymmetric encryption algorithm; and sending the front-end public key to the back-end application, and receiving the back-end public key sent by the back-end application.
According to still another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the above sending method of plaintext data when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the sending method of the plaintext data through the computer program.
According to the invention, first plaintext data to be sent by a front-end application is determined, and the first plaintext data is encrypted according to a pre-acquired rear-end public key of a rear-end application to obtain encrypted first plaintext data; and sending the encrypted first plaintext data to the back-end application to instruct the back-end application to analyze the encrypted first plaintext data according to a back-end private key of the back-end application to obtain the first plaintext data. That is to say, when the front-end application sends the plaintext data to the back-end application, the plaintext data is encrypted through the public key of the back-end application, and then the back-end application decrypts the encrypted plaintext data through the private key of the back-end application, so that the data security of the data sent by the front-end application to the back-end application is ensured, the problem that communication data is easily acquired by a third party in the process of communication between the front-end application and the back-end application is solved, and the risk that the data is hijacked, identified and tampered is eliminated.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a computer terminal of a transmitting method of plaintext data according to an embodiment of the present invention;
fig. 2 is a flowchart (one) of a transmitting method of plaintext data according to an embodiment of the present invention;
fig. 3 is a flowchart (ii) of a transmitting method of plaintext data according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a method of transmitting plaintext data according to an embodiment of the invention;
fig. 5 is a block diagram (one) of the structure of a plaintext data transmitting apparatus according to an embodiment of the invention;
fig. 6 is a block diagram (ii) of the structure of a plaintext data transmitting apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method embodiments provided in the embodiments of the present application may be executed in a computer terminal or a similar computing device. Taking the operation on a computer terminal as an example, fig. 1 is a hardware configuration block diagram of a computer terminal of a plaintext data sending method according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more processors 102 (only one is shown in fig. 1), wherein the processors 102 may include, but are not limited to, a Microprocessor (MPU) or a Programmable Logic Device (PLD), and a memory 104 for storing data, and in an exemplary embodiment, the computer terminal may further include a transmission device 106 for communication function and an input/output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or with more functionality than that shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of application software, such as a computer program corresponding to the sending method of plaintext data in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to a computer terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Fig. 2 is a flowchart (a) of a method for transmitting plaintext data according to an embodiment of the present invention, where the flowchart includes the following steps:
step S202, determining first plaintext data to be sent by a front end application;
step S204, encrypting the first plaintext data according to a pre-acquired back-end public key of a back-end application to obtain encrypted first plaintext data;
step S206, sending the encrypted first plaintext data to the back-end application to instruct the back-end application to analyze the encrypted first plaintext data according to a back-end private key of the back-end application, so as to obtain the first plaintext data.
Through the steps, when the front-end application sends the plaintext data to the back-end application, the plaintext data is encrypted through the public key of the back-end application, and then the back-end application decrypts the encrypted plaintext data through the private key of the back-end application, so that the data security of the data sent by the front-end application to the back-end application is ensured, the problem that communication data are easily acquired by a third party in the communication process of the front-end application and the back-end application is solved, and the risk that the data are hijacked, identified and tampered is further avoided.
It should be noted that, before data encryption is performed, a public key and a private key corresponding to a front-end application and a back-end application must be generated, specifically, a back-end public key and a back-end private key of the back-end application, a front-end public key of the front-end application and a front-end private key of the front-end application are generated through an asymmetric encryption algorithm; the method comprises the steps of sending a front-end public key to a back-end application, and receiving the back-end public key sent by the back-end application.
It should be noted that, in the asymmetric encryption algorithm, each communication party needs two keys, namely, a public key and a private key, which can be encrypted and decrypted with each other, wherein the public key is used for encrypting data, the private key is used for decrypting data, that is, the public key is public and can be disclosed to any person and object, and the private key is owned by the person and cannot be disclosed to the outside.
Specifically, in the communication process between the front-end application and the back-end application, the front-end application needs to send the front-end public key to the back-end application, the back-end application needs to send the back-end public key to the front-end application, the front-end application stores the front-end private key by itself, and the back-end application stores the back-end private key by itself.
Further, the step S204 may be specifically divided into the following steps:
the method comprises the following steps: converting the first plaintext data into a first string;
step two: and encrypting the first character string through the rear-end public key to obtain encrypted first plaintext data.
That is, before the front-end application communicates with the back-end application, the first plaintext data needs to be converted into a first character string, and the first character string is encrypted by the public key of the back-end application and then transmitted. For example, the front-end application needs to report a user gender information { gender: the ' male ' is applied to the back end, and the gender information is converted into a first character string ' { \\ generator \ firstly: \\ male \ is carried out, then a first character string is encrypted by using a rear-end public key, and the content format of the encrypted first plaintext data transmitted finally is { value: xxxxx }.
In an alternative embodiment, fig. 3 is a flowchart (ii) of a plaintext data sending method according to an embodiment of the present invention, that is, before or after determining that the front end applies the first plaintext data to be sent, the method further includes the following steps:
step S302: receiving encrypted second plaintext data sent by the backend application, wherein the encrypted second plaintext data is determined by the following method: the back-end application encrypts second plaintext data according to a front-end public key of the front-end application;
step S304: and analyzing the encrypted second plaintext data according to a front-end private key applied by the front end to obtain the second plaintext data.
Through the steps, the front-end application receives the second plaintext data which is sent by the back-end application and encrypted by using the front-end public key, and then the front-end application decrypts the second plaintext data by using the front-end private key to obtain the second plaintext data, so that the data security sent by the back-end application to the front-end application is ensured, the problem that the second plaintext data sent by the back-end application is easily acquired by a third party in the communication process of the front-end application and the back-end application is solved, and the risk that the second plaintext data is hijacked, identified and tampered is avoided.
Further, analyzing the encrypted second plaintext data according to a front-end private key applied by the front end to obtain the second plaintext data, including: analyzing the encrypted second plaintext data according to the front-end private key to obtain a second character string, wherein the second character string is obtained by converting the second plaintext data by the back-end application; and converting the second character string to obtain the second plaintext data.
That is to say, before the back-end application encrypts the second plaintext data, the back-end application also performs character conversion on the second plaintext data to obtain a second character string, and then encrypts the second character string, and after the front-end application receives the encrypted second plaintext data, the front-end application decrypts the second character string to obtain the second character string, and then the second plaintext data can be obtained through the second character string.
It should be noted that, determining the first plaintext data to be sent by the front-end application is implemented in the following manner: establishing network communication transmission channels of the front-end application and the back-end application; receiving a data request of the back-end application through the network communication transmission channel; and responding to the data request, and determining first plaintext data corresponding to the data request to be sent by the front-end application.
That is, the front-end application receives a data request of the back-end application through the network communication transmission channel, and determines the first plaintext data to be sent to the back-end application according to the data request.
It is to be understood that the above-described embodiments are only a few, but not all, embodiments of the present invention. In order to better understand the sending method of the plaintext data, the following describes the above process with reference to an embodiment, but the invention is not limited to the technical solution of the embodiment of the present invention, and specifically:
in an alternative embodiment, fig. 4 is a schematic diagram of a sending method of plaintext data according to an embodiment of the present invention, specifically:
by using an asymmetric encryption algorithm, the front-end and the back-end (corresponding to the front-end application and the back-end application in the above embodiments) respectively generate their own public key and private key, where the public key is used to encrypt data and the private key is used to decrypt data, and then the front-end and the back-end exchange their respective public keys, that is, the front-end application sends the front-end public key to the back-end application, and the back-end application sends the back-end public key to the front-end application.
Before the front-end and back-end communication, data (corresponding to plaintext data in the above-described embodiment) is converted into a character string, encrypted by a public key of a transmission target, and then transmitted. For example, the front-end application needs to report a user gender information { gender: "male", firstly converting the user gender information into a character string "{ \\" generator \ ": \\ male \ is then encrypted with a backend public key, and the final transmitted content format is { value: xxxxx }.
The back-end application receives the data and then decrypts the data through a back-end private key to obtain a character string, and then converts the character string into an object for use, and according to the example, the character string is decrypted to obtain "{ \\" generator \ ": \\ male \ is converted into an object of { gender: "male".
In order to facilitate development, the network communication method is uniformly packaged, data is encrypted before a request, and is decrypted after a response is obtained, so that the process of encrypting and decrypting the data is insensitive to developers, and the development efficiency is improved.
It should be noted that, the front-end application generates its own public key and private key, the public key is used for encrypting data, and only the private key can decrypt data; the back-end application generates a public key and a private key of the back-end application, wherein the public key is used for encrypting data, and only the private key can be used for decrypting; the front-end application uses the back-end public key for data encryption, the encrypted data is transmitted to the back-end application through a network, and the back-end application uses the back-end private key to decrypt the data.
In addition, according to the technical scheme of the embodiment, the data of the front-end and back-end network communication is encrypted, that is, all the data transmitted by the network are encrypted data, so that the possibility of hijacking identification and tampering does not exist, the tampering cannot be deciphered even if the data are hijacked, and the data security is ensured. And the front end and the back end are uniformly encrypted before data is sent and decrypted after data is received, so that the development efficiency is improved, and developers can feel the data processing process noninductively.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a plaintext data sending apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and the description already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementations in hardware or a combination of software and hardware are also possible and contemplated.
Fig. 5 is a block diagram (one) of the structure of a plaintext data transmitting apparatus according to an embodiment of the invention, the apparatus including:
a determining module 52, configured to determine first plaintext data to be sent by a front-end application;
the encryption module 54 is configured to encrypt the first plaintext data according to a pre-obtained backend public key of a backend application to obtain encrypted first plaintext data;
a sending module 56, configured to send the encrypted first plaintext data to the back-end application, so as to instruct the back-end application to analyze the encrypted first plaintext data according to a back-end private key of the back-end application, so as to obtain the first plaintext data.
Through the module, when the front-end application sends the plaintext data to the back-end application, the plaintext data is encrypted through the public key of the back-end application, and then the back-end application decrypts the encrypted plaintext data through the private key of the back-end application, so that the data safety of the data sent to the back-end application by the front-end application is ensured, the problem that communication data are easily acquired by a third party in the communication process of the front-end application and the back-end application is solved, and the risk that the data are hijacked, identified and tampered is further avoided.
Optionally, the encryption module 54 is further configured to generate a back-end public key of the back-end application and a back-end private key of the back-end application, and a front-end public key of the front-end application and a front-end private key of the front-end application through an asymmetric encryption algorithm; and sending the front-end public key to the back-end application, and receiving the back-end public key sent by the back-end application.
It should be noted that, in the asymmetric encryption algorithm, each communication party needs two keys, namely, a public key and a private key, which can be encrypted and decrypted with each other, wherein the public key is used for encrypting data, the private key is used for decrypting data, that is, the public key is public and can be disclosed to any person and object, and the private key is owned by the person and cannot be disclosed to the outside.
Specifically, in the communication process between the front-end application and the back-end application, the front-end application needs to send the front-end public key to the back-end application, the back-end application needs to send the back-end public key to the front-end application, the front-end application stores the front-end private key by itself, and the back-end application stores the back-end private key by itself.
Optionally, the encryption module 54 is further configured to convert the first plaintext data into a first character string; and encrypting the first character string through the rear-end public key to obtain encrypted first plaintext data.
That is, before the front-end application communicates with the back-end application, the first plaintext data needs to be converted into a first character string, and the first character string is encrypted by the public key of the back-end application and then transmitted. For example, the front-end application needs to report a user gender information { gender: the ' male ' is applied to the back end, and the gender information is converted into a first character string ' { \\ generator \ firstly: \\ male \ is carried out, then a first character string is encrypted by using a rear-end public key, and the content format of the encrypted first plaintext data transmitted finally is { value: xxxxx }.
Fig. 6 is a block diagram (ii) of a plaintext data transmitting apparatus according to an embodiment of the present invention, wherein the plaintext data transmitting apparatus further includes: a decryption module 58.
Optionally, the decryption module 58 is further configured to receive encrypted second plaintext data sent by the backend application, where the encrypted second plaintext data is determined by: the back-end application encrypts second plaintext data according to a front-end public key of the front-end application; and analyzing the encrypted second plaintext data according to a front-end private key applied by the front end to obtain the second plaintext data.
In this embodiment, the front-end application receives the second plaintext data sent by the back-end application and encrypted by using the front-end public key, and then the front-end application decrypts the second plaintext data by using the front-end private key to obtain the second plaintext data, so that the data security sent by the back-end application to the front-end application is ensured, the problem that the second plaintext data sent by the back-end application is easily acquired by a third party in the communication process between the front-end application and the back-end application is solved, and the risk that the second plaintext data is hijacked, identified and tampered is eliminated.
Further, the decryption module 58 is further configured to analyze the encrypted second plaintext data according to the front-end private key to obtain a second character string, where the second character string is obtained by converting the second plaintext data by the back-end application; and converting the second character string to obtain the second plaintext data.
That is to say, before the back-end application encrypts the second plaintext data, the back-end application also performs character conversion on the second plaintext data to obtain a second character string, and then encrypts the second character string, and after the front-end application receives the encrypted second plaintext data, the front-end application decrypts the second character string to obtain the second character string, and then the second plaintext data can be obtained through the second character string.
It should be noted that the determining module 52 is further configured to establish a network communication transmission channel between the front-end application and the back-end application; receiving a data request of the back-end application through the network communication transmission channel; and responding to the data request, and determining first plaintext data corresponding to the data request to be sent by the front-end application.
That is, the front-end application receives a data request of the back-end application through the network communication transmission channel, and determines the first plaintext data to be sent to the back-end application according to the data request.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, determining first plaintext data to be sent by the front-end application;
s2, encrypting the first plaintext data according to a pre-acquired back-end public key of a back-end application to obtain encrypted first plaintext data;
s3, sending the encrypted first plaintext data to the back-end application to instruct the back-end application to analyze the encrypted first plaintext data according to a back-end private key of the back-end application to obtain the first plaintext data.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, determining first plaintext data to be sent by the front-end application;
s2, encrypting the first plaintext data according to a pre-acquired back-end public key of a back-end application to obtain encrypted first plaintext data;
s3, sending the encrypted first plaintext data to the back-end application to instruct the back-end application to analyze the encrypted first plaintext data according to a back-end private key of the back-end application to obtain the first plaintext data.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
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 principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for transmitting plaintext data, comprising:
determining first plaintext data to be sent by a front-end application;
encrypting the first plaintext data according to a pre-acquired back-end public key of a back-end application to obtain encrypted first plaintext data;
and sending the encrypted first plaintext data to the back-end application to instruct the back-end application to analyze the encrypted first plaintext data according to a back-end private key of the back-end application to obtain the first plaintext data.
2. The method according to claim 1, wherein before determining that the front end applies the first plaintext data to be transmitted, the method further comprises:
generating a back-end public key of the back-end application and a back-end private key of the back-end application, and a front-end public key of the front-end application and a front-end private key of the front-end application by an asymmetric encryption algorithm;
and sending the front-end public key to the back-end application, and receiving the back-end public key sent by the back-end application.
3. The method according to claim 1, wherein the step of encrypting the first plaintext data according to a pre-obtained backend public key of a backend application to obtain encrypted first plaintext data comprises:
converting the first plaintext data into a first string;
and encrypting the first character string through the rear-end public key to obtain encrypted first plaintext data.
4. The transmitting method of plaintext data according to claim 1, further comprising:
receiving encrypted second plaintext data sent by the backend application, wherein the encrypted second plaintext data is determined by the following method: the back-end application encrypts second plaintext data according to a front-end public key of the front-end application;
and analyzing the encrypted second plaintext data according to a front-end private key applied by the front end to obtain the second plaintext data.
5. The method according to claim 4, wherein the analyzing the encrypted second plaintext data according to a front-end private key applied by the front end to obtain the second plaintext data comprises:
analyzing the encrypted second plaintext data according to the front-end private key to obtain a second character string, wherein the second character string is obtained by converting the second plaintext data by the back-end application;
and converting the second character string to obtain the second plaintext data.
6. The method for sending plaintext data according to claim 1, wherein determining that the first plaintext data to be sent is applied by the front end comprises:
establishing network communication transmission channels of the front-end application and the back-end application;
receiving a data request of the back-end application through the network communication transmission channel;
and responding to the data request, and determining first plaintext data corresponding to the data request to be sent by the front-end application.
7. A transmitting apparatus of plaintext data, comprising:
the determining module is used for determining first plaintext data to be sent by a front-end application;
the encryption module is used for encrypting the first plaintext data according to a pre-acquired back-end public key of a back-end application to obtain encrypted first plaintext data;
the sending module is configured to send the encrypted first plaintext data to the back-end application to instruct the back-end application to analyze the encrypted first plaintext data according to a back-end private key of the back-end application, so as to obtain the first plaintext data.
8. The apparatus for sending plaintext data according to claim 7, wherein the determining module is further configured to generate a back-end public key of the back-end application and a back-end private key of the back-end application, and a front-end public key of the front-end application and a front-end private key of the front-end application through an asymmetric encryption algorithm; and sending the front-end public key to the back-end application, and receiving the back-end public key sent by the back-end application.
9. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 6.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 6 by means of the computer program.
CN202110932765.9A 2021-08-13 2021-08-13 Plaintext data transmission method and apparatus, storage medium, and electronic apparatus Pending CN113852604A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110932765.9A CN113852604A (en) 2021-08-13 2021-08-13 Plaintext data transmission method and apparatus, storage medium, and electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110932765.9A CN113852604A (en) 2021-08-13 2021-08-13 Plaintext data transmission method and apparatus, storage medium, and electronic apparatus

Publications (1)

Publication Number Publication Date
CN113852604A true CN113852604A (en) 2021-12-28

Family

ID=78975499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110932765.9A Pending CN113852604A (en) 2021-08-13 2021-08-13 Plaintext data transmission method and apparatus, storage medium, and electronic apparatus

Country Status (1)

Country Link
CN (1) CN113852604A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106533665A (en) * 2016-10-31 2017-03-22 北京百度网讯科技有限公司 Method, system and device for storing website private key plaintext
CN106603485A (en) * 2016-10-31 2017-04-26 美的智慧家居科技有限公司 Secret key negotiation method and device
CN109409109A (en) * 2018-10-17 2019-03-01 网易(杭州)网络有限公司 Data processing method, device, processor and server in network service
CN110049032A (en) * 2019-04-09 2019-07-23 有光创新(北京)信息技术有限公司 A kind of the data content encryption method and device of two-way authentication
CN110839035A (en) * 2019-11-19 2020-02-25 深圳前海环融联易信息科技服务有限公司 Path access control method and device, computer equipment and storage medium
CN110912682A (en) * 2018-09-17 2020-03-24 阿里巴巴集团控股有限公司 Data processing method, device and system
CN111756690A (en) * 2020-05-19 2020-10-09 北京明略软件系统有限公司 Data processing system, method and server
CN112187726A (en) * 2020-09-04 2021-01-05 宇龙计算机通信科技(深圳)有限公司 Data transmission method, device, storage medium and terminal
CN112235107A (en) * 2020-10-27 2021-01-15 南方电网科学研究院有限责任公司 Data transmission method, device, equipment and storage medium
CN112637166A (en) * 2020-12-15 2021-04-09 平安科技(深圳)有限公司 Data transmission method, device, terminal and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106533665A (en) * 2016-10-31 2017-03-22 北京百度网讯科技有限公司 Method, system and device for storing website private key plaintext
CN106603485A (en) * 2016-10-31 2017-04-26 美的智慧家居科技有限公司 Secret key negotiation method and device
CN110912682A (en) * 2018-09-17 2020-03-24 阿里巴巴集团控股有限公司 Data processing method, device and system
CN109409109A (en) * 2018-10-17 2019-03-01 网易(杭州)网络有限公司 Data processing method, device, processor and server in network service
CN110049032A (en) * 2019-04-09 2019-07-23 有光创新(北京)信息技术有限公司 A kind of the data content encryption method and device of two-way authentication
CN110839035A (en) * 2019-11-19 2020-02-25 深圳前海环融联易信息科技服务有限公司 Path access control method and device, computer equipment and storage medium
CN111756690A (en) * 2020-05-19 2020-10-09 北京明略软件系统有限公司 Data processing system, method and server
CN112187726A (en) * 2020-09-04 2021-01-05 宇龙计算机通信科技(深圳)有限公司 Data transmission method, device, storage medium and terminal
CN112235107A (en) * 2020-10-27 2021-01-15 南方电网科学研究院有限责任公司 Data transmission method, device, equipment and storage medium
CN112637166A (en) * 2020-12-15 2021-04-09 平安科技(深圳)有限公司 Data transmission method, device, terminal and storage medium

Similar Documents

Publication Publication Date Title
CN106790223B (en) Data transmission method, equipment and system
CN107786331B (en) Data processing method, device, system and computer readable storage medium
CN107483192B (en) Data transmission method and device based on quantum communication
CN107948170B (en) Interface request parameter encryption method, device, equipment and readable storage medium
CN112822177B (en) Data transmission method, device, equipment and storage medium
CN110417544B (en) Root key generation method, device and medium
CN104836784A (en) Information processing method, client, and server
CN112672342B (en) Data transmission method, device, equipment, system and storage medium
CN105208028A (en) Data transmission method and related device and equipment
CN109194701B (en) Data processing method and device
CN111614670A (en) Method and device for sending encrypted file and storage medium
CN114465803A (en) Object authorization method, device, system and storage medium
CN113660725B (en) Positioning anti-cheating method, device and system, computer equipment and storage medium
CN111654503A (en) Remote control method, device, equipment and storage medium
CN113613227B (en) Data transmission method and device of Bluetooth equipment, storage medium and electronic device
CN111224958A (en) Data transmission method and system
CN113992427A (en) Data encryption sending method and device based on adjacent nodes
KR20190040443A (en) Apparatus and method for creating secure session of smart meter
CN106487761B (en) Message transmission method and network equipment
CN113660645B (en) Device configuration method and device, electronic device and storage medium
CN111355683A (en) Method, device and storage medium for ensuring http data transmission safety
CN110875902A (en) Communication method, device and system
CN113852604A (en) Plaintext data transmission method and apparatus, storage medium, and electronic apparatus
CN116830525A (en) Data transmission method, device, system, electronic equipment and readable medium
CN112995210A (en) Data transmission method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination