Data encryption transmission method and device, equipment and medium

By randomly selecting target mark information from multiple encrypted mark information in data encryption transmission, and using their corresponding target keys and target encryption and decryption algorithms for encryption and decryption, the problem of low data transmission security caused by the use of fixed encryption and decryption algorithms and keys in the prior art is solved, and higher data transmission security is achieved.

CN120128352APending Publication Date: 2025-06-10CHENGDU TD TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311680886.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-07
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

The existing data encryption transmission methods use fixed encryption and decryption algorithms and keys, resulting in low security in data transmission.

Method used

The sender device randomly selects the target mark information from multiple encrypted mark information, encrypts the original data using the target key and the target encryption and decryption algorithm corresponding to the target mark information, and sends the encrypted data and target mark information to the receiver device. The receiving device determines the target key and the target encryption and decryption algorithm based on the received target mark information, and decrypts the encrypted data.

Benefits of technology

By using the target key and target encryption and decryption algorithm corresponding to the randomly selected target mark information for encryption and decryption, the security of data transmission is effectively improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120128352A_ABST
    Figure CN120128352A_ABST
Patent Text Reader

Abstract

The invention provides a data encryption transmission method and device, equipment and a medium, which can be applied to the technical field of communication. In the method, target mark information is randomly selected from multiple pieces of encrypted mark information through sender equipment, then original data is encrypted by adopting a target key and a target encryption and decryption algorithm corresponding to the target mark information to obtain encrypted data, and then the encrypted data and the target mark information are sent to receiver equipment. And the receiver device decrypts the encrypted data by using the target key and the target encryption and decryption algorithm corresponding to the determined target mark information to obtain the original data. According to the scheme, encryption and decryption are performed by adopting the target key corresponding to the randomly selected target mark information and the target encryption and decryption algorithm, so that the security of data transmission is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a data encryption transmission method, apparatus, device, and medium. Background Art

[0002] With the development of technology and people's attention to information security, for data transmission, it is also necessary to encrypt the data before transmission.

[0003] In the prior art, for the encrypted transmission of data, usually the sending device uses a key and an encryption / decryption algorithm to encrypt the original data, obtains the encrypted data and transmits it to the receiving device, and the receiving device uses the same encryption / decryption algorithm and key to decrypt the encrypted data to obtain the original data.

[0004] In summary, the existing data encryption transmission method uses fixed encryption / decryption algorithms and keys, resulting in low security of data transmission. Summary of the Invention

[0005] Embodiments of this application provide a data encryption transmission method, apparatus, device, and medium, which are used to solve the problem that the existing data encryption transmission method uses fixed encryption / decryption algorithms and keys, resulting in low security of data transmission.

[0006] In a first aspect, embodiments of this application provide a data encryption transmission method, which is applied to a sending device, and the method includes:

[0007] Randomly select a target tag information from multiple encrypted tag information, where the multiple encrypted tag information is information obtained by encrypting the tag information using multiple groups of keys and encryption / decryption algorithms;

[0008] Use the target key and target encryption / decryption algorithm corresponding to the target tag information to encrypt the original data to obtain encrypted data;

[0009] Send target data to the receiving device, where the target data includes the encrypted data and the target tag information.

[0010] In a specific implementation, before randomly selecting the target tag information from the multiple encrypted tag information, the method further includes:

[0011] Interact with the receiving device to obtain multiple keys, multiple encryption / decryption algorithms, and the tag information;

[0012] For each key and each encryption / decryption algorithm, use the key and the encryption / decryption algorithm to encrypt the tag information to obtain the encrypted tag information;

[0013] After establishing a corresponding relationship between the encrypted tag information, the key, and the encryption / decryption algorithm, store them.

[0014] In a specific implementation manner, the interacting with the receiving device to obtain multiple keys, multiple encryption / decryption algorithms, and the tag information includes:

[0015] Send an encryption parameter negotiation request to the receiving device, where the encryption parameter negotiation request includes multiple encryption / decryption algorithms to be selected;

[0016] Receive the tag information and the multiple encryption / decryption algorithms sent by the receiving device;

[0017] Send multiple first key data to the receiving device;

[0018] Receive the second key data corresponding to each first key data sent by the receiving device;

[0019] For each first key data, generate a key based on the first key data and the second key data corresponding to the first key data.

[0020] In a second aspect, an embodiment of the present application provides a data encryption and transmission method, which is applied to a receiving device. The method includes:

[0021] Receive the target data sent by the sending device, where the target data includes encrypted data and target tag information;

