Data transmission method, system and device and readable storage medium
By performing device legality authentication on the server and distributing transmission keys, the problem of low data transmission security between devices in public networks is solved, encrypted transmission between devices is achieved, and data leakage is avoided.
Patent Information
- Application Number
- CN202410903860.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-10-29
AI Technical Summary
In a public or semi-public network environment, data transmission between devices lacks security and is easily intercepted by the network, leading to data leakage.
The server performs legality authentication of source and destination devices, generates and distributes transmission keys, ensures encrypted transmission during data transmission, and uses preset keys and public and private key pairs for device identity verification and data encryption.
It realizes secure data transmission between devices in the network environment, prevents data leakage, and provides simple and effective security protection measures.
Smart Images

Figure CN118869291A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security technology, and in particular to a data transmission method and system, device, and readable storage medium. Background Art
[0002] Users' devices are often in some public or semi-public network environments. Because it is a public network, there are many devices connected to the network with different identities. Therefore, when data is transmitted between two devices deployed in the network, if the data transmission is not protected or has sufficient security protection, it is easy to be monitored by the network, resulting in the leakage of the transmitted data. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a data transmission method and system, an apparatus, and a readable storage medium to solve the problem of low security when data is transmitted between devices in a network.
[0004] In order to solve the above technical problems, this specification is implemented as follows:
[0005] In a first aspect, a data transmission method is provided, which is executed on a server, and the method comprises:
[0006] Receive an encrypted transmission application from a source device, the encrypted transmission application carrying identity information of the source device and identity information of a destination device to which the source device applies for encrypted transmission;
[0007] In response to the encrypted transmission application, request the source device and the destination device to provide registration information on the server to confirm the legitimacy of the source device and the destination device;
[0008] If it is confirmed that the source device and the destination device are both legitimate, a transmission key is sent to the source device and the destination device respectively, and the transmission key is used for encryption and decryption of data transmitted between the source device and the destination device.
[0009] Optionally, in response to the encrypted transmission application, respectively requesting the source device and the destination device to provide registration information on the server to confirm the legitimacy of the source device and the destination device includes:
[0010] Based on the identity information of the target device carried in the encrypted transmission application, a first request is sent to the target device, where the first request is used to request the target device to provide a registration number on the server encrypted by a preset key, where the target device is the source device or the destination device, and the preset key is provided by the server to the target device when the target device is registered;
[0011] Receiving a first encrypted registration number sent by the target device;
[0012] If the first encrypted registration number is decrypted by the preset key to obtain the first registration number of the target device, the first registration number is matched with a registration list, where the registration number of each device registered on the server is recorded in the registration list;
[0013] If the match fails, the target device is confirmed to be illegal;
[0014] If the match is successful, it is confirmed that the target device is legitimate.
[0015] Optionally, the registration list also records the public key of each device registered on the server.
[0016] After matching the first registration number with the registration list, the method further includes:
[0017] If the match is successful, obtaining the public key of the target device from the registration list and using the public key to encrypt the target random number;
[0018] Sending the second request to the target device, where the second request carries the encrypted target random number and is used to request the target device to provide a registration number on the server encrypted by the target random number;
[0019] Receiving a second encrypted registration number sent by the target device;
[0020] If the second encrypted registration number is decrypted by the target random number to obtain the second registration number of the target device, and the second registration number is consistent with the first registration number, then the target device is confirmed to be legitimate.
[0021] Optionally, before respectively requesting the source device and the destination device to provide registration information on the server in response to the encrypted transmission application, the method further includes:
[0022] Receiving a registration application sent by a target device, wherein the registration application carries identity information of the target device;
[0023] After the registration application is approved, a registration number and a public key and private key pair are generated for the target device;
[0024] Sending the corresponding registration number and private key, and the preset key to the target device;
[0025] The identity information of the target device is associated with the registration information including the registration number and the public key, and recorded in the registration list.
[0026] In a second aspect, a data transmission method is provided, which is executed on a target device, and the method includes:
[0027] receiving a first request sent by the server, wherein the first request is used to request the target device to provide a registration number on the server encrypted by a preset key, wherein the preset key is provided by the server when the target device is registered;
[0028] In response to the first request, encrypt the registration number by using the preset key and send the encrypted registration number to the server so that the server can confirm the legitimacy of the target device;
[0029] Receiving a transmission key sent by the server after confirming that the target device is legitimate;
[0030] The transmission key is used to encrypt or decrypt the transmitted data.
[0031] Optionally, before receiving the transmission key sent by the server after confirming that the target device is legitimate, the method further includes:
[0032] receiving a second request sent by the server, the second request carrying a random number encrypted by a public key and being used to request the target device to provide a registration number on the server encrypted by the random number, the public key being provided by the server to the target device when the target device is registered;
[0033] Decrypting the encrypted random number using the public key;
[0034] The registration number is encrypted with the random number obtained by decryption and sent to the server so that the server can confirm the legitimacy of the target device.
[0035] Optionally, the target device is a source device, and before receiving the first request sent by the server, the method further includes:
[0036] An encrypted transmission application is sent to the server, where the encrypted transmission application carries the identity information of the source device and the identity information of the destination device to which the source device applies for encrypted data transmission.
[0037] In a third aspect, a system is provided, including a server, a source device and a destination device.
[0038] The source device sends an encrypted transmission application to the server, where the encrypted transmission application carries the identity information of the source device and the identity information of the destination device for which the source device applies for encrypted data transmission;
[0039] The server, in response to the encrypted transmission application, requests the source device and the destination device to provide registration information on the server respectively, so as to confirm the legitimacy of the source device and the destination device; if it is confirmed that the source device and the destination device are both legitimate, the server sends a transmission key to the source device and the destination device respectively;
[0040] The source device uses the transmission key to encrypt target data for transmission to the destination device;
[0041] The destination device uses the transmission key to decrypt and obtain the target data transmitted by the source device.
[0042] In a fourth aspect, a data transmission device is provided, comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect or the second aspect are implemented.
[0043] In a fifth aspect, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented.
[0044] In an embodiment of the present application, an encrypted transmission application is received from a source device, the encrypted transmission application carries the identity information of the source device and the identity information of the destination device to which the source device applies for encrypted transmission; in response to the encrypted transmission application, the source device and the destination device are respectively requested to provide registration information on the server to confirm the legitimacy of the source device and the destination device; if it is confirmed that the source device and the destination device are both legal, a transmission key is sent to the source device and the destination device respectively, and the transmission key is used for encryption and decryption of data transmitted between the source device and the destination device. Therefore, when data is transmitted between two devices deployed in a network environment, data encryption transmission can be achieved through an intermediate security management platform, which is simple and convenient and provides security protection for data transmission to avoid leakage of transmission data due to network monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0046] Figure 1 It is a schematic diagram of an application scenario of the data transmission method of an embodiment of the present application.
[0047] Figure 2 It is a flowchart of the data transmission method of the first embodiment of the present application.
[0048] Figure 3 It is a flowchart of device registration in an embodiment of the present application.
[0049] Figure 4 It is a flowchart of device legitimacy authentication in an embodiment of the present application.
[0050] Figure 5 It is a flowchart of the data transmission method of the second embodiment of the present application.
[0051] Figure 6 It is a schematic diagram of the overall process of the data transmission method in an embodiment of the present application.
[0052] Figure 7 It is a structural block diagram of the data transmission system of an embodiment of the present application.
[0053] Figure 8 It is a structural block diagram of a data transmission system device according to an embodiment of the present application. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application. The numbering of the drawings in this application is only used to distinguish the various steps in the scheme, and is not used to limit the execution order of the various steps. The specific execution order is subject to the description in the specification.
[0055] In order to solve the problems existing in the prior art, the embodiments of the present application provide a data transmission method and system, a device, and a readable storage medium.
[0056] Figure 1 is a schematic diagram of an application scenario of the data transmission method of an embodiment of the present application, such as Figure 1 As shown, network devices 10 with different security levels are deployed in the network 20. The network 20 can be an open public network or a semi-public network, which can not only freely access the devices of users with different identities, but also deploy the devices of some specific users. For example, for the network deployed in the target shopping mall, it can be provided to customers entering the mall and employees inside the mall at the same time, and data transmission can be carried out in encryption or plain text according to the needs. For example, in Figure 1In the network shown, some devices 10 in the dotted box on the right are devices of employees in the mall, that is, devices of specific users. The data transmitted may include general data or important data, so the data of these devices needs to be protected. The devices 10 on the left are devices of ordinary customers in the network, and data transmission between devices will be in plain text. The left device can also access the non-sensitive data of the right device, and the data transmission between devices will be in plain text.
[0057] Important data transmitted between devices of a specific user needs to be protected. If device A transmits important data to device B, device A is defined as the source device and device B is defined as the destination device. For important data transmission between device A and device B, it is necessary to establish a data transmission channel between the source device and the destination device in conjunction with a preset server.
[0058] Figure 2 It is a flow chart of the data transmission method of the first embodiment of the present application. In this embodiment, the data transmission method is executed on the server, and specifically includes the following steps 12 to 16.
[0059] Step 12: Receive an encrypted transmission application from a source device, where the encrypted transmission application carries the identity information of the source device and the identity information of a destination device to which the source device applies for encrypted transmission.
[0060] The source device is the device to be transmitted. Before transmitting important data to the destination device, it needs to send an encrypted transmission application to the server instead of transmitting directly in plain text. The device's identity information includes serial numbers or identifiers such as device ID number, device attribute code, authentication certificate number or device registration number, which are used by the server to establish a data transmission channel between the source device and the destination device based on the identity information of the source device and the destination device carried in the encrypted transmission application.
[0061] Step 14, in response to the encrypted transmission application, respectively requesting the source device and the destination device to provide registration information on the server to confirm the legitimacy of the source device and the destination device.
[0062] Specifically, the response to the encrypted transmission application respectively requests the source device and the destination device to provide registration information on the server to confirm the legitimacy of the source device and the destination device, including: based on the identity information of the target device carried in the encrypted transmission application, sending a first request to the target device, the first request being used to request the target device to provide a registration number on the server encrypted by a preset key, the target device being the source device or the destination device, and the preset key being provided by the server to the target device when the target device is registered; receiving a first encrypted registration number sent by the target device; if the first encrypted registration number is decrypted by the preset key to obtain the first registration number of the target device, then matching the first registration number with a registration list, which records the registration number of each device registered on the server; if the match fails, confirming that the target device is illegitimate; if the match succeeds, confirming that the target device is legitimate.
[0063] Confirming the legitimacy of the source device and the destination device is to determine whether the devices at both ends of the data transmission channel have been registered on the server. Only pre-registered devices can perform data encryption transmission operations.
[0064] Optionally, the response to the encrypted transmission application, before respectively requesting the source device and the destination device to provide registration information on the server, also includes: receiving a registration application sent by the target device, the registration application carrying the identity information of the target device; after the registration application is approved, generating a registration number and a public key and private key pair for the target device; sending the corresponding registration number and private key, as well as the preset key to the target device; associating the identity information of the target device with the registration information including the registration number and public key, and recording it in the registration list.
[0065] Combine the following Figure 3 , describes the registration process of each network device including the source device and the destination device on the server. Figure 3 As shown, the following steps are included:
[0066] S300: The device applies for registration to a server for security management.
[0067] S301, the legitimacy of the registration can be combined with manual review and confirmation, for example, the registration is confirmed by the administrator.
[0068] S302, the security management server generates a registration number and sends it to the device applying for registration. The registration number is unique within the network where the device is located. That is, different devices within the same network have different registration numbers.
[0069] S303, the security management server generates a public-private key pair and sends the private key to the application device.
[0070] The public and private keys are also unique for each device.
[0071] S304, the security management server sends the agreed key to the application device. The agreed key is unified in the network and there can be only one. That is, the preset keys of different devices in the same network are the same.
[0072] S305, the security management server associates the registration number and the public key of the corresponding device with the identity information of the device, and adds them to the registration list.
[0073] When confirming the legitimacy of the source device and the destination device, the server mainly combines the registration information of each device on the server, such as the registration number and the preset key.
[0074] In this embodiment, the server first sends a request to the source device and destination device whose legitimacy needs to be confirmed to provide a registration number encrypted using a preset key. If the data sent by the device in response to the request can be decrypted using the preset key stored on the server, and the decrypted data is consistent with the registration number stored in the server registration list when the device was registered, it means that the device used the preset key provided during registration to encrypt the registration number and is a legal device.
[0075] In one embodiment, in order to further confirm the security of data transmission, the server can, based on the above-mentioned legitimacy confirmation, further combine the device's registration information on the server, such as a public key and a private key pair, to confirm the legitimacy of the source device and the destination device.
[0076] Optionally, the registration list also records the public key of each device registered on the server. After matching the first registration number with the registration list, it also includes: if the match is successful, obtaining the public key of the target device from the registration list and using the public key to encrypt the target random number; sending the second request to the target device, the second request carries the encrypted target random number and is used to request the target device to provide the registration number on the server encrypted by the target random number; receiving the second encrypted registration number sent by the target device; if the second encrypted registration number is decrypted by the target random number to obtain the second registration number of the target device, and the second registration number is consistent with the first registration number, then confirming that the target device is legal.
[0077] In this embodiment, the server first sends a request to the source device and the destination device whose legitimacy needs to be confirmed. The request carries a random number encrypted by the public key provided by the server when the device is registered, and requires the corresponding device to provide a registration number encrypted using the random number. If the data sent by the device in response to the request can be decrypted using the random number stored on the server, and the decrypted data is consistent with the registration number of the device during the previous security confirmation, that is, consistent with the registration number corresponding to the registration number stored in the server registration list when the device was registered, it means that the device used the private key provided during registration to decrypt the random number, and used the random number to encrypt the registration number, and the device is a legal device.
[0078] Combine the following Figure 4 , an example of confirming the legitimacy of a source device or a destination device is described in detail.
[0079] like Figure 4 As shown, the following steps are included:
[0080] S200, the security management server requires the device to send a registration number.
[0081] S201, the device sends a registration number encrypted by an agreed symmetric algorithm and an agreed key to a security management server. The symmetric algorithm is agreed upon in advance, such as SM4 or AES. The agreed key is a predetermined key, which is provided to the device by the server when the device is registered.
[0082] S202, the security management server decrypts the registration number using an agreed symmetric algorithm and an agreed key.
[0083] S203, the security management server determines whether the registration number is in the registration list. If so, proceed to step S204, otherwise proceed to step S214.
[0084] S204: If the device is in the registration list, the security management server obtains the public key of the device in the registration list.
[0085] S205: The security management server generates a random number.
[0086] S206: The security management server encrypts the random number using the public key provided when the device is registered.
[0087] S207: The security management server sends the encrypted random number to the device.
[0088] S208, after receiving the encrypted random number, the device uses the private key provided during registration to decrypt the encrypted random number sent by the server.
[0089] S209, the device uses the decrypted random number as a key and encrypts the registration number of the device using the agreed symmetric encryption.
[0090] S210, the device sends the encrypted registration number to the security server.
[0091] S211, the security server uses the random number as a key and uses the agreed symmetric encryption algorithm to decrypt the encrypted registration number.
[0092] S212, the security server determines whether the registration number is consistent with the registration number decrypted in step S202. If so, proceed to step S213, otherwise proceed to step S214.
[0093] S213: The device is authenticated and is legal.
[0094] S214: Device authentication failed. The device is illegal.
[0095] In the process of verifying the legitimacy of the device, the server uses symmetric encryption, asymmetric encryption, random numbers and other technical means to fully ensure the security of the authentication. Even if there is illegal monitoring in the network, the authentication data cannot be forged, thus affecting the authentication result.
[0096] Step 16: If it is confirmed that the source device and the destination device are both legal, a transmission key is sent to the source device and the destination device respectively, and the transmission key is used for encryption and decryption of data transmitted between the source device and the destination device.
[0097] The server confirms that the source device and the destination device are legitimate devices, establishes a data encryption transmission channel between the two, and sends the transmission key to the source device and the destination device respectively. The source device can use the transmission key to encrypt the data transmitted to the destination device and send the encrypted data to the destination device. Correspondingly, the destination device can use the transmission key to decrypt the encrypted data to obtain the corresponding transmission data. The transmission key is a temporary key and is only used for this transmission. It will become invalid when the transmission ends. The next time there is an encrypted transmission application, a different transmission key will be provided.
[0098] In an embodiment of the present application, an encrypted transmission application is received from a source device, the encrypted transmission application carries the identity information of the source device and the identity information of the destination device to which the source device applies for encrypted transmission; in response to the encrypted transmission application, the source device and the destination device are respectively requested to provide registration information on the server to confirm the legitimacy of the source device and the destination device; if it is confirmed that the source device and the destination device are both legal, a transmission key is sent to the source device and the destination device respectively, and the transmission key is used for encryption and decryption of data transmitted between the source device and the destination device. Therefore, when data is transmitted between two devices deployed in a network environment, data encryption transmission can be achieved through an intermediate security management platform, which is simple and convenient and provides security protection for data transmission to avoid leakage of transmission data due to network monitoring.
[0099] Optionally, the embodiment of the present application further provides a data transmission method, Figure 5 : is a flow chart of a data transmission method according to a second embodiment of the present application. In this embodiment, the data transmission method is executed on a target device, which may be a source device or a destination device, and specifically includes the following steps:
[0100] Step 22, receiving a first request sent by the server, wherein the first request is used to request the target device to provide a registration number on the server encrypted by a preset key, wherein the preset key is provided by the server when the target device is registered;
[0101] Step 24, in response to the first request, encrypting the registration number by the preset key and sending it to the server so that the server can confirm the legitimacy of the target device;
[0102] Step 26, receiving the transmission key sent by the server after confirming that the target device is legitimate;
[0103] Step 28: Use the transmission key to encrypt or decrypt the transmitted data.
[0104] In this embodiment, the device encrypts its registration number using the preset key during registration and provides it to the server according to the server's requirements so that the server can authenticate the legitimacy of the device, and when the authentication is passed, uses the transmission key provided by the server to encrypt the sent data or decrypt the received data.
[0105] Optionally, before receiving the transmission key sent by the server after confirming the legitimacy of the target device, it also includes: receiving a second request sent by the server, the second request carries a random number encrypted by a public key and is used to request the target device to provide a registration number on the server encrypted by the random number, the public key being provided by the server to the target device when the target device is registered; decrypting the encrypted random number using the public key; encrypting the registration number with the random number obtained by decryption and sending it to the server, so that the server can confirm the legitimacy of the target device.
[0106] In this embodiment, the device uses the private key used during registration to decrypt the server's encrypted random number according to the server's requirements, and uses the random number to encrypt its registration number and then provides it to the server so that the server can further authenticate the legitimacy of the device, and use the transmission key provided by the server to encrypt the sent data or decrypt the received data when both authentications are passed.
[0107] In one embodiment, the target device is a source device, and before receiving the first request sent by the server, it also includes: sending an encrypted transmission application to the server, wherein the encrypted transmission application carries the identity information of the source device and the identity information of the destination device for which the source device applies to perform data encryption transmission.
[0108] For the source device of the data to be transmitted, it is necessary to actively initiate an application to the server to provide the server with the identity information of the devices on both sides of the transmission, and the server will authenticate the legitimacy of the devices on both sides.
[0109] In an embodiment of the present application, a first request is received from the server, wherein the first request is used to request the target device to provide a registration number on the server encrypted by a preset key, wherein the preset key is provided by the server when the target device is registered; in response to the first request, the registration number is encrypted by the preset key and sent to the server so that the server can confirm the legitimacy of the target device; a transmission key is received from the server after confirming the legitimacy of the target device; and the transmission key is used to encrypt or decrypt the transmitted data. Therefore, when data is transmitted between two devices deployed in a network environment, data encryption transmission can be achieved through an intermediate security management platform, which is simple and convenient and provides security protection for data transmission to avoid leakage of transmitted data due to network monitoring.
[0110] Combine the following Figure 6 The overall process of the data transmission method is described in the embodiment of the present invention.
[0111] like Figure 6 As shown, the following steps are included:
[0112] S101, a source device initiates an encrypted transmission application to a security management server.
[0113] S102, the security management server authenticates the legitimacy of the source device. For devices in the network to perform secure encrypted data transmission, they must first register with the security management server and become a secure device in the network. This step is to confirm whether the source device is a registered secure device.
[0114] S103, determine whether the source device is a legitimate security device, if so, proceed to S104, otherwise proceed to S108.
[0115] S104: The security management server further authenticates the legitimacy of the destination device.
[0116] S105, determine whether the destination device is a legitimate security device, if so, proceed to S106, otherwise proceed to S108.
[0117] S106, the security management server sends a temporary key to the source device and the destination device respectively. First, to ensure the transmission rate, the encrypted transmission method between the source device and the destination device is a symmetric encryption algorithm. Secondly, the source device and the destination device have agreed on encryption when they registered, that is, the entire network uses the same encryption method. In addition, each time an application for encrypted transmission is made, a temporary key is assigned by the security management server, and the key is a random key that is different each time to fully ensure the security of data transmission.
[0118] S107, the source device and the destination device begin to transmit data in an encrypted state.
[0119] S108, the source device and the destination device continue to maintain a non-encrypted data transmission state.
[0120] Alternatively, if Figure 7 As shown, an embodiment of the present application also provides a data transmission system 1000, including a server 1400, a source device 1200 and a destination device 1600.
[0121] The source device 1200 sends an encrypted transmission application to the server, where the encrypted transmission application carries the identity information of the source device and the identity information of the destination device to which the source device applies for encrypted data transmission;
[0122] The server 1400, in response to the encrypted transmission application, requests the source device and the destination device to provide registration information on the server respectively, so as to confirm the legitimacy of the source device and the destination device; if it is confirmed that the source device and the destination device are both legitimate, the transmission key is sent to the source device and the destination device respectively;
[0123] The source device 1200 uses the transmission key to encrypt target data transmitted to the destination device;
[0124] The destination device 1600 uses the transmission key to decrypt and obtain the target data transmitted by the source device.
[0125] It is understandable that the server 1400, the source device 1200 and the destination device 1600 in this embodiment can implement the above Figures 1 to 6 In order to avoid repetition, the relevant descriptions of the various processes implemented by the server (including the security management server), source device and destination device (including the target device) involved in any embodiment are appropriately omitted.
[0126] Alternatively, if Figure 8 As shown, an embodiment of the present application also provides a data transmission device 2000, including a processor 2400 and a memory 2200, and the memory 2200 stores programs or instructions that can be run on the processor 2400. When the program or instructions are executed by the processor 2400, the various steps of the above-mentioned data transmission method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0127] The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, each process of any of the above-mentioned data transmission method embodiments is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the readable storage medium includes a computer-readable storage medium, such as a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0128] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. The computer program can be operated to enable a computer to implement the various processes of any of the above-mentioned data transmission method embodiments when executed, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0129] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0130] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0131] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A data transmission method, characterized in that: Executed on a server, the method comprises: Receive an encrypted transmission application from a source device, the encrypted transmission application carrying identity information of the source device and identity information of a destination device to which the source device applies for encrypted transmission; In response to the encrypted transmission application, request the source device and the destination device to provide registration information on the server to confirm the legitimacy of the source device and the destination device; If it is confirmed that the source device and the destination device are both legitimate, a transmission key is sent to the source device and the destination device respectively, and the transmission key is used for encryption and decryption of data transmitted between the source device and the destination device.
2. The method according to claim 1, characterized in that: The responding to the encrypted transmission application, respectively requesting the source device and the destination device to provide registration information on the server to confirm the legitimacy of the source device and the destination device, includes: Based on the identity information of the target device carried in the encrypted transmission application, a first request is sent to the target device, where the first request is used to request the target device to provide a registration number on the server encrypted by a preset key, where the target device is the source device or the destination device, and the preset key is provided by the server to the target device when the target device is registered; Receiving a first encrypted registration number sent by the target device; If the first encrypted registration number is decrypted by the preset key to obtain the first registration number of the target device, the first registration number is matched with a registration list, where the registration number of each device registered on the server is recorded in the registration list; If the match fails, the target device is confirmed to be illegal; If the match is successful, it is confirmed that the target device is legitimate.
3. The system according to claim 2, characterized in that The registration list also records the public key of each device registered on the server. After matching the first registration number with the registration list, the method further includes: If the match is successful, obtaining the public key of the target device from the registration list and using the public key to encrypt the target random number; Sending the second request to the target device, where the second request carries the encrypted target random number and is used to request the target device to provide a registration number on the server encrypted by the target random number; Receiving a second encrypted registration number sent by the target device; If the second encrypted registration number is decrypted by the target random number to obtain the second registration number of the target device, and the second registration number is consistent with the first registration number, then the target device is confirmed to be legitimate.
4. The method according to claim 2 or 3, characterized in that: Before the responding to the encrypted transmission application and respectively requesting the source device and the destination device to provide registration information on the server, the method further includes: Receiving a registration application sent by a target device, wherein the registration application carries identity information of the target device; After the registration application is approved, a registration number and a public key and private key pair are generated for the target device; Sending the corresponding registration number and private key, and the preset key to the target device; The identity information of the target device is associated with the registration information including the registration number and the public key, and recorded in the registration list.
5. A data transmission method, characterized in that: Executed on a target device, the method includes: receiving a first request sent by the server, wherein the first request is used to request the target device to provide a registration number on the server encrypted by a preset key, wherein the preset key is provided by the server when the target device is registered; In response to the first request, encrypt the registration number by using the preset key and send the encrypted registration number to the server so that the server can confirm the legitimacy of the target device; Receiving a transmission key sent by the server after confirming that the target device is legitimate; The transmission key is used to encrypt or decrypt the transmitted data.
6. The method according to claim 5, characterized in that Before receiving the transmission key sent by the server after confirming that the target device is legitimate, the method further includes: receiving a second request sent by the server, the second request carrying a random number encrypted by a public key and being used to request the target device to provide a registration number on the server encrypted by the random number, the public key being provided by the server to the target device when the target device is registered; Decrypting the encrypted random number using the public key; The registration number is encrypted with the random number obtained by decryption and sent to the server so that the server can confirm the legitimacy of the target device.
7. The method according to claim 5 or 6, characterized in that: The target device is a source device, and before receiving the first request sent by the server, the method further includes: An encrypted transmission application is sent to the server, where the encrypted transmission application carries the identity information of the source device and the identity information of the destination device to which the source device applies for encrypted data transmission.
8. A data transmission system, characterized in that: Including server, source device and destination device, The source device sends an encrypted transmission application to the server, where the encrypted transmission application carries the identity information of the source device and the identity information of the destination device for which the source device applies for encrypted data transmission; The server, in response to the encrypted transmission application, requests the source device and the destination device to provide registration information on the server respectively, so as to confirm the legitimacy of the source device and the destination device; If it is confirmed that the source device and the destination device are both legitimate, sending a transmission key to the source device and the destination device respectively; The source device uses the transmission key to encrypt target data for transmission to the destination device; The destination device uses the transmission key to decrypt and obtain the target data transmitted by the source device.
9. A data transmission device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 4 or the steps of the method according to any one of claims 5 to 7 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by the processor, the steps of the method according to any one of claims 1 to 4 or the steps of the method according to any one of claims 5 to 7 are implemented.
