CN113132320A - Encryption transmission method and device and electronic equipment - Google Patents

Encryption transmission method and device and electronic equipment Download PDF

Info

Publication number
CN113132320A
CN113132320A CN201911416500.2A CN201911416500A CN113132320A CN 113132320 A CN113132320 A CN 113132320A CN 201911416500 A CN201911416500 A CN 201911416500A CN 113132320 A CN113132320 A CN 113132320A
Authority
CN
China
Prior art keywords
encryption
data
decryption
decryption server
application client
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
CN201911416500.2A
Other languages
Chinese (zh)
Inventor
姜智成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology 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 Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201911416500.2A priority Critical patent/CN113132320A/en
Publication of CN113132320A publication Critical patent/CN113132320A/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/0471Network 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 applying encryption by an intermediary, e.g. receiving clear information at the intermediary and encrypting the received information at the intermediary before forwarding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Abstract

The embodiment of the invention provides an encryption transmission method, an encryption transmission device and electronic equipment, wherein the method comprises the following steps: the method comprises the steps that a first application client sends an encryption request containing data to be encrypted to a first encryption and decryption server, so that the first encryption and decryption server encrypts the data to be encrypted to obtain encrypted data; receiving the encrypted data returned by the first encryption and decryption server; sending the encrypted data to a second application client which is in communication connection with the first application client; the second application client sends the encrypted data to a second encryption and decryption server, so that the second encryption and decryption server decrypts the encrypted data and returns the decrypted data to the second application client; the first encryption and decryption server and the second encryption and decryption server are the same, and the success rate of data decryption is improved.

Description