[0022] Determine the target key and the target encryption / decryption algorithm corresponding to the target tag information according to the corresponding relationship between the encrypted tag information, the key, and the encryption / decryption algorithm;

[0023] Use the target key and the target encryption / decryption algorithm to decrypt the encrypted data to obtain the original data.

[0024] In a specific implementation manner, before receiving the target data sent by the sending device, the method further includes:

[0025] Interact with the sending device to obtain tag information, multiple keys, and multiple encryption / decryption algorithms;

[0026] For each key and each encryption / decryption algorithm, use the key and the encryption / decryption algorithm to encrypt the tag information to obtain the encrypted tag information;

[0027] After establishing a corresponding relationship between the encrypted tag information, the key, and the encryption / decryption algorithm, store them.

[0028] In a specific embodiment, interacting with the sending device to obtain marking information, a plurality of keys, and a plurality of encryption and decryption algorithms includes:

[0029] Receiving an encryption parameter negotiation request sent by the sending device, where the encryption parameter negotiation request includes a plurality of to-be-selected encryption and decryption algorithms;

[0030] Selecting the plurality of encryption and decryption algorithms from the plurality of to-be-selected encryption and decryption algorithms;

[0031] Generating the marking information;

[0032] Sending the marking information and the plurality of encryption and decryption algorithms to the sending device;

[0033] Receiving a plurality of first key data sent by the sending device;

[0034] Sending second key data corresponding to each first key data to the sending device;

[0035] For each first key data, generating a key according to the first key data and the second key data corresponding to the first key data.

[0036] In a third aspect, an embodiment of the present application provides a data encryption and transmission device, including:

[0037] A processing module, configured to:

[0038] Randomly selecting a target marking information from a plurality of encrypted marking information, where the plurality of encrypted marking information are information obtained by encrypting the marking information respectively using multiple groups of keys and encryption and decryption algorithms;

[0039] Encrypting the original data using the target key and the target encryption and decryption algorithm corresponding to the target marking information to obtain encrypted data;

[0040] A communication module, configured to send target data to a receiving device, where the target data includes the encrypted data and the target marking information.

[0041] In a fourth aspect, an embodiment of the present application provides a data encryption and transmission device, including:

[0042] A communication module, configured to receive target data sent by a sending device, where the target data includes encrypted data and a target marking information;

[0043] A processing module, configured to:

[0044] Determining the target key and the target encryption and decryption algorithm corresponding to the target marking information according to the corresponding relationship between the encrypted marking information, the key, and the encryption and decryption algorithm;

[0045] Use the target key and the target encryption / decryption algorithm to decrypt the encrypted data to obtain the original data.

[0046] In a fifth aspect, an embodiment of the present application provides an electronic device, including:

[0047] A processor, a memory, and a communication interface;

[0048] The memory is used to store executable instructions of the processor;

[0049] Wherein, the processor is configured to execute the data encryption and transmission method according to any one of the first aspects by executing the executable instructions.

[0050] In a sixth aspect, an embodiment of the present application provides an electronic device, including:

[0051] A processor, a memory, and a communication interface;

[0052] The memory is used to store executable instructions of the processor;

[0053] Wherein, the processor is configured to execute the data encryption and transmission method according to any one of the second aspects by executing the executable instructions.

[0054] In a seventh aspect, an embodiment of the present application provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the data encryption and transmission method according to any one of the first aspect or the second aspect.

[0055] In an eighth aspect, an embodiment of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it is used to implement the data encryption and transmission method according to any one of the first aspect or the second aspect.

[0056] The data encryption and transmission method, device, equipment, and medium provided by the embodiments of the present application, the sending device randomly selects the target marker information from multiple encrypted marker information, and then uses the target key and the target encryption / decryption algorithm corresponding to the target marker information to encrypt the original data to obtain the encrypted data, and then sends the encrypted data and the target marker information to the receiving device. The receiving device uses the target key and the target encryption / decryption algorithm corresponding to the determined target marker information to decrypt the encrypted data to obtain the original data. This solution effectively improves the security of data transmission by using the target key and the target encryption / decryption algorithm corresponding to the randomly selected target marker information for encryption and decryption. Description of the Drawings

[0057] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0058] Figure 1 Schematic diagram of the application scenario of the data encryption transmission method provided by the present application;

[0059] Figure 2 Schematic flowchart of the first embodiment of the data encryption transmission method provided by the present application;

[0060] Figure 3 Schematic flowchart of the second embodiment of the data encryption transmission method provided by the present application;

[0061] Figure 4 Schematic flowchart of the third embodiment of the data encryption transmission method provided by the present application;

