WO2022126980A1 - Data transmission method and apparatus, terminal, and storage medium - Google Patents

Data transmission method and apparatus, terminal, and storage medium Download PDF

Info

Publication number
WO2022126980A1
WO2022126980A1 PCT/CN2021/091116 CN2021091116W WO2022126980A1 WO 2022126980 A1 WO2022126980 A1 WO 2022126980A1 CN 2021091116 W CN2021091116 W CN 2021091116W WO 2022126980 A1 WO2022126980 A1 WO 2022126980A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
encryption algorithm
asymmetric encryption
client
transmitted
Prior art date
Application number
PCT/CN2021/091116
Other languages
French (fr)
Chinese (zh)
Inventor
徐志文
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022126980A1 publication Critical patent/WO2022126980A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0861Network architectures or network communication protocols for network security for authentication of entities using biometrical features, e.g. fingerprint, retina-scan
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3226Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using a predetermined code, e.g. password, passphrase or PIN
    • H04L9/3231Biological data, e.g. fingerprint, voice or retina

Definitions

  • the present application relates to the field of information security, and in particular, to a data transmission method, device, terminal and storage medium.
  • Encrypted transmission of data is an important technology in the field of data security. With the advent of the era of big data, more and more attention has been paid to data security issues, especially in the financial field, such as: sensitive information of customers, access rights of financial information systems, Transaction quantitative sensitive information encryption, etc. The leakage of sensitive information will not only cause losses to the operation of the enterprise, but also affect the reputation of the enterprise. Therefore, in the modern Internet industry, especially the financial and insurance industry, it is very important to encrypt and transmit sensitive data well.
  • the inventor realized that the current data transmission method is mainly that the transmitter and the receiver jointly establish a secure channel for data transmission, and the transmitter and the receiver perform data exchange processing operations in the secure channel. In this way, the security of data is ensured. Since this data transmission method currently requires a lot of manpower and material resources to establish and maintain a secure channel for data transmission, it increases the cost of data transmission between different hosts and the complexity of data transmission. The data transmission process There may also be a risk of tampering in the data, thereby increasing the possibility of data leakage.
  • a data transmission method, applied to a first client includes: when detecting that there is plaintext data to be transmitted, loading a preconfigured asymmetric encryption algorithm table; obtaining each asymmetric encryption algorithm in the asymmetric encryption algorithm table The priority of the algorithm, the optimal asymmetric encryption algorithm is determined based on the order of priority; it detects whether the data communication between multiple internal chips has been intruded, and when there is no intrusion, the current face image is collected for authorization authentication. After the authentication is successful Extract private key data from a preset key database; encrypt the plaintext data to be transmitted based on the optimal asymmetric encryption algorithm and the private key data to generate ciphertext data; convert the ciphertext data It is sent to the second client through the pre-established data sharing network.
  • a data transmission method applied to a second client, the method comprising: when receiving a data access request sent by the first client for the second client, acquiring The ciphertext data sent by the second client; obtaining the public key of the first client, and decrypting the ciphertext data based on the public key of the first client, and generating plaintext data after successful decryption; based on the plaintext data
  • the asymmetric encryption algorithm corresponding to the current moment is obtained from ; based on the public key of the first client and the asymmetric encryption algorithm corresponding to the current moment, the data information required by the first client is encrypted, and the encrypted data is generated.
  • Data information detect whether the data communication between multiple internal chips has been intruded, collect the current face image for authorization authentication when not intruded, and extract the second private key data from the preset key database after successful authentication; based on The second private key data and the asymmetric encryption algorithm corresponding to the current moment re-encrypt the encrypted data information to generate ciphertext data after secondary encryption; The response is sent to the first client through the pre-established data sharing network.
  • a data transmission device applied to a first client, includes: a data-to-be-transmitted detection module, configured to load a pre-configured asymmetric encryption algorithm table when detecting that there is plaintext data to be transmitted; an optimal asymmetric encryption The algorithm determination module is used to obtain the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and the optimal asymmetric encryption algorithm is determined based on the priority order; the private key data extraction module is used to detect the internal multiple chips.
  • the data encryption module is used for The symmetric encryption algorithm and the private key data encrypt the plaintext data to be transmitted to generate ciphertext data
  • the ciphertext data sending module is used for sending the ciphertext data to the second through the pre-established data sharing network client.
  • a terminal includes a memory and a processor, the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the above data transmission method.
  • a storage medium storing computer-readable instructions, when the computer-readable instructions are executed by one or more processors, cause the one or more processors to perform the steps of the above data transmission method.
  • the first client first loads a preconfigured asymmetric encryption algorithm table when detecting that there is plaintext data to be transmitted, and obtains the asymmetric encryption algorithm The priority of each asymmetric encryption algorithm in the table, and then determine the optimal asymmetric encryption algorithm based on the priority order, and then detect whether the data communication between multiple internal chips is intrusion, and collect the current face when it is not intrusion. Perform authority authentication on the image, extract the private key data from the preset key database after successful authentication, and then encrypt the plaintext data to be transmitted based on the optimal asymmetric encryption algorithm and the private key data to generate a password.
  • the present application selects the optimal asymmetric encryption algorithm according to the priority from the preset asymmetric encryption algorithm table during data transmission, and performs data encryption and decryption in combination with the pre-saved asymmetric encryption public key and private key files, it can prevent Data is tampered with during transmission, further reducing the possibility of data leakage.
  • FIG. 1 is an implementation environment diagram of a data transmission method provided in an embodiment of the present application.
  • FIG. 2 is a schematic diagram of an internal structure of a terminal in an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a data transmission method provided in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of another data transmission method provided in an embodiment of the present application.
  • FIG. 5 is an apparatus schematic diagram of a data transmission apparatus provided by an embodiment of the present application.
  • FIG. 1 is an implementation environment diagram of a data transmission method provided in an embodiment. As shown in FIG. 1 , the implementation environment includes a first client 110 and a second client 120 .
  • the first client 110 is a computer device, for example, a computer device that performs operations such as encryption of sensitive data to be transmitted, and a data encryption tool is installed on the first client 110 .
  • An application that needs to decrypt the data corresponding to the task to be transmitted is installed on the second client 120.
  • the sensitive data to be transmitted can be encrypted at the first client 110, and the first client 110 Detecting plaintext data to be transmitted, the first client 110 loads a preconfigured asymmetric encryption algorithm table when detecting that there is plaintext data to be transmitted; the first client 110 obtains the data of each asymmetric encryption algorithm in the asymmetric encryption algorithm table.
  • the first client 110 determines the optimal asymmetric encryption algorithm based on the order of priority; the first client 110 detects whether the data communication between multiple internal chips is intruded, and collects the current face when not intruded
  • the image performs authority authentication, and after the authentication is successful, the private key data is extracted from the preset key database; the first client 110 performs the operation on the plaintext data to be transmitted based on the optimal asymmetric encryption algorithm and the private key data. Encryption to generate ciphertext data; the first client 110 sends the ciphertext data to the second client 120 through a pre-established data sharing network.
  • the second client 120 When receiving the data access request sent by the first client to the second client, the second client 120 obtains the ciphertext data sent to the second client; the second client 120 obtains the public key of the first client, and The ciphertext data is decrypted based on the public key of the first client, and the plaintext data is generated after the decryption is successful; The priority of the encryption algorithm, and the optimal asymmetric encryption algorithm is determined based on the priority order; the second client 120 encrypts the data information required by the first client based on the public key of the first client and the optimal asymmetric encryption algorithm , and generate encrypted data information; the second client 120 detects whether the data communication between multiple internal chips is intruded, and collects the current face image for authorization authentication when it is not intruded.
  • the private key data is extracted from the key database; the second client 120 re-encrypts the encrypted data information based on the private key data and the optimal asymmetric encryption algorithm to generate secondary encrypted data information; the second client 120 encrypts the data twice The latter data information is responded to the first client 110 through the pre-established data sharing network.
  • the first client 110 When the first client 110 receives the data response sent by the second client to the first client, the first client 110 obtains the ciphertext data sent to the first client; the first client 110 obtains the data of the second client. public key, and decrypt the ciphertext data sent to the first client based on the public key of the second client, and obtain the decrypted data after successful decryption; the first client 110 decrypts the decrypted data based on the extracted private key data Secondary decryption to generate plaintext data.
  • the client 120 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc., but is not limited thereto.
  • the server 110 and the client 120 may be connected through Bluetooth, USB (Universal Serial Bus, Universal Serial Bus) or other communication connection methods, which are not limited in this application.
  • FIG. 2 is a schematic diagram of an internal structure of a terminal in an embodiment.
  • the terminal includes a processor, a non-volatile storage medium, a memory and a network interface connected through a system bus.
  • the non-volatile storage medium of the terminal stores an operating system, a database, and computer-readable instructions, and the database may store a sequence of control information.
  • the processor can implement a data transfer method.
  • the processor of the terminal is used to provide computing and control capabilities to support the operation of the entire terminal.
  • Computer-readable instructions may be stored in the memory of the terminal, and when executed by the processor, the computer-readable instructions may cause the processor to execute a data transmission method.
  • the network interface of the terminal is used to connect and communicate with the terminal.
  • FIG. 2 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the terminal to which the solution of the present application is applied. More or fewer components are shown in the figures, either in combination or with different arrangements of components.
  • the data transmission method provided by the embodiment of the present application will be described in detail below with reference to FIG. 3 to FIG. 4 .
  • the method can be implemented by relying on a computer program, and can be run on a data transmission device based on the von Neumann system.
  • the computer program can be integrated into an application or run as a stand-alone utility application.
  • an embodiment of the present application provides a schematic flowchart of a data transmission method, which is applied to a first client. As shown in FIG. 3, the method of this embodiment of the present application may include the following steps:
  • the data sharing network can be regarded as an internally established local area network, and the network only provides data transmission services for clients that have successfully joined the data sharing network. .
  • the data sharing network can also be regarded as the company's intranet, which only provides network transmission services for the company's clients. Other external clients cannot access the hosts that join the data sharing network.
  • the establishment of the data sharing network can guarantee the company's
  • the security of the internal host can also monitor the data transmission between the company's various hosts to further improve the security level of the company's data.
  • the shared network is in communication connection with the blockchain network deployed by the cloud service, and the blockchain stores the private key of the current host for data encryption. Saving the private key in the blockchain network can further improve the security of the private key.
  • the multiple hosts can perform data transmission based on the network.
  • the pre-configured asymmetric encryption algorithm table is an asymmetric encryption algorithm library set by an administrator.
  • the asymmetric encryption algorithm library stores a plurality of different asymmetric encryption algorithms, and a plurality of different Each of the asymmetric encryption algorithms has a priority.
  • the client encrypts plaintext data, it can obtain the encryption algorithm from the asymmetric encryption algorithm library for encryption. Since the asymmetric encryption algorithm library is managed by the administrator, the asymmetric encryption algorithms in the asymmetric encryption algorithm library can be updated in real time as time changes. When it needs to be explained, when adding, deleting, modifying and checking the algorithms in the asymmetric encryption algorithm library, the parameter information will be recorded corresponding to the operation time and the number of operations.
  • the client when two clients join the data sharing network for data transmission, the client detects in real time whether there is plaintext data to be transmitted.
  • the detection method can be hardware detection, or software. Detection methods, for example, hardware detection methods can be detected by traffic probes, and software detection methods can be detected by detection methods identified in packets.
  • An encryption algorithm library from which a pre-configured asymmetric encryption algorithm table is loaded.
  • the message data includes the data encryption instruction generated by the user by pressing the button, and the instruction includes the software.
  • the identifier set in advance in the system for example, the identifier of the data encryption instruction is "encryption".
  • the message in the command is in the form of plaintext data + identification. At this time, when the identification mark is found in the message, the plaintext data is detected.
  • the priority of each asymmetric encryption algorithm is preset by the administrator, and the priority setting can be limited in many ways.
  • the client first obtains the algorithm setting time indicated by each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and then determines the priority of each encryption algorithm based on the length of the algorithm setting time from the current time. class.
  • the present application defines that the priority of each algorithm in the preset algorithm table is determined according to the set time, that is to say, the shorter the set time, the more the algorithm is newly added. The added algorithm shows that the encryption strength is a bit stronger.
  • the optimal encryption algorithm is selected by calculating the setting time of each algorithm in the encryption algorithm table, which ensures that the encryption strength is higher.
  • the client first obtains the frequency of use of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and finally determines the priority of each asymmetric encryption algorithm based on the frequency of use of each asymmetric encryption algorithm .
  • the present application defines that the algorithm priority is determined according to the frequency of use. The less the algorithm is used, the lower the risk of the algorithm not being cracked. higher strength.
  • each encryption algorithm in the encryption algorithm table when determining the priority order of each encryption algorithm in the encryption algorithm table, first obtain the use frequency of each encryption algorithm in the encryption algorithm table, and determine the encryption algorithm with the least frequency of use according to the use frequency data of each encryption algorithm, and finally The encryption algorithm with the least frequency is determined as the current optimal encryption algorithm.
  • the present application selects the optimal encryption algorithm by using the frequency of use of each algorithm in the encryption algorithm table, which ensures higher encryption strength.
  • multiple internal chips are communication chip devices during data transmission in the data sharing network. By detecting multiple internal communication chips, it is judged whether the current data sharing network has been invaded by the outside. The attack initiated by the private key stored in the computer equipment in the data sharing network, this step can stop the data transmission in time to ensure the security of the data transmission when the private key stored in the computer equipment in the data sharing network is leaked .
  • the protocol analysis, comparison and analysis are usually performed on the two non-similar communication modes between multiple communication chips in the shared data network. If the amount of data is the same as the content of the communication data, it is considered that it has not been invaded, and if the amount of communication data is different from the content of the communication data, it is considered that it has been invaded.
  • it also includes detecting whether the computer equipment in the data sharing network is implanted with a virus, and obtaining the private key file data saved in the computer equipment by implanting a virus.
  • Check and/or check through a third-party trusted security company check the capacity of your own program storage area by checking the capacity of your own program storage area, and when the capacity is found to become larger, search for the newly added program file by traversing, and check the program file itself.
  • the parameters are parsed. When the parsed parameters are unrecognized parameter information, an early warning is issued and the program is automatically deleted.
  • the face image of the current user is collected by the camera of the computer equipment to be encrypted at this time for identification, and after the identification passes the authority verification, the computer equipment is connected to the blockchain network through the data sharing network, and Send the current user information to the blockchain network for re-authentication.
  • the blockchain network responds the private key of the current computer device to the computer device through the shared network, connects to the database that saves the key file, and automatically obtains the key file. private key data in .
  • the computer device By checking whether the current shared data network is invaded, whether the current computer equipment has viruses, and whether the current user is a person with authority. When all three verifications are passed, the computer device will connect to the key database to obtain the private key. This method further ensures the security of data transmission and prevents the data from being hijacked and tampered with during transmission due to the leakage of the private key.
  • the optimal asymmetric encryption algorithm is obtained based on step S102 and the private key data is obtained according to step S103
  • the plaintext data and private key data to be transmitted are input into the optimal asymmetric encryption algorithm
  • the encryption operation is performed in the algorithm, and the ciphertext data is generated after the encryption is completed.
  • the plaintext data to be transmitted is a
  • the asymmetric encryption algorithms in the asymmetric encryption algorithm table used in the embodiments of the present application may include hash algorithm, Hash algorithm, MD5 (Message Digest Algorithm 5) algorithm, SHA (Secure Hash Algorithm) algorithm, etc.
  • hash algorithm SHA (Secure Hash Algorithm) algorithm
  • RSA Message Digest Algorithm 5
  • SHA Secure Hash Algorithm
  • the optimal asymmetric encryption algorithm is RSA, it is preferred to use a 1024-bit private key number; if the optimal asymmetric encryption algorithm is ECC, a 160-bit private key is preferred.
  • the symmetric encryption algorithm is AES, the 128-bit private key data is preferentially used.
  • S105 Send the ciphertext data to the second client through a pre-established data sharing network.
  • the second client is the client that receives the ciphertext data.
  • host A needs to query a certain data on host B, first host A encrypts the data to be queried as a with its own private key, and host A sends a to host B.
  • step S102 also includes: the optimal encryption algorithm can also be selected by calculating the data volume of the plaintext data to be encrypted, or the encryption algorithm can be selected according to the data importance of the data to be encrypted, specifically according to the actual data information to be transmitted. Make a determination, which is not limited here.
  • the key database generation method includes: the current computer equipment can generate private keys of different digits according to several set methods, then generate public key data according to the private key data of different digits, and finally The generated private keys of different digits and the public keys corresponding to the private keys of different digits are sent to the key database for storage.
  • the method of generating the private key includes not limited to generating the private key by generating a random number, but also generating the private key by the current time + random number.
  • the specific generation method can be set by yourself according to the actual application scenario, here No more restrictions.
  • the encrypted data compression can be optimized.
  • a commonly used algorithm is to transmit changed data items and ignore unchanged data items.
  • the amount of data change is not large, there are many redundant bits transmitted, which leads to slow transmission speed. Therefore, the changing bits and non-changing bits are clearly separated, and the compression is performed at the level of the unit, so that even if a very simple run-length coding compression algorithm is used, a very high compression rate can be obtained.
  • the data transmission mode of the TCP/IP protocol is preferred during data transmission.
  • the first client first loads a preconfigured asymmetric encryption algorithm table when detecting that there is plaintext data to be transmitted, obtains the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and then Determine the optimal asymmetric encryption algorithm based on the high and low order of priorities, and then detect whether the data communication between multiple internal chips is intruded.
  • the private key data is extracted from the key database, and the plaintext data to be transmitted is encrypted based on the optimal asymmetric encryption algorithm and the private key data to generate ciphertext data.
  • the established data sharing network is sent to the second client.
  • the present application selects the optimal asymmetric encryption algorithm according to the priority from the preset asymmetric encryption algorithm table during data transmission, and performs data encryption and decryption in combination with the pre-saved asymmetric encryption public key and private key files, it can prevent Data is tampered with during transmission, further reducing the possibility of data leakage.
  • an embodiment of the present application provides a schematic flowchart of a data transmission method, which is applied to a first client. As shown in FIG. 4 , the method of this embodiment of the present application may include the following steps:
  • the first client first loads a preconfigured asymmetric encryption algorithm table when detecting that there is plaintext data to be transmitted, obtains the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and then Determine the optimal asymmetric encryption algorithm based on the high and low order of priorities, and then detect whether the data communication between multiple internal chips is intruded.
  • the private key data is extracted from the key database, and the plaintext data to be transmitted is encrypted based on the optimal asymmetric encryption algorithm and the private key data to generate ciphertext data.
  • the established data sharing network is sent to the second client.
  • the present application selects the optimal asymmetric encryption algorithm according to the priority from the preset asymmetric encryption algorithm table during data transmission, and performs data encryption and decryption in combination with the pre-saved asymmetric encryption public key and private key files, it can prevent Data is tampered with during transmission, further reducing the possibility of data leakage.
  • FIG. 5 shows a schematic structural diagram of a data transmission apparatus provided by an exemplary embodiment of the present application, which is applied to a first client.
  • the data transmission system can be implemented as all or a part of the terminal through software, hardware or a combination of the two.
  • the device 1 includes a data to be transmitted detection module 10 , an optimal asymmetric encryption algorithm determination module 20 , a private key data extraction module 30 , a data encryption module 40 , and a ciphertext data transmission module 50 .
  • the data-to-be-transmitted detection module 10 is configured to load a pre-configured asymmetric encryption algorithm table when detecting that there is plaintext data to be transmitted;
  • the optimal asymmetric encryption algorithm determination module 20 is used to obtain the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and determine the optimal asymmetric encryption algorithm based on the high and low order of the priority;
  • the private key data extraction module 30 is used to detect whether the data communication between multiple internal chips has been invaded, and when it has not been invaded, the current face image is collected for authorization authentication, and after the authentication is successful, the private key is extracted from the preset key database. key data;
  • a data encryption module 40 configured to encrypt the plaintext data to be transmitted based on the optimal asymmetric encryption algorithm and the private key data to generate ciphertext data
  • the ciphertext data sending module 50 is configured to send the ciphertext data to the second client through a pre-established data sharing network.
  • the first client first loads a preconfigured asymmetric encryption algorithm table when detecting that there is plaintext data to be transmitted, obtains the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and then Determine the optimal asymmetric encryption algorithm based on the high and low order of priorities, and then detect whether the data communication between multiple internal chips is intruded.
  • the private key data is extracted from the key database, and the plaintext data to be transmitted is encrypted based on the optimal asymmetric encryption algorithm and the private key data to generate ciphertext data.
  • the established data sharing network is sent to the second client.
  • the present application selects the optimal asymmetric encryption algorithm according to the priority from the preset asymmetric encryption algorithm table during data transmission, and performs data encryption and decryption in combination with the pre-saved asymmetric encryption public key and private key files, it can prevent Data is tampered with during transmission, further reducing the possibility of data leakage.
  • a terminal in one embodiment, includes a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor executes the computer program, the following steps are implemented: when the first client detects When there is plaintext data to be transmitted, load the pre-configured asymmetric encryption algorithm table; obtain the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and determine the optimal asymmetric encryption algorithm based on the priority order; Whether the data communication between multiple internal chips has been invaded, when not invaded, the current face image is collected for authorization authentication, and the private key data is extracted from the preset key database after successful authentication; based on the optimal asymmetric
  • the encryption algorithm and the private key data encrypt the plaintext data to be transmitted to generate ciphertext data; and send the ciphertext data to the second client through a pre-established data sharing network.
  • the second client When receiving the data access request sent by the first client to the second client, the second client obtains the ciphertext data sent to the second client; obtains the public key of the first client, and based on the public key of the first client The key decrypts the ciphertext data, and after the decryption is successful, the plaintext data is generated; based on the plaintext data, the data information required by the first client is obtained, and the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table is based on the priority.
  • the first client When receiving the data response sent by the second client to the first client, the first client obtains the ciphertext data sent to the first client; obtains the public key of the second client, and based on the public key of the second client Decrypt the ciphertext data sent to the first client, and obtain decrypted data after successful decryption; decrypt the decrypted data twice based on the extracted private key data to generate plaintext data.
  • the first client executed by the processor detects the plaintext data to be transmitted, the following step is further performed: the first client connects to a pre-created data sharing network.
  • the processor when the processor performs the detection of the plaintext data to be transmitted, the following steps are specifically performed: when the first client detects the plaintext data to be transmitted in the hardware mode, collects the plaintext to be transmitted in real time through a traffic probe data; or when detecting the plaintext data to be transmitted in software mode, obtain the currently generated message information in real time through the application programming interface; parse the message information, and find the encrypted identifier in the parsed message information; When encrypting the identifier, obtain the plaintext data to be transmitted corresponding to the encrypted identifier.
  • the processor when the processor executes the first client to obtain the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, the processor specifically performs the following steps: the first client obtains each asymmetric encryption algorithm in the asymmetric encryption algorithm table. The set time indicated by the algorithm; the priority of each asymmetric encryption algorithm is determined based on the length of the set time from the current time.
  • the processor when the processor executes the first client to obtain the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, the processor specifically performs the following steps: the first client obtains each asymmetric encryption algorithm in the asymmetric encryption algorithm table. The usage frequency of the algorithm; the priority of each asymmetric encryption algorithm is determined based on the usage frequency of each asymmetric encryption algorithm.
  • a storage medium storing computer-readable instructions
  • the computer-readable storage medium may be non-volatile or volatile
  • the computer-readable instructions are stored by one or more
  • the processor executes one or more processors are caused to execute the following steps: when the first client detects that there is plaintext data to be transmitted, loads a preconfigured asymmetric encryption algorithm table; obtains each non-symmetric encryption algorithm table in the asymmetric encryption algorithm table.
  • the priority of the symmetric encryption algorithm, the optimal asymmetric encryption algorithm is determined based on the priority order; it detects whether the data communication between multiple internal chips has been intruded, and when there is no intrusion, the current face image is collected for authorization authentication.
  • the second client When receiving the data access request sent by the first client to the second client, the second client obtains the ciphertext data sent to the second client; obtains the public key of the first client, and based on the public key of the first client The key decrypts the ciphertext data, and after the decryption is successful, the plaintext data is generated; based on the plaintext data, the data information required by the first client is obtained, and the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table is based on the priority.
  • the first client When receiving the data response sent by the second client to the first client, the first client obtains the ciphertext data sent to the first client; obtains the public key of the second client, and based on the public key of the second client Decrypt the ciphertext data sent to the first client, and obtain decrypted data after successful decryption; decrypt the decrypted data twice based on the extracted private key data to generate plaintext data.
  • the first client executed by the processor detects the plaintext data to be transmitted, the following step is further performed: the first client connects to a pre-created data sharing network.
  • the processor when the processor performs the detection of the plaintext data to be transmitted, the following steps are specifically performed: when the first client detects the plaintext data to be transmitted in the hardware mode, collects the plaintext to be transmitted in real time through a traffic probe data; or when detecting the plaintext data to be transmitted in software mode, obtain the currently generated message information in real time through the application programming interface; parse the message information, and find the encrypted identifier in the parsed message information; When encrypting the identifier, obtain the plaintext data to be transmitted corresponding to the encrypted identifier.
  • the processor when the processor executes the first client to obtain the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, the processor specifically performs the following steps: the first client obtains each asymmetric encryption algorithm in the asymmetric encryption algorithm table. The set time indicated by the algorithm; the priority of each asymmetric encryption algorithm is determined based on the length of the set time from the current time.
  • the processor when the processor executes the first client to obtain the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, the processor specifically performs the following steps: the first client obtains each asymmetric encryption algorithm in the asymmetric encryption algorithm table. The usage frequency of the algorithm; the priority of each asymmetric encryption algorithm is determined based on the usage frequency of each asymmetric encryption algorithm.
  • the realization of all or part of the processes in the methods of the above embodiments can be accomplished by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the program is During execution, it may include the processes of the embodiments of the above-mentioned methods.
  • the aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only storage memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM) or the like.