Encryption transmission method and device and electronic equipment
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to an encryption transmission method and apparatus, and an electronic device.
Background
Data communication is generally required to be carried out between application programs installed in different devices through a network, in order to improve the safety of data transmission, a data transmission party is generally required to encrypt data to be transmitted to obtain encrypted data, then the encrypted data is transmitted to a data receiving party through the network, and then the encrypted data is decrypted by the data receiving party to achieve the purpose of data communication.
At present, when encryption transmission is performed, specifically, a data transmission party encrypts data to be transmitted based on a certain data encryption and decryption algorithm, and then transmits the encrypted data to a data receiving party, and the data receiving party decrypts the encrypted data based on the same data encryption and decryption algorithm.
Because the same data encryption and decryption algorithm may have a certain difference in terms of specific implementation when the development languages are different, in the above process, a problem may occur that data decryption fails due to the fact that the implementation manners of the data encryption and decryption algorithms adopted by the data transmission side and the data reception side are not completely consistent, so that data communication cannot be performed.
Disclosure of Invention
Embodiments of the present invention provide an encryption transmission method, an encryption transmission device, and an electronic device, so as to improve a success rate of data decryption. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides an encryption transmission method, which is applied to a first application client, where the method includes:
sending an encryption request containing data to be encrypted to a first encryption and decryption server so that the first encryption and decryption server encrypts the data to be encrypted to obtain encrypted data;
receiving the encrypted data returned by the first encryption and decryption server;
sending the encrypted data to a second application client which is in communication connection with the first application client; the second application client sends the encrypted data to a second encryption and decryption server, so that the second encryption and decryption server decrypts the encrypted data and returns the decrypted data to the second application client; the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server.
Further, data is transmitted between the first encryption and decryption server and the first application client through socket connection.
Further, the socket connection has a connection identifier corresponding to the first application client.
Further, before the step of sending an encryption request to the first encryption and decryption server, the method further includes:
and sending a key setting request containing key information to the first encryption and decryption server.
In a second aspect, an embodiment of the present invention provides an encrypted transmission method, which is applied to a second application client, where the method includes:
receiving encrypted data sent by a first application client; the encrypted data is sent by the first application client after the first application client sends the data to be encrypted to a first encryption and decryption server so that the first encryption and decryption server encrypts the data to be encrypted and returns the encrypted data to the first application client;
sending a decryption request containing the encrypted data to a second encryption and decryption server, so that the second encryption and decryption server decrypts the encrypted data to obtain decrypted data; the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server;
and receiving the decrypted data returned by the second encryption and decryption server.
Further, data is transmitted between the second encryption and decryption server and the second application client through socket connection.
Further, the socket connection has a connection identifier corresponding to the second application client.
Further, before the step of sending the decryption request including the encrypted data to the second encryption and decryption server, the method further includes:
and sending a key setting request containing key information to the second encryption and decryption server.
In a third aspect, an embodiment of the present invention provides an encryption and decryption method, which is applied to an encryption and decryption server, and the method includes:
receiving an encryption and decryption request containing data to be encrypted or decrypted;
encrypting or decrypting the data to be encrypted or decrypted according to the encryption and decryption request to obtain encrypted data or decrypted data;
and returning the encrypted data or the decrypted data.
In a fourth aspect, an embodiment of the present invention provides an encryption transmission apparatus, which is applied to a first application client, where the apparatus includes:
the encryption request sending module is used for sending an encryption request containing data to be encrypted to a first encryption and decryption server so that the first encryption and decryption server encrypts the data to be encrypted to obtain encrypted data;
the first encrypted data receiving module is used for receiving the encrypted data returned by the first encryption and decryption server side;
the encrypted data sending module is used for sending the encrypted data to a second application client which is in communication connection with the first application client; the second application client sends the encrypted data to a second encryption and decryption server, so that the second encryption and decryption server decrypts the encrypted data and returns the decrypted data to the second application client; the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server.
Further, data is transmitted between the first encryption and decryption server and the first application client through socket connection.
Further, the socket connection has a connection identifier corresponding to the first application client.
Further, the apparatus further includes: a first key setting request sending module;
the first key setting request sending module is configured to send a key setting request including key information to the first encryption and decryption server before sending the encryption request to the first encryption and decryption server.
In a fifth aspect, an embodiment of the present invention provides an encryption transmission apparatus, which is applied to a second application client, where the apparatus includes:
the second encrypted data receiving module is used for receiving encrypted data sent by the first application client; the encrypted data is sent by the first application client after the first application client sends the data to be encrypted to a first encryption and decryption server so that the first encryption and decryption server encrypts the data to be encrypted and returns the encrypted data to the first application client;
a decryption request sending module, configured to send a decryption request including the encrypted data to the second encryption and decryption server, so that the second encryption and decryption server decrypts the encrypted data to obtain decrypted data; the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server;
and the decrypted data receiving module is used for receiving the decrypted data returned by the second encryption and decryption server side.
Further, data is transmitted between the second encryption and decryption server and the second application client through socket connection.
Further, the socket connection has a connection identifier corresponding to the second application client.
Further, the apparatus further includes: a second key setting request sending module;
and the second key setting request sending module is configured to send a key setting request including key information to the second encryption and decryption server before sending the decryption request including the encrypted data to the second encryption and decryption server.
In a sixth aspect, an embodiment of the present invention provides an encryption and decryption apparatus, which is applied to an encryption and decryption server, and the apparatus includes:
the encryption and decryption request receiving module is used for receiving an encryption and decryption request containing data to be encrypted or decrypted;
the encryption and decryption module is used for encrypting or decrypting the data to be encrypted or decrypted according to the encryption and decryption request to obtain encrypted data or decrypted data;
and the encryption and decryption data returning module is used for returning the encrypted data or the decrypted data.
In a seventh aspect, an embodiment of the present invention provides an electronic device, including: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the steps of the encryption transmission method according to any one of the first aspect when executing the program stored in the memory.
In an eighth aspect, an embodiment of the present invention provides an electronic device, including: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the steps of the encryption transmission method according to any one of the second aspects when executing the program stored in the memory.
In a ninth aspect, an embodiment of the present invention provides an electronic device, including: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the steps of the encryption and decryption method according to any one of the third aspects when executing the program stored in the memory.
In a tenth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the encryption transmission method according to any one of the first aspect and the second aspect.
In an eleventh aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the encryption and decryption method steps of any one of the first aspect and the second aspect.
In a twelfth aspect, an embodiment of the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to perform the steps of the encryption transmission method according to any one of the first aspect and the second aspect.
In a thirteenth aspect, an embodiment of the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the steps of the encryption and decryption method according to any one of the first aspect and the second aspect.
The method is applied to a first application client, and the first application client sends an encryption request containing data to be encrypted to a first encryption and decryption server, so that the first encryption and decryption server encrypts the data to be encrypted to obtain encrypted data; receiving the encrypted data returned by the first encryption and decryption server; sending the encrypted data to a second application client which is in communication connection with the first application client; the second application client sends the encrypted data to a second encryption and decryption server, so that the second encryption and decryption server decrypts the encrypted data and returns the decrypted data to the second application client; the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server. In the embodiment of the invention, the data is not required to be encrypted or decrypted by the first application client and the second application client, but the data is encrypted and decrypted by the first encryption and decryption server and the second encryption and decryption server which are specially used for encrypting and decrypting the data and are arranged outside the first application client and the second application client.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of an encrypted transmission method according to an embodiment of the present invention;
fig. 2 is another schematic flow chart of an encryption transmission method according to an embodiment of the present invention;
fig. 3 is a schematic interaction flow diagram of an encryption transmission method according to an embodiment of the present invention;
fig. 4 is a schematic flow chart of an encryption and decryption method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an encryption transmission apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another encryption transmission apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an encryption and decryption apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of another electronic device according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of another electronic device according to an embodiment of the present invention.
Detailed Description
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.
In order to improve the success rate of data decryption, embodiments of the present invention provide an encryption transmission method, an encryption transmission device, and an electronic device, which are described in detail below.
Referring to fig. 1, fig. 1 is a schematic flowchart of an encryption transmission method according to an embodiment of the present invention, where the method may be applied to a first application client.
The method specifically comprises the following steps:
step 101, sending an encryption request containing data to be encrypted to a first encryption and decryption server, so that the first encryption and decryption server encrypts the data to be encrypted to obtain encrypted data.
Further, before the first application client sends the encryption request to the first encryption and decryption server, a communication connection needs to be established with the first encryption and decryption server, specifically, a socket connection may be established, so that data may be transmitted between the first encryption and decryption server and the first application client through the socket connection, and in order to enable the first encryption and decryption server to establish a connection with a plurality of application clients to transmit data, a connection identifier may be set for the established socket connection, where the identifier corresponds to the application client. For example, the first encryption/decryption server may establish socket connections with the application client 1 and the application client 2, respectively, and then a connection identifier may be set as socket1 for the socket connection between the first encryption/decryption server and the application client 1, and a connection identifier may be set as socket2 for the socket connection between the first encryption/decryption server and the application client 2.
Further, the encryption request may further include data length information of the data to be encrypted, for example, the request may be composed of three parts of data, where a first part of data is data representing that the request is an encryption request, a second part of data is data length information of the data to be encrypted, and a third part of data is complete data to be encrypted. Here, the specific form of the encryption request is not limited.
And 102, receiving the encrypted data returned by the first encryption and decryption server.
Corresponding to step 101, in this step, the encrypted data returned by the first encryption and decryption server may be received through socket connection.
And 103, sending the encrypted data to a second application client in communication connection with the first application client, so that the second application client sends the encrypted data to a second encryption and decryption server, so that the second encryption and decryption server decrypts the encrypted data and returns the decrypted data to the second application client.
The first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server.
As can be seen from the foregoing embodiments, in the embodiments of the present invention, the first application client and the second application client do not need to encrypt or decrypt data themselves, but the first encryption and decryption server and the second encryption and decryption server, which are dedicated to data encryption and decryption, outside the first application client and the second application client perform encryption and decryption of data, and the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server, so that the consistency of data encryption and decryption algorithms is ensured, the problem of data decryption failure caused by inconsistency of data encryption and decryption algorithms is avoided, and the success rate of data decryption is improved.
Referring to fig. 2, fig. 2 is another schematic flow chart of an encryption transmission method according to an embodiment of the present invention, where the method may be applied to a second application client, and the method specifically includes the following steps:
step 201, receiving encrypted data sent by a first application client; the encrypted data is sent by the first application program after the first application client sends the data to be encrypted to the first encryption and decryption server so that the first encryption and decryption server encrypts the data to be encrypted and returns the encrypted data to the first application client.
Step 202, sending a decryption request containing the encrypted data to the second encryption and decryption server, so that the second encryption and decryption server decrypts the encrypted data to obtain decrypted data; the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server.
Corresponding to step 101, further, before the second application client sends the decryption request to the second encryption and decryption server, a communication connection needs to be established with the second encryption and decryption server, specifically, a socket connection may be established, so that data may be transmitted between the second encryption and decryption server and the second application client through the socket connection, and in order to enable the second encryption and decryption server to establish a local connection with multiple application clients to transmit data, a connection identifier may be set for the established socket connection, where the connection identifier corresponds to the application program.
Further, the decryption request may further include data length information of the encrypted data (i.e., the data to be decrypted), for example, the request may be composed of three parts of data, where the first part of data is data representing that the request is the decryption request, the second part of data is data length information of the data to be decrypted, and the third part of data is complete data to be decrypted. Here, the specific form of the decryption request is not limited.
And step 203, receiving the decrypted data returned by the second encryption and decryption server.
As can be seen from the embodiment shown in fig. 2, in the embodiment of the present invention, the first application client and the second application client do not need to encrypt or decrypt data themselves, but a first encryption and decryption server and a second encryption and decryption server, which are dedicated to data encryption and decryption, outside the first application client and the second application client perform encryption and decryption of data, and the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server, so that the consistency of the data encryption and decryption algorithms is ensured, the problem of data decryption failure caused by inconsistency of the data encryption and decryption algorithms is avoided, and the success rate of data decryption is improved.
In the embodiments of fig. 1 and fig. 2, the first application client and the first encryption and decryption server may be located in the same device, or may be located in different devices, and accordingly, the second application client and the second encryption and decryption server may be located in the same device, or may be located in different devices, which is not limited to this.
Further, in general, when data is transmitted between two devices through a network, in order to improve transmission security, it is necessary to encrypt data to be transmitted at a data sending end, transmit the encrypted data through the network, and decrypt the received encrypted data at a data receiving end. Therefore, the first application client and the first encryption and decryption server can be located in the same electronic device, and the second application client and the second encryption and decryption server are located in another electronic device. Referring to fig. 3, fig. 3 is an interaction flow diagram of an encryption transmission method according to an embodiment of the present invention, in the embodiment shown in fig. 3, a first application client and a first encryption/decryption server are located in the same electronic device, that is, a first electronic device, and a second application client and a second encryption/decryption server are located in another electronic device, that is, a second electronic device.
The embodiment shown in fig. 3 specifically includes the following steps:
step 300, a first application client side is connected through a socket and sends a key setting request containing key information to a first encryption and decryption server side; and the second application client side is connected through the socket and sends a key setting request containing the same key information to the second encryption and decryption server side.
In this step, the first application client and the second application client may send the key setting request at regular time, or may receive the key setting instruction, for example: when detecting that the key setting related configuration parameters are modified, sending a key setting request to update the key in time, so that encryption and decryption operations are subsequently performed according to the updated key, the problem that encrypted data is maliciously cracked due to long-term use of the same key is prevented, and the security of data transmission is improved.
Step 301, the first application client sends an encryption request containing data to be encrypted to the first encryption and decryption server through socket connection.
In the client/server communication mode, communication is usually performed by socket connection, and the socket connection has no limitation on development languages used by two applications performing data communication, that is, the two applications performing data communication by socket connection may be applications developed by the same development language or applications developed by different development languages, and the difference in development languages does not affect normal data communication between the two applications through socket connection.
And 302, encrypting the data to be encrypted by the first encryption and decryption server based on the key information to obtain the encrypted data.
Step 303, the first encryption and decryption server is connected through a socket, and returns the encrypted data to the first application client.
And step 304, the first application client sends the encrypted data to a second application client in a second electronic device in communication connection with the first electronic device.
Step 305, the second application client sends a decryption request containing the encrypted data to the second encryption and decryption server through socket connection.
And step 306, the second encryption and decryption server decrypts the encrypted data based on the key information to obtain decrypted data.
And 307, the second encryption and decryption server is connected through a socket, and returns the decrypted data to the second application client.
In this embodiment, the first application client and the second application client may be any application program having an encryption and decryption data interaction function with the first or second encryption and decryption server through socket connection. Specifically, the first application client and the second application client may be the same or different.
As can be seen from the embodiment shown in fig. 3, in the embodiment of the present invention, the first application client and the second application client do not need to encrypt or decrypt data themselves, but a first encryption/decryption server and a second encryption/decryption server dedicated to data encryption/decryption are installed locally on the first application client and the second application client, respectively, and the first encryption/decryption server and the second encryption/decryption server are the same encryption/decryption server, so that the consistency of the data encryption/decryption algorithm is ensured, the problem of data decryption failure due to inconsistency of the data encryption/decryption algorithm is avoided, and the success rate of data decryption is increased.
Meanwhile, before data encryption and decryption, a key setting request can be sent to the first encryption and decryption server side and the second encryption and decryption server side by the first application client side regularly or according to a certain time rule, so that the key can be updated in time, encryption and decryption operations can be performed subsequently according to the updated key, the problem that encrypted data are maliciously cracked due to long-term use of the same key is solved, and the security of data transmission is improved.
Referring to fig. 4, fig. 4 is a schematic flow chart of an encryption and decryption method provided by the embodiment of the present invention, where the method is applied to an encryption and decryption server, and includes the following steps:
step 401, an encryption and decryption request containing data to be encrypted or decrypted is received.
Further, the encryption request may further include data length information of the data to be encrypted, for example, the request may be composed of three parts of data, where a first part of data is data representing that the request is an encryption request, a second part of data is data length information of the data to be encrypted, and a third part of data is complete data to be encrypted. Here, the specific form of the encryption request is not limited.
It should be noted that the encryption/decryption server may only include an encryption function, may also include a decryption function, and of course, may also include an encryption function and a decryption function. The system provides encryption/decryption services for each application client, particularly communicates with each application client by using socket connection, and can provide various encryption/decryption algorithms for encryption/decryption services.
And 402, encrypting or decrypting the data to be encrypted or decrypted according to the encryption and decryption request to obtain encrypted data or decrypted data.
In this step, any Encryption and decryption algorithm may be used to encrypt the Data to be encrypted, for example, the Encryption and decryption algorithm may be a symmetric Encryption algorithm such as an AES (Advanced Encryption Standard) algorithm and a DES (Data Encryption Standard), an asymmetric Encryption algorithm such as an elliptic curve algorithm and an RSA algorithm that does not damage the Data, or a set of self-setting Encryption and decryption algorithms, and here, the Encryption and decryption algorithm used to encrypt the Data is not limited.
Step 403, returning the encrypted data or the decrypted data.
As can be seen from the embodiment shown in fig. 4, in the embodiment of the present invention, when data encryption or decryption is required, data to be encrypted or decrypted may be directly sent to an encryption/decryption server outside the application program by the application program, and after the encryption/decryption server performs encryption or decryption, the encrypted or decrypted data may be directly returned to the corresponding application program.
Based on the same inventive concept, according to the encryption transmission method provided in the above embodiment of the present invention, correspondingly, an embodiment of the present invention further provides an encryption transmission apparatus, which is applied to a first application client; the schematic structural diagram of the device is shown in fig. 5, and the device comprises:
an encryption request sending module 501, configured to send an encryption request including data to be encrypted to a first encryption and decryption server, so that the first encryption and decryption server encrypts the data to be encrypted to obtain encrypted data;
a first encrypted data receiving module 502, configured to receive encrypted data returned by the first encryption and decryption server;
the encrypted data sending module 503 is configured to send the encrypted data to a second application client in communication connection with the first application client; the second application client sends the encrypted data to the second encryption and decryption server, so that the second encryption and decryption server decrypts the encrypted data and returns the decrypted data to the second application client; the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server.
Further, data are transmitted between the first encryption and decryption server and the first application client through socket connection.
Further, the socket connection has a connection identifier corresponding to the first application client.
Further, the apparatus further comprises: a first key setting request sending module;
the first key setting request sending module is used for sending a key setting request containing key information to the first encryption and decryption server before sending the encryption request to the first encryption and decryption server.
As can be seen from the embodiment shown in fig. 5, in the embodiment of the present invention, the first application client and the second application client do not need to encrypt or decrypt data themselves, but a first encryption and decryption server and a second encryption and decryption server, which are dedicated to data encryption and decryption, outside the first application client and the second application client perform encryption and decryption of data, and the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server, so that the consistency of the data encryption and decryption algorithms is ensured, the problem of data decryption failure caused by inconsistency of the data encryption and decryption algorithms is avoided, and the success rate of data decryption is improved.
Based on the same inventive concept, according to the encryption transmission method provided by the above embodiment of the present invention, correspondingly, an embodiment of the present invention further provides another encryption transmission apparatus, which is applied to a second application client; the structure of the device is schematically shown in fig. 6, and the device comprises:
a second encrypted data receiving module 601, configured to receive encrypted data sent by the first application client; the encrypted data is sent by the first application client after the first application client sends the data to be encrypted to the first encryption and decryption server so that the first encryption and decryption server encrypts the data to be encrypted and returns the encrypted data to the first application client;
a decryption request sending module 602, configured to send a decryption request including the encrypted data to the second encryption and decryption server, so that the second encryption and decryption server decrypts the encrypted data to obtain decrypted data; the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server;
and a decrypted data receiving module 603, configured to receive decrypted data returned by the second encryption and decryption server.
Further, data is transmitted between the second encryption and decryption server and the second application client through socket connection.
Further, the socket connection has a connection identifier corresponding to the second application client.
Further, the apparatus further comprises: a second key setting request sending module;
and the second key setting request sending module is used for sending a key setting request containing key information to the second encryption and decryption server before sending a decryption request containing the encrypted data to the second encryption and decryption server.
As can be seen from the embodiment shown in fig. 6, in the embodiment of the present invention, the first application client and the second application client do not need to encrypt or decrypt data themselves, but a first encryption and decryption server and a second encryption and decryption server, which are dedicated to data encryption and decryption, outside the first application client and the second application client perform encryption and decryption of data, and the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server, so that the consistency of the data encryption and decryption algorithms is ensured, the problem of data decryption failure caused by inconsistency of the data encryption and decryption algorithms is avoided, and the success rate of data decryption is improved.
Based on the same inventive concept, according to the encryption and decryption method provided by the above embodiment of the present invention, correspondingly, an embodiment of the present invention further provides an encryption and decryption apparatus, which is applied to an encryption and decryption server; the structure of the device is schematically shown in fig. 7, and the device comprises:
an encryption and decryption request receiving module 701, configured to receive an encryption and decryption request including data to be encrypted or decrypted;
the encryption and decryption module 702 is configured to encrypt or decrypt data to be encrypted or decrypted according to the encryption and decryption request to obtain encrypted data or decrypted data;
an encryption/decryption data returning module 703 is configured to return the encrypted data or the decrypted data.
As can be seen from the embodiment shown in fig. 7, in the embodiment of the present invention, when data encryption or decryption is required, the application program may directly send data to be encrypted or decrypted to the encryption/decryption server outside the application program, and after the encryption/decryption server performs encryption or decryption, the encrypted or decrypted data is directly returned to the corresponding application program.
An embodiment of the present invention further provides an electronic device, as shown in fig. 8, which includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804, where the processor 801, the communication interface 802, and the memory 803 complete mutual communication through the communication bus 804,
a memory 803 for storing a computer program;
the processor 801 is configured to implement the following steps when executing the program stored in the memory 803:
sending an encryption request containing data to be encrypted to a first encryption and decryption server so that the first encryption and decryption server encrypts the data to be encrypted to obtain encrypted data;
receiving encrypted data returned by the first encryption and decryption server;
sending the encrypted data to a second application client in communication connection with the first application client; the second application client sends the encrypted data to the second encryption and decryption server, so that the second encryption and decryption server decrypts the encrypted data and returns the decrypted data to the second application client; the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server.
Further, other processing flows in the above encryption transmission method provided by the embodiment of the present invention may also be included, and are not described in detail here.
As can be seen from the embodiment shown in fig. 8, in the embodiment of the present invention, the first application client and the second application client do not need to encrypt or decrypt data themselves, but a first encryption and decryption server and a second encryption and decryption server, which are dedicated to data encryption and decryption, outside the first application client and the second application client perform encryption and decryption of data, and the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server, so that the consistency of the data encryption and decryption algorithms is ensured, the problem of data decryption failure caused by inconsistency of the data encryption and decryption algorithms is avoided, and the success rate of data decryption is improved.
Another electronic device is provided in the embodiments of the present invention, as shown in fig. 9, and includes a processor 901, a communication interface 902, a memory 903, and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete mutual communication through the communication bus 904,
a memory 903 for storing computer programs;
the processor 901 is configured to implement the following steps when executing the program stored in the memory 903:
receiving encrypted data sent by a first application client; the encrypted data is sent by the first application client after the first application client sends the data to be encrypted to the first encryption and decryption server so that the first encryption and decryption server encrypts the data to be encrypted and returns the encrypted data to the first application client;
sending a decryption request containing the encrypted data to a second encryption and decryption server so that the second encryption and decryption server decrypts the encrypted data to obtain decrypted data; the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server;
and receiving the decrypted data returned by the second encryption and decryption server.
Further, other processing flows in the above encryption transmission method provided by the embodiment of the present invention may also be included, and are not described in detail here.
As can be seen from the embodiment shown in fig. 9, in the embodiment of the present invention, the first application client and the second application client do not need to encrypt or decrypt data themselves, but a first encryption and decryption server and a second encryption and decryption server, which are dedicated to data encryption and decryption, outside the first application client and the second application client perform encryption and decryption of data, and the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server, so that the consistency of the data encryption and decryption algorithms is ensured, the problem of data decryption failure caused by inconsistency of the data encryption and decryption algorithms is avoided, and the success rate of data decryption is improved.
Still another electronic device according to an embodiment of the present invention is provided, as shown in fig. 10, and includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, where the processor 1001, the communication interface 1002 and the memory 1003 complete mutual communication through the communication bus 1004,
a memory 1003 for storing a computer program;
the processor 1001 is configured to implement the following steps when executing the program stored in the memory 1003:
receiving an encryption and decryption request containing data to be encrypted or decrypted;
encrypting or decrypting data to be encrypted or decrypted according to the encryption and decryption request to obtain encrypted data or decrypted data;
and returning the encrypted data or the decrypted data.
As can be seen from the embodiment shown in fig. 10, in the embodiment of the present invention, when data encryption or decryption is required, the application program may directly send data to be encrypted or decrypted to the encryption/decryption server outside the application program, and after the encryption/decryption server performs encryption or decryption, the encrypted or decrypted data is directly returned to the corresponding application program.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, there is also provided a computer-readable storage medium, which stores instructions that, when executed on a computer, cause the computer to execute the encrypted transmission method described in any one of the above embodiments to obtain the same technical effect.
In another embodiment of the present invention, there is also provided a computer-readable storage medium, which stores instructions that, when executed on a computer, cause the computer to execute the encryption and decryption method described in any one of the above embodiments to obtain the same technical effect.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the encrypted transmission method described in any of the above embodiments to achieve the same technical effect.
In another embodiment of the present invention, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute the encryption and decryption method described in any of the above embodiments to achieve the same technical effects.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device and electronic apparatus embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (21)