[0062] Figure 5 Schematic diagram of the structure of the first embodiment of the data encryption transmission device provided by the present application;

[0063] Figure 6 Schematic diagram of the structure of the second embodiment of the data encryption transmission device provided by the present application;

[0064] Figure 7 Schematic diagram of the structure of an electronic device provided by the present application Figure 1 ;

[0065] Figure 8 Schematic diagram of the structure of an electronic device provided by the present application Figure 2 . Detailed implementation manners

[0066] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Based on the embodiments of the present application, all other embodiments made by those of ordinary skill in the art under the inspiration of this embodiment belong to the scope of protection of the present application.

[0067] In the description and claims of this application and the above-mentioned drawings, terms such as "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that such data used can be interchanged under appropriate circumstances so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0068] With the development of technology, various data are increasing day by day, and all walks of life attach more and more importance to the security of data. For data transmission, it is also necessary to encrypt the data before transmission.

[0069] In the prior art, for the encrypted transmission of data, usually the sending device uses a key and an encryption / decryption algorithm to encrypt the original data, obtains the encrypted data and transmits it to the receiving device. The receiving device uses the same encryption / decryption algorithm and key to decrypt the encrypted data to obtain the original data. Due to the use of a fixed encryption / decryption algorithm and key, there will be a problem of low security in data transmission.

[0070] In view of the problems existing in the prior art, the inventors found in the process of researching the data encryption transmission method that in order to improve the security of data transmission, the sending device can randomly select a key and an encryption / decryption algorithm for encryption, and then transmit the encrypted data and the target marking information that can determine the key and the encryption / decryption algorithm to the receiving device. Then the receiving device determines the key and the encryption / decryption algorithm according to the received target marking information for decryption, which can effectively improve the security of data transmission. Based on the above inventive concept, the data encryption transmission solution in this application is designed.

[0071] In this application, the sending device and the receiving device can be terminal devices, gateways, servers, etc. The embodiments of this application do not limit them and can be determined according to the actual situation.

[0072] Exemplarily, Figure 1 is a schematic diagram of the application scenario of the data encryption transmission method provided by this application. As Figure 1 shown, in this application scenario, there are multiple sending devices, namely smart communication terminals, tablet computers, and smart watches, and the receiving device is a gateway. Hereinafter, an example of a smart communication terminal sending data to the gateway will be used for illustration.

[0073] Before the intelligent communication terminal sends data to the gateway, the intelligent communication terminal interacts with the gateway so that both the intelligent communication terminal and the gateway obtain the same marking information, multiple keys, and multiple encryption and decryption algorithms.

[0074] Furthermore, for each key and each encryption and decryption algorithm, the intelligent communication terminal and the gateway use the key and the encryption and decryption algorithm to encrypt the marking information to obtain the encrypted marking information; then, after establishing a correspondence between the encrypted marking information, the key, and the encryption and decryption algorithm, they store it.

[0075] When the intelligent communication terminal needs to send data to the gateway, it first randomly selects the target marking information from multiple encrypted marking information.

[0076] Furthermore, it uses the target key and the target encryption and decryption algorithm corresponding to the target marking information to encrypt the original data to obtain the encrypted data; then it sends the target data to the receiving device, where the target data includes the encrypted data and the target marking information.

[0077] After receiving the target data, the gateway determines the target key and the target encryption and decryption algorithm corresponding to the target marking information according to the correspondence between the encrypted marking information, the key, and the encryption and decryption algorithm.

[0078] Then it uses the target key and the target encryption and decryption algorithm to decrypt the encrypted data to obtain the original data, thus completing the data transmission process.

[0079] It should be noted that Figure 1 This is only a schematic diagram of an application scenario provided by the embodiments of the present application. The embodiments of the present application do not limit Figure 1 the actual forms of various devices included, nor do they limit Figure 1 the interaction methods between the devices. In the specific application of the solution, it can be set according to actual needs.

[0080] Next, the technical solution of the present application will be described in detail through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0081] Figure 2 This is a schematic flowchart of the first embodiment of the data encryption and transmission method provided by the present application. The embodiments of the present application illustrate the situation where the sending device randomly selects the target marking information from multiple encrypted marking information, and then uses the target key and the target encryption and decryption algorithm corresponding to the target marking information to encrypt the original data. The receiving device uses the target key and the target encryption and decryption algorithm corresponding to the determined target marking information to decrypt the encrypted data. The method in this embodiment can be implemented through software, hardware, or a combination of software and hardware. For example Figure 2As shown, the data encryption and transmission method specifically includes the following steps:

