Data interaction method, device, system and electronic equipment
The dual encryption and decryption method of encrypting the associated data and mapping it on the elliptic curve through a preset key solves the problem of insufficient data transmission security in the prior art, and achieves higher data transmission security and correctness.
Patent Information
- Application Number
- CN202110621476.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-03
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-06-03
AI Technical Summary
In the existing data transmission method, the MD5 password hash function used is insufficient in security, resulting in data being easily leaked during the acquisition process and unable to effectively protect user privacy.
The associated data is encrypted using a preset key, encrypted data is generated, and the password hash is mapped to the elliptic curve through an interchangeable cipher algorithm, and double encryption and decryption operations are performed to ensure the security of data transmission.
Through the dual encryption and decryption process, the risk of data leakage is significantly reduced, the security of data transmission is enhanced, and the correct transmission of data is ensured.
Smart Images

Figure CN113360923B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data interaction, and in particular to a data interaction method, device, system and electronic equipment. Background Art
[0002] With the popularization of big data technology, machine learning and other technologies, data plays an increasingly important role in all walks of life. It is usually difficult for a single enterprise or organization to collect panoramic user data. In order to reduce the risk of data leakage, the traditional data transmission method processes the data to be transmitted through a simple cryptographic hash function and converts it into an irreversible cryptographic hash. The security of the widely used MD5 cryptographic hash function cannot be guaranteed, which can easily cause actual data leakage in the process of obtaining user data. Summary of the invention
[0003] Therefore, the technical problem to be solved by the present invention is to overcome the defects of data leakage caused by the existing data acquisition process, thereby providing a data interaction method, device, system and electronic device.
[0004] According to the first aspect, the embodiment of the present invention discloses a data interaction method, including: encrypting associated data according to a preset first key to generate first encrypted data; sending the first encrypted data and its first identification data to a receiving end, and obtaining second encrypted data fed back by the receiving end according to the first encrypted data and identification data and a second identification data set matching the first identification data, wherein the second encrypted data is obtained by the receiving end encrypting the first encrypted data according to a preset second key; decrypting the second encrypted data according to the first key to obtain third decrypted data, and searching for a third identification data set matching the third decrypted data in the second identification data set; decrypting the third identification data set according to the first key to obtain corresponding associated data. The risk of leakage of user personal privacy is reduced, and the security during data transmission is increased.
[0005] Optionally, the data interaction method further includes: sending the third decrypted data included in the second identification data set to the receiving end.
[0006] Optionally, the data interaction method, encrypting the associated data according to a preset first key to generate the first encrypted data, includes: encrypting the associated data according to the preset first key to generate the first encrypted data includes: calculating a cryptographic hash of the associated data; mapping the cryptographic hash to an elliptic curve based on a commutative cryptographic algorithm; generating the first encrypted data based on the cryptographic hash mapped to a point on the elliptic curve and the first key.
[0007] According to the second aspect, an embodiment of the present invention also discloses a data interaction method, including: obtaining first encrypted data and first identification data sent by a sender, the first encrypted data being generated by the sender by encrypting associated data according to a preset first key; encrypting the first encrypted data according to a preset second key to obtain second encrypted data; searching for a second identification data set matching the first identification data in the associated data, and feeding back the second encrypted data and the second identification data set to the sender, the second identification data set being third encrypted data corresponding to the associated data matching the first identification data, and the third encrypted data being generated by encrypting the associated data according to the preset second key.
[0008] Optionally, the data interaction method also includes: obtaining a third identification data set sent by the sender, the third identification data set being third encrypted data in the second identification data set that matches third decrypted data, the third decrypted data being decrypted data generated by the sender by decrypting the second encrypted data according to the first key; decrypting the third identification data set according to the second key to obtain the corresponding associated data.
[0009] Optionally, the process of encrypting the associated data according to a preset second key to generate the third encrypted data in the data interaction method includes: the process of encrypting the associated data according to the preset second key to generate the third encrypted data includes: calculating the cryptographic hash of the associated data; mapping the cryptographic hash to an elliptic curve based on a commutative cryptographic algorithm; generating the third encrypted data based on the cryptographic hash mapped to a point on the elliptic curve and the second key.
[0010] According to the third aspect, the embodiment of the present invention also discloses a data interaction system, including: a sending end and a receiving end, wherein the sending end is used to encrypt the associated data according to a preset first key to generate first encrypted data; the sending end is used to send the first encrypted data and its first identification data to the receiving end; the receiving end is used to obtain the first encrypted data and the first identification data sent by the sending end, and encrypt the first encrypted data according to a preset second key to obtain the second encrypted data, wherein the first encrypted data is generated by the sending end encrypting the associated data according to the preset first key; the receiving end is used to search for a second identification data set matching the first identification data in the associated data, and feed back the second encrypted data and the second identification data set to the sending end, wherein the second identification data set is the third encrypted data corresponding to the associated data matching the first identification data, and the third encrypted data is generated by encrypting the associated data according to the preset second key. The sending end is used to obtain the second encrypted data and the second identification data set sent by the receiving end, decrypt the second encrypted data according to the first key to obtain the third decrypted data, and search for a third identification data set matching the third decrypted data in the second identification data set; the sending end is used to decrypt the third identification data set according to the first key to obtain the corresponding associated data.
[0011] According to the fourth aspect, an embodiment of the present invention also discloses a data interaction device, including: a first encryption module, used to encrypt associated data according to a preset first key to generate first encrypted data; a first feedback module, used to send the first encrypted data and its first identification data to a receiving end, and obtain the second encrypted data and a second identification data set matching the first identification data fed back by the receiving end according to the first encrypted data and the identification data, wherein the second encrypted data is obtained by the receiving end encrypting the first encrypted data according to a preset second key; a decryption module, used to decrypt the second encrypted data according to the first key to obtain third decrypted data, and search for a third identification data set matching the third decrypted data in the second identification data set; a first acquisition module, decrypting the third identification data set according to the first key to obtain corresponding associated data.
[0012] According to the fifth aspect, an embodiment of the present invention also discloses a data interaction device, including: a second acquisition module, used to acquire first encrypted data and first identification data sent by a sender, the first encrypted data being generated by the sender by encrypting associated data according to a preset first key; a second encryption module, used to encrypt the first encrypted data according to a preset second key to obtain second encrypted data; a second feedback module, used to search for a second identification data set matching the first identification data in the associated data, and feed back the second encrypted data and the second identification data set to the sender, the second identification data set being third encrypted data corresponding to the associated data matching the first identification data, and the third encrypted data being generated by encrypting the associated data according to the preset second key.
[0013] According to the sixth aspect, an embodiment of the present invention also discloses an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor performs the steps of the data interaction method described in the first aspect or any optional embodiment of the first aspect or the second aspect or any optional embodiment of the second aspect.
[0014] According to the seventh aspect, an embodiment of the present invention further discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the data interaction method as described in the first aspect or the first aspect or the second aspect or any optional embodiment of the second aspect.
[0015] The technical solution of the present invention has the following advantages:
[0016] The data interaction method, device, system and electronic device provided by the present invention encrypts the associated data according to the preset first key to generate the first encrypted data; sends the first encrypted data and its first identification data to the receiving end, and obtains the second encrypted data fed back by the receiving end according to the first encrypted data and identification data and the second identification data set matching the first identification data, wherein the second encrypted data is obtained by the receiving end encrypting the first encrypted data according to the preset second key; decrypts the second encrypted data according to the first key to obtain the third decrypted data, and searches the second identification data set for the third decrypted data matching the third decrypted data; obtains the associated data corresponding to the third decrypted data matching the second identification data set. According to the double encryption of the sending end and the receiving end, the data is more secure and reliable during the interaction process, and the corresponding associated data is transmitted according to the identification data, which ensures the correctness of the data. The whole interaction process effectively reduces the risk of data leakage and increases security. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 This is a specific application scenario in the embodiment of the present invention;
[0019] Figure 2 An interactive scene diagram of a specific embodiment of the present invention;
[0020] Figure 3 A flowchart of a specific example of a data interaction method in an embodiment of the present invention;
[0021] Figure 4 A flowchart of a specific example of a data interaction method in an embodiment of the present invention;
[0022] Figure 5 A principle block diagram of a specific example of a data interaction method and device in an embodiment of the present invention;
[0023] Figure 6 A principle block diagram of a specific example of a data interaction method and device in an embodiment of the present invention;
[0024] Figure 7 FIG. 4 is a specific example diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0027] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, it can also be the internal connection of two components, it can be a wireless connection, or it can be a wired connection. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0028] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0029] like Figure 1 The figure is a schematic diagram of an application scenario of a specific embodiment of the present invention. The data interaction system includes a sending end and a receiving end, both of which are data information interaction devices of enterprises and platform institutions that can read databases. When an enterprise needs to expand existing data by accessing external data, the sending end and the receiving end interact with related data, and the sending end obtains the required related data information from the receiving end.
[0030] Figure 2 The flowchart of the process of data interaction between different databases according to a specific embodiment of the present invention is shown as follows. Figure 1 In the data interaction system shown, the process of data interaction in the data interaction system mainly includes:
[0031] Step 201: The sending end encrypts the associated data according to a preset first key to generate first encrypted data.
[0032] Exemplarily, the first key ka can be any large integer selected randomly; the associated data is an identifier that can identify a specific identity, such as a mobile phone number, name, ID number, mobile phone IMEI device number, etc., and two or more of the identity identifiers are used as associated data. The embodiment of the present invention does not limit the type of identity identifier contained in the associated data, and those skilled in the art can determine it according to actual needs; the encryption process is that the sender needs to convert the associated data into a hash value cryptographic hash, and the conversion method used can be a SHA-256 cryptographic hash function to calculate the hash value. For example, the sender's associated data is a mobile phone number 13900000000, and its SHA256 hash The hash value is 76b3bc961ab030f63500d07b0904b200b28c01e47bc8e59e979885634dfa0a4c. The conversion process can also be completed by other cryptographic hash functions such as MD5, SM3, SHA-224, SHA-384, SHA-512, RIPEMD-128, RIPEMD-160, RIPEMD-256, RIPEMD-320, Keccak and other algorithms. The embodiment of the present invention does not limit the type of cryptographic hash algorithm used to convert the associated data, and those skilled in the art can determine it according to actual needs. After the cryptographic hash is calculated through the above process, the obtained cryptographic hash is mapped one by one to the exchangeable cryptographic system, such as mapping to the elliptic curve system to obtain point 1 on the elliptic curve, and the first encrypted data is obtained by multiplying the first key ka and the point on the elliptic curve one by one, that is, point 2 on the elliptic curve.
[0033] Step 202: The sending end sends the first encrypted data and its first identification data to the receiving end.
[0034] Exemplarily, the first identification data is characteristic data that needs to be matched with the receiving end for data matching. In the embodiment of the present invention, the first identification data can be several prefix bytes of the cryptographic hash of the associated data hash value. For example, in the above step 201, the converted cryptographic hash is 76b3bc961ab030f63500d07b0904b200b28c01e47bc8e59e979885634dfa0a4c, and the first 3 bytes of the hash value are sent, that is, 76b3bc is the first identification data. The embodiment of the present invention does not limit the type of the first identification data, and those skilled in the art can determine it according to actual needs. For example, in the case of a smaller amount of data, the prefix bytes may not be sent, and the entire cryptographic hash may be sent directly.
[0035] Step 203, the receiving end is used to obtain the first encrypted data and the first identification data sent by the sending end, and encrypt the first encrypted data according to the preset second key to obtain the second encrypted data, where the first encrypted data is generated by the sending end by encrypting the associated data according to the preset first key; and search the receiving end associated data for the second identification data set that matches the first identification data, where the second identification data set is the third encrypted data corresponding to the associated data that matches the first identification data, and the third encrypted data is generated by encrypting the associated data according to the preset second key.
[0036] Exemplarily, the second key kb can be any large integer selected randomly; the second encrypted data is point 3 on the elliptic curve obtained by multiplying the second key kb by point 2 on the elliptic curve corresponding to the first encrypted data at the receiving end; the second identification data set is the first encrypted data of the receiving end corresponding to the cryptographic hash of the associated data hash value in the receiving end that matches the prefix byte of the hash value of the associated data of the first identification data, and the third encrypted data is the set 1 of points on the elliptic curve of the first encrypted data of the associated data of the receiving end.
[0037] Step 204: The receiving end feeds back the second encrypted data and the second identification data set to the sending end.
[0038] In step 205, the sending end is used to obtain the second encrypted data and the second identification data set sent by the receiving end, decrypt the second encrypted data according to the first key to obtain third decrypted data, and search the second identification data set for a third identification data set that matches the third decrypted data in the second identification data set, and decrypt the third identification data set according to the first key to obtain corresponding associated data.
[0039] Exemplarily, the decryption process is to calculate the inverse element of the first key ka and point 2 on the second encrypted data elliptic curve to obtain point 3 on the third decrypted data elliptic curve, and search for a point on the third decrypted data elliptic curve that matches the first encrypted data obtained by the receiving end. If there is a point, the corresponding point is recorded, and the first key ka and the inverse element of the point are calculated to obtain the hash value cryptographic hash of the corresponding associated data, thereby obtaining the corresponding associated data.
[0040] Step 206: The sending end sends a third identification data set, where the third identification data set is third encrypted data in the second identification data set that matches the third decrypted data, and the third decrypted data is decrypted data generated by the sending end by decrypting the second encrypted data according to the first key.
[0041] Step 207: The receiving end decrypts the third identification data set fed back by the sending end according to the second key to obtain the corresponding associated data.
[0042] Exemplarily, after the sending end obtains the corresponding associated data, if it is necessary to disclose the transmitted data to the receiving end, the inverse element of the third identification data set and the second key kb is calculated to obtain the corresponding associated data.
[0043] The present invention provides a data interaction system, which encrypts associated data according to a preset first key to generate first encrypted data; sends the first encrypted data and its first identification data to a receiving end, and obtains second encrypted data fed back by the receiving end according to the first encrypted data and identification data and a second identification data set matching the first identification data, wherein the second encrypted data is obtained by the receiving end encrypting the first encrypted data according to a preset second key; decrypts the second encrypted data according to the first key to obtain third decrypted data, and searches for a third identification data set matching the third decrypted data in the second identification data set; obtains associated data corresponding to the third decrypted data matching the second identification data set. According to the double encryption of the sending end and the receiving end, the data is more secure and reliable during the interaction process, and the corresponding associated data is transmitted according to the identification data, which ensures the correctness of the data. The entire interaction process effectively reduces the risk of data leakage and increases security.
[0044] As an optional embodiment of the present invention, in the system, after the sending end finds the matching third decrypted data in the first encrypted data set of the receiving end, the sending end further performs the following process: sending the third decrypted data contained in the second identification data set to the receiving end.
[0045] Exemplarily, the sending end obtains the associated data corresponding to the receiving end. If the receiving end also needs to know what data the sending end obtains, the third decrypted data matched by the sending end is sent to the receiving end. For the decryption process of the receiving end, please refer to the relevant description of the above step 207, which will not be repeated here.
[0046] As an optional implementation of the present invention, the step 201, encrypting the associated data according to a preset first key, generating the first encrypted data includes: calculating a cryptographic hash of the associated data; mapping the cryptographic hash to an elliptic curve based on a commutative cryptographic algorithm; and generating the first encrypted data based on the cryptographic hash mapped to a point on the elliptic curve and the first key.
[0047] Exemplarily, during the data transmission process, what is actually transmitted is the cryptographic hash of the associated data and the corresponding encrypted cryptographic hash. For the specific implementation, please refer to the relevant description of the above step 201, which will not be repeated here.
[0048] The embodiment of the present invention further discloses a data interaction method. In this embodiment, the data interaction method can be specifically applied to the sending end in the data interaction system described in any of the above embodiments, such as Figure 3 As shown, the method includes:
[0049] Step 301: encrypt the associated data according to a preset first key to generate first encrypted data.
[0050] For example, details are given in the relevant description of step 201 above, which will not be repeated here.
[0051] Step 302: send the first encrypted data and its first identification data to a receiving end, and obtain second encrypted data fed back by the receiving end based on the first encrypted data and identification data and a second identification data set matching the first identification data, wherein the second encrypted data is obtained by the receiving end encrypting the first encrypted data according to a preset second key.
[0052] For example, details are shown in the above-mentioned steps 202, 203 and 204, which will not be described again here.
[0053] Step 303: decrypt the second encrypted data according to the first key to obtain third decrypted data, and search the second identification data set for a third identification data set that matches the third decrypted data.
[0054] For example, the details are shown in the above step 205, which will not be described again here.
[0055] Step 304: decrypt the third identification data set according to the first key to obtain corresponding associated data.
[0056] For example, the details are shown in the above step 205, which will not be described again here.
[0057] The present invention provides a data interaction method, which encrypts associated data according to a preset first key to generate first encrypted data; sends the first encrypted data and its first identification data to a receiving end, and obtains second encrypted data fed back by the receiving end according to the first encrypted data and identification data and a second identification data set matching the first identification data, wherein the second encrypted data is obtained by the receiving end encrypting the first encrypted data according to a preset second key; decrypts the second encrypted data according to the first key to obtain third decrypted data, and searches for a third identification data set matching the third decrypted data in the second identification data set; decrypts the third identification data set according to the first key to obtain corresponding associated data. The data is more secure and reliable during the interaction process, and the corresponding associated data is transmitted according to the identification data, which ensures the correctness of the data. The entire interaction process effectively reduces the risk of data leakage and increases security.
[0058] The embodiment of the present invention further discloses a data interaction method. In this embodiment, the data interaction method can be specifically applied to the receiving end in the data interaction system in any of the above embodiments, such as Figure 4 As shown, the method includes:
[0059] Step 401: Acquire first encrypted data and first identification data sent by a sender, where the first encrypted data is generated by the sender by encrypting associated data according to a preset first key.
[0060] For example, the details are shown in the above step 203, which will not be described again here.
[0061] Step 402, encrypting the first encrypted data according to a preset second key to obtain second encrypted data;
[0062] For example, the details are shown in the above step 203, which will not be described again here.
[0063] Step 403, searching the associated data for a second identification data set that is identical and matches the first identification data obtained from the sending end, and feeding back the second encrypted data and the second identification data set to the sending end, wherein the second identification data set is third encrypted data corresponding to the associated data that matches the first identification data, and the third encrypted data is generated by encrypting the associated data according to a preset second key.
[0064] For example, the details are shown in the above step 203, which will not be described again here.
[0065] A data interaction method provided by an embodiment of the present invention completes cross-platform and cross-institutional diverse data transmission between different platforms, ensures the correctness of data, effectively reduces the risk of data leakage, and increases security.
[0066] The embodiment of the present invention also discloses a data interaction device, such as Figure 5 As shown, the device comprises:
[0067] The first encryption module 501 is used to encrypt the associated data according to a preset first key to generate first encrypted data; illustratively, the details are shown in the relevant description of the above step 201, which will not be repeated here.
[0068] The first feedback module 502 is used to send the first encrypted data and its first identification data to the receiving end, and obtain the second encrypted data fed back by the receiving end based on the first encrypted data and the identification data and a second identification data set matching the first identification data, wherein the second encrypted data is obtained by the receiving end encrypting the first encrypted data according to a preset second key; illustratively, details are shown in the above steps 202, 203 and 204, which will not be repeated here.
[0069] The decryption module 503 is used to decrypt the second encrypted data according to the first key to obtain third decrypted data, and search the second identification data set for a third identification data set that matches the third decrypted data; illustratively, details are shown in the above step 205 and will not be repeated here.
[0070] The first acquisition module 504 decrypts the third identification data set according to the first key to obtain corresponding associated data. For example, see the above step 205 for details, which will not be repeated here.
[0071] A data interaction device provided in an embodiment of the present invention completes cross-platform and cross-institutional diverse data transmission between different platforms by constructing a data interaction device for a sending end, thereby reducing the risk of user personal privacy leakage and increasing security during data transmission.
[0072] The present invention provides a data interaction device, such as Figure 6 As shown, the device comprises:
[0073] The second acquisition module 601 is used to obtain the first encrypted data and the first identification data sent by the sender, where the first encrypted data is generated by the sender by encrypting the associated data according to the preset first key; illustratively, details are shown in the above step 30203, which will not be repeated here.
[0074] The second encryption module 602 is used to encrypt the first encrypted data according to a preset second key to obtain second encrypted data; illustratively, the details are shown in the above step 203 and will not be repeated here.
[0075] The second feedback module 603 is used to search the associated data for a second identification data set that matches the first identification data, and feed back the second encrypted data and the second identification data set to the sending end, wherein the second identification data set is the third encrypted data corresponding to the associated data that matches the first identification data, and the third encrypted data is generated by encrypting the associated data according to the preset second key. For example, see the above step 203 for details, which will not be repeated here.
[0076] A data interaction device provided in an embodiment of the present invention completes cross-platform and cross-institutional diverse data transmission between different platforms by constructing a data interaction device for a receiving end, thereby reducing the risk of user personal privacy leakage and increasing security during data transmission.
[0077] The embodiment of the present invention further provides an electronic device, such as Figure 7 As shown, the electronic device may include a processor 701 and a memory 702, wherein the processor 701 and the memory 702 may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.
[0078] The processor 701 may be a central processing unit (CPU). The processor 701 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0079] The memory 702 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the data interaction method in the embodiment of the present invention. The processor 701 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory 702, that is, the data interaction method in the above method embodiment is implemented.
[0080] The memory 702 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created by the processor 701, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 702 may optionally include a memory remotely arranged relative to the processor 701, and these remote memories may be connected to the processor 701 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0081] The one or more modules are stored in the memory 702, and when executed by the processor 701, the following is performed: Figure 3 or Figure 4 The data interaction method in the illustrated embodiment.
[0082] For details of the above electronic equipment, please refer to Figure 1-Figure 6 The corresponding related descriptions and effects in the illustrated embodiments can be understood and will not be repeated here.
[0083] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0084] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A data interaction method, characterized in that: include: Encrypting the associated data according to a preset first key to generate first encrypted data; Sending the first encrypted data and its first identification data to a receiving end, and obtaining second encrypted data fed back by the receiving end according to the first encrypted data and the identification data and a second identification data set matching the first identification data, wherein the second encrypted data is obtained by the receiving end encrypting the first encrypted data according to a preset second key; Decrypting the second encrypted data according to the first key to obtain third decrypted data, and searching the second identification data set for a third identification data set that matches the third decrypted data; Decrypting the third identification data set according to the first key to obtain corresponding associated data; The step of encrypting the associated data according to the preset first key to generate the first encrypted data comprises: calculating a cryptographic hash of the associated data; Mapping the cryptographic hash onto an elliptic curve based on a commutative cryptographic algorithm; Based on the cryptographic hash mapping to the elliptic curve, a first point on the elliptic curve is obtained, and the first key and the first point on the elliptic curve are multiplied one by one to generate the first encrypted data, which is the point on the second elliptic curve; The second encrypted data is a point on a third elliptic curve obtained by multiplying the point on the second elliptic curve corresponding to the first encrypted data by the second key at the receiving end; The step of decrypting the second encrypted data according to the first key to obtain third decrypted data, and searching the second identification data set for a third identification data set matching the third decrypted data; and decrypting the third identification data set according to the first key to obtain corresponding associated data comprises: Calculate the inverse element of the first key and the point on the second elliptic curve of the second encrypted data to obtain the point on the third elliptic curve of the third decrypted data, search for the point on the third elliptic curve of the third decrypted data that matches the first encrypted data obtained by the receiving end, if there is a point, record the corresponding point, and calculate the first key and the inverse element of the point to obtain the hash value cryptographic hash of the corresponding associated data, thereby obtaining the corresponding associated data.
2. The data interaction method according to claim 1, characterized in that: Also includes: The third decrypted data included in the second identification data set is sent to the receiving end.
3. A data interaction method, characterized in that: include: Acquire first encrypted data and first identification data sent by a sending end, where the first encrypted data is generated by the sending end by encrypting associated data according to a preset first key; Encrypting the first encrypted data according to a preset second key to obtain second encrypted data; Searching for a second identification data set matching the first identification data in the associated data, and feeding back the second encrypted data and the second identification data set to the sending end, wherein the second identification data set is third encrypted data corresponding to the associated data matching the first identification data, and the third encrypted data is generated by encrypting the associated data according to a preset second key; Acquire a third identification data set sent by the sending end, where the third identification data set is third encrypted data in the second identification data set that matches third decrypted data, and the third decrypted data is decrypted data generated by the sending end by decrypting the second encrypted data according to the first key; Decrypting the third identification data set according to the second key to obtain the corresponding associated data; The process of encrypting the associated data according to the preset second key to generate the third encrypted data includes: calculating a cryptographic hash of the associated data; Mapping the cryptographic hash onto an elliptic curve based on a commutative cryptographic algorithm; The third encrypted data is generated based on the cryptographic hash mapping to a point on an elliptic curve and a second key.
4. A data interaction system, characterized in that: include: The sending end and the receiving end, where The sending end is used to encrypt the associated data according to a preset first key to generate first encrypted data; The step of encrypting the associated data according to the preset first key to generate the first encrypted data comprises: calculating a cryptographic hash of the associated data; Mapping the cryptographic hash onto an elliptic curve based on a commutative cryptographic algorithm; Based on the cryptographic hash mapping to the elliptic curve, a first point on the elliptic curve is obtained, and the first key and the first point on the elliptic curve are multiplied one by one to generate the first encrypted data, which is the point on the second elliptic curve; The transmitting end is used to send the first encrypted data and its first identification data to the receiving end; The receiving end is used to obtain the first encrypted data and the first identification data sent by the sending end, and encrypt the first encrypted data according to the preset second key to obtain the second encrypted data, wherein the first encrypted data is generated by the sending end by encrypting the associated data according to the preset first key, and the second encrypted data is a point on a third elliptic curve obtained by multiplying the receiving end according to the second key and the point on the second elliptic curve corresponding to the first encrypted data one by one; The receiving end is used to search the associated data for a second identification data set matching the first identification data, and feed back the second encrypted data and the second identification data set to the sending end, where the second identification data set is third encrypted data corresponding to the associated data matching the first identification data, and the third encrypted data is generated by encrypting the associated data according to a preset second key; The transmitting end is used to obtain the second encrypted data and the second identification data set sent by the receiving end, decrypt the second encrypted data according to the first key to obtain third decrypted data, and search the second identification data set for a third identification data set that matches the third decrypted data; The sending end is used to decrypt the third identification data set according to the first key to obtain corresponding associated data; The step of decrypting the second encrypted data according to the first key to obtain third decrypted data, and searching the second identification data set for a third identification data set matching the third decrypted data; and decrypting the third identification data set according to the first key to obtain corresponding associated data comprises: Calculate the inverse element of the first key and the point on the second elliptic curve of the second encrypted data to obtain the point on the third elliptic curve of the third decrypted data, search for a point on the third elliptic curve of the third decrypted data that matches the first encrypted data of the receiving end, if there is a point, record the corresponding point, and calculate the first key and the inverse element of the point to obtain a hash value cryptographic hash of the corresponding associated data, thereby obtaining the corresponding associated data; The receiving end is used to obtain a third identification data set sent by the sending end, where the third identification data set is third encrypted data in the second identification data set that matches third decrypted data, and the third decrypted data is decrypted data generated by the sending end by decrypting the second encrypted data according to the first key; The receiving end is used to decrypt the third identification data set according to the second key to obtain the corresponding associated data; The process of encrypting the associated data according to the preset second key to generate the third encrypted data includes: calculating a cryptographic hash of the associated data; Mapping the cryptographic hash onto an elliptic curve based on a commutative cryptographic algorithm; The third encrypted data is generated based on the cryptographic hash mapping to a point on an elliptic curve and a second key.
5. A data interaction device, characterized in that: include: A first encryption module, used to encrypt the associated data according to a preset first key to generate first encrypted data; A first feedback module is used to send the first encrypted data and its first identification data to a receiving end, and obtain second encrypted data fed back by the receiving end according to the first encrypted data and the identification data and a second identification data set matching the first identification data, wherein the second encrypted data is obtained by the receiving end encrypting the first encrypted data according to a preset second key; a decryption module, configured to decrypt the second encrypted data according to the first key to obtain third decrypted data, and search the second identification data set for a third identification data set that matches the third decrypted data; A first acquisition module, decrypting the third identification data set according to the first key to obtain corresponding associated data; The step of encrypting the associated data according to the preset first key to generate the first encrypted data comprises: calculating a cryptographic hash of the associated data; Mapping the cryptographic hash onto an elliptic curve based on a commutative cryptographic algorithm; Based on the cryptographic hash mapping to the elliptic curve, a first point on the elliptic curve is obtained, and the first key and the first point on the elliptic curve are multiplied one by one to generate the first encrypted data, which is the point on the second elliptic curve; The second encrypted data is a point on a third elliptic curve obtained by multiplying the point on the second elliptic curve corresponding to the first encrypted data by the second key at the receiving end; The step of decrypting the second encrypted data according to the first key to obtain third decrypted data, and searching the second identification data set for a third identification data set matching the third decrypted data; and decrypting the third identification data set according to the first key to obtain corresponding associated data comprises: Calculate the inverse element of the first key and the point on the second elliptic curve of the second encrypted data to obtain the point on the third elliptic curve of the third decrypted data, search for the point on the third elliptic curve of the third decrypted data that matches the first encrypted data obtained by the receiving end, if there is a point, record the corresponding point, and calculate the first key and the inverse element of the point to obtain the hash value cryptographic hash of the corresponding associated data, thereby obtaining the corresponding associated data.
6. A data interaction device, characterized in that: include: A second acquisition module is used to acquire first encrypted data and first identification data sent by a sending end, where the first encrypted data is generated by the sending end by encrypting associated data according to a preset first key; A second encryption module, used to encrypt the first encrypted data according to a preset second key to obtain second encrypted data; a second feedback module, configured to search the associated data for a second identification data set matching the first identification data, and feed back the second encrypted data and the second identification data set to the sending end, wherein the second identification data set is third encrypted data corresponding to the associated data matching the first identification data, and the third encrypted data is generated by encrypting the associated data according to a preset second key; Acquire a third identification data set sent by the sending end, where the third identification data set is third encrypted data in the second identification data set that matches third decrypted data, and the third decrypted data is decrypted data generated by the sending end by decrypting the second encrypted data according to the first key; Decrypting the third identification data set according to the second key to obtain the corresponding associated data; The process of encrypting the associated data according to the preset second key to generate the third encrypted data includes: calculating a cryptographic hash of the associated data; Mapping the cryptographic hash onto an elliptic curve based on a commutative cryptographic algorithm; The third encrypted data is generated based on the cryptographic hash mapping to a point on an elliptic curve and a second key.
7. An electronic device, characterized in that: include: at least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor performs the steps of the data interaction method as described in any one of claims 1-3.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the data interaction method according to any one of claims 1 to 3 are implemented.