1. An encryption transmission method applied to a first application client, the method comprising:
sending an encryption request containing data to be encrypted to a first encryption and decryption server so that the first encryption and decryption server encrypts the data to be encrypted to obtain encrypted data;
receiving the encrypted data returned by the first encryption and decryption server;
sending the encrypted data to a second application client which is in communication connection with the first application client; the second application client sends the encrypted data to a second encryption and decryption server, so that the second encryption and decryption server decrypts the encrypted data and returns the decrypted data to the second application client; the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server.
2. The method according to claim 1, wherein the first encryption and decryption server and the first application client transmit data through a socket connection.
3. The method of claim 2, wherein the socket connection has a connection identifier corresponding to the first application client.
4. The method according to claim 1 or 3, wherein before the step of sending an encryption request to the first encryption and decryption server, the method further comprises:
and sending a key setting request containing key information to the first encryption and decryption server.
5. An encrypted transmission method applied to a second application client, the method comprising:
receiving encrypted data sent by a first application client; the encrypted data is sent by the first application client after the first application client sends the data to be encrypted to a first encryption and decryption server so that the first encryption and decryption server encrypts the data to be encrypted and returns the encrypted data to the first application client;
sending a decryption request containing the encrypted data to a second encryption and decryption server, so that the second encryption and decryption server decrypts the encrypted data to obtain decrypted data; the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server;
and receiving the decrypted data returned by the second encryption and decryption server.
6. The method according to claim 5, wherein the second encryption and decryption server and the second application client transmit data through a socket connection.
7. The method of claim 6, wherein the socket connection has a connection identifier corresponding to the second application client.
8. The method according to claim 5 or 7, wherein before the step of sending the decryption request containing the encrypted data to the second encryption/decryption server, the method further comprises:
and sending a key setting request containing key information to the second encryption and decryption server.
9. An encryption and decryption method is applied to an encryption and decryption server side, and the method comprises the following steps:
receiving an encryption and decryption request containing data to be encrypted or decrypted;
encrypting or decrypting the data to be encrypted or decrypted according to the encryption and decryption request to obtain encrypted data or decrypted data;
and returning the encrypted data or the decrypted data.
10. An encryption transmission apparatus, applied to a first application client, the apparatus comprising:
the encryption request sending module is used for sending an encryption request containing data to be encrypted to a first encryption and decryption server so that the first encryption and decryption server encrypts the data to be encrypted to obtain encrypted data;
the first encrypted data receiving module is used for receiving the encrypted data returned by the first encryption and decryption server side;
the encrypted data sending module is used for sending the encrypted data to a second application client which is in communication connection with the first application client; the second application client sends the encrypted data to a second encryption and decryption server, so that the second encryption and decryption server decrypts the encrypted data and returns the decrypted data to the second application client; the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server.
11. The apparatus according to claim 10, wherein the first encryption/decryption server and the first application client transmit data via a socket connection.
12. The apparatus of claim 11, wherein the socket connection has a connection identifier corresponding to the first application client.
13. The apparatus of claim 10 or 12,
the device, still include: a first key setting request sending module;
the first key setting request sending module is configured to send a key setting request including key information to the first encryption and decryption server before sending the encryption request to the first encryption and decryption server.
14. An encrypted transmission device applied to a second application client, the device comprising:
the second encrypted data receiving module is used for receiving encrypted data sent by the first application client; the encrypted data is sent by the first application client after the first application client sends the data to be encrypted to a first encryption and decryption server so that the first encryption and decryption server encrypts the data to be encrypted and returns the encrypted data to the first application client;
a decryption request sending module, configured to send a decryption request including the encrypted data to the second encryption and decryption server, so that the second encryption and decryption server decrypts the encrypted data to obtain decrypted data; the first encryption and decryption server and the second encryption and decryption server are the same encryption and decryption server;
and the decrypted data receiving module is used for receiving the decrypted data returned by the second encryption and decryption server side.
15. The apparatus according to claim 14, wherein the second encryption/decryption server and the second application client transmit data via a socket connection.
16. The apparatus of claim 15, wherein the socket connection has a connection identifier corresponding to the second application client.
17. The apparatus of claim 14 or 16,
the device, still include: a second key setting request sending module;
and the second key setting request sending module is configured to send a key setting request including key information to the second encryption and decryption server before sending the decryption request including the encrypted data to the second encryption and decryption server.
18. An encryption and decryption apparatus, applied to an encryption and decryption server, the apparatus comprising:
the encryption and decryption request receiving module is used for receiving an encryption and decryption request containing data to be encrypted or decrypted;
the encryption and decryption module is used for encrypting or decrypting the data to be encrypted or decrypted according to the encryption and decryption request to obtain encrypted data or decrypted data;
and the encryption and decryption data returning module is used for returning the encrypted data or the decrypted data.
19. An electronic device comprising a processor and a memory, wherein,
the memory is used for storing a computer program;
the processor, when executing the program stored in the memory, implementing the method steps of any of claims 1-4.
20. An electronic device comprising a processor and a memory, wherein,
the memory is used for storing a computer program;
the processor, when executing the program stored in the memory, is configured to perform the method steps of any of claims 5-8.
21. An electronic device comprising a processor and a memory, wherein,
the memory is used for storing a computer program;
the processor, when executing the program stored in the memory, performs the method steps of claim 9.
CN201911416500.2A 2019-12-31 2019-12-31 Encryption transmission method and device and electronic equipment Pending CN113132320A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911416500.2A CN113132320A (en) 2019-12-31 2019-12-31 Encryption transmission method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911416500.2A CN113132320A (en) 2019-12-31 2019-12-31 Encryption transmission method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113132320A true CN113132320A (en) 2021-07-16