[0082] S201: The sending device randomly selects a target marker information from multiple encrypted marker information.

[0083] In this step, when the sending device needs to send data to the receiving device, in order to improve the security of data transmission, it first randomly selects the target marker information from the multiple stored encrypted marker information.

[0084] Among them, the multiple encrypted marker information is the information obtained by encrypting the marker information respectively using multiple groups of keys and encryption and decryption algorithms.

[0085] S202: The sending device encrypts the original data using the target key and target encryption and decryption algorithm corresponding to the target marker information to obtain encrypted data.

[0086] In this step, after the sending device obtains the target marker information, because the corresponding relationship between the encrypted marker information and the key and encryption and decryption algorithm is stored in the sending device, it can determine the target key and target encryption and decryption algorithm corresponding to the target marker information. Furthermore, the sending device encrypts the original data using the target key and target encryption and decryption algorithm corresponding to the target marker information to obtain encrypted data.

[0087] S203: The sending device sends the target data to the receiving device.

[0088] In this step, after the sending device obtains the encrypted data, it can perform data transmission and send the target data to the receiving device. The target data includes the encrypted data and the target marker information.

[0089] S204: After the receiving device receives the target data sent by the sending device, it determines the target key and target encryption and decryption algorithm corresponding to the target marker information according to the corresponding relationship between the encrypted marker information and the key and encryption and decryption algorithm.

[0090] In this step, after the sending device sends the target data to the receiving device, the receiving device can receive the target data. Since the corresponding relationship between the encrypted marker information and the key and encryption and decryption algorithm is stored in the receiving device, it can determine the target key and target encryption and decryption algorithm corresponding to the target marker information in the target data.

[0091] It should be noted that the sending device can place the target marker information at a preset position of the encrypted data. The receiving device can read the data at the preset position to obtain the target marker information, and the remaining data is the encrypted data. The preset position can be the starting position, the ending position, the middle position, etc. The embodiments of the present application do not limit the preset position and can be determined according to the actual situation.

[0092] S205: The receiving device decrypts the encrypted data using the target key and the target encryption / decryption algorithm to obtain the original data.

[0093] In this step, after the receiving device determines the target key and the target encryption / decryption algorithm corresponding to the target marking information, it can use the target key and the target encryption / decryption algorithm to decrypt the encrypted data in the target data to obtain the original data, thus completing the data transmission process.

[0094] The data encryption and transmission method provided in this embodiment enables the sending device to randomly select target marking information from multiple encrypted marking information, and then uses the target key and the target encryption / decryption algorithm corresponding to the target marking information to encrypt the original data to obtain encrypted data, and then sends the encrypted data and the target marking information to the receiving device. The receiving device uses the target key and the target encryption / decryption algorithm corresponding to the determined target marking information to decrypt the encrypted data to obtain the original data. Compared with the prior art where a fixed encryption / decryption algorithm and key are used for encryption and decryption, this solution effectively improves the security of data transmission by encrypting and decrypting using the target key and the target encryption / decryption algorithm corresponding to the randomly selected target marking information each time.

[0095] Figure 3 It is a schematic flowchart of the second embodiment of the data encryption and transmission method provided in this application. On the basis of the above embodiment, this embodiment of the application describes the situation where the sending device and the receiving device obtain keys, encryption / decryption algorithms, marking information, and generate the corresponding relationship between the encrypted marking information and the keys and encryption / decryption algorithms. As Figure 3 shown, the data encryption and transmission method specifically includes the following steps:

[0096] S301: The sending device and the receiving device interact to obtain marking information, multiple keys, and multiple encryption / decryption algorithms.

[0097] Before data transmission, to ensure the security during the data transmission process, the sending device and the receiving device need to obtain keys, encryption / decryption algorithms, marking information, and generate the corresponding relationship between the encrypted marking information and the keys and encryption / decryption algorithms.

[0098] In this step, the sending device and the receiving device interact, and the sending device and the receiving device obtain the same marking information, multiple keys, and multiple encryption / decryption algorithms.

[0099] S302: For each key and each encryption / decryption algorithm, the sending device and the receiving device use the key and the encryption / decryption algorithm to encrypt the marking information to obtain the encrypted marking information.

[0100] In this step, after the sender device and the receiver device obtain the same tag information, multiple keys, and multiple encryption and decryption algorithms, for each key and each encryption and decryption algorithm, the sender device and the receiver device use the key and the encryption and decryption algorithm to encrypt the tag information to obtain the encrypted tag information. The key and the encryption and decryption algorithm form a set of data.

