A data transmission method and system based on OT extension protocol

By merging and serializing the four rounds of communication in the OT extension protocol, the problem of excessive number of connections in the OT extension protocol is solved, and network performance is improved, especially in environments with limited network connections or performance bottlenecks.

CN115987573BActive Publication Date: 2025-09-26CHINA CITIC BANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211548700.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-05
Publication Date
2025-09-26
Estimated Expiration
2042-12-05

AI Technical Summary

Technical Problem

Existing OT extension protocols involve a large number of connection establishment operations in network communications, resulting in excessive network connection overhead and affecting protocol performance, especially when the amount of data continues to grow.

Method used

By redesigning the four-round communication process of the OT extension protocol, homogeneous and similar data are merged and serialized, reducing the number of connections and optimizing the communication process.

Benefits of technology

Without affecting the security of the protocol, it significantly reduces communication overhead and improves network performance, especially in scenarios with limited network connections or performance bottlenecks, such as blockchain application environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115987573B_ABST
    Figure CN115987573B_ABST
Patent Text Reader

Abstract

The present invention relates to a data transmission method and system based on the OT extension protocol, comprising: a server generating a public key set and sending the public key set to a client; a client generating a secret key set based on the public key set and sending it to the server; the server generating a random matrix ciphertext set based on the secret key set and sending it to the client; the client encrypting data based on the random matrix ciphertext set, generating an encryption matrix, and sending the encryption matrix to the server; the server encrypting data using the encryption matrix, generating an encrypted data set and sending it to the client; the client performing calculations based on the encrypted data set to generate a calculation result data set, and sending the calculation result data set to the server. The present invention solves the problem of excessive connection operations at the network communication layer and improves the performance of the OT extension protocol.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data transmission method and system based on an OT extension protocol. Background Art

[0002] The Oblivious Transfer (OT) protocol, also known as the Oblivious Transfer (OT) protocol, is a privacy-preserving, two-party communication protocol that enables both parties to transmit messages in a selectively ambiguous manner. The OT protocol is a fundamental cryptographic protocol that allows the receiver of a service to inadvertently obtain certain messages input by the sender, thereby protecting the receiver's privacy from the sender. Specifically, it is an interactive protocol between a receiver and a sender. Because the OT protocol ensures data security between both parties, it has been widely used in various fields.

[0003] An oblivious transfer requires multiple rounds of interaction between the sender and the receiver. In actual application scenarios, we often need to complete a large number of oblivious transfers at a time. If the original oblivious transfer protocol is used to implement it each time, the efficiency will be very low. Therefore, some researchers have proposed the Oblivious Transfer Extension (OTExtension) protocol, the purpose of which is to achieve an arbitrary number of oblivious transfers by executing the oblivious protocol a fixed number of times. However, the network communication layer in the current OT extension protocol involves a large number of connection establishment operations. When the amount of data continues to grow, there will be a lot of network connection establishment overhead, which will affect the overall performance of the protocol. Summary of the Invention

[0004] To address the shortcomings of the existing technology, the present invention proposes a data transmission method and system based on the OT extension protocol. On the basis of the OT extension protocol, the four-round communication process is redesigned, and homogeneous and similar data are merged and serialized, thereby completing the data exchange process with far fewer connections than the existing solution.

[0005] To achieve the above objectives, the technical solutions adopted by the present invention include:

[0006] A data transmission method based on an OT extension protocol, comprising:

[0007] S1. The server generates a public key set and sends the public key set to the client;

[0008] The client generates a secret key set based on the public key set and sends it to the server. The server generates a random matrix ciphertext set based on the secret key set and sends it to the client.

[0009] S2. The client encrypts the data according to the random matrix ciphertext set to generate an encryption matrix, and sends the encryption matrix to the server;

[0010] S3. The server encrypts the data using the encryption matrix, generates an encrypted data set, and sends it to the client;

[0011] S4. The client performs calculations based on the encrypted data set to generate a calculation result data set, and sends the calculation result data set to the server.

[0012] Furthermore, the server in S1 generates a public key set, and sending the public key set to the client includes:

[0013] The server serializes the public key set and sends the public key set to the client via socket communication;

[0014] The client generates a secret key set according to the public key set and sends the secret key set to the server, including:

[0015] The client deserializes the public key set, calculates a symmetric key that matches the public key set to form a key matrix, outputs N keys of the key matrix to the key set in columns, serializes the key set, and sends the key set to the server via socket communication;