Family

ID=76770780

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911416500.2A Pending CN113132320A (en) 2019-12-31 2019-12-31 Encryption transmission method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113132320A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113612775A (en) * 2021-08-04 2021-11-05 西安思安云创科技有限公司 4C remote control safety protection method, device and system based on Internet of things equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105205407A (en) * 2015-08-27 2015-12-30 郭玉涛 Electronic certificate encryption and decryption method
CN106657110A (en) * 2016-12-30 2017-05-10 北京奇虎科技有限公司 Encrypted transmission method and apparatus of streaming data
CN107018154A (en) * 2017-05-31 2017-08-04 南京燚麒智能科技有限公司 A kind of router and method for routing for being used to connect Intranet and outer net based on application layer
WO2019138399A1 (en) * 2018-01-15 2019-07-18 Copa Media Ltd. A method and a computer program for exchanging secured peer-to-peer communications
CN110445764A (en) * 2019-07-11 2019-11-12 广州朗国电子科技有限公司 It is a kind of to communicate close insurance system and method and encryption and decryption server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105205407A (en) * 2015-08-27 2015-12-30 郭玉涛 Electronic certificate encryption and decryption method
CN106657110A (en) * 2016-12-30 2017-05-10 北京奇虎科技有限公司 Encrypted transmission method and apparatus of streaming data
CN107018154A (en) * 2017-05-31 2017-08-04 南京燚麒智能科技有限公司 A kind of router and method for routing for being used to connect Intranet and outer net based on application layer
WO2019138399A1 (en) * 2018-01-15 2019-07-18 Copa Media Ltd. A method and a computer program for exchanging secured peer-to-peer communications
CN110445764A (en) * 2019-07-11 2019-11-12 广州朗国电子科技有限公司 It is a kind of to communicate close insurance system and method and encryption and decryption server

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113612775A (en) * 2021-08-04 2021-11-05 西安思安云创科技有限公司 4C remote control safety protection method, device and system based on Internet of things equipment