[0101] Exemplarily, two keys are obtained, namely key A and key B; three encryption and decryption algorithms are obtained, namely algorithm 1, algorithm 2, and algorithm 3; six encrypted tag information can be obtained, which are: the encrypted tag information obtained by encrypting the tag information with key A and algorithm 1, the encrypted tag information obtained by encrypting the tag information with key A and algorithm 2, the encrypted tag information obtained by encrypting the tag information with key A and algorithm 3, the encrypted tag information obtained by encrypting the tag information with key B and algorithm 1, the encrypted tag information obtained by encrypting the tag information with key B and algorithm 2, and the encrypted tag information obtained by encrypting the tag information with key B and algorithm 3.

[0102] S303: After the sender device and the receiver device establish a corresponding relationship between the encrypted tag information, the key, and the encryption and decryption algorithm, they store it.

[0103] In this step, after the sender device and the receiver device obtain the encrypted tag information, they establish a corresponding relationship between the encrypted tag information, the key, and the encryption and decryption algorithm and then store it for use in subsequent data transmission processes.

[0104] It should be noted that when at least one of the multiple encryption and decryption algorithms is discarded, the steps in this embodiment can be re-executed.

[0105] The data encryption and transmission method provided in this embodiment encrypts the obtained tag information by the sender device and the receiver device according to the obtained multiple keys and multiple encryption and decryption algorithms, and then stores the encrypted tag information after establishing a corresponding relationship with the key and the encryption and decryption algorithm, so that random selection can be made from multiple keys and multiple encryption and decryption algorithms during data transmission, improving the security of data transmission.

[0106] Figure 4 It is a schematic flowchart of the third embodiment of the data encryption and transmission method provided in this application. On the basis of the above embodiment, this application embodiment describes the situation where the sender device and the receiver device interact to obtain tag information, multiple keys, and multiple encryption and decryption algorithms. As Figure 4 shown, the data encryption and transmission method specifically includes the following steps:

[0107] S401: The sender device sends an encryption parameter negotiation request to the receiver device.

[0108] In this step, in order to obtain the marking information, multiple keys, and multiple encryption and decryption algorithms, the sender device needs to send an encryption parameter negotiation request to the receiver device. The encryption parameter negotiation request includes multiple encryption and decryption algorithms to be selected. The encryption and decryption algorithms to be selected are algorithms that the sender device can implement.

[0109] It should be noted that the encryption and decryption algorithms to be selected can be the Data Encryption Standard (DES) algorithm, the Advanced Encryption Standard (AES) algorithm, the SM4 algorithm, etc. The embodiments of the present application do not limit the encryption and decryption algorithms to be selected, and can be determined according to the actual situation.

[0110] S402: After the receiver device receives the encryption parameter negotiation request sent by the sender device, select multiple encryption and decryption algorithms from the multiple encryption and decryption algorithms to be selected.

[0111] In this step, after the sender device sends the encryption parameter negotiation request to the receiver device, the receiver device can receive the request, and then select the algorithms that it can implement from the multiple encryption and decryption algorithms to be selected in the request to obtain multiple encryption and decryption algorithms.

[0112] S403: The receiver device generates the marking information.

[0113] In the step, after the receiver device receives the encryption parameter negotiation request, it can generate the marking information.

[0114] It should be noted that the marking information can be an encrypted information such as a randomly generated string, a randomly generated number, a randomly generated text, etc. The embodiments of the present application do not limit the marking information and can be determined according to the actual situation.

[0115] It should be noted that the execution order of the receiver device to determine multiple encryption and decryption algorithms and generate the marking information can be: first determine multiple encryption and decryption algorithms, and then generate the marking information; it can also be: first determine and generate the marking information, and then execute multiple encryption and decryption algorithms; it can also be: determine multiple encryption and decryption algorithms and generate the marking information at the same time. The embodiments of the present application do not limit the execution order of the receiver device to determine multiple encryption and decryption algorithms and generate the marking information, and can be determined according to the actual situation.

[0116] S404: The receiver device sends the marking information and multiple encryption and decryption algorithms to the sender device.

[0117] In this step, after the receiving device obtains the marking information and multiple encryption and decryption algorithms, it sends them to the sending device for subsequent storage by the sending device.

[0118] S405: After the sending device receives the marking information and multiple encryption and decryption algorithms sent by the receiving device, it sends multiple first key data to the receiving device.

[0119] In this step, after the receiving device sends the marking information and multiple encryption and decryption algorithms to the sending device, the sending device can receive and store the marking information and multiple encryption and decryption algorithms, and then send multiple first key data to the receiving device. The first key data can be a randomly generated string.