Abstract

Disclosed in the present application are a data transmission method and apparatus, a terminal, and a storage medium, applied to a first client. The method comprises: loading a pre-configured asymmetric encryption algorithm table when it is detected that plaintext data to be transmitted exists; obtaining priorities of asymmetric encryption algorithms in the asymmetric encryption algorithm table, and determining an optimal asymmetric encryption algorithm on the basis of the priorities; detecting whether data communication between multiple internal chips is subjected to intrusion, when the data communication is not subjected to intrusion, acquiring a current face image for authority authentication, and after the authentication succeeds, extracting private key data from a preset key database; encrypting the plaintext data on the basis of the optimal asymmetric encryption algorithm and the private key data so as to generate ciphertext data; and sending the ciphertext data to a second client by means of a pre-established data sharing network. By using embodiments of the present application, during data transmission, data can be prevented from being tampered and the risk of data leakage can be reduced. Moreover, the present application is also applicable to a blockchain technology.

Description

一种数据传输方法、装置、终端及存储介质A data transmission method, device, terminal and storage medium
优先权信息priority information
本申请要求于2020年12月15日提交中国专利局、申请号为202011476863.8,发明名称为“一种数据传输方法、装置、终端及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on December 15, 2020 with the application number 202011476863.8 and titled "A data transmission method, device, terminal and storage medium", the entire contents of which are by reference Incorporated in this application.
技术领域technical field
本申请涉及信息安全领域,特别涉及一种数据传输方法、装置、终端及存储介质。The present application relates to the field of information security, and in particular, to a data transmission method, device, terminal and storage medium.
背景技术Background technique
数据进行加密传输是数据安全领域重要的技术,随着大数据时代的到来,数据安全问题越来越受到人们的重视,尤其在金融领域,例如:客户的敏感信息,金融信息系统的访问权限,交易量化敏感信息加密等。敏感信息的泄露不仅会给企业的运营造成损失,更重要的是会影响企业声誉,因此在现代互联网行业,尤其金融保险行业,做好敏感数据的加密和快速传输至关重要。Encrypted transmission of data is an important technology in the field of data security. With the advent of the era of big data, more and more attention has been paid to data security issues, especially in the financial field, such as: sensitive information of customers, access rights of financial information systems, Transaction quantitative sensitive information encryption, etc. The leakage of sensitive information will not only cause losses to the operation of the enterprise, but also affect the reputation of the enterprise. Therefore, in the modern Internet industry, especially the financial and insurance industry, it is very important to encrypt and transmit sensitive data well.
在现有数据传输中,发明人意识到目前数据传输方法主要是传输者和被传输者双方共同建立起数据传输的安全信道,传输者和被传输者通过在安全信道中进行数据交换处理操作,以此来保证数据的安全性,由于目前这种数据传输方式需要耗费大量人力物力来建立和维持数据传输的安全通道,从而提升了不同主机数据传输的成本以及数据传输的复杂度,数据传输过程中可能还存在被篡改的风险,进而增加了数据泄露的可能性。In the existing data transmission, the inventor realized that the current data transmission method is mainly that the transmitter and the receiver jointly establish a secure channel for data transmission, and the transmitter and the receiver perform data exchange processing operations in the secure channel. In this way, the security of data is ensured. Since this data transmission method currently requires a lot of manpower and material resources to establish and maintain a secure channel for data transmission, it increases the cost of data transmission between different hosts and the complexity of data transmission. The data transmission process There may also be a risk of tampering in the data, thereby increasing the possibility of data leakage.
发明内容SUMMARY OF THE INVENTION
基于此,有必要针对数据传输过程中可能还存在被篡改的风险的问题,提供一种数据传输方法、装置、终端及存储介质。Based on this, it is necessary to provide a data transmission method, device, terminal and storage medium for the problem that there may be a risk of being tampered with during data transmission.
一种数据传输方法,应用于第一客户端,数据传输方法包括:当检测到存在待传输的明文数据时,加载预先配置的非对称加密算法表;获取非对称加密算法表中各非对称加密算法的优先级,基于优先级的高低顺序确定最优非对称加密算法;检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取私钥数据;基于所述最优非对称加密算法和所述私钥数据对所述待传输的明文数据进行加密,生成密文数据;将所述密文数据通过预先建立的数据共享网络发送至第二客户端。A data transmission method, applied to a first client, includes: when detecting that there is plaintext data to be transmitted, loading a preconfigured asymmetric encryption algorithm table; obtaining each asymmetric encryption algorithm in the asymmetric encryption algorithm table The priority of the algorithm, the optimal asymmetric encryption algorithm is determined based on the order of priority; it detects whether the data communication between multiple internal chips has been intruded, and when there is no intrusion, the current face image is collected for authorization authentication. After the authentication is successful Extract private key data from a preset key database; encrypt the plaintext data to be transmitted based on the optimal asymmetric encryption algorithm and the private key data to generate ciphertext data; convert the ciphertext data It is sent to the second client through the pre-established data sharing network.
一种数据传输方法,应用于第二客户端,方法包括:当接收到所述第一客户端针对所述第二客户端发送的数据访问请求时,获取所述第一客户端针对所述第二客户端发送的密文数据;获取所述第一客户端的公钥,并基于所述第一客户端的公钥对所述密文数据进行解密,解密成功后生成明文数据;基于所述明文数据获取第一客户端所需的数据信息,并加载非对称加密算法表;确定出所述第一客户端所需的数据信息对应的保密等级;基于所述保密等级从所述非 对称加密算法表中获取当前时刻对应的非对称加密算法;基于所述第一客户端的公钥以及所述当前时刻对应的非对称加密算法将所述第一客户端所需的数据信息进行加密,生成加密后的数据信息;检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取第二私钥数据;基于所述第二私钥数据以及所述当前时刻对应的非对称加密算法对所述加密后的数据信息再次加密,生成二次加密后的密文数据;将所述二次加密后的密文数据通过预先建立的数据共享网络响应至第一客户端。A data transmission method, applied to a second client, the method comprising: when receiving a data access request sent by the first client for the second client, acquiring The ciphertext data sent by the second client; obtaining the public key of the first client, and decrypting the ciphertext data based on the public key of the first client, and generating plaintext data after successful decryption; based on the plaintext data Obtain the data information required by the first client, and load the asymmetric encryption algorithm table; determine the security level corresponding to the data information required by the first client; based on the security level from the asymmetric encryption algorithm table The asymmetric encryption algorithm corresponding to the current moment is obtained from ; based on the public key of the first client and the asymmetric encryption algorithm corresponding to the current moment, the data information required by the first client is encrypted, and the encrypted data is generated. Data information; detect whether the data communication between multiple internal chips has been intruded, collect the current face image for authorization authentication when not intruded, and extract the second private key data from the preset key database after successful authentication; based on The second private key data and the asymmetric encryption algorithm corresponding to the current moment re-encrypt the encrypted data information to generate ciphertext data after secondary encryption; The response is sent to the first client through the pre-established data sharing network.
一种数据传输装置,应用于第一客户端,装置包括:待传输数据检测模块,用于当检测到存在待传输的明文数据时,加载预先配置的非对称加密算法表;最优非对称加密算法确定模块,用于获取非对称加密算法表中各非对称加密算法的优先级,基于优先级的高低顺序确定最优非对称加密算法;私钥数据提取模块,用于检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取私钥数据;数据加密模块,用于基于所述最优非对称加密算法和所述私钥数据对所述待传输的明文数据进行加密,生成密文数据;密文数据发送模块,用于将所述密文数据通过预先建立的数据共享网络发送至第二客户端。A data transmission device, applied to a first client, includes: a data-to-be-transmitted detection module, configured to load a pre-configured asymmetric encryption algorithm table when detecting that there is plaintext data to be transmitted; an optimal asymmetric encryption The algorithm determination module is used to obtain the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and the optimal asymmetric encryption algorithm is determined based on the priority order; the private key data extraction module is used to detect the internal multiple chips. Whether the data communication between them has been invaded, when not invaded, the current face image is collected for authorization authentication, and the private key data is extracted from the preset key database after the authentication is successful; the data encryption module is used for The symmetric encryption algorithm and the private key data encrypt the plaintext data to be transmitted to generate ciphertext data; the ciphertext data sending module is used for sending the ciphertext data to the second through the pre-established data sharing network client.
一种终端,包括存储器和处理器,存储器中存储有计算机可读指令,计算机可读指令被处理器执行时,使得处理器执行上述数据传输方法的步骤。A terminal includes a memory and a processor, the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the above data transmission method.
一种存储有计算机可读指令的存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述数据传输方法的步骤。A storage medium storing computer-readable instructions, when the computer-readable instructions are executed by one or more processors, cause the one or more processors to perform the steps of the above data transmission method.
上述数据传输方法、装置、终端和存储介质,在本申请实施例中,第一客户端首先当检测到存在待传输的明文数据时加载预先配置的非对称加密算法表,并获取非对称加密算法表中各非对称加密算法的优先级,再基于优先级的高低顺序确定最优非对称加密算法,然后检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取私钥数据,再基于所述最优非对称加密算法和所述私钥数据对所述待传输的明文数据进行加密,生成密文数据,最后将所述密文数据通过预先建立的数据共享网络发送至第二客户端。由于本申请在数据传输时从预先设定的非对称加密算法表中根据优先级选择最优非对称加密算法并结合预先保存的非对称加密公钥及私钥文件进行数据加密和解密,可以防止数据传输过程中被篡改,进一步降低了数据泄露的可能性。For the above data transmission method, device, terminal, and storage medium, in the embodiments of the present application, the first client first loads a preconfigured asymmetric encryption algorithm table when detecting that there is plaintext data to be transmitted, and obtains the asymmetric encryption algorithm The priority of each asymmetric encryption algorithm in the table, and then determine the optimal asymmetric encryption algorithm based on the priority order, and then detect whether the data communication between multiple internal chips is intrusion, and collect the current face when it is not intrusion. Perform authority authentication on the image, extract the private key data from the preset key database after successful authentication, and then encrypt the plaintext data to be transmitted based on the optimal asymmetric encryption algorithm and the private key data to generate a password. and finally sending the ciphertext data to the second client through the pre-established data sharing network. Since the present application selects the optimal asymmetric encryption algorithm according to the priority from the preset asymmetric encryption algorithm table during data transmission, and performs data encryption and decryption in combination with the pre-saved asymmetric encryption public key and private key files, it can prevent Data is tampered with during transmission, further reducing the possibility of data leakage.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description serve to explain the principles of the application.
图1为本申请一个实施例中提供的数据传输方法的实施环境图;1 is an implementation environment diagram of a data transmission method provided in an embodiment of the present application;
图2为本申请一个实施例中终端的内部结构示意图;2 is a schematic diagram of an internal structure of a terminal in an embodiment of the present application;
图3为本申请一个实施例中提供的数据传输方法的方法示意图;3 is a schematic diagram of a data transmission method provided in an embodiment of the present application;
图4为本申请一个实施例中提供的另一种数据传输方法的方法示意图;4 is a schematic diagram of another data transmission method provided in an embodiment of the present application;
图5是本申请实施例提供的一种数据传输装置的装置示意图。FIG. 5 is an apparatus schematic diagram of a data transmission apparatus provided by an embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。It will be understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element.
图1为一个实施例中提供的数据传输方法的实施环境图,如图1所示,在该实施环境中,包括第一客户端110以及第二客户端120。FIG. 1 is an implementation environment diagram of a data transmission method provided in an embodiment. As shown in FIG. 1 , the implementation environment includes a first client 110 and a second client 120 .
第一客户端110为计算机设备,例如为待传输的敏感数据进行加密等操作的计算机设备,第一客户端110上安装有数据加密工具。第二客户端120上安装有需要针对待传输任务对应的数据进行解密等操作的应用,当需要数据加密时,待传输的敏感数据可以在第一客户端110进行数据加密,第一客户端110检测待传输的明文数据,第一客户端110当检测到存在待传输的明文数据时加载预先配置的非对称加密算法表;第一客户端110获取非对称加密算法表中各非对称加密算法的优先级,第一客户端110基于优先级的高低顺序确定最优非对称加密算法;第一客户端110检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取私钥数据;第一客户端110基于所述最优非对称加密算法和所述私钥数据对所述待传输的明文数据进行加密,生成密文数据;第一客户端110将所述密文数据通过预先建立的数据共享网络发送至第二客户端120。The first client 110 is a computer device, for example, a computer device that performs operations such as encryption of sensitive data to be transmitted, and a data encryption tool is installed on the first client 110 . An application that needs to decrypt the data corresponding to the task to be transmitted is installed on the second client 120. When data encryption is required, the sensitive data to be transmitted can be encrypted at the first client 110, and the first client 110 Detecting plaintext data to be transmitted, the first client 110 loads a preconfigured asymmetric encryption algorithm table when detecting that there is plaintext data to be transmitted; the first client 110 obtains the data of each asymmetric encryption algorithm in the asymmetric encryption algorithm table. Priority, the first client 110 determines the optimal asymmetric encryption algorithm based on the order of priority; the first client 110 detects whether the data communication between multiple internal chips is intruded, and collects the current face when not intruded The image performs authority authentication, and after the authentication is successful, the private key data is extracted from the preset key database; the first client 110 performs the operation on the plaintext data to be transmitted based on the optimal asymmetric encryption algorithm and the private key data. Encryption to generate ciphertext data; the first client 110 sends the ciphertext data to the second client 120 through a pre-established data sharing network.
第二客户端120当接收到第一客户端针对第二客户端发送的数据访问请求时,获取针对第二客户端发送的密文数据;第二客户端120获取第一客户端的公钥,并基于第一客户端的公钥对密文数据进行解密,解密成功后生成明文数据;第二客户端120基于明文数据获取第一客户端所需数据信息,并从非对称加密算法表中各非对称加密算法的优先级,基于优先级的高低顺序确定最优非对称加密算法;第二客户端120基于第一客户端的公钥以及最优非对称加密算法将第一客户端所需数据信息进行加密,生成加密后的数据信息;第二客户端120检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取私钥数据;第二客户端120基于私钥数据以及最优非对称加密算法对加密后的数据信息再次加密,生成二次加密后的数据信息;第二客户端120将二次加密后的数据信息通过预先建立的数据共享网络响应至第一客户端110。When receiving the data access request sent by the first client to the second client, the second client 120 obtains the ciphertext data sent to the second client; the second client 120 obtains the public key of the first client, and The ciphertext data is decrypted based on the public key of the first client, and the plaintext data is generated after the decryption is successful; The priority of the encryption algorithm, and the optimal asymmetric encryption algorithm is determined based on the priority order; the second client 120 encrypts the data information required by the first client based on the public key of the first client and the optimal asymmetric encryption algorithm , and generate encrypted data information; the second client 120 detects whether the data communication between multiple internal chips is intruded, and collects the current face image for authorization authentication when it is not intruded. The private key data is extracted from the key database; the second client 120 re-encrypts the encrypted data information based on the private key data and the optimal asymmetric encryption algorithm to generate secondary encrypted data information; the second client 120 encrypts the data twice The latter data information is responded to the first client 110 through the pre-established data sharing network.
第一客户端110当接收到第二客户端针对第一客户端发送的数据响应时,第一客户端110获取针对第一客户端发送的密文数据;第一客户端110获取第二客户端的公钥,并基于第二客户端的公钥对针对第一客户端发送的密文数据进行解密,解密成功后得到解密后的数据;第一客户端110基于提取的私钥数据对解密后的数据二次解密,生成明文数据。When the first client 110 receives the data response sent by the second client to the first client, the first client 110 obtains the ciphertext data sent to the first client; the first client 110 obtains the data of the second client. public key, and decrypt the ciphertext data sent to the first client based on the public key of the second client, and obtain the decrypted data after successful decryption; the first client 110 decrypts the decrypted data based on the extracted private key data Secondary decryption to generate plaintext data.
需要说明的是,客户端120可为智能手机、平板电脑、笔记本电脑、台式计算机等,但并不局限于此。服务器110以及客户端120可以通过蓝牙、USB(Universal Serial Bus,通用串行总线)或者其他通讯连接方式进行连接,本申请在此不做限制。It should be noted that the client 120 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc., but is not limited thereto. The server 110 and the client 120 may be connected through Bluetooth, USB (Universal Serial Bus, Universal Serial Bus) or other communication connection methods, which are not limited in this application.
图2为一个实施例中终端的内部结构示意图。如图2所示,该终端包括通过系统总线连接的处理器、非易失性存储介质、存储器和网络接口。其中,该终端的非易失性存储介质存储有操作系统、数据库和计算机可读指令,数据库 中可存储有控件信息序列,该计算机可读指令被处理器执行时,可使得处理器实现一种数据传输方法。该终端的处理器用于提供计算和控制能力,支撑整个终端的运行。该终端的存储器中可存储有计算机可读指令,该计算机可读指令被处理器执行时,可使得处理器执行一种数据传输方法。该终端的网络接口用于与终端连接通信。本领域技术人员可以理解,图2中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的终端的限定,具体的终端可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。FIG. 2 is a schematic diagram of an internal structure of a terminal in an embodiment. As shown in FIG. 2, the terminal includes a processor, a non-volatile storage medium, a memory and a network interface connected through a system bus. The non-volatile storage medium of the terminal stores an operating system, a database, and computer-readable instructions, and the database may store a sequence of control information. When the computer-readable instructions are executed by the processor, the processor can implement a data transfer method. The processor of the terminal is used to provide computing and control capabilities to support the operation of the entire terminal. Computer-readable instructions may be stored in the memory of the terminal, and when executed by the processor, the computer-readable instructions may cause the processor to execute a data transmission method. The network interface of the terminal is used to connect and communicate with the terminal. Those skilled in the art can understand that the structure shown in FIG. 2 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the terminal to which the solution of the present application is applied. More or fewer components are shown in the figures, either in combination or with different arrangements of components.
下面将结合附图3-附图4,对本申请实施例提供的数据传输方法进行详细介绍。该方法可依赖于计算机程序实现,可运行于基于冯诺依曼体系的数据传输装置上。该计算机程序可集成在应用中,也可作为独立的工具类应用运行。The data transmission method provided by the embodiment of the present application will be described in detail below with reference to FIG. 3 to FIG. 4 . The method can be implemented by relying on a computer program, and can be run on a data transmission device based on the von Neumann system. The computer program can be integrated into an application or run as a stand-alone utility application.
请参见图3,为本申请实施例提供了一种数据传输方法的流程示意图,应用于第一客户端。如图3所示,本申请实施例的方法可以包括以下步骤:Referring to FIG. 3 , an embodiment of the present application provides a schematic flowchart of a data transmission method, which is applied to a first client. As shown in FIG. 3, the method of this embodiment of the present application may include the following steps:
S101,当检测到存在待传输的明文数据时,加载预先配置的非对称加密算法表;S101, when detecting that there is plaintext data to be transmitted, load a preconfigured asymmetric encryption algorithm table;
通常,在多个客户端进行数据传输时,本申请通过预先建立数据共享网络,数据共享网络可以看作是一个内部建立的局域网,该网络只为加入数据共享网络成功的客户端提供数据传输服务。其中,数据共享网络也可以看作是公司的内网,只为本公司的客户端提供网络传输服务,其他外部客户端无法访问加入数据共享网络的主机,数据共享网络的建立可以即能保障公司内部主机的安全性,同时也可以对公司各个主机之间的数据传输进行监控,进一步提升公司数据的安全级别。Generally, when multiple clients perform data transmission, the present application establishes a data sharing network in advance. The data sharing network can be regarded as an internally established local area network, and the network only provides data transmission services for clients that have successfully joined the data sharing network. . Among them, the data sharing network can also be regarded as the company's intranet, which only provides network transmission services for the company's clients. Other external clients cannot access the hosts that join the data sharing network. The establishment of the data sharing network can guarantee the company's The security of the internal host can also monitor the data transmission between the company's various hosts to further improve the security level of the company's data.
进一步地,该共享网络和云服务部署的区块链网络进行通信连接,该区块链保存有当前主机进行数据加密的私钥。将私钥保存在区块链网络中,可以进一步提升私钥的安全性。Further, the shared network is in communication connection with the blockchain network deployed by the cloud service, and the blockchain stores the private key of the current host for data encryption. Saving the private key in the blockchain network can further improve the security of the private key.
进一步地,在数据共享网络建立后,当多个主机加入到该数据共享网络后,多个主机就可以基于该网络进行数据传输。Further, after the data sharing network is established, when multiple hosts join the data sharing network, the multiple hosts can perform data transmission based on the network.
在本申请实施例中,预先配置的非对称加密算法表是由管理员设定的一个非对称加密算法库,非对称加密算法库中保存了多个不同的非对称加密算法,多个不同的非对称加密算法中每个非对称加密算法都具有优先级。当客户端对明文数据进行加密时,可通过从非对称加密算法库中获取加密算法进行加密。由于非对称加密算法库是由管理员进行管理,可以随着时间的变化实时更新非对称加密算法库中的非对称加密算法。需要说明的时,对非对称加密算法库中的算法进行增删改查等操作时,都会对应操作时间以及操作的次数等记录参数信息。In the embodiment of the present application, the pre-configured asymmetric encryption algorithm table is an asymmetric encryption algorithm library set by an administrator. The asymmetric encryption algorithm library stores a plurality of different asymmetric encryption algorithms, and a plurality of different Each of the asymmetric encryption algorithms has a priority. When the client encrypts plaintext data, it can obtain the encryption algorithm from the asymmetric encryption algorithm library for encryption. Since the asymmetric encryption algorithm library is managed by the administrator, the asymmetric encryption algorithms in the asymmetric encryption algorithm library can be updated in real time as time changes. When it needs to be explained, when adding, deleting, modifying and checking the algorithms in the asymmetric encryption algorithm library, the parameter information will be recorded corresponding to the operation time and the number of operations.
在一种可能的实现方式中,在加入数据共享网络中两个客户端进行数据传输时,客户端实时检测是否存在待传输的明文数据,检测方式可以通过硬件的检测方式,也可以通过软件的检测方式,例如硬件检测方式可以是通过流量探针进行检测,软件检测方式可以通过检测报文中标识的方式进行检测,在检测到存在待传输的明文数据时,客户端连接预先创建的非对称加密算法库,从该非对称加密算法库中加载出预先配置的非对称加密算法表。In a possible implementation, when two clients join the data sharing network for data transmission, the client detects in real time whether there is plaintext data to be transmitted. The detection method can be hardware detection, or software. Detection methods, for example, hardware detection methods can be detected by traffic probes, and software detection methods can be detected by detection methods identified in packets. An encryption algorithm library, from which a pre-configured asymmetric encryption algorithm table is loaded.
进一步地,在通过软件检测方式检测是否存在待传输的明文数据时,首先实时获取当前客户端产生的所有报文数据,报文数据中包含用户通过按键生成 的数据加密指令,该指令中包括软件系统中提前设定的标识,例如数据加密指令的标识为“encryption”。当用户通过客户端按键生成数据加密指令后,该指令中的报文为明文数据+标识的形式,此时当发现报文中有识别标识时以此检测到明文数据。Further, when detecting whether there is plaintext data to be transmitted by the software detection method, first obtain all the message data generated by the current client in real time, and the message data includes the data encryption instruction generated by the user by pressing the button, and the instruction includes the software. The identifier set in advance in the system, for example, the identifier of the data encryption instruction is "encryption". After the user generates a data encryption command by pressing the client button, the message in the command is in the form of plaintext data + identification. At this time, when the identification mark is found in the message, the plaintext data is detected.
S102,获取非对称加密算法表中各非对称加密算法的优先级,基于优先级的高低顺序确定最优非对称加密算法;S102, obtain the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and determine the optimal asymmetric encryption algorithm based on the high and low order of the priority;
通常,各非对称加密算法的优先级是管理员预先设定的,该优先级的设定可根据多种方式进行限定。Usually, the priority of each asymmetric encryption algorithm is preset by the administrator, and the priority setting can be limited in many ways.
例如,在一种可能的实现方式中,客户端首先获取非对称加密算法表中各非对称加密算法指示的算法设定时间,再基于算法设定时间距离当前时间的时长确定各加密算法的优先级。本申请在一种可能的实现方式中限定了预设算法表中各算法优先级的确定是根据设定的时间进行确定,也就是说设定时间越短,说明该算法是最新添加的,最新添加的算法说明加密强度更加高一点。For example, in a possible implementation manner, the client first obtains the algorithm setting time indicated by each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and then determines the priority of each encryption algorithm based on the length of the algorithm setting time from the current time. class. In a possible implementation manner, the present application defines that the priority of each algorithm in the preset algorithm table is determined according to the set time, that is to say, the shorter the set time, the more the algorithm is newly added. The added algorithm shows that the encryption strength is a bit stronger.
具体的,在确定算法表中的各算法的优先级顺序时,首先获取加密算法表中各加密算法的设置时间,通过设置时间和当前时刻进行做差得到各算法设定的时间间隔,选取时间间隔最小的加密算法最为最优加密算法进行加密操作。本申请通过计算加密算法表中各算法的设定时间选取最优的加密算法,保证了加密强度更加高。Specifically, when determining the priority order of each algorithm in the algorithm table, first obtain the set time of each encryption algorithm in the encryption algorithm table, and obtain the time interval set by each algorithm by making a difference between the set time and the current time, and select the time The encryption algorithm with the smallest interval is the most optimal encryption algorithm for encryption operation. In the present application, the optimal encryption algorithm is selected by calculating the setting time of each algorithm in the encryption algorithm table, which ensures that the encryption strength is higher.
例如,在另一种可能的实现方式中,客户端首先获取非对称加密算法表中各非对称加密算法的使用频率,最后基于各非对称加密算法的使用频率确定各非对称加密算法的优先级。本申请在另一种可能的实现方式中限定了算法优先级的确定是根据使用的频率进行确定,算法使用的频率越少,说明该算法不被破解的风险更小,即该加密算法的加密强度更高。For example, in another possible implementation manner, the client first obtains the frequency of use of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and finally determines the priority of each asymmetric encryption algorithm based on the frequency of use of each asymmetric encryption algorithm . In another possible implementation, the present application defines that the algorithm priority is determined according to the frequency of use. The less the algorithm is used, the lower the risk of the algorithm not being cracked. higher strength.
具体的,在确定加密算法表中各加密算法的优先级顺序时,首先获取加密算法表中各加密算法的使用频率,根据每个加密算法的使用频率数据确定出使用频率最小的加密算法,最后将使用频率最少的加密算法确定为当前最优的加密算法。本申请通过加密算法表中各算法的使用频率选取最优的加密算法,保障了加密强度更高。Specifically, when determining the priority order of each encryption algorithm in the encryption algorithm table, first obtain the use frequency of each encryption algorithm in the encryption algorithm table, and determine the encryption algorithm with the least frequency of use according to the use frequency data of each encryption algorithm, and finally The encryption algorithm with the least frequency is determined as the current optimal encryption algorithm. The present application selects the optimal encryption algorithm by using the frequency of use of each algorithm in the encryption algorithm table, which ensures higher encryption strength.
需要说明的是,还可以根据其他方式设定优先级,此处不再赘述。It should be noted that the priority may also be set in other manners, which will not be repeated here.
S103,检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取私钥数据;S103, detecting whether the data communication between the multiple internal chips has been invaded, and when not being invaded, collect the current face image to perform authority authentication, and extract private key data from a preset key database after the authentication is successful;
通常,内部多个芯片为数据共享网络中数据传输时的通信芯片设备,通过对内部多个通信芯片进行检测,来判断当前的数据共享网络是否遭到外部的入侵,例如外部的计算机设备为了获取数据共享网络中的计算机设备里保存的私钥而发起的攻击,该步骤为了在数据共享网络中的计算机设备里保存的私钥被泄露的情况下,可以及时停止数据传输,保证数据传输的安全。Usually, multiple internal chips are communication chip devices during data transmission in the data sharing network. By detecting multiple internal communication chips, it is judged whether the current data sharing network has been invaded by the outside. The attack initiated by the private key stored in the computer equipment in the data sharing network, this step can stop the data transmission in time to ensure the security of the data transmission when the private key stored in the computer equipment in the data sharing network is leaked .
具体的,在检测内部多个芯片之间的数据通信是否遭受入侵时,通常对共享数据网络中多个通信芯片之间的两路非同类通讯方式进行协议解析、比对和分析处理,如果通讯数据量和通信数据内容一样,则认为没有遭到入侵,如果通讯数据量和通信数据内容有任一个不一样,则认为遭到入侵。Specifically, when detecting whether the data communication between multiple internal chips is invaded, the protocol analysis, comparison and analysis are usually performed on the two non-similar communication modes between multiple communication chips in the shared data network. If the amount of data is the same as the content of the communication data, it is considered that it has not been invaded, and if the amount of communication data is different from the content of the communication data, it is considered that it has been invaded.
进一步地,还包括检测数据共享网络中计算机设备是否被植入病毒,通过植入病毒的方式获取到保存在计算机设备的私钥文件数据,在检测是否被植入病毒的方式包括不限于通过自身检查和/或通过第三方可信任的安全公司进行 检查,自身检查通过检查自身程序保存区的容量,当发现容量变大时,通过遍历的方式查找新加入的程序文件,对程序文件自身携带的参数进行解析,当解析后的参数为未能识别的参数信息时,进行预警并自动删除该程序。Further, it also includes detecting whether the computer equipment in the data sharing network is implanted with a virus, and obtaining the private key file data saved in the computer equipment by implanting a virus. Check and/or check through a third-party trusted security company, check the capacity of your own program storage area by checking the capacity of your own program storage area, and when the capacity is found to become larger, search for the newly added program file by traversing, and check the program file itself. The parameters are parsed. When the parsed parameters are unrecognized parameter information, an early warning is issued and the program is automatically deleted.
进一步地,在未发现遭受入侵时,此时通过当前待加密计算机设备的摄像头采集当前用户的人脸图像进行识别,识别后通过权限验证后,计算机设备通过数据共享网络连接区块链网络,并将当前用户信息发送给区块链网络进行再次认证,认证成功后,区块链网络将当前计算机设备的私钥通过共享网络响应到计算机设备,连接保存密钥文件的数据库,自动获取密钥文件中的私钥数据。Further, when no intrusion is found, at this time, the face image of the current user is collected by the camera of the computer equipment to be encrypted at this time for identification, and after the identification passes the authority verification, the computer equipment is connected to the blockchain network through the data sharing network, and Send the current user information to the blockchain network for re-authentication. After the authentication is successful, the blockchain network responds the private key of the current computer device to the computer device through the shared network, connects to the database that saves the key file, and automatically obtains the key file. private key data in .
通过检查当前共享数据网络是否遭受入侵、当前计算机设备是否存在病毒、当前用户是否为具有权限的人员。当三种验证都通过时,计算机设备才会连接密钥数据库获取私钥,这种方式进一步保障了数据传输时的安全性,防止因为私钥泄露导致数据在传输过程中被人劫持以及篡改。By checking whether the current shared data network is invaded, whether the current computer equipment has viruses, and whether the current user is a person with authority. When all three verifications are passed, the computer device will connect to the key database to obtain the private key. This method further ensures the security of data transmission and prevents the data from being hijacked and tampered with during transmission due to the leakage of the private key.
S104,基于所述最优非对称加密算法和所述私钥数据对所述待传输的明文数据进行加密,生成密文数据;S104, encrypting the plaintext data to be transmitted based on the optimal asymmetric encryption algorithm and the private key data to generate ciphertext data;
在一种可能的实现方式中,当基于步骤S102获取到最优非对称加密算法,以及根据步骤S103获取到私钥数据后,将待传输的明文数据和私钥数据输入到最优非对称加密算法中进行加密操作,加密结束后生成密文数据。In a possible implementation manner, after the optimal asymmetric encryption algorithm is obtained based on step S102 and the private key data is obtained according to step S103, the plaintext data and private key data to be transmitted are input into the optimal asymmetric encryption algorithm The encryption operation is performed in the algorithm, and the ciphertext data is generated after the encryption is completed.
例如,待传输的明文数据为a,用非对称加密算法和公钥ek加密a,得到密文s=Eek(a),Eek()为非对称加密算法的公钥加密操作。For example, the plaintext data to be transmitted is a, and a is encrypted with the asymmetric encryption algorithm and the public key ek to obtain the ciphertext s=Eek(a), where Eek() is the public key encryption operation of the asymmetric encryption algorithm.
在本申请实施例中所使用的的非对称加密算法表中的非对称加密算法可以有散列算法、Hash算法、MD5(Message Digest Algorithm 5)算法、SHA(Secure Hash Algorithm)算法等,优选的,在进行加密操作时,如果最优非对称加密算法为RSA时,优选采用1024位的私钥数字,如果最优非对称加密算法为ECC时,优先采用160位的私钥,如果最优非对称加密算法为AES时,优先采用128位的私钥数据。The asymmetric encryption algorithms in the asymmetric encryption algorithm table used in the embodiments of the present application may include hash algorithm, Hash algorithm, MD5 (Message Digest Algorithm 5) algorithm, SHA (Secure Hash Algorithm) algorithm, etc. , when performing encryption operations, if the optimal asymmetric encryption algorithm is RSA, it is preferred to use a 1024-bit private key number; if the optimal asymmetric encryption algorithm is ECC, a 160-bit private key is preferred. When the symmetric encryption algorithm is AES, the 128-bit private key data is preferentially used.
S105,将所述密文数据通过预先建立的数据共享网络发送至第二客户端。S105: Send the ciphertext data to the second client through a pre-established data sharing network.
通常,第二客户端为接收密文数据的客户端。Usually, the second client is the client that receives the ciphertext data.
例如,如果A主机需要查询B主机上的某一个数据,首先A主机将要查询的数据通过A自己的私钥加密为a,A主机将a发送给B主机。For example, if host A needs to query a certain data on host B, first host A encrypts the data to be queried as a with its own private key, and host A sends a to host B.
进一步地,步骤S102还包括:还可以通过计算待加密明文数据的数据量来选择最优的加密算法,也可以通过待加密数据的数据重要程度来选择加密算法,具体根据实际待传输的数据信息进行确定,此处不做限定。Further, step S102 also includes: the optimal encryption algorithm can also be selected by calculating the data volume of the plaintext data to be encrypted, or the encryption algorithm can be selected according to the data importance of the data to be encrypted, specifically according to the actual data information to be transmitted. Make a determination, which is not limited here.
进一步地,在步骤S103中,密钥数据库生成方式包括:当前计算机设备可根据设定的若干种方式生成不同位数的私钥,然后根据生成不同位数的私钥数据生成公钥数据,最后将生成的不同位数的私钥和不同位数的私钥对应的公钥一起发送至密钥数据库进行保存。其中,生成私钥的方式包括不限于通过产生随机数的方式生成私钥、也可以通过当前时间+随机数的方式生成私钥,具体的生成方式可以根据实际的应用场景自行设定,此处不再限制。Further, in step S103, the key database generation method includes: the current computer equipment can generate private keys of different digits according to several set methods, then generate public key data according to the private key data of different digits, and finally The generated private keys of different digits and the public keys corresponding to the private keys of different digits are sent to the key database for storage. Among them, the method of generating the private key includes not limited to generating the private key by generating a random number, but also generating the private key by the current time + random number. The specific generation method can be set by yourself according to the actual application scenario, here No more restrictions.
进一步地,为了保障数据传输的更快一些,节省时间,可以对加密后的数据压缩优化,目前普遍使用的算法是传输变化了的数据项,而忽略未变化的数据项。当数据变化量不大时,传输的冗余位很多,这导致传输速度慢。故将变化位和非变化位清晰地分开,在以位为单位的水平上进行压缩,这样即使使用极为简单的行程编码压缩算法也可以取得极高的压缩率。Further, in order to ensure faster data transmission and save time, the encrypted data compression can be optimized. Currently, a commonly used algorithm is to transmit changed data items and ignore unchanged data items. When the amount of data change is not large, there are many redundant bits transmitted, which leads to slow transmission speed. Therefore, the changing bits and non-changing bits are clearly separated, and the compression is performed at the level of the unit, so that even if a very simple run-length coding compression algorithm is used, a very high compression rate can be obtained.
进一步地,在数据传输时优选TCP/IP协议的数据传输方式。Further, the data transmission mode of the TCP/IP protocol is preferred during data transmission.
进一步地,在当接收到第二客户端针对第一客户端发送的数据响应时,首先获取针对第一客户端发送的密文数据,然后获取第二客户端的公钥,并基于第二客户端的公钥对针对第一客户端发送的密文数据进行解密,解密成功后得到解密后的数据,最后基于提取的私钥数据对解密后的数据二次解密,生成明文数据。Further, when receiving the data response sent by the second client to the first client, first obtain the ciphertext data sent to the first client, then obtain the public key of the second client, and based on the second client's The public key decrypts the ciphertext data sent by the first client, and after successful decryption, the decrypted data is obtained, and finally the decrypted data is decrypted twice based on the extracted private key data to generate plaintext data.
在本申请实施例中,第一客户端首先当检测到存在待传输的明文数据时加载预先配置的非对称加密算法表,并获取非对称加密算法表中各非对称加密算法的优先级,再基于优先级的高低顺序确定最优非对称加密算法,然后检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取私钥数据,再基于所述最优非对称加密算法和所述私钥数据对所述待传输的明文数据进行加密,生成密文数据,最后将所述密文数据通过预先建立的数据共享网络发送至第二客户端。由于本申请在数据传输时从预先设定的非对称加密算法表中根据优先级选择最优非对称加密算法并结合预先保存的非对称加密公钥及私钥文件进行数据加密和解密,可以防止数据传输过程中被篡改,进一步降低了数据泄露的可能性。In this embodiment of the present application, the first client first loads a preconfigured asymmetric encryption algorithm table when detecting that there is plaintext data to be transmitted, obtains the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and then Determine the optimal asymmetric encryption algorithm based on the high and low order of priorities, and then detect whether the data communication between multiple internal chips is intruded. The private key data is extracted from the key database, and the plaintext data to be transmitted is encrypted based on the optimal asymmetric encryption algorithm and the private key data to generate ciphertext data. The established data sharing network is sent to the second client. Since the present application selects the optimal asymmetric encryption algorithm according to the priority from the preset asymmetric encryption algorithm table during data transmission, and performs data encryption and decryption in combination with the pre-saved asymmetric encryption public key and private key files, it can prevent Data is tampered with during transmission, further reducing the possibility of data leakage.
请参见图4,为本申请实施例提供了一种数据传输方法的流程示意图,应用于第一客户端。如图4所示,本申请实施例的方法可以包括以下步骤:Referring to FIG. 4, an embodiment of the present application provides a schematic flowchart of a data transmission method, which is applied to a first client. As shown in FIG. 4 , the method of this embodiment of the present application may include the following steps:
S201,当接收到所述第一客户端针对所述第二客户端发送的数据访问请求时,获取所述第一客户端针对所述第二客户端发送的密文数据;S201, when receiving a data access request sent by the first client to the second client, obtain ciphertext data sent by the first client to the second client;
S202,获取所述第一客户端的公钥,并基于所述第一客户端的公钥对所述密文数据进行解密,解密成功后生成明文数据;S202, obtaining the public key of the first client, and decrypting the ciphertext data based on the public key of the first client, and generating plaintext data after successful decryption;
S203,确定出所述第一客户端所需的数据信息对应的保密等级,并基于所述保密等级从所述非对称加密算法表中获取当前时刻对应的非对称加密算法;S203, determining the security level corresponding to the data information required by the first client, and obtaining the asymmetric encryption algorithm corresponding to the current moment from the asymmetric encryption algorithm table based on the security level;
S204,基于所述第一客户端的公钥以及所述当前时刻对应的非对称加密算法将所述第一客户端所需的数据信息进行加密,生成加密后的数据信息;S204, encrypting data information required by the first client based on the public key of the first client and the asymmetric encryption algorithm corresponding to the current moment, to generate encrypted data information;
S205,检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取第二私钥数据;S205, detecting whether the data communication between the multiple internal chips has been invaded, and when not being invaded, collect the current face image for authorization authentication, and extract the second private key data from the preset key database after the authentication is successful;
S206,基于所述第二私钥数据以及所述当前时刻对应的非对称加密算法对所述加密后的数据信息再次加密,生成二次加密后的密文数据;S206, re-encrypting the encrypted data information based on the second private key data and the asymmetric encryption algorithm corresponding to the current moment to generate secondary encrypted ciphertext data;
S207,将所述二次加密后的密文数据通过预先建立的数据共享网络响应至第一客户端。S207, responding the ciphertext data after the secondary encryption to the first client through a pre-established data sharing network.
在本申请实施例中,第一客户端首先当检测到存在待传输的明文数据时加载预先配置的非对称加密算法表,并获取非对称加密算法表中各非对称加密算法的优先级,再基于优先级的高低顺序确定最优非对称加密算法,然后检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取私钥数据,再基于所述最优非对称加密算法和所述私钥数据对所述待传输的明文数据进行加密,生成密文数据,最后将所述密文数据通过预先建立的数据共享网络发送至第二客户端。由于本申请在数据传输时从预先设定的非对称加密算法表中根据优先级选择最优非对称加密算法并结合预先保存的非对称加密公钥及私钥文件进行数据加密和解密,可以防止数据传输过程中被篡改,进一步降低了数据泄露的可能性。In this embodiment of the present application, the first client first loads a preconfigured asymmetric encryption algorithm table when detecting that there is plaintext data to be transmitted, obtains the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and then Determine the optimal asymmetric encryption algorithm based on the high and low order of priorities, and then detect whether the data communication between multiple internal chips is intruded. The private key data is extracted from the key database, and the plaintext data to be transmitted is encrypted based on the optimal asymmetric encryption algorithm and the private key data to generate ciphertext data. The established data sharing network is sent to the second client. Since the present application selects the optimal asymmetric encryption algorithm according to the priority from the preset asymmetric encryption algorithm table during data transmission, and performs data encryption and decryption in combination with the pre-saved asymmetric encryption public key and private key files, it can prevent Data is tampered with during transmission, further reducing the possibility of data leakage.
下述为本发明装置实施例,可以用于执行本发明方法实施例。对于本发明装置实施例中未披露的细节,请参照本发明方法实施例。The following are apparatus embodiments of the present invention, which can be used to execute method embodiments of the present invention. For details not disclosed in the device embodiments of the present invention, please refer to the method embodiments of the present invention.
请参见图5,其示出了本申请一个示例性实施例提供的数据传输装置的结构示意图,应用于第一客户端。该数据传输系统可以通过软件、硬件或者两者的结合实现成为终端的全部或一部分。该装置1包括待传输数据检测模块10、最优非对称加密算法确定模块20、私钥数据提取模块30、数据加密模块40、密文数据发送模块50。Please refer to FIG. 5 , which shows a schematic structural diagram of a data transmission apparatus provided by an exemplary embodiment of the present application, which is applied to a first client. The data transmission system can be implemented as all or a part of the terminal through software, hardware or a combination of the two. The device 1 includes a data to be transmitted detection module 10 , an optimal asymmetric encryption algorithm determination module 20 , a private key data extraction module 30 , a data encryption module 40 , and a ciphertext data transmission module 50 .
待传输数据检测模块10,用于当检测到存在待传输的明文数据时,加载预先配置的非对称加密算法表;The data-to-be-transmitted detection module 10 is configured to load a pre-configured asymmetric encryption algorithm table when detecting that there is plaintext data to be transmitted;
最优非对称加密算法确定模块20,用于获取非对称加密算法表中各非对称加密算法的优先级,基于优先级的高低顺序确定最优非对称加密算法;The optimal asymmetric encryption algorithm determination module 20 is used to obtain the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and determine the optimal asymmetric encryption algorithm based on the high and low order of the priority;
私钥数据提取模块30,用于检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取私钥数据;The private key data extraction module 30 is used to detect whether the data communication between multiple internal chips has been invaded, and when it has not been invaded, the current face image is collected for authorization authentication, and after the authentication is successful, the private key is extracted from the preset key database. key data;
数据加密模块40,用于基于所述最优非对称加密算法和所述私钥数据对所述待传输的明文数据进行加密,生成密文数据;a data encryption module 40, configured to encrypt the plaintext data to be transmitted based on the optimal asymmetric encryption algorithm and the private key data to generate ciphertext data;
密文数据发送模块50,用于将所述密文数据通过预先建立的数据共享网络发送至第二客户端。The ciphertext data sending module 50 is configured to send the ciphertext data to the second client through a pre-established data sharing network.
需要说明的是,上述实施例提供的数据传输系统在执行数据传输方法时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的数据传输系统与数据传输方法实施例属于同一构思,其体现实现过程详见方法实施例,这里不再赘述。It should be noted that, when the data transmission system provided in the above-mentioned embodiments executes the data transmission method, only the division of the above-mentioned functional modules is used for illustration. , that is, dividing the internal structure of the device into different functional modules to complete all or part of the functions described above. In addition, the data transmission system and the data transmission method provided by the above embodiments belong to the same concept, and the implementation process of the data transmission system is described in the method embodiment, which will not be repeated here.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
在本申请实施例中,第一客户端首先当检测到存在待传输的明文数据时加载预先配置的非对称加密算法表,并获取非对称加密算法表中各非对称加密算法的优先级,再基于优先级的高低顺序确定最优非对称加密算法,然后检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取私钥数据,再基于所述最优非对称加密算法和所述私钥数据对所述待传输的明文数据进行加密,生成密文数据,最后将所述密文数据通过预先建立的数据共享网络发送至第二客户端。由于本申请在数据传输时从预先设定的非对称加密算法表中根据优先级选择最优非对称加密算法并结合预先保存的非对称加密公钥及私钥文件进行数据加密和解密,可以防止数据传输过程中被篡改,进一步降低了数据泄露的可能性。In this embodiment of the present application, the first client first loads a preconfigured asymmetric encryption algorithm table when detecting that there is plaintext data to be transmitted, obtains the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and then Determine the optimal asymmetric encryption algorithm based on the high and low order of priorities, and then detect whether the data communication between multiple internal chips is intruded. The private key data is extracted from the key database, and the plaintext data to be transmitted is encrypted based on the optimal asymmetric encryption algorithm and the private key data to generate ciphertext data. The established data sharing network is sent to the second client. Since the present application selects the optimal asymmetric encryption algorithm according to the priority from the preset asymmetric encryption algorithm table during data transmission, and performs data encryption and decryption in combination with the pre-saved asymmetric encryption public key and private key files, it can prevent Data is tampered with during transmission, further reducing the possibility of data leakage.
在一个实施例中,提出了一种终端,终端包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现以下步骤:第一客户端当检测到存在待传输的明文数据时,加载预先配置的非对称加密算法表;获取非对称加密算法表中各非对称加密算法的优先级,基于优先级的高低顺序确定最优非对称加密算法;检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取私钥数据;基于所述最优非对称加密算法和所述 私钥数据对所述待传输的明文数据进行加密,生成密文数据;将所述密文数据通过预先建立的数据共享网络发送至第二客户端。第二客户端当接收到第一客户端针对第二客户端发送的数据访问请求时,获取针对第二客户端发送的密文数据;获取第一客户端的公钥,并基于第一客户端的公钥对密文数据进行解密,解密成功后生成明文数据;基于明文数据获取第一客户端所需数据信息,并从非对称加密算法表中各非对称加密算法的优先级,基于优先级的高低顺序确定最优非对称加密算法;基于第一客户端的公钥以及最优非对称加密算法将第一客户端所需数据信息进行加密,生成加密后的数据信息;检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取私钥数据;基于私钥数据以及最优非对称加密算法对加密后的数据信息再次加密,生成二次加密后的数据信息;将二次加密后的数据信息通过预先建立的数据共享网络响应至第一客户端。第一客户端当接收到第二客户端针对第一客户端发送的数据响应时,获取针对第一客户端发送的密文数据;获取第二客户端的公钥,并基于第二客户端的公钥对针对第一客户端发送的密文数据进行解密,解密成功后得到解密后的数据;基于提取的私钥数据对解密后的数据二次解密,生成明文数据。In one embodiment, a terminal is proposed. The terminal includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the following steps are implemented: when the first client detects When there is plaintext data to be transmitted, load the pre-configured asymmetric encryption algorithm table; obtain the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and determine the optimal asymmetric encryption algorithm based on the priority order; Whether the data communication between multiple internal chips has been invaded, when not invaded, the current face image is collected for authorization authentication, and the private key data is extracted from the preset key database after successful authentication; based on the optimal asymmetric The encryption algorithm and the private key data encrypt the plaintext data to be transmitted to generate ciphertext data; and send the ciphertext data to the second client through a pre-established data sharing network. When receiving the data access request sent by the first client to the second client, the second client obtains the ciphertext data sent to the second client; obtains the public key of the first client, and based on the public key of the first client The key decrypts the ciphertext data, and after the decryption is successful, the plaintext data is generated; based on the plaintext data, the data information required by the first client is obtained, and the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table is based on the priority. Determine the optimal asymmetric encryption algorithm in sequence; encrypt the data information required by the first client based on the public key of the first client and the optimal asymmetric encryption algorithm, and generate encrypted data information; Whether the data communication has been invaded, if not, the current face image is collected for authorization authentication. After the authentication is successful, the private key data is extracted from the preset key database; based on the private key data and the optimal asymmetric encryption algorithm, the encrypted The data information is encrypted again to generate the data information after the secondary encryption; the data information after the secondary encryption is responded to the first client through the pre-established data sharing network. When receiving the data response sent by the second client to the first client, the first client obtains the ciphertext data sent to the first client; obtains the public key of the second client, and based on the public key of the second client Decrypt the ciphertext data sent to the first client, and obtain decrypted data after successful decryption; decrypt the decrypted data twice based on the extracted private key data to generate plaintext data.
在一个实施例中,处理器所执行的第一客户端检测待传输的明文数据时,还执行以下步骤:第一客户端连接预先创建的数据共享网络。In an embodiment, when the first client executed by the processor detects the plaintext data to be transmitted, the following step is further performed: the first client connects to a pre-created data sharing network.
在一个实施例中,处理器所执行检测待传输的明文数据时,具体执行以下步骤:第一客户端当检测待传输的明文数据方式为硬件方式时,通过流量探针实时采集待传输的明文数据;或者当检测待传输的明文数据方式为软件方式时,通过应用程序编程接口实时获取当前产生的报文信息;解析报文信息,并查找解析后的报文信息中的加密标识;当存在加密标识时,获取加密标识对应的待传输的明文数据。In one embodiment, when the processor performs the detection of the plaintext data to be transmitted, the following steps are specifically performed: when the first client detects the plaintext data to be transmitted in the hardware mode, collects the plaintext to be transmitted in real time through a traffic probe data; or when detecting the plaintext data to be transmitted in software mode, obtain the currently generated message information in real time through the application programming interface; parse the message information, and find the encrypted identifier in the parsed message information; When encrypting the identifier, obtain the plaintext data to be transmitted corresponding to the encrypted identifier.
在一个实施例中,处理器执行第一客户端获取非对称加密算法表中各非对称加密算法的优先级时,具体执行以下步骤:第一客户端获取非对称加密算法表中各非对称加密算法指示的设定时间;基于设定时间距离当前时间的时长确定各非对称加密算法的优先级。In one embodiment, when the processor executes the first client to obtain the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, the processor specifically performs the following steps: the first client obtains each asymmetric encryption algorithm in the asymmetric encryption algorithm table. The set time indicated by the algorithm; the priority of each asymmetric encryption algorithm is determined based on the length of the set time from the current time.
在一个实施例中,处理器执行第一客户端获取非对称加密算法表中各非对称加密算法的优先级时,具体执行以下步骤:第一客户端获取非对称加密算法表中各非对称加密算法的使用频率;基于各非对称加密算法的使用频率确定各非对称加密算法的优先级。In one embodiment, when the processor executes the first client to obtain the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, the processor specifically performs the following steps: the first client obtains each asymmetric encryption algorithm in the asymmetric encryption algorithm table. The usage frequency of the algorithm; the priority of each asymmetric encryption algorithm is determined based on the usage frequency of each asymmetric encryption algorithm.
在一个实施例中,提出了一种存储有计算机可读指令的存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,该计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:第一客户端当检测到存在待传输的明文数据时,加载预先配置的非对称加密算法表;获取非对称加密算法表中各非对称加密算法的优先级,基于优先级的高低顺序确定最优非对称加密算法;检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取私钥数据;基于所述最优非对称加密算法和所述私钥数据对所述待传输的明文数据进行加密,生成密文数据;将所述密文数据通过预先建立的数据共享网络发送至第二客户端。第二客户端当接收到第一客户端针对第二客户端发送的数据访问请求时,获取针对第二客户端发送的密文数据;获取第一客户端的公钥,并基于第一客户端的公钥对密文数据进行解密,解密成功后生成明 文数据;基于明文数据获取第一客户端所需数据信息,并从非对称加密算法表中各非对称加密算法的优先级,基于优先级的高低顺序确定最优非对称加密算法;基于第一客户端的公钥以及最优非对称加密算法将第一客户端所需数据信息进行加密,生成加密后的数据信息;检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取私钥数据;基于私钥数据以及最优非对称加密算法对加密后的数据信息再次加密,生成二次加密后的数据信息;将二次加密后的数据信息通过预先建立的数据共享网络响应至第一客户端。第一客户端当接收到第二客户端针对第一客户端发送的数据响应时,获取针对第一客户端发送的密文数据;获取第二客户端的公钥,并基于第二客户端的公钥对针对第一客户端发送的密文数据进行解密,解密成功后得到解密后的数据;基于提取的私钥数据对解密后的数据二次解密,生成明文数据。In one embodiment, a storage medium storing computer-readable instructions is provided, the computer-readable storage medium may be non-volatile or volatile, and the computer-readable instructions are stored by one or more When the processor executes, one or more processors are caused to execute the following steps: when the first client detects that there is plaintext data to be transmitted, loads a preconfigured asymmetric encryption algorithm table; obtains each non-symmetric encryption algorithm table in the asymmetric encryption algorithm table. The priority of the symmetric encryption algorithm, the optimal asymmetric encryption algorithm is determined based on the priority order; it detects whether the data communication between multiple internal chips has been intruded, and when there is no intrusion, the current face image is collected for authorization authentication. After success, extract private key data from a preset key database; encrypt the plaintext data to be transmitted based on the optimal asymmetric encryption algorithm and the private key data to generate ciphertext data; The text data is sent to the second client through the pre-established data sharing network. When receiving the data access request sent by the first client to the second client, the second client obtains the ciphertext data sent to the second client; obtains the public key of the first client, and based on the public key of the first client The key decrypts the ciphertext data, and after the decryption is successful, the plaintext data is generated; based on the plaintext data, the data information required by the first client is obtained, and the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table is based on the priority. Determine the optimal asymmetric encryption algorithm in sequence; encrypt the data information required by the first client based on the public key of the first client and the optimal asymmetric encryption algorithm, and generate encrypted data information; Whether the data communication has been invaded, if not, the current face image is collected for authorization authentication. After the authentication is successful, the private key data is extracted from the preset key database; based on the private key data and the optimal asymmetric encryption algorithm, the encrypted The data information is encrypted again to generate the data information after the secondary encryption; the data information after the secondary encryption is responded to the first client through the pre-established data sharing network. When receiving the data response sent by the second client to the first client, the first client obtains the ciphertext data sent to the first client; obtains the public key of the second client, and based on the public key of the second client Decrypt the ciphertext data sent to the first client, and obtain decrypted data after successful decryption; decrypt the decrypted data twice based on the extracted private key data to generate plaintext data.
在一个实施例中,处理器所执行的第一客户端检测待传输的明文数据时,还执行以下步骤:第一客户端连接预先创建的数据共享网络。In an embodiment, when the first client executed by the processor detects the plaintext data to be transmitted, the following step is further performed: the first client connects to a pre-created data sharing network.
在一个实施例中,处理器所执行检测待传输的明文数据时,具体执行以下步骤:第一客户端当检测待传输的明文数据方式为硬件方式时,通过流量探针实时采集待传输的明文数据;或者当检测待传输的明文数据方式为软件方式时,通过应用程序编程接口实时获取当前产生的报文信息;解析报文信息,并查找解析后的报文信息中的加密标识;当存在加密标识时,获取加密标识对应的待传输的明文数据。In one embodiment, when the processor performs the detection of the plaintext data to be transmitted, the following steps are specifically performed: when the first client detects the plaintext data to be transmitted in the hardware mode, collects the plaintext to be transmitted in real time through a traffic probe data; or when detecting the plaintext data to be transmitted in software mode, obtain the currently generated message information in real time through the application programming interface; parse the message information, and find the encrypted identifier in the parsed message information; When encrypting the identifier, obtain the plaintext data to be transmitted corresponding to the encrypted identifier.
在一个实施例中,处理器执行第一客户端获取非对称加密算法表中各非对称加密算法的优先级时,具体执行以下步骤:第一客户端获取非对称加密算法表中各非对称加密算法指示的设定时间;基于设定时间距离当前时间的时长确定各非对称加密算法的优先级。In one embodiment, when the processor executes the first client to obtain the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, the processor specifically performs the following steps: the first client obtains each asymmetric encryption algorithm in the asymmetric encryption algorithm table. The set time indicated by the algorithm; the priority of each asymmetric encryption algorithm is determined based on the length of the set time from the current time.
在一个实施例中,处理器执行第一客户端获取非对称加密算法表中各非对称加密算法的优先级时,具体执行以下步骤:第一客户端获取非对称加密算法表中各非对称加密算法的使用频率;基于各非对称加密算法的使用频率确定各非对称加密算法的优先级。In one embodiment, when the processor executes the first client to obtain the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, the processor specifically performs the following steps: the first client obtains each asymmetric encryption algorithm in the asymmetric encryption algorithm table. The usage frequency of the algorithm; the priority of each asymmetric encryption algorithm is determined based on the usage frequency of each asymmetric encryption algorithm.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,该计算机程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。Those of ordinary skill in the art can understand that the realization of all or part of the processes in the methods of the above embodiments can be accomplished by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the program is During execution, it may include the processes of the embodiments of the above-mentioned methods. Wherein, the aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only storage memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM) or the like.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features It is considered to be the range described in this specification.
以上实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above examples only represent several embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but should not be construed as a limitation on the scope of the patent of the present application. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the patent of the present application shall be subject to the appended claims.