[0016] The server generates a random matrix ciphertext set according to the key set and sends it to the client, including: the server uses N keys in the key set to encrypt a random matrix, generates N ciphertexts and outputs them to the random matrix ciphertext set, serializes the random matrix ciphertext set, sends the random matrix ciphertext set to the client through socket communication, and the client deserializes the random matrix ciphertext set.

[0017] Furthermore, the server in S3 encrypts the data using the encryption matrix to generate an encrypted data set and sends the encrypted data set to the client, including:

[0018] Outputting the encrypted data set to a first array to be transmitted, and performing serialization processing on the first array to be transmitted;

[0019] Setting a first threshold to determine whether the length of the first array to be transmitted is greater than the first threshold;

[0020] If the length of the first array to be transmitted is greater than the first threshold, cutting the first array to be transmitted and recording a first cutting length value;

[0021] The first array to be transmitted and the first cutting length value are sent to the client through socket communication.

[0022] Furthermore, before S4, the client also includes receiving the first array to be transmitted through socket communication, determining whether the first cutting length value is received, and if the first cutting length value is received, splicing and deserializing the data of the first array to be transmitted.

[0023] Furthermore, the client in S4 performs calculations based on the encrypted data set to generate a calculation result data set, and sends the calculation result data set to the server, including:

[0024] Outputting the calculation result data set to a second array to be transmitted, and performing serialization processing on the second array to be transmitted;

[0025] Setting a second threshold to determine whether the length of the second array to be transmitted is greater than the second threshold;

[0026] If the length of the second array to be transmitted is greater than the second threshold, cutting the second array to be transmitted and recording a second cutting length value;

[0027] The first array to be transmitted and the cut length value are sent to the server through socket communication.

[0028] Furthermore, the server receives the second array to be transmitted through socket communication, determines whether the second cutting length value is received, and if the second cutting length value is received, splices and deserializes the data of the second array to be transmitted.

[0029] The present invention also relates to a data transmission system based on the OT extension protocol, comprising:

[0030] The first communication module is configured to generate a public key set on the server side and send the public key set to the client side; the client side generates a secret key set based on the public key set and sends it to the server side; and the server side generates a random matrix ciphertext set based on the secret key set and sends it to the client side;

[0031] A second communication module is used for the client to encrypt data according to the random matrix ciphertext set, generate an encryption matrix, and send the encryption matrix to the server;

[0032] A third communication module is used for the server to encrypt the data using the encryption matrix, generate an encrypted data set, and send it to the client;

[0033] The fourth communication module is used for the client to perform calculations based on the encrypted data set to generate a calculation result data set, and send the calculation result data set to the server.

[0034] The present invention also relates to a computer-readable storage medium having a computer program stored thereon, and the computer program implements the above method when executed by a processor.

[0035] The present invention also relates to an electronic device, comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein the processor is configured to execute the computer program stored in the memory and perform the above-mentioned method.

[0036] The beneficial effects of the present invention are:

[0037] Based on the OT extension protocol, this invention redesigns the four-round communication process, merging and serializing homogeneous data to complete data exchange with far fewer connections than existing solutions. This improved protocol is particularly useful in scenarios where the number of network connections is limited or network performance bottlenecks exist, such as blockchain applications, where establishing a connection is expensive. By reducing the number of connections, better performance is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 The figure is a flow chart of the data transmission method based on the OT extension protocol of the present invention.

[0039] Figure 2 This is a structural diagram of the data transmission system based on the OT extension protocol of the present invention. DETAILED DESCRIPTION

[0040] The following will clearly and completely describe the technical solutions in the embodiments of the present invention 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 making creative efforts are within the scope of protection of the present invention.

[0041] The first aspect of the present invention relates to a process of steps as follows Figure 1 A data transmission method based on an OT extension protocol is shown, including:

[0042] S1. The server generates a public key set and sends the public key set to the client;

[0043] The client generates a secret key set based on the public key set and sends it to the server. The server generates a random matrix ciphertext set based on the secret key set and sends it to the client.

[0044] Specifically, in an embodiment of the present invention, the server generates a set of public keys, such as matrices T and U (the width of T and U is N), and then sends them to the client after N oblivious transmissions. Preferably, N is 128, which is configurable in practice. The client obtains the secret key set through calculation. Among them, oblivious transmission uses asymmetric encryption. The original transmission requires three interactions, namely: the server sends the public key, the client sends the encryption key, and the server sends the encryption matrix. By modifying the transmission protocol (generating N=128 secret keys and transmitting them at one time), the N*3 socket interactions are optimized to 3 times, but this does not affect the effect of the oblivious transmission protocol.