[0120] S406: After the receiving device receives the multiple first key data sent by the sending device, it sends the second key data corresponding to each first key data to the sending device.

[0121] In this step, after the sending device sends multiple first key data to the receiving device, the receiving device can receive the multiple first key data, and then for each first key data, generate the corresponding second key data and send it to the sending device. The second key data can be a randomly generated string.

[0122] S407: For each first key data, the receiving device generates a key based on the first key data and the second key data corresponding to the first key data.

[0123] In this step, after the receiving device generates the second key data corresponding to each first key data, for each first key data, it uses a key generation algorithm to generate and store a key based on the first key data and the second key data corresponding to the first key data.

[0124] S408: After the sending device receives the second key data corresponding to each first key data sent by the receiving device, for each first key data, it generates a key based on the first key data and the second key data corresponding to the first key data.

[0125] In this step, after the receiving device sends the second key data corresponding to each first key data to the sending device, the sending device can receive the second key data, and then for each first key data, it uses a key generation algorithm to generate and store a key based on the first key data and the second key data corresponding to the first key data.

[0126] It should be noted that the execution steps of the sending device and the receiving device can be interchanged.

[0127] The data encryption and transmission method provided in this embodiment enables the sender device to send the algorithms it can implement to the receiver device. The receiver device selects the algorithms it can implement from them as multiple encryption and decryption algorithms, ensuring that both the sender device and the receiver device can use encryption and decryption algorithms. By the sender device determining the first key data and the receiver device determining the second key data, the key is made more complex, improving the security of data transmission.

[0128] The following is an embodiment of the device of the present application, which can be used to execute the method embodiment of the present application. For details not disclosed in the device embodiment of the present application, please refer to the method embodiment of the present application.

[0129] Figure 5 It is a schematic structural diagram of the first embodiment of the data encryption and transmission device provided by the present application; this device can be integrated into the sender device in the above method embodiment, or can be implemented by the sender device in the above method embodiment. As Figure 5 shown, the data encryption and transmission device 50 includes:

[0130] A processing module 51, configured to:

[0131] Randomly select a target marker information from multiple encrypted marker information, where the multiple encrypted marker information is information obtained by encrypting the marker information respectively using multiple groups of keys and encryption and decryption algorithms;

[0132] Encrypt the original data using the target key and the target encryption and decryption algorithm corresponding to the target marker information to obtain encrypted data;

[0133] A communication module 52, configured to send target data to the receiver device, where the target data includes the encrypted data and the target marker information.

[0134] Further, the communication module 52 is further configured to interact with the receiver device to obtain multiple keys, multiple encryption and decryption algorithms, and the marker information;

[0135] Further, the processing module 51 is further configured to:

[0136] For each key and each encryption and decryption algorithm, encrypt the marker information using the key and the encryption and decryption algorithm to obtain encrypted marker information;

[0137] Establish a corresponding relationship between the encrypted marker information, the key, and the encryption and decryption algorithm and store them.

[0138] Further, the communication module 52 is specifically configured to:

[0139] Send an encryption parameter negotiation request to the receiving device, where the encryption parameter negotiation request includes multiple encryption and decryption algorithms to be selected;

[0140] Receive the marker information and the multiple encryption and decryption algorithms sent by the receiving device;

[0141] Send multiple first key data to the receiving device;

[0142] Receive the second key data corresponding to each first key data sent by the receiving device;

[0143] Through the processing module 51, for each first key data, generate a key according to the first key data and the second key data corresponding to the first key data.

[0144] The data encryption transmission device provided in this embodiment is used to execute the technical solution of the sending device in any of the foregoing method embodiments, and its implementation principle and technical effects are similar, so details are not described herein again.

[0145] Figure 6 It is a schematic structural diagram of the second embodiment of the data encryption transmission device provided in this application; this device can be integrated into the receiving device in the foregoing method embodiment, or can be implemented by the receiving device in the foregoing method embodiment. As Figure 6 shown, the data encryption transmission device 60 includes:

[0146] A communication module 61, configured to receive target data sent by a sending device, where the target data includes encrypted data and target marker information;

[0147] A processing module 62, configured to:

[0148] Determine a target key and a target encryption and decryption algorithm corresponding to the target marker information according to the corresponding relationship between the encrypted marker information, the key, and the encryption and decryption algorithm;

[0149] Use the target key and the target encryption and decryption algorithm to decrypt the encrypted data to obtain the original data.