Claims (20)

  1. 一种数据传输方法,应用于第一客户端,其中,所述方法包括:A data transmission method, applied to a first client, wherein the method includes:
    当检测到存在待传输的明文数据时,加载预先配置的非对称加密算法表;When detecting that there is plaintext data to be transmitted, load the pre-configured asymmetric encryption algorithm table;
    获取所述非对称加密算法表中各非对称加密算法的优先级,基于所述优先级的高低顺序确定最优非对称加密算法;Obtain the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and determine the optimal asymmetric encryption algorithm based on the order of the priorities;
    检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取私钥数据;Detect whether the data communication between multiple internal chips has been intruded, and collect the current face image for authorization authentication when not intruded, and extract the private key data from the preset key database after successful authentication;
    基于所述最优非对称加密算法和所述私钥数据对所述待传输的明文数据进行加密,生成密文数据;Encrypting the plaintext data to be transmitted based on the optimal asymmetric encryption algorithm and the private key data to generate ciphertext data;
    将所述密文数据通过预先建立的数据共享网络发送至第二客户端。Sending the ciphertext data to the second client through a pre-established data sharing network.
  2. 根据权利要求1所述的方法,其中,所述获取所述非对称加密算法表中各非对称加密算法的优先级,基于所述优先级的高低顺序确定最优非对称加密算法,包括:The method according to claim 1, wherein the obtaining the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and determining the optimal asymmetric encryption algorithm based on the high and low order of the priority, comprises:
    解析所述待传输的明文数据,确定出所述待传输的明文数据的保密等级;Parse the plaintext data to be transmitted, and determine the security level of the plaintext data to be transmitted;
    基于所述保密等级从所述非对称加密算法表中获取当前时刻对应的非对称加密算法。The asymmetric encryption algorithm corresponding to the current moment is acquired from the asymmetric encryption algorithm table based on the security level.
  3. 根据权利要求1所述的方法,其中,检测所述待传输的明文数据方式包括硬件检测或软件检测;The method according to claim 1, wherein the method of detecting the plaintext data to be transmitted comprises hardware detection or software detection;
    检测所述待传输的明文数据,包括:Detecting the plaintext data to be transmitted includes:
    当检测到所述待传输的明文数据的传输方式为硬件方式时,则通过流量探针实时采集待传输的明文数据;或者When it is detected that the transmission mode of the plaintext data to be transmitted is the hardware mode, the plaintext data to be transmitted is collected in real time through the traffic probe; or
    当检测到所述待传输的明文数据的传输方式为软件方式时,则通过应用程序编程接口实时获取当前产生的报文信息;When it is detected that the transmission mode of the plaintext data to be transmitted is the software mode, the currently generated message information is obtained in real time through the application programming interface;
    解析所述报文信息,并查找所述解析后的报文信息中是否存在加密标识;Parse the message information, and find out whether there is an encryption identifier in the parsed message information;
    当所述解析后的报文信息中存在所述加密标识时,从所述报文信息中获取与所述加密标识对应的待传输的明文数据。When the encrypted identifier exists in the parsed message information, the plaintext data to be transmitted corresponding to the encrypted identifier is acquired from the message information.
  4. 根据权利要求1所述的方法,其中,所述获取所述非对称加密算法表中各非对称加密算法的优先级,包括:The method according to claim 1, wherein the obtaining the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table comprises:
    获取所述非对称加密算法表中各非对称加密算法指示的设定时间;Obtain the set time indicated by each asymmetric encryption algorithm in the asymmetric encryption algorithm table;
    基于所述各非对称加密算法指示的设定时间分别距离当前时间的时长,确定所述各非对称加密算法的优先级。The priority of each asymmetric encryption algorithm is determined based on the respective durations between the set times indicated by the asymmetric encryption algorithms and the current time.
  5. 根据权利要求1所述的方法,其中,所述获取所述非对称加密算法表中各非对称加密算法的优先级,包括:The method according to claim 1, wherein the obtaining the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table comprises:
    获取所述非对称加密算法表中各非对称加密算法的使用频率;Obtain the frequency of use of each asymmetric encryption algorithm in the asymmetric encryption algorithm table;
    基于所述各非对称加密算法的使用频率确定所述各非对称加密算法的优先级。The priority of each asymmetric encryption algorithm is determined based on the frequency of use of each asymmetric encryption algorithm.
  6. 根据权利要求1所述的方法,其中,所述方法还包括:The method of claim 1, wherein the method further comprises:
    当接收到所述第二客户端针对所述第一客户端发送的所述密文数据的响应时,获取第二客户端针对第一客户端发送的密文数据;When receiving a response from the second client to the ciphertext data sent by the first client, acquiring the ciphertext data sent by the second client to the first client;
    获取所述第二客户端的公钥,并基于所述第二客户端的公钥对所述第二客户端针对第一客户端发送的密文数据进行解密,解密成功后得到解密后的数据;obtaining the public key of the second client, and decrypting the ciphertext data sent by the second client to the first client based on the public key of the second client, and obtaining decrypted data after successful decryption;
    基于所述提取的私钥数据对解密后的数据二次解密,生成明文数据。The decrypted data is decrypted twice based on the extracted private key data to generate plaintext data.
  7. 根据权利要求1所述的方法,其中,所述当检测到存在待传输的明文数据时,加载预先配置的非对称加密算法表之前,还包括:The method according to claim 1, wherein when it is detected that there is plaintext data to be transmitted, before loading the preconfigured asymmetric encryption algorithm table, the method further comprises:
    建立数据共享网络。Establish a data sharing network.
  8. 根据权利要求7所述的方法,其中,所述数据共享网络是一个内部建立的局域网,或者内网。The method according to claim 7, wherein the data sharing network is an internally established local area network or an intranet.
  9. 根据权利要求8所述的方法,其中,所述数据共享网络连接至区块链网络。The method of claim 8, wherein the data sharing network is connected to a blockchain network.
  10. 根据权利要求9所述的方法,其中,所述区块链网络保存有当前主机进行数据加密的私钥。The method according to claim 9, wherein the blockchain network stores the private key of the current host for data encryption.
  11. 根据权利要求7所述的方法,其中,所述建立数据共享网络之后,还包括:The method according to claim 7, wherein after establishing the data sharing network, the method further comprises:
    多个主机加入到所述数据共享网络。Multiple hosts join the data sharing network.
  12. 根据权利要求1所述的方法,其中,所述非对称加密算法表是预先设定的一个非对称加密算法库,所述非对称加密算法库中保存了多个不同的非对称加密算法。The method according to claim 1, wherein the asymmetric encryption algorithm table is a preset asymmetric encryption algorithm library, and a plurality of different asymmetric encryption algorithms are stored in the asymmetric encryption algorithm library.
  13. 根据权利要求12所述的方法,其特征在于,所述多个不同的非对称加密算法中每个非对称加密算法有优先级。The method according to claim 12, wherein each asymmetric encryption algorithm in the plurality of different asymmetric encryption algorithms has a priority.
  14. [根据细则26改正19.05.2021] 
    根据权利要求12所述的方法,其中,所述非对称加密算法库中的非对称加密算法随着时间的变化自动更新。
    [Corrected 19.05.2021 according to Rule 26]
    The method according to claim 12, wherein the asymmetric encryption algorithms in the asymmetric encryption algorithm library are automatically updated as time changes.
  15. [根据细则26改正19.05.2021] 
    根据权利要求12所述的方法,其中,所述每个非对称加密算法的优先级是预先设定的。
    [Corrected 19.05.2021 according to Rule 26]
    13. The method of claim 12, wherein the priority of each asymmetric encryption algorithm is preset.
  16. [根据细则26改正19.05.2021] 
    根据权利要求1所述的方法,其中,所述内部多个芯片为所述数据共享网络中数据传输时的通信芯片。
    [Corrected 19.05.2021 according to Rule 26]
    The method according to claim 1, wherein the plurality of internal chips are communication chips during data transmission in the data sharing network.
  17. 一种数据传输方法,应用于第二客户端,其中,所述方法包括:A data transmission method, applied to a second client, wherein the method comprises:
    当接收到所述第一客户端针对所述第二客户端发送的数据访问请求时,获取所述第一客户端针对所述第二客户端发送的密文数据;When receiving a data access request sent by the first client to the second client, acquiring ciphertext data sent by the first client to the second client;
    获取所述第一客户端的公钥,并基于所述第一客户端的公钥对所述密文数据进行解密,解密成功后生成明文数据;Obtaining the public key of the first client, and decrypting the ciphertext data based on the public key of the first client, and generating plaintext data after successful decryption;
    基于所述明文数据获取第一客户端所需的数据信息,并加载非对称加密算法表;Obtain data information required by the first client based on the plaintext data, and load the asymmetric encryption algorithm table;
    确定出所述第一客户端所需的数据信息对应的保密等级;determining the security level corresponding to the data information required by the first client;
    基于所述保密等级从所述非对称加密算法表中获取当前时刻对应的非对称加密算法;Obtain the asymmetric encryption algorithm corresponding to the current moment from the asymmetric encryption algorithm table based on the security level;
    基于所述第一客户端的公钥以及所述当前时刻对应的非对称加密算法将所述第一客户端所需的数据信息进行加密,生成加密后的数据信息;Encrypting the data information required by the first client based on the public key of the first client and the asymmetric encryption algorithm corresponding to the current moment, to generate encrypted data information;
    检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取第二私钥数据;Detect whether the data communication between multiple internal chips has been intruded, and collect the current face image for authorization authentication when not intruded, and extract the second private key data from the preset key database after the authentication is successful;
    基于所述第二私钥数据以及所述当前时刻对应的非对称加密算法对所述加密后的数据信息再次加密,生成二次加密后的密文数据;Re-encrypt the encrypted data information based on the second private key data and the asymmetric encryption algorithm corresponding to the current moment to generate secondary encrypted ciphertext data;
    将所述二次加密后的密文数据通过预先建立的数据共享网络响应至第一客户端。The ciphertext data after the secondary encryption is responded to the first client through the pre-established data sharing network.
  18. 一种数据传输装置,应用于第一客户端,其中,所述装置包括:A data transmission device, applied to a first client, wherein the device comprises:
    待传输数据检测模块,用于当检测到存在待传输的明文数据时,加载预先配置的非对称加密算法表;A data-to-be-transmitted detection module, configured to load a pre-configured asymmetric encryption algorithm table when it is detected that there is plaintext data to be transmitted;
    最优非对称加密算法确定模块,用于获取所述非对称加密算法表中各非对 称加密算法的优先级,基于所述优先级的高低顺序确定最优非对称加密算法;an optimal asymmetric encryption algorithm determination module, used for obtaining the priority of each asymmetric encryption algorithm in the asymmetric encryption algorithm table, and determining the optimal asymmetric encryption algorithm based on the high and low order of the priority;
    私钥数据提取模块,用于检测内部多个芯片之间的数据通信是否遭受入侵,当没有遭受入侵时采集当前人脸图像进行权限认证,认证成功后从预先设定的密钥数据库提取私钥数据;The private key data extraction module is used to detect whether the data communication between multiple internal chips has been intruded. When there is no intrusion, the current face image is collected for authorization authentication. After the authentication is successful, the private key is extracted from the preset key database. data;
    数据加密模块,用于基于所述最优非对称加密算法和所述私钥数据对所述待传输的明文数据进行加密,生成密文数据;a data encryption module, configured to encrypt the plaintext data to be transmitted based on the optimal asymmetric encryption algorithm and the private key data to generate ciphertext data;
    密文数据发送模块,用于将所述密文数据通过预先建立的数据共享网络发送至第二客户端。The ciphertext data sending module is configured to send the ciphertext data to the second client through the pre-established data sharing network.
  19. 一种终端,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行如权利要求1至17中任一项权利要求所述数据传输方法的步骤。A terminal, comprising a memory and a processor, the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor causes the processor to execute any one of claims 1 to 17 The steps of the data transmission method of claim 1.
  20. 一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行如权利要求1至17中任一项权利要求所述数据传输的步骤。A storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the execution of any one of claims 1 to 17 Steps of data transfer.