[0045] Specifically, the server generates N public keys and outputs them to the public key H (which can be a temporary variable, memory object, file, etc.). According to the OT extension protocol, the number of public keys is equal to the number of elements in the one-dimensional random matrix. Since socket communication can only transmit binary data, the public key set to be transmitted needs to be serialized (such as Pickle) and converted into binary data.

[0046] The server sends the public key set H to the client via socket communication;

[0047] The client receives the public key set and deserializes it;

[0048] The client calculates the matching symmetric keys one by one to form a key matrix;

[0049] The client outputs the N keys of the key matrix to the key set by column;

[0050] The client serializes the key set and sends it via socket communication; the server receives the key set from the client, which contains N keys;

[0051] The server encrypts the random matrix with secret keys one by one, generates N ciphertexts and outputs them to a random matrix ciphertext set, serializes the random matrix ciphertext set, sends the random matrix ciphertext set to the client through socket communication, and the client deserializes the random matrix ciphertext set.

[0052] In this embodiment of the present invention, the number of socket communications on the client side is reduced from N to 1; on the server side, it is reduced from 2N to 1, where N is no less than 128. The total number of transmissions is optimized from N*3 to 3. Because the encryption algorithm and encryption process remain unchanged, communication overhead is reduced without compromising protocol security and reliability.

[0053] S2. The client encrypts the data according to the random matrix ciphertext set to generate an encryption matrix, and sends the encryption matrix to the server;

[0054] Specifically, in the embodiment of the present invention, the client uses a random matrix ciphertext set to encrypt the T and U matrices column by column, obtaining M encrypted T and U matrix column data, where the number of M is equal to the number of columns in the T and U matrices. In this embodiment, the matrix width is set to 512, so the number of M is consistent with the matrix width, which is 512. This is configurable in practice.

[0055] The client outputs M encrypted column data to generate an encryption matrix;

[0056] Since socket communication can only transmit binary data, the encryption matrix to be transmitted needs to be serialized and converted into binary data;

[0057] The client sends the encryption matrix via socket communication;

[0058] The server receives the encryption matrix;

[0059] The server deserializes the received encryption matrix.

[0060] Since this round sends data by column of the T and U matrices, the amount of data transferred is equal to the number of columns in the T and U matrices, M. For security reasons, the value of M should be set to no less than 512. The client can optimize the original M-times, where encrypted data is sent immediately after each column is generated, to sending it over a single socket connection.

[0061] S3. The server encrypts the data using the encryption matrix, generates an encrypted data set, and sends it to the client;

[0062] Specifically, in the embodiment of the present invention, the server encrypts the data using an encryption matrix to generate an encrypted data set, the number of which is 8n (n is the number of elements on the server), and outputs it to the first array to be transmitted;

[0063] Since socket communication can only transmit binary data, the first array to be transmitted needs to be serialized (such as Pickle) to convert it into binary data;

[0064] For data packets whose length is greater than the first threshold, in order to prevent the risk of network transmission interruption, it is necessary to cut the data packet {m1, m2, ..., mf} according to the network bandwidth, and record the first cut length value of the data packet;

[0065] Send the first cut length value to let the client know how large the data to be sent is, and send the data packet to the client through the socket;

[0066] The client receives all data through the socket;

[0067] If there are multiple data packets, the client needs to splice the received data;

[0068] The client deserializes the concatenated data.

[0069] In this step, the number of socket communications on the server side is reduced from 8n to f, where f is the number of packets split. Because the encrypted data is of fixed length (determined by the hash table configuration), each packet can accommodate a large number of data, so the value of f is much smaller than n. If the server's local data packet is smaller than the threshold T, the number of server-initiated communications will be optimized from 8n to 1.

[0070] S4. The client performs calculations based on the encrypted data set to generate a calculation result data set, and sends the calculation result data set to the server.

[0071] Specifically, in the embodiment of the present application, the client obtains the calculation result, generates a calculation result data set, the number of which is R, and outputs it to the second array to be transmitted;

[0072] Since socket communication can only transmit binary data, the second array to be transmitted needs to be serialized and converted into binary data;

[0073] For data packets whose length is greater than the second threshold, the data packet needs to be cut into {m1, m2, ..., mf}, and the second cut length value of the data packet is recorded;

