Multi-party communication protocol encryption method and device based on ECDH algorithm, and storage medium
By using the ECDH algorithm for key exchange in multi-party communication scenarios in untrusted networks, the problem of weak key transmission security is solved, decentralized multi-party communication encryption is realized, and information security is improved.
Patent Information
- Application Number
- CN202411776793.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-05
AI Technical Summary
Existing encrypted communication tools have the problem of weak key transmission security in untrusted networks, especially in multi-party communication scenarios, which cannot effectively prevent information theft, tampering and destruction.
A multi-party communication protocol based on the ECDH algorithm is adopted to exchange keys in two groups in the communication group, and the final shared key is obtained through n-1 key exchange, realizing decentralized multi-party communication encryption.
Improve the security of communication information in untrusted networks, prevent information theft, tampering and destruction, and provide higher security and reliability.
Smart Images

Figure CN119788323A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an encryption method, device and storage medium for a multi-party communication protocol based on an ECDH algorithm. Background Art
[0002] The Internet has been widely used in the new era of social development. While it brings convenience to people's lives and work, its open characteristics have caused many security risks. Therefore, in the Internet environment, information exchange also faces the risk of information leakage.
[0003] The risks of information leakage can be mainly classified into the following issues: content theft (such as the leakage of relatively private personal or group information, etc.); content tampering (such as distortion of information exchange content, etc.); content forgery (such as using other people's identities to publish information, etc.).
[0004] Common means of information theft and sabotage attacks include: Trojan transplantation, application forgery, network packet capture, man-in-the-middle attacks (DNS hijacking), and vulnerability mining.
[0005] In the process of network information exchange, cryptography can ensure information security through encryption (preventing bad guys from obtaining private data), authentication (preventing bad guys from modifying private data without being discovered), and authorization (preventing bad guys from impersonating private identities). Therefore, communication protocols that use more secure encryption algorithms are essential in network information exchange.
[0006] Multi-channel communication refers to the exchange of information between groups in a network, such as Figure 1 As shown in Figure 1, the centralized node is usually responsible for information transmission. Currently known encrypted communication tools include cross-platform instant messaging software (Telegram for short), and the implementation principle of Telegram's communication protocol is mainly based on single chat encryption. In an untrusted network, if only the central node is responsible for the transmission of key information, the central node becomes a weak link in network security. Once it is attacked or fails, the security of the entire key transmission system will be seriously threatened, and the security is poor.
[0007] It is known that in the public-private key encryption system, each entity has a private key. The public key can decrypt the information encrypted by the private key, and only the private key can decrypt the information encrypted by the public key. Therefore, there is a way to verify the public-private key signatures. The ECDH protocol is mostly used for communication encryption between two ends. It cannot perform multi-end encryption and cannot guarantee that the communication information will not be stolen, tampered with or destroyed in an untrusted network. Summary of the invention
[0008] The present application shows an encryption method, device and storage medium for a multi-party communication protocol based on the ECDH algorithm.
[0009] In the first aspect, the present application shows a multi-party communication protocol encryption method, device and storage medium based on the ECDH algorithm, the method comprising:
[0010] Based on the ECDH algorithm, key exchange is performed between two parties in the communication group, and the final shared key is obtained after n-1 key exchanges.
[0011] The key exchange comprises the following steps:
[0012] Each node in the communication selects a base point G;
[0013] Compute node private key;
[0014] Calculate the public key of each node and send it to other child nodes;
[0015] Each node synthesizes the final shared key.
[0016] According to the method of the first aspect of the present application, the node public key is composed of the node private key and the base point, and the shared key is composed of the node private key and the remaining multiple node public keys.
[0017] According to the method of the first aspect of the present application, the base points of the plurality of nodes are on the same finite field on the same line.
[0018] According to the method of the first aspect of the present application, the curve selected in the instant messaging system implemented based on the ECDH algorithm is secp256k1.
[0019] According to the method of the first aspect of the present application, when a key exchange is performed in a communication group, a session identifier is generated for the conversation between the two parties of the key exchange, and the session identifier is used so that the two parties of the key exchange can identify and track the conversation.
[0020] According to the method of the first aspect of the present application, inter-group communication is completed by the server side.
[0021] According to the method of the first aspect of the present application, in the instant messaging system, there are multiple clients participating in the key exchange.
[0022] According to the method of the first aspect of the present application, a member is randomly selected from the group to initiate the conversation.
[0023] In a second aspect, the present application shows an electronic device, which includes: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the method described in any of the above aspects.
[0024] In a third aspect, the present application shows a non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in any of the above aspects.
[0025] The technical solution provided by this application may have the following beneficial effects:
[0026] (1) ECDH is essentially a DH key exchange algorithm based on ECC. Compared with RSA, ECDH has the advantage of using shorter keys to achieve security that is equivalent to or higher than RSA.
[0027] (2) Most multi-party communication software on the market use two-way encryption or a method where the key is controlled by a third party. This application borrows the idea of key exchange in the ECDH algorithm and implements decentralized multi-party communication encryption by exchanging keys in pairs in the communication group, which is more secure.
[0028] (3) This application can help multi-party communication software get rid of the original two-end communication encryption mode and adopt a more secure, reliable and stable decentralized mode, which can better ensure that communication information is not stolen, tampered with, destroyed, etc. in untrusted networks. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a multi-party communication diagram in an untrusted network of the present application.
[0030] Figure 2 This is a flowchart of the steps of a multi-party communication protocol encryption method based on the ECDH algorithm of the present application.
[0031] Figure 3 This is a verification diagram of the encryption method of a multi-party communication protocol based on the ECDH algorithm of the present application.
[0032] Figure 4 It is the flow chart of DH algorithm.
[0033] Figure 5 This is the ECDH algorithm flow chart.
[0034] Figure 6 It is a block diagram of an electronic device of the present application.
[0035] Figure 7 It is a block diagram of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0037] Before introducing the ECDH algorithm-based multi-party communication protocol encryption method provided by this application, the ECDH algorithm involved in this application is first explained.
[0038] The ECC elliptic curve cryptosystem was proposed by Koblitz and Miller in 1985. Since its launch, it has attracted great attention in the fields of data, cryptography and computer science around the world.
[0039] ECC is a public key encryption system whose security is based on the difficulty of discrete logarithms. The advantages of ECC are low bandwidth requirements, small storage space usage, and providing equivalent or higher levels of security with smaller keys.
[0040] The commonly used elliptic curve key exchange algorithm (elliptic curve diffe-hellman, ECDH) and elliptic curve digital signature algorithm ECDSA are both implemented based on ECC.
[0041] ECDSA combines public key cryptography and hash functions to verify the integrity of messages and the authenticity of their origin. It leverages the difficulty of the discrete logarithm problem on elliptic curves to ensure the security of signatures.
[0042] In ECDSA, the key generation process includes selecting the elliptic curve and base point, generating the private key and the public key. The specific steps are as follows:
[0043] First, select an elliptic curve and a base point that meet certain mathematical requirements.
[0044] Second, randomly select a private key, which is a random integer and should be kept secret.
[0045] Third, use the private key and base point to calculate the public key. The public key is the result of multiplying the private key by the base point and can be publicly exchanged.
[0046] The signature generation process for ECDSA involves the following steps:
[0047] 1. Calculate the hash value of the message: Use a secure hash function (such as SHA-256) to hash the message to obtain the message digest.
[0048] 2. Select a random number k: This random number is different for each signature to ensure the uniqueness and security of the signature.
[0049] 3. Calculate the signature value: Use the private key and random number k to calculate the point R on the elliptic curve, and take the modulus n of the horizontal coordinate of point R as r. Then calculate the s value, which is obtained through complex calculation based on r, message digest, private key and random number k.
[0050] 4. Signature result: The signature pair (r, s) is the final digital signature, which is sent to the recipient together with the original message.
[0051] The signature verification process for ECDSA involves the following steps:
[0052] 1. After receiving the message and signature, the receiver uses the sender's public key to verify the signature.
[0053] 2. Hash the received message using the same hash function as the signer to obtain a message digest.
[0054] 3. Check whether the signature pair (r, s) satisfies certain range conditions.
[0055] 4. Calculate the point R' on the elliptic curve using the value in the public key and signature pair.
[0056] 5. Verify whether the horizontal coordinate of R' is equal to the r value in the signature. If the verification succeeds, it means that the signature is valid, the message has not been tampered with and the source is authentic; if the verification fails, it means that the signature is invalid.
[0057] ECDH is a variant of the DH algorithm, which is essentially a key exchange protocol based on ECC. The decentralized multi-party communication encryption protocol proposed in this application is based on ECDH. The following is a brief description of DH and ECDH.
[0058] DH (Diffie-Hellman) algorithm is a publicly published public key algorithm based on the key negotiation mechanism.
[0059] like Figure 4 As shown, instead of the sender generating a key and encrypting it for the receiver, the sender and receiver jointly generate a key that is private to each other. The sender and receiver both have this key. To calculate the negotiated key, the sender uses a combination of its private key and the receiver's public key. The receiver uses a combination of its private key and the sender's public key.
[0060] A DH public key is often referred to as a share because it is a party's share of the key agreement.
[0061] DH uses modular exponentiation, but the modulus is a large prime number (usually called p). This modulus is well-known and must be shared between the sender and the receiver. The sender and the receiver must also share another number called the generator (g). g is chosen such that for any value of Z < P, there exists a w such that g w mod p = Z. Thus it can "generate" all the numbers from 1 to p - 1. To generate a key, a random number (X) smaller than p is generated, and Y is calculated as Y = g w mod p, where X is the private key and Y is the public key. We will use Xs and Ys to refer to the sender's keys, and Xr and Yr to refer to the receiver's keys.
[0062] When calculating the shared key (Z), the sender and the receiver respectively rely on:
[0063] Z = Yr Xs mod p = (g Xr ) Xs mod p = g Xr*Xs mod p
[0064] Z = Ys Xr mod p = (g Xs ) Xr mod p = g Xs*Xr mod p
[0065] The encryption key is obtained.
[0066] ECDH is the Diffie-Hellman (DH) key exchange algorithm based on ECC (elliptic curve crypto-systems). The two parties in the exchange can negotiate a key without sharing any secrets. ECC is a cryptographic system based on the discrete logarithm problem on elliptic curves. Given a point P on an elliptic curve and an integer k, it is easy to solve Q = kP; given points P and Q, it is a difficult problem to find the integer k such that Q = kP.
[0067] The key generation process is as follows:
[0068] Suppose the two parties in the key exchange are Alice and Bob, and they have shared curve parameters (elliptic curve E, order N, and base point G)
[0069] Alice generates an integer a through a random algorithm, calculates A = a * G, and obtains the ciphertext a at Alice's end. Similarly, Bob generates a random number b and calculates B = b * G to obtain the ciphertext B at Bob's end.
[0070] (2) Alice sends the calculated A to Bob. Assume that A is obtained by the enemy. Since it is difficult to solve the correspondence between two points in the elliptic curve discrete logarithm problem, it is impossible to obtain a through A and G. Similarly, Bob sends the calculated B to Alice.
[0071] (3) Bob receives A from Alice and calculates Q = b*A
[0072] (4) Alice receives B from Bob and calculates Q ′ =a*B, Alice and Bob both get Q=b*A=b*(a*G)=(b*a)*G=(a*b)*G,
[0073] Q ′ =a*B=a*(b*G)=(a*b)*G
[0074] It can be seen that Q = Q ′ (Commutative law and associative law), that is, both parties obtain a consistent key Q through negotiation.
[0075] Note that the multiplication in the above algorithm is not the multiplication in algebra, but the modulus operation based on the elliptic curve cryptography system. The specific process can be referred to Figure 5 .
[0076] As an important part of the ECC public key cryptography system, the ECDH algorithm has the advantages of small key length, small computational complexity, and strong anti-attack, and has been widely used in many scenarios. Java Development Kit (JDK) 1.7 and later versions began to support the ECDH signature algorithm, and many open source cryptographic libraries also have good support for ECDH.
[0077] Reference Figure 1 , showing a step flow chart of a multi-party communication protocol encryption method based on the ECDH algorithm of the present application, the method can be applied to electronic devices, wherein the method can specifically include: based on the ECDH algorithm, performing key exchange between two parties in the communication group, and obtaining the final shared key after n-1 key exchanges.
[0078] The key exchange comprises the following steps:
[0079] In step S101, each node in communication selects a base point G;
[0080] In step S102, the node private key is calculated;
[0081] In step S103, the public key of each node is calculated and sent to other child nodes;
[0082] In step S104, each node synthesizes a final shared key.
[0083] If there is such a group, consider this group as a set.
[0084] group={p1,p2,…,p n}
[0085] In order to transmit a message in this group without a centralized node, this application adopts a method of randomly selecting a member in this group to decrypt these messages for secure information transmission.
[0086] In order to achieve multi-end encryption, this application uses ECDH to perform n-1 key exchanges in exchange for a shared key S for group chat encryption.
[0087] The proof is as follows:
[0088] For any large integer
[0089] {x1,x2,…,x n}
[0090] exist
[0091]
[0092] That is, after n-1 key exchanges, the final shared key S is obtained.
[0093] If three parties need to build an encrypted channel, the key negotiation process can be simplified into the following steps:
[0094] In the first step, k1, k2, k3 are represented as respective nodes, and each node is required to select a base point G on the same finite field on the same line.
[0095] The second step is to calculate the node private key.
[0096] The private key of node k1 is d1,
[0097] The private key of node k2 is d2,
[0098] The private key of node k3 is d3.
[0099] The third step is to calculate the public key of each node and send it to other child nodes.
[0100] The public key of node k1 is H1=d1G,
[0101] The public key of node k2 is H2=d2G,
[0102] The public key of node k3 is H3=d3G.
[0103] In the fourth step, each node synthesizes the final shared key S.
[0104] S=d1H2H3=d2H1H3=d3H1H2
[0105] Example
[0106] like Figure 2 As shown. Assume that there are three users, A, B, and C, and the public and private key pairs they hold are (Pri-a, Pub-a), (Pri-b, Pub-b), and (Pri-c, Pub-c).
[0107] Step 1: Assume that user A initiates a round of secret chat, generate the base point G and session identifier sign, calculate user A's initial private key d1, calculate the public key to obtain H1=d1G, and send it to other users.
[0108] Step 2:
[0109] (1) User B receives the base point G and session identifier sign sent by A, user A's initial private key d1, calculates user B's initial private key d2, calculates the public key H2 = d2G, and calculates the shared key S 12 =d1H2.
[0110] (2) User C receives the base point G and session identifier sign sent by A, user A's initial private key d1, calculates user C's initial private key d3, calculates the public key H3 = d3G, and calculates the shared key S 13 =d1H3.
[0111] Step 3: User B receives H3 and S sent by C. 13 and session identifier sign, calculate the shared key S 23 =d2H3 and S = d2S 13 =d1d2H3.
[0112] Step 4: User A receives S sent by B 23 and session identifier sign, calculate the shared key S = d1S 23 =d1d2H3.
[0113] Step 5: User C receives S sent by B 13 and session identifier sign, calculate the shared key S = d3S 12 =d1d3H2.
[0114] Note: The above communications are all completed by the server.
[0115] For the above protocol, the curve selected by the ECDH algorithm is secp256k1 (secp256k1 curve is the parameter of the elliptic curve digital signature algorithm (ECDSA) used in Bitcoin), and a simple instant messaging system (IM) is implemented, such as Figure 3 As shown in the figure, this is the result of verification with 4 clients. Theoretically, n clients can be opened, that is, as long as the computing resources and network bandwidth of the server allow, any number of clients can exchange keys and communicate.
[0116] The application scenarios of this application are:
[0117] 1. IoT communication encryption for blockchain.
[0118] 2. Network communication encryption of multi-party communication software.
[0119] 3. Network communication encryption in the AIot field.
[0120] The embodiments of the present application include the following beneficial effects:
[0121] (1) ECDH is essentially a DH key exchange algorithm based on ECC. Compared with RSA, ECDH has the advantage of using shorter keys to achieve security that is equivalent to or higher than RSA.
[0122] (2) Most multi-party communication software on the market use two-way encryption or a method where the key is controlled by a third party. This application borrows the idea of key exchange in the ECDH algorithm and implements decentralized multi-party communication encryption by exchanging keys in pairs in the communication group, which is more secure.
[0123] (3) This application can help multi-party communication software get rid of the original two-end communication encryption mode and adopt a more secure, reliable and stable decentralized mode, which can better ensure that communication information is not stolen, tampered with, destroyed, etc. in untrusted networks.
[0124] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by the present application.
[0125] Optionally, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0126] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0127] Figure 6 800 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0128] Reference Figure 6 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0129] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0130] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0131] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0132] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0133] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0134] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0135] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0136] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0137] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0138] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0139] Figure 719 is a block diagram of a computer-readable storage medium 1900 shown in the present application. For example, the computer-readable storage medium 1900 may be provided as a server.
[0140] Reference Figure 7 , the computer-readable storage medium 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions, such as an application, that can be executed by the processing component 1922. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0141] The computer readable storage medium 1900 may also include a power supply component 1926 configured to perform power management of the computer readable storage medium 1900, a wired or wireless network interface 1950 configured to connect the computer readable storage medium 1900 to a network, and an input / output (I / O) interface 1958. The computer readable storage medium 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0142] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0143] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0144] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0145] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0146] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0147] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0148] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0149] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0150] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0151] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A multi-party communication protocol encryption method based on ECDH algorithm, characterized in that: The method comprises: Based on the ECDH algorithm, key exchange is performed between two parties in the communication group, and the final shared key is obtained after n-1 key exchanges. The key exchange comprises the following steps: Each node in the communication selects a base point; Compute node private key; Calculate the public key of each node and send it to other child nodes; Each node synthesizes the final shared key.
2. The ECDH algorithm-based multi-party communication protocol encryption method according to claim 1, characterized in that: The node public key is composed of the node private key and the base point, and the shared key is composed of the node private key and the remaining multiple node public keys.
3. The ECDH algorithm-based multi-party communication protocol encryption method according to claim 1, characterized in that: The base points of the plurality of nodes are on the same finite field on the same line.
4. The ECDH algorithm-based multi-party communication protocol encryption method according to claim 1, characterized in that: The curve selected in the instant messaging system implemented based on the ECDH algorithm is secp256k1.
5. The ECDH algorithm-based multi-party communication protocol encryption method according to claim 1, characterized in that: When a key exchange is performed in a communication group, a session identifier is generated between the two parties of the exchange, and the session identifier is used so that the two parties of the key exchange can identify and track the session.
6. The ECDH algorithm-based multi-party communication protocol encryption method according to claim 1, characterized in that: Inter-group communication is done by the server.
7. The ECDH algorithm-based multi-party communication protocol encryption method according to claim 4, characterized in that: In an instant messaging system, there are multiple clients participating in the key exchange.
8. The ECDH algorithm-based multi-party communication protocol encryption method according to claim 5, characterized in that: A member is randomly selected from the group to initiate the conversation.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method according to any one of claims 1 to 8 when executed by the processor.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Method for sharing key in multi-party communication
CN105847002A
Method for supervisor to share sensitive data in alliance chain scene based on group negotiation key
CN114239048A
End-to-end data encryption processing method
CN118573408A
Data encryption system and method
US9800410B1