PCT/CN2021/091116 2020-12-15 2021-04-29 Data transmission method and apparatus, terminal, and storage medium WO2022126980A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011476863.8 2020-12-15
CN202011476863.8A CN112637166B (en) 2020-12-15 2020-12-15 Data transmission method, device, terminal and storage medium

Publications (1)

Publication Number Publication Date
WO2022126980A1 true WO2022126980A1 (en) 2022-06-23

Family

ID=75313054

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/091116 WO2022126980A1 (en) 2020-12-15 2021-04-29 Data transmission method and apparatus, terminal, and storage medium

Country Status (2)

Country Link
CN (1) CN112637166B (en)
WO (1) WO2022126980A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115001864A (en) * 2022-07-27 2022-09-02 深圳市西昊智能家具有限公司 Communication authentication method and device for intelligent furniture, computer equipment and storage medium
CN115567506A (en) * 2022-08-08 2023-01-03 山东日照发电有限公司 Data transmission method and system based on FTP (File transfer protocol)
CN116155634A (en) * 2023-04-23 2023-05-23 驿羚江苏大数据有限公司 Charging process safety protection method and system based on SaaS mode
CN116226886A (en) * 2023-03-22 2023-06-06 中国移动通信集团广东有限公司 Information security management method and system for software information system
CN116436697A (en) * 2023-06-07 2023-07-14 北京华云安信息技术有限公司 Data transmission encryption and decryption method and device, electronic equipment and storage medium
CN116528042A (en) * 2023-06-29 2023-08-01 深圳市巨龙创视科技有限公司 Control method and system for remote camera

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112637166B (en) * 2020-12-15 2022-07-22 平安科技(深圳)有限公司 Data transmission method, device, terminal and storage medium
CN113486380B (en) * 2021-07-23 2023-04-11 西安万像电子科技有限公司 Encryption method of text file
CN113852604A (en) * 2021-08-13 2021-12-28 青岛海尔科技有限公司 Plaintext data transmission method and apparatus, storage medium, and electronic apparatus
CN113688433A (en) * 2021-09-01 2021-11-23 广州众诺电子技术有限公司 Anti-cracking method and device for consumable chip, electronic equipment and computer-readable storage medium
CN114584300B (en) * 2022-03-02 2024-02-02 中国科学院国家授时中心 Encryption and decryption method and system for bidirectional time service
CN116150796B (en) * 2023-04-18 2023-12-08 安羚科技(杭州)有限公司 Data protection method and device for data leakage prevention system
CN117650946A (en) * 2024-01-29 2024-03-05 永鼎行远(南京)信息科技有限公司 Method for trusted data exchange channel

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140064478A1 (en) * 2012-08-31 2014-03-06 Tata Consultancy Services Limited User input based data encryption
CN105069365A (en) * 2015-06-30 2015-11-18 广东欧珀移动通信有限公司 Data processing method and mobile terminal
CN106899562A (en) * 2016-04-21 2017-06-27 中国移动通信有限公司研究院 The secure algorithm negotiation method of Internet of Things, network element and internet-of-things terminal
CN108880791A (en) * 2018-05-30 2018-11-23 招商银行股份有限公司 Cryptographic key protection method, terminal and computer readable storage medium
CN110166242A (en) * 2019-05-22 2019-08-23 吉林亿联银行股份有限公司 Message transmitting method and device
CN111835511A (en) * 2020-06-30 2020-10-27 平安国际智慧城市科技股份有限公司 Data security transmission method and device, computer equipment and storage medium
CN112637166A (en) * 2020-12-15 2021-04-09 平安科技(深圳)有限公司 Data transmission method, device, terminal and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100561917C (en) * 2004-06-04 2009-11-18 中兴通讯股份有限公司 Select the method for cryptographic algorithm in a kind of wireless communication system
CN103001976A (en) * 2012-12-28 2013-03-27 中国科学院计算机网络信息中心 Safe network information transmission method
CN107194237B (en) * 2017-04-05 2020-04-03 百富计算机技术(深圳)有限公司 Method and device for application program security authentication, computer equipment and storage medium
CN111614467B (en) * 2020-04-29 2022-08-19 深圳奇迹智慧网络有限公司 System backdoor defense method and device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140064478A1 (en) * 2012-08-31 2014-03-06 Tata Consultancy Services Limited User input based data encryption
CN105069365A (en) * 2015-06-30 2015-11-18 广东欧珀移动通信有限公司 Data processing method and mobile terminal
CN106899562A (en) * 2016-04-21 2017-06-27 中国移动通信有限公司研究院 The secure algorithm negotiation method of Internet of Things, network element and internet-of-things terminal
CN108880791A (en) * 2018-05-30 2018-11-23 招商银行股份有限公司 Cryptographic key protection method, terminal and computer readable storage medium
CN110166242A (en) * 2019-05-22 2019-08-23 吉林亿联银行股份有限公司 Message transmitting method and device
CN111835511A (en) * 2020-06-30 2020-10-27 平安国际智慧城市科技股份有限公司 Data security transmission method and device, computer equipment and storage medium
CN112637166A (en) * 2020-12-15 2021-04-09 平安科技(深圳)有限公司 Data transmission method, device, terminal and storage medium

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115001864A (en) * 2022-07-27 2022-09-02 深圳市西昊智能家具有限公司 Communication authentication method and device for intelligent furniture, computer equipment and storage medium
CN115567506A (en) * 2022-08-08 2023-01-03 山东日照发电有限公司 Data transmission method and system based on FTP (File transfer protocol)
CN116226886A (en) * 2023-03-22 2023-06-06 中国移动通信集团广东有限公司 Information security management method and system for software information system
CN116226886B (en) * 2023-03-22 2024-02-09 中国移动通信集团广东有限公司 Information security management method and system for software information system
CN116155634A (en) * 2023-04-23 2023-05-23 驿羚江苏大数据有限公司 Charging process safety protection method and system based on SaaS mode
CN116155634B (en) * 2023-04-23 2023-08-04 驿羚江苏大数据有限公司 Charging process safety protection method and system based on SaaS mode
CN116436697A (en) * 2023-06-07 2023-07-14 北京华云安信息技术有限公司 Data transmission encryption and decryption method and device, electronic equipment and storage medium
CN116436697B (en) * 2023-06-07 2023-09-12 北京华云安信息技术有限公司 Data transmission encryption and decryption method and device, electronic equipment and storage medium
CN116528042A (en) * 2023-06-29 2023-08-01 深圳市巨龙创视科技有限公司 Control method and system for remote camera
CN116528042B (en) * 2023-06-29 2023-10-27 深圳市巨龙创视科技有限公司 Control method and system for remote camera