[0074] Send the second cut length value to the server through the socket;

[0075] If there are multiple data packets, the server will splice the received data;

[0076] The server performs deserialization processing.

[0077] In this step, the number of socket communications initiated by the client is reduced from R to f. R is the calculation result. In typical applications such as privacy intersection, R represents the elements of the intersection, and f represents the number of packets split. Because each packet can accommodate a large number of data, the number of client-initiated communications is typically optimized from R to 1.

[0078] Another aspect of the present invention also relates to a data transmission system based on the OT extension protocol, the structure of which is as follows: Figure 2 Shown, including:

[0079] The first communication module is configured to generate a public key set on the server side and send the public key set to the client side; the client side generates a secret key set based on the public key set and sends it to the server side; and the server side generates a random matrix ciphertext set based on the secret key set and sends it to the client side;

[0080] A second communication module is used for the client to encrypt data according to the random matrix ciphertext set, generate an encryption matrix, and send the encryption matrix to the server;

[0081] A third communication module is used for the server to encrypt the data using the encryption matrix, generate an encrypted data set, and send it to the client;

[0082] The fourth communication module is used for the client to perform calculations based on the encrypted data set to generate a calculation result data set, and send the calculation result data set to the server.

[0083] By using this system, the above-mentioned calculation and processing method can be executed and the corresponding technical effects can be achieved.

[0084] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all steps of the data transmission method based on the OT extension protocol in the above-mentioned embodiment. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements all steps of the data transmission method based on the OT extension protocol in the above-mentioned embodiment.

[0085] An embodiment of the present invention also provides an electronic device for executing the above-mentioned method. As an implementation device of the method, the electronic device has at least a processor and a memory, and in particular, the memory stores the data and related computer programs required for executing the method, and the processor calls the data and programs in the memory to execute all the steps of the implementation method and obtains the corresponding technical effect.

[0086] Preferably, the electronic device may include a bus architecture, which may include any number of interconnected buses and bridges, and the bus will include various circuits linked together by one or more processors and memories. The bus may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are all well known in the art and, therefore, will not be described further herein. The bus interface provides an interface between the bus and the receiver and transmitter. The receiver and transmitter can be the same component, namely a transceiver, which provides a unit for communicating with various other systems over a transmission medium. The processor is responsible for managing the bus and general processing, while the memory can be used to store data used by the processor when performing operations.

[0087] Additionally, the electronic device may further include components such as a communication module, an input unit, an audio processor, a display, and a power supply. The processor (or controller, operating control) employed may include a microprocessor or other processor device and / or logic device, which receives input and controls the operation of various components of the electronic device. The memory may be one or more of a cache, flash memory, a hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices, and may store the aforementioned data and information. It may also store programs for executing the relevant information, and the processor may execute the programs stored in the memory to implement information storage or processing. The input unit is used to provide input to the processor, and may, for example, be a keypad or touch input device. The power supply is used to provide power to the electronic device. The display is used to display objects such as images and text, and may, for example, be an LCD display. The communication module is a transmitter / receiver that sends and receives signals via an antenna. The communication module (transmitter / receiver) is coupled to the processor to provide input signals and receive output signals, similar to the case of a conventional mobile communication terminal. Based on different communication technologies, multiple communication modules can be provided in the same electronic device, such as a cellular network module, a Bluetooth module, and / or a wireless local area network module. The communication module (transmitter / receiver) is also coupled to a speaker and a microphone via an audio processor to provide audio output via the speaker and receive audio input from the microphone, thereby implementing common telecommunications functions. The audio processor may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor is also coupled to a central processing unit, enabling local recording via the microphone and playback of stored audio via the speaker.

[0088] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0089] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or boxes.

[0090] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction system that is implemented in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0091] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The present invention is described in detail below. ...