[0150] Further, the communication module 61 is further configured to interact with the sending device to obtain marker information, multiple keys, and multiple encryption and decryption algorithms;

[0151] Further, the processing module 62 is further configured to:

[0152] For each key and each encryption and decryption algorithm, use the key and the encryption and decryption algorithm to encrypt the marker information to obtain the encrypted marker information;

[0153] After establishing a corresponding relationship between the encrypted tag information, the key, and the encryption / decryption algorithm, store them.

[0154] Further, the communication module 61 is specifically configured to:

[0155] Receive an encryption parameter negotiation request sent by the sending device, where the encryption parameter negotiation request includes multiple encryption / decryption algorithms to be selected;

[0156] Select the multiple encryption / decryption algorithms from the multiple encryption / decryption algorithms to be selected through the processing module 62;

[0157] Generate the tag information through the processing module 62;

[0158] Send the tag information and the multiple encryption / decryption algorithms to the sending device;

[0159] Receive multiple first key data sent by the sending device;

[0160] Send the second key data corresponding to each first key data to the sending device;

[0161] For each first key data, generate a key according to the first key data and the second key data corresponding to the first key data through the processing module 62.

[0162] The data encryption and transmission device provided in this embodiment is used to execute the technical solutions of the receiving device in any of the foregoing method embodiments, and its implementation principle and technical effects are similar and will not be elaborated here.

[0163] Figure 7 The structural schematic of an electronic device provided by this application Figure 1 As Figure 7 shown, the electronic device 70 includes:

[0164] A processor 71, a memory 72, and a communication interface 73;

[0165] The memory 72 is used to store the executable instructions of the processor 71;

[0166] Among them, the processor 71 is configured to execute the technical solutions of the sending device in any of the foregoing method embodiments by executing the executable instructions.

[0167] Optionally, the memory 72 can be either independent or integrated with the processor 71.

[0168] Optionally, when the memory 72 is a device independent of the processor 71, the electronic device 70 may further include:

[0169] The bus 74, the memory 72, and the communication interface 73 are connected to the processor 71 via the bus 74 to complete communication with each other. The communication interface 73 is used to communicate with other devices.

[0170] Optionally, the communication interface 73 can be specifically implemented by a transceiver. The communication interface is used to implement communication between the database access device and other devices (such as clients, read-write libraries, and read-only libraries). The memory may include a random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory.

[0171] The bus 74 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience in representation, only a thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus.

[0172] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0173] This electronic device is used to execute the technical solution of the sender device in any of the foregoing method embodiments, and its implementation principle and technical effects are similar, so they will not be elaborated here.

[0174] Figure 8 The structural schematic of an electronic device provided by this application Figure 2 . As Figure 8 shown, this electronic device 80 includes:

[0175] A processor 81, a memory 82, and a communication interface 83;

[0176] The memory 82 is used to store the executable instructions of the processor 81;

[0177] Among them, the processor 81 is configured to execute the technical solution of the receiver device in any of the foregoing method embodiments by executing the executable instructions.

[0178] Optionally, the memory 82 can be either independent or integrated with the processor 81.

[0179] Optionally, when the memory 82 is a device independent of the processor 81, the electronic device 80 may further include:

[0180] A bus 84, through which the memory 82 and the communication interface 83 are connected to the processor 81 to complete mutual communication, and the communication interface 83 is used for communicating with other devices.

[0181] Optionally, the communication interface 83 may be specifically implemented by a transceiver. The communication interface is used to implement communication between the database access device and other devices (such as clients, read-write libraries, and read-only libraries). The memory may include RAM and may also include non-volatile memory, such as at least one disk memory.

[0182] The bus 84 may be a PCI bus or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity in illustration, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0183] The foregoing processor may be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it may also be a digital signal processor DSP, an application specific integrated circuit ASIC, a field programmable gate array FPGA, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0184] The electronic device is used to execute the technical solutions of the receiving device in any of the foregoing method embodiments, and its implementation principle and technical effects are similar, and will not be elaborated herein.

[0185] An embodiment of the present application further provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the technical solutions provided in any of the foregoing method embodiments are implemented.

[0186] An embodiment of the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, it is used to implement the technical solutions provided in any of the foregoing method embodiments.

[0187] Those of ordinary skill in the art can understand that all or part of the steps of implementing the foregoing method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the foregoing method embodiments; and the foregoing storage medium includes: various media such as ROM, RAM, magnetic disk, or optical disc that can store program codes.