Also Published As

Publication number Publication date
CN112637166B (en) 2022-07-22
CN112637166A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
WO2022126980A1 (en) Data transmission method and apparatus, terminal, and storage medium
CN110799941B (en) Anti-theft and tamper-proof data protection
US20210328773A1 (en) Trusted startup methods and apparatuses of blockchain integrated station
US9219722B2 (en) Unclonable ID based chip-to-chip communication
US11546348B2 (en) Data service system
US10887085B2 (en) System and method for controlling usage of cryptographic keys
US10601590B1 (en) Secure secrets in hardware security module for use by protected function in trusted execution environment
US20240061790A1 (en) Locally-stored remote block data integrity
WO2022022009A1 (en) Message processing method and apparatus, device, and storage medium
CN111294203B (en) Information transmission method
US11086986B2 (en) Processing control apparatus, processing control method, and non-transitory recoding medium
CN111917540A (en) Data encryption and decryption method and device, mobile terminal and storage medium
US8402278B2 (en) Method and system for protecting data
CN112733180A (en) Data query method and device and electronic equipment
EP4096160A1 (en) Shared secret implementation of proxied cryptographic keys
CN114244508A (en) Data encryption method, device, equipment and storage medium
CN114915503A (en) Data stream splitting processing encryption method based on security chip and security chip device
CN115118446A (en) Data security control method and system
KR20210090635A (en) private key cloud storage
US11804969B2 (en) Establishing trust between two devices for secure peer-to-peer communication
CN114329574B (en) Encrypted partition access control method and system based on domain management platform and computing equipment
CN113452654B (en) Data decryption method
US20240048532A1 (en) Data exchange protection and governance system
EP3433992B1 (en) Cloud storage of data
KR20230102761A (en) User data decryption method according to decryption information

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 08/08/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21904919

Country of ref document: EP

Kind code of ref document: A1