[0092] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention are intended to be covered by the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A data transmission method based on an oblivious transfer extension protocol, characterized in that: include: S1. The server generates a public key set and sends the public key set to the client; The client generates a secret key set based on the public key set and sends it to the server. The server generates a random matrix ciphertext set based on the secret key set and sends it to the client. S2. The client encrypts the data according to the random matrix ciphertext set to generate an encryption matrix, and sends the encryption matrix to the server; S3. The server encrypts the data using the encryption matrix, generates an encrypted data set, and sends it to the client; S4. The client performs calculations based on the encrypted data set to generate a calculation result data set, and sends the calculation result data set to the server; The server generates a public key set in S1, and sends the public key set to the client, including: The server serializes the public key set and sends the public key set to the client via socket communication; The client generates a secret key set according to the public key set and sends the secret key set to the server, including: The client deserializes the public key set, calculates a symmetric key that matches the public key set to form a key matrix, outputs N keys of the key matrix to the key set in columns, serializes the key set, and sends the key set to the server via socket communication; The server generates a random matrix ciphertext set according to the secret key set and sends it to the client, comprising: the server uses N secret keys in the secret key set to encrypt a random matrix, generates N ciphertexts and outputs them to the random matrix ciphertext set, serializes the random matrix ciphertext set, sends the random matrix ciphertext set to the client through socket communication, and the client deserializes the random matrix ciphertext set; The server in S3 encrypts the data using the encryption matrix, generates an encrypted data set, and sends it to the client, including: Outputting the encrypted data set to a first array to be transmitted, and performing serialization processing on the first array to be transmitted; Setting a first threshold to determine whether the length of the first array to be transmitted is greater than the first threshold; If the length of the first array to be transmitted is greater than the first threshold, cutting the first array to be transmitted and recording a first cutting length value; The first array to be transmitted and the first cutting length value are sent to the client through socket communication.

2. The method according to claim 1, wherein Before S4, the client also receives the first array to be transmitted through socket communication, determines whether the first cutting length value is received, and if the first cutting length value is received, splices and deserializes the data of the first array to be transmitted.

3. The method according to claim 2, wherein In S4, the client performs calculations based on the encrypted data set to generate a calculation result data set, and sends the calculation result data set to the server, including: Outputting the calculation result data set to a second array to be transmitted, and performing serialization processing on the second array to be transmitted; Setting a second threshold to determine whether the length of the second array to be transmitted is greater than the second threshold; If the length of the second array to be transmitted is greater than the second threshold, cutting the second array to be transmitted and recording a second cutting length value; The second array to be transmitted and the cut length value are sent to the server through socket communication.

4. The method according to claim 3, wherein The method also includes the server receiving the second array to be transmitted through socket communication, determining whether the second cutting length value is received, and if the second cutting length value is received, splicing and deserializing the data of the second array to be transmitted.

5. A data transmission system based on an oblivious transfer extension protocol, characterized in that: include: The first communication module is used for the server to generate a public key set and send the public key set to the client; The client generates a secret key set based on the public key set and sends it to the server. The server generates a random matrix ciphertext set based on the secret key set and sends it to the client. A second communication module is used for the client to encrypt data according to the random matrix ciphertext set, generate an encryption matrix, and send the encryption matrix to the server; A third communication module is used for the server to encrypt the data using the encryption matrix, generate an encrypted data set, and send it to the client; A fourth communication module is used for the client to perform calculations based on the encrypted data set to generate a calculation result data set, and send the calculation result data set to the server; The server generates a public key set, and sending the public key set to the client includes: The server serializes the public key set and sends the public key set to the client via socket communication; The client generates a secret key set according to the public key set and sends the secret key set to the server, including: The client deserializes the public key set, calculates a symmetric key that matches the public key set to form a key matrix, outputs N keys of the key matrix to the key set in columns, serializes the key set, and sends the key set to the server via socket communication; The server generates a random matrix ciphertext set according to the secret key set and sends it to the client, comprising: the server uses N secret keys in the secret key set to encrypt a random matrix, generates N ciphertexts and outputs them to the random matrix ciphertext set, serializes the random matrix ciphertext set, sends the random matrix ciphertext set to the client through socket communication, and the client deserializes the random matrix ciphertext set; The server encrypts the data using the encryption matrix, generates an encrypted data set, and sends the encrypted data set to the client, including: Outputting the encrypted data set to a first array to be transmitted, and performing serialization processing on the first array to be transmitted; Setting a first threshold to determine whether the length of the first array to be transmitted is greater than the first threshold; If the length of the first array to be transmitted is greater than the first threshold, cutting the first array to be transmitted and recording a first cutting length value; The first array to be transmitted and the first cutting length value are sent to the client through socket communication.

6. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which implements the method according to any one of claims 1 to 4 when executed by a processor.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: The processor is configured to execute a computer program stored in a memory to perform the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Homomorphic encryption matrix determinant security outsourcing method based on cloud computing

    CN110324135A

  • Key combination calculation management method, device and equipment

    CN113032815A