[0188] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A data encryption and transmission method, characterized in that, applied to a sender device, the method includes: randomly selecting a target marker information from multiple encrypted marker information, where the multiple encrypted marker information is information obtained by encrypting the marker information respectively using multiple groups of keys and encryption and decryption algorithms; encrypting the original data using the target key and target encryption and decryption algorithm corresponding to the target marker information to obtain encrypted data; sending target data to the receiver device, where the target data includes the encrypted data and the target marker information.

2. The method according to claim 1, characterized in that, before randomly selecting the target marker information from multiple encrypted marker information, the method further includes: interacting with the receiver device to obtain multiple keys, multiple encryption and decryption algorithms, and the marker information; for each key and each encryption and decryption algorithm, encrypting the marker information using the key and the encryption and decryption algorithm to obtain encrypted marker information; establishing a corresponding relationship between the encrypted marker information, the key, and the encryption and decryption algorithm and storing them.

3. The method according to claim 2, characterized in that, the interacting with the receiver device to obtain multiple keys, multiple encryption and decryption algorithms, and the marker information includes: sending an encryption parameter negotiation request to the receiver device, where the encryption parameter negotiation request includes multiple encryption and decryption algorithms to be selected; receiving the marker information and the multiple encryption and decryption algorithms sent by the receiver device; sending multiple first key data to the receiver device; receiving second key data corresponding to each first key data sent by the receiver device; for each first key data, generating a key according to the first key data and the second key data corresponding to the first key data.

4. A data encryption and transmission method, characterized in that, applied to a receiver device, the method includes: receiving target data sent by a sender device, where the target data includes encrypted data and target marker information; determining the target key and target encryption and decryption algorithm corresponding to the target marker information according to the corresponding relationship between the encrypted marker information, the key, and the encryption and decryption algorithm; decrypting the encrypted data using the target key and the target encryption and decryption algorithm to obtain the original data.

5. The method according to claim 4, characterized in that, before receiving the target data sent by the sender device, the method further includes: interacting with the sender device to obtain marker information, multiple keys, and multiple encryption and decryption algorithms; for each key and each encryption and decryption algorithm, encrypting the marker information using the key and the encryption and decryption algorithm to obtain encrypted marker information; establishing a corresponding relationship between the encrypted marker information, the key, and the encryption and decryption algorithm and storing them.

6. The method according to claim 5, characterized in that, the interacting with the sender device to obtain marker information, multiple keys, and multiple encryption and decryption algorithms includes: Receive the encryption parameter negotiation request sent by the sender device, where the encryption parameter negotiation request includes multiple encryption and decryption algorithms to be selected; Select the multiple encryption and decryption algorithms from the multiple encryption and decryption algorithms to be selected; Generate the tag information; Send the tag information and the multiple encryption and decryption algorithms to the sender device; Receive multiple first key data sent by the sender device; Send the second key data corresponding to each first key data to the sender device; For each first key data, generate a key according to the first key data and the second key data corresponding to the first key data.

7. A data encryption and transmission device, characterized in that, comprising: A processing module, configured to: Randomly select a target tag information from multiple encrypted tag information, where the multiple encrypted tag information is information obtained by encrypting the tag information respectively using multiple groups of keys and encryption and decryption algorithms; Encrypt the original data using the target key and the target encryption and decryption algorithm corresponding to the target tag information to obtain encrypted data; A communication module, configured to send target data to a receiver device, where the target data includes the encrypted data and the target tag information.

8. A data encryption and transmission device, characterized in that, comprising: A communication module, configured to receive target data sent by a sender device, where the target data includes encrypted data and a target tag information; A processing module, configured to: Determine the target key and the target encryption and decryption algorithm corresponding to the target tag information according to the correspondence between the encrypted tag information and the key and the encryption and decryption algorithm; Decrypt the encrypted data using the target key and the target encryption and decryption algorithm to obtain the original data.

9. An electronic device, characterized in that, comprising: A processor, a memory, and a communication interface; The memory is used to store the executable instructions of the processor; Wherein, the processor is configured to execute the data encryption and transmission method according to any one of claims 1 to 3 by executing the executable instructions.

10. An electronic device, characterized in that, comprising: A processor, a memory, and a communication interface; The memory is used to store the executable instructions of the processor; Wherein, the processor is configured to execute the data encryption and transmission method according to any one of claims 4 to 6 by executing the executable instructions.

11. A readable storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by a processor, it implements the data encryption and transmission method according to any one of claims 1 to 3, or any one of claims 4 to 6.

12. A computer program product, characterized in that, comprising a computer program, where when the computer program is executed by a processor, it is used to implement the data encryption and transmission method according to any one of claims 1 to 3, or any one of claims 4 to 6.