Similar Documents

Publication Publication Date Title
US10171440B2 (en) Method and apparatus for managing encryption keys for cloud service
US11676133B2 (en) Method and system for mobile cryptocurrency wallet connectivity
US8938074B2 (en) Systems and methods for secure communication using a communication encryption bios based upon a message specific identifier
CN114024710B (en) Data transmission method, device, system and equipment
US10887085B2 (en) System and method for controlling usage of cryptographic keys
CN108270739B (en) Method and device for managing encryption information
WO2018090763A1 (en) Method and device for configuring terminal master key
WO2020233049A1 (en) Data authorization method and apparatus of blockchain system, storage medium, and electronic device
CN111355684B (en) Internet of things data transmission method, device and system, electronic equipment and medium
CN112400299B (en) Data interaction method and related equipment
US10063655B2 (en) Information processing method, trusted server, and cloud server
CN110557255A (en) certificate management method and device
CN114826733B (en) File transmission method, device, system, equipment, medium and program product
CN104243452B (en) A kind of cloud computing access control method and system
CN111970109A (en) Data transmission method and system
CN113992427B (en) Data encryption sending method and device based on adjacent nodes
CN113630412B (en) Resource downloading method, resource downloading device, electronic equipment and storage medium
CN114095277A (en) Power distribution network secure communication method, secure access device and readable storage medium
CN116488919B (en) Data processing method, communication node and storage medium
CN113132320A (en) Encryption transmission method and device and electronic equipment
CN108848094B (en) Data security verification method, device, system, computer equipment and storage medium
CN111368322A (en) File decryption method and device, electronic equipment and storage medium
CN113422832B (en) File transmission method, device, equipment and storage medium
CN113556333A (en) Computer network data secure transmission method and device
CN114650188A (en) Data secure transmission method and device based on proxy node

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210716

RJ01 Rejection of invention patent application after publication