Secure communication method, device, computer equipment and storage medium
By using the key agreement algorithm between the H.323 terminal and the SIP conference server to determine the master key and channel key, the problem of low security of media stream pass-through is solved and two-way secure media stream communication is achieved.
Patent Information
- Application Number
- CN202210816467.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-12
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-07-12
AI Technical Summary
The media flow pass-through between the H.323 terminal and the SIP conference server has low security and lacks a complete standard to negotiate secure media flows.
Use the preset key agreement algorithm to determine the master key, generate the key random number of the media stream channel, and obtain the channel key through master key encryption. Generate channel opening signaling and send it to the H.323 terminal to open the media stream channel. , and sends the channel key to the terminal to ensure encrypted transmission of media stream information.
It realizes point-to-point two-way secure media streaming communication between H.323 terminal and SIP main server, ensuring communication security.
Smart Images

Figure CN115208983B
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a secure communication method, apparatus, computer equipment and storage medium. Background Art
[0002] VoIP (Voice over Internet Protocol, IP-based voice transmission) is a voice call technology, also known as IP phone, Internet phone, broadband phone. It uses the Internet Protocol (IP) to achieve voice calls and multimedia conferences, that is, to communicate via the Internet. The implementation of IP phone needs to be based on relevant protocols. Internationally, the more influential IP phone protocols include H.323 protocol and SIP protocol.
[0003] As various industries pay more and more attention to the security of IP phones, the demand for secure and reliable H.323 calls is increasing. When H.323 terminals connect to SIP conference servers, the security of media streams must also be guaranteed. However, in scenarios where H.323 terminals and SIP conference servers need to achieve direct media streams, there is no perfect standard to negotiate secure media streams, making the point-to-point direct media streams between H.323 terminals and SIP conference servers less secure. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a secure communication method, apparatus, computer equipment and storage medium to solve the problem of low security of point-to-point media stream direct communication between an H.323 terminal and a SIP conference server.
[0005] In order to solve the above technical problems, the embodiment of the present application provides a secure communication method, which adopts the following technical solution:
[0006] Determine the master key between the H.323 terminal and the H.323 terminal based on the preset key agreement algorithm;
[0007] For each media stream channel to be established with the H.323 terminal, generating a key random number for the media stream channel;
[0008] Encrypting the key random number according to the master key to obtain a channel key of the media stream channel;
[0009] Generate a channel opening signaling including the channel key, and send the channel opening signaling to the H.323 terminal to open a media stream channel with the H.323 terminal, and send the channel key to the H.323 terminal.
[0010] In order to solve the above technical problems, the embodiment of the present application also provides a secure communication device, which adopts the following technical solution:
[0011] A master key determination module, used to determine the master key between the H.323 terminal based on a preset key agreement algorithm;
[0012] A random number generation module, used for generating a key random number of each media stream channel to be established with the H.323 terminal;
[0013] A channel key generation module, used to encrypt the key random number according to the master key to obtain the channel key of the media stream channel;
[0014] The channel key sending module is used to generate a channel opening signaling including the channel key, and send the channel opening signaling to the H.323 terminal to open a media stream channel with the H.323 terminal, and send the channel key to the H.323 terminal.
[0015] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0016] Determine the master key between the H.323 terminal and the H.323 terminal based on the preset key agreement algorithm;
[0017] For each media stream channel to be established with the H.323 terminal, generating a key random number for the media stream channel;
[0018] Encrypting the key random number according to the master key to obtain a channel key of the media stream channel;
[0019] Generate a channel opening signaling including the channel key, and send the channel opening signaling to the H.323 terminal to open a media stream channel with the H.323 terminal, and send the channel key to the H.323 terminal.
[0020] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0021] Determine the master key between the H.323 terminal and the H.323 terminal based on the preset key agreement algorithm;
[0022] For each media stream channel to be established with the H.323 terminal, generating a key random number for the media stream channel;
[0023] Encrypting the key random number according to the master key to obtain a channel key of the media stream channel;
[0024] Generate a channel opening signaling including the channel key, and send the channel opening signaling to the H.323 terminal to open a media stream channel with the H.323 terminal, and send the channel key to the H.323 terminal.
[0025] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects: the SIP main server and the H.323 terminal can determine the master key based on the key agreement algorithm while ensuring information security; the SIP main server and the H.323 terminal can establish multiple media stream channels, and for each media stream channel, a corresponding key random number can be generated; the master key is a high-level key, which is used to encrypt the key random number to generate a channel key; the SIP main server generates a channel opening signaling carrying the channel key and sends it to the H.323 terminal, so that the H.323 terminal also holds the channel key and opens the media stream channel between the SIP main server and the H.323 terminal; when the media stream information is transmitted through the media stream channel, it needs to be encrypted according to the channel key, thereby realizing point-to-point two-way secure media stream communication between the H.323 terminal and the SIP main server, ensuring communication security. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0027] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0028] Figure 2 is a flow chart of an embodiment of a secure communication method according to the present application;
[0029] Figure 3 is a timing diagram of an embodiment of a secure communication method according to the present application;
[0030] Figure 4 is a schematic structural diagram of an embodiment of a secure communication device according to the present application;
[0031] Figure 5 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0033] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0034] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0035] like Figure 1 As shown, the system architecture 100 may include H.323 terminals 101, 102, 103, a network 104, and a SIP host server 105. The network 104 is used to provide a medium for a communication link between the H.323 terminals 101, 102, 103 and the SIP host server. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0036] The user can use H.323 terminals 101, 102, 103 to interact with the SIP main server through the network 104 to receive or send messages, etc. The H.323 terminal can be a terminal that communicates based on the H.323 protocol.
[0037] H.323 terminals 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) players, laptop computers and desktop computers, etc.
[0038] The SIP main server 105 may include a PBX server and a SIP conference server. The PBX server is used to assist in establishing a point-to-point bidirectional secure media stream channel with the SIP conference server. The SIP conference server runs based on the SIP protocol and can implement IP telephone conferences between H.323 terminals.
[0039] It should be noted that the secure communication method provided in the embodiment of the present application is generally executed by a SIP main server, and accordingly, the secure communication device is generally arranged in the SIP main server.
[0040] It should be understood that Figure 1 The number of H.323 terminals, networks and SIP main servers in the embodiment is only for illustration. Any number of H.323 terminals, networks and SIP main servers may be provided according to the implementation requirements.
[0041] Continue to refer Figure 2 , shows a flow chart of an embodiment of a secure communication method according to the present application. The secure communication method can be applied to a SIP main server, comprising the following steps:
[0042] Step S201: Determine a master key between the H.323 terminal and the H.323 terminal based on a preset key agreement algorithm.
[0043] In this embodiment, the electronic device (eg, Figure 1 The SIP main server shown in the figure can communicate with the H.323 terminal through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0044] Specifically, the H.323 terminal and the SIP main server first determine the master key between the H.323 terminal and the SIP main server through a preset key agreement algorithm. The key agreement algorithm enables the H.323 terminal and the SIP main server to exchange keys securely in an insecure channel to determine the master key, which is used to generate other keys to achieve encryption of communication messages.
[0045] Step S202: For each media stream channel to be established with the H.323 terminal, a key random number of the media stream channel is generated.
[0046] Specifically, multiple media stream channels can be established between the H.323 terminal and the SIP main server. A media stream channel is a channel for transmitting media stream information. A media stream channel includes at least one type, for example, a media stream channel for transmitting audio media streams and a media stream channel for transmitting video media streams. Different audio media streams or video media streams can be transmitted through different media stream channels.
[0047] For each media stream channel that needs to be established between the H.323 terminal and the SIP main server, a key random number is generated for each media stream channel. The key random number is a random number, usually generated by the SIP main server, and can also be generated by the H.323 terminal.
[0048] There may be multiple H.323 terminals in this application, and each H.323 terminal establishes a media stream channel with the SIP main server separately. When describing this application, any H.323 terminal is used as an example for explanation, and the data interaction process between each H.323 terminal and the SIP main server is the same.
[0049] Step S203: encrypt the key random number according to the master key to obtain the channel key of the media stream channel.
[0050] Specifically, the key random number is encrypted according to the master key masterkey, and the encrypted data is used as the channel key sessionKey of the media stream channel. The channel key is used to encrypt information that needs to be transmitted through the media stream channel.
[0051] The SIP main server may encrypt the key random number according to the main key to obtain the channel key.
[0052] Step S204: Generate a channel opening signaling including a channel key, and send the channel opening signaling to the H.323 terminal to open a media stream channel with the H.323 terminal, and send the channel key to the H.323 terminal.
[0053] Specifically, the SIP main server generates a channel opening signaling, which is a signaling instructing to open a media stream channel between the H.323 terminal and the SIP main server. According to the signaling, the SIP main server establishes a media stream channel with the H.323 terminal.
[0054] The channel opening signaling generated by the SIP main server contains the channel key, so when the channel opening signaling is sent to the H.323 terminal, the channel key is also sent to the H.323 terminal. When the H.323 terminal and the SIP main server subsequently transmit information through the media stream channel, the information to be transmitted is encrypted by the channel key; in addition, the media stream channel in this application is a two-way communication channel; thus, point-to-point two-way secure media stream communication between the H.323 terminal and the SIP main server is realized.
[0055] In this embodiment, the SIP main server and the H.323 terminal can determine the master key based on the key agreement algorithm under the premise of ensuring information security; the SIP main server and the H.323 terminal can establish multiple media stream channels, and for each media stream channel, a corresponding key random number can be generated; the master key is a high-level key, which is used to encrypt the key random number to generate a channel key; the SIP main server generates a channel opening signaling carrying the channel key and sends it to the H.323 terminal, so that the H.323 terminal also holds the channel key and opens the media stream channel between the SIP main server and the H.323 terminal; when the media stream information is transmitted through the media stream channel, it needs to be encrypted according to the channel key, thereby realizing point-to-point two-way secure media stream communication between the H.323 terminal and the SIP main server, ensuring communication security.
[0056] Further, the SIP main server includes a PBX server and a SIP conference server, and the above step S201 may include: receiving a channel establishment request sent by an H.323 terminal; the channel establishment request is generated based on the H225 protocol, and is used to request to establish a media stream channel between the H.323 terminal and the SIP conference server; the PBX server extracts the H235 protocol information from the channel establishment request to obtain the public parameters and the first public key in the H235 protocol information; the first public key is calculated by the H.323 terminal based on the public parameters; the second public key is calculated based on the public parameters, and the second private key is calculated based on the public parameters and the first public key; the second private key is determined as the master key; the PBX server sends the second public key to the H.323 terminal to instruct the H.323 terminal to calculate the first private key based on the public parameters and the second public key; the first private key is the same as the second private key, and is the master key on the H.323 terminal side.
[0057] Specifically, the SIP main server may include a PBX server and a SIP conference server. The H.323 terminal in this application can implement an IP telephone conference, and the implementation of the telephone conference requires the participation of the SIP conference server. The PBX server is used to assist in establishing a point-to-point bidirectional secure media stream channel between the H.323 terminal and the SIP conference server. The SIP conference server runs based on the SIP protocol and is used to implement an IP telephone conference between H.323 terminals.
[0058] The key agreement algorithm in this application can be the Diffie-Hellman key exchange algorithm. The Diffie-Hellman (DH for short) key exchange is one of the earliest key exchange algorithms, which enables the communicating parties to exchange keys securely in an insecure channel for encrypting subsequent communication messages. The algorithm was proposed by Whitfield Diffie and Martin Hellman in 1976 and was later applied to the security field. For example, the TLS (Transport Layer Security) of the Https protocol and the IKE (Internet Key Exchange) of the IPsec protocol both use the DH algorithm as the key exchange algorithm.
[0059] The H.323 terminal first communicates with the PBX server based on the H225 protocol. The H.323 terminal can act as a caller, generate a channel establishment request according to the H225 protocol, and send the channel establishment request to the PBX server in the SIP main server. The channel establishment request can be regarded as a request by the H.323 terminal to establish an initial channel with the SIP main server. In one embodiment, the initial channel can be an H245 (H.245) control channel. The H225 protocol (also written as the H.225 protocol) is a call signaling protocol and one of the core protocols of the H.323 protocol, which mainly implements user call control. Before any call starts, a call connection is first established between the endpoints, and an H.245 control channel is established at the same time, which is the main function of the H225 call signaling protocol. The initial channel between the H.323 terminal and the SIP main server is to prepare for the subsequent media stream channel, so the channel establishment request can also be regarded as a request to establish a media stream channel.
[0060] The H.323 terminal can generate two global public parameters, a prime number q and an integer a, where a is a primitive root of q. The H.323 terminal selects a random number XA (XA < q) as a private key and calculates the first public key YA = a XA modq, where mod represents the remainder operation. The public parameters and the first public key are added to the channel establishment request as H235 protocol information. The H235 protocol is a security-related protocol in the H323 protocol.
[0061] The PBX server extracts the H235 protocol information from the received channel establishment request to obtain the public parameters and the first public key. Then, the PBX server selects a random number BX (XB<q) as a private key and calculates the second public key YB=a XB modq.
[0062] The PBX server then calculates the second private key K based on the public parameter q, the first public key YA and the random number BX 2 =(YA) XB modq, the calculated second private key is the master key on the PBX server side.
[0063] The PBX server sends the second public key to the H.323 terminal, and the H.323 terminal calculates the first private key K according to the public parameter q, the second public key YB and the random number XA. 1 =(YB) XA modq. The first private key is the master key on the H.323 terminal side. According to the modulo operation rule, the value of the first private key is the same as the value of the second private key, that is, the H.323 terminal and the PBX server have completed the exchange of the same private key.
[0064] Furthermore, the step of the PBX server extracting the H235 protocol information from the channel establishment request to obtain the public parameters and the first public key in the H235 protocol information may include: the PBX server sends the channel establishment request to the SIP conference server; when the PBX server receives the request confirmation information returned by the SIP conference server, the PBX server extracts the H235 protocol information from the channel establishment request to obtain the public parameters and the first public key in the H235 protocol information.
[0065] Specifically, after receiving the channel establishment request from the H.323 terminal, the PBX server sends the channel establishment request to the SIP conference server. The channel establishment request is also a request for the SIP conference server to participate in the IP telephone conference. After receiving the channel establishment request, the SIP conference server generates a request confirmation message and sends it to the PBX server. For example, the SIP conference server can use the message "200OK" as the request confirmation message and send it to the PBX server. After receiving the request confirmation message, the PBX server extracts the H235 protocol information from the channel establishment request to obtain the public parameters and the first public key in the H235 protocol information.
[0066] In one embodiment, after receiving the channel establishment request, the PBX server can immediately obtain the H235 protocol information from the channel establishment request, and then send the channel establishment request to the SIP conference server, and after receiving the request confirmation information from the SIP conference server, generate the second public key of the called party.
[0067] In this embodiment, a channel establishment request is sent to the SIP conference server and request confirmation information from the SIP conference server is received, so that the SIP conference server will join the subsequent IP telephone conference.
[0068] The process of determining the master key between the H.323 terminal, the PBX server, and the SIP conference server is implemented based on the H225 protocol, which is the H225.0 stage of this application.
[0069] In this embodiment, the H.323 terminal and the PBX server determine the master key based on the H225 protocol and the Diffie-Hellman key exchange algorithm.
[0070] Furthermore, the above step S202 may include: determining the control end with the H.323 terminal based on the H245 protocol; when the SIP main server is the control end, generating a key random number for each media stream channel to be established with the H.323 terminal.
[0071] Specifically, after the master key is determined, the H245 phase is entered, during which the H.323 terminal and the SIP main server determine the channel key of each media stream channel based on the H245 protocol.
[0072] The H245 protocol (or H.245 protocol) is a control signaling protocol in the H323 protocol, which can control channel-related information. Based on the H245 protocol, the H.323 terminal and the SIP main server need to go through the stages of capability exchange (CapabilityExchange), master / slave determination (Master / Slave) and channel opening (OpenLogic Channel). Among them, in the master / slave determination stage, the H.323 terminal and the SIP main server need to determine the control end, i.e., the Master end, and the other end as the slave end, i.e., the Slave end.
[0073] Generally, the PBX server related parameters in the SIP main server can be set in advance so that the server can be used as the control end. When the PBX server in the SIP main server acts as the control end, the PBX server generates a corresponding key random number for each media stream channel to be established.
[0074] In one embodiment, the PBX server generates OLC signaling, ie, channel opening signaling, in the channel opening (Open Logic Channel) phase. The signaling includes a channel key of each media stream channel.
[0075] In this embodiment, when the SIP main server is determined as the control end based on the H245 protocol, the SIP main server may generate a key random number for each media stream channel, so as to subsequently generate a channel key for each media stream channel.
[0076] Furthermore, after the above step S204, the process may further include: generating session description information including a channel key; generating confirmation information based on the session description information; and sending the confirmation information to the SIP conference server via the PBX server.
[0077] Specifically, the channel key generated by the SIP main server exists in the PBX server. Since the PBX server no longer participates in information transmission based on the media stream channel, and information transmission exists between the H.323 terminal and the SIP conference server, the PBX server also needs to send the channel key to the SIP conference server.
[0078] The PBX server generates session description information. The session description information here is the Session Description Protocol SDP (Session Description Protocol), which is actually a data format used to describe multimedia connection content, such as resolution, format, encoding and encryption algorithm. The session description information contains a=h235key corresponding to each media stream channel, that is, the channel key of each media stream channel in base64 format.
[0079] Then, confirmation information is generated according to the session description information. Since the confirmation information (Acknowledge, ACK) between the PBX server and the SIP conference server is generated after the PBX server communicates with the H.323 terminal, the PBX server can generate delayed confirmation information (Delayed ACK) and then send the delayed confirmation information to the SIP conference server, thereby ensuring that the subsequent SIP conference server can achieve secure communication.
[0080] In this embodiment, the channel key is included in the confirmation information and sent to the SIP conference server, so that the SIP conference server can implement secure communication later.
[0081] Furthermore, after the step of sending the confirmation information to the SIP conference server through the PBX server, the method may further include: obtaining the information to be sent through the SIP conference server, and encrypting the information to be sent according to the channel key to obtain encrypted information; and sending the encrypted information to the H.323 terminal based on the media stream channel.
[0082] Specifically, after the media stream channel is established, if the SIP conference server has unencrypted information to be sent to the H.323 terminal, the information to be sent can be encrypted according to the channel key of the media stream channel required to transmit the information to be sent to obtain encrypted information, and then the encrypted information is sent to the corresponding H.323 terminal through the media stream channel to ensure communication security. For example, the information to be sent is audio, and there are two media stream channels for transmitting audio; according to the setting information, the information to be sent needs to be transmitted through the first media stream channel a for transmitting audio, then the channel key ak of the media stream channel a is obtained, and the information to be sent is encrypted according to the channel key ak to obtain encrypted information.
[0083] In one embodiment, the channel key is a symmetric key, and the algorithm used is the AES-128-CBC group symmetric encryption algorithm.
[0084] In this embodiment, the information to be sent is encrypted according to the channel key to obtain the encrypted information, thereby ensuring the security of sending the encrypted information to the H.323 terminal.
[0085] Furthermore, after the above step S204, the method may further include: receiving media stream information sent by the H.323 terminal through the SIP conference server. The media stream information is obtained by the H.323 terminal encrypting the initial media stream information according to the channel key; confirming the H.323 receiving terminal corresponding to the media stream information; and sending the media stream information to the H.323 receiving terminal through the SIP conference server.
[0086] Specifically, during an IP telephone conference, the H.323 terminal obtains initial media stream information, such as collected audio or video, encrypts the initial media stream information according to a corresponding channel key to obtain media stream information, and then sends the media stream information to the SIP conference server through a media stream channel.
[0087] There can be multiple H.323 terminals connected to the SIP conference server. For the media stream information sent by one of the H.323 terminals, the SIP conference server needs to forward it to other H.323 terminals participating in the conference, namely, the H.323 receiving terminals; or, the SIP conference server extracts the receiving terminal identifier from the media stream information, and determines which H.323 terminals are the H.323 receiving terminals of the media stream information according to the receiving terminal identifier. Then the SIP conference server sends the media stream information to the determined H.323 receiving terminal, realizing secure media stream communication and secure IP telephone conference.
[0088] In this embodiment, after receiving the media stream information encrypted by the channel key, the SIP conference server determines the H.323 receiving terminal and then sends the media stream information to the H.323 receiving terminal, thereby achieving secure media stream communication with the H.323 terminal and a secure IP telephone conference.
[0089] like Figure 3 FIG. 1 is a timing diagram of a secure communication method in one embodiment. Figure 3 The H.323 terminal, the PBX server and the SIP conference server are included, wherein the PBX server and the SIP conference server constitute the SIP main server. In the H225.0 stage, the H.323 terminal sends a channel establishment request to the PBX server, and the channel establishment request carries the H235 protocol information related to the calling party H.323 terminal. The PBX server sends the channel establishment request to the SIP conference server, and the channel establishment request is also a conference request for the SIP conference server, and returns the request confirmation information to the PBX server. The H235 protocol information in the channel establishment request contains public parameters and a first public key generated by the H.323 terminal. The PBX server calculates a second public key based on the public parameters, and calculates a second private key based on the public parameters and the first public key; the PBX server generates the H235 protocol information on the SIP conference server side, which contains the second public key. The H.323 terminal can calculate the first private key based on the second public key in the received H235 protocol information. The first private key is the same as the second private key, and is the master key determined by the H.323 terminal and the PBX server.
[0090] Then enter the H245 stage, the H.323 terminal and the PBX server conduct capability exchange (CapabilityExchange), master / slave determination stage (Master / Slave) and channel opening (Open Logic Channel) stage. In the master / slave determination stage, the PBX server, as the control end, generates a random key number for each media stream channel, and encrypts the random key number with the master key to obtain the channel key of each media stream channel. The PBX server sends the channel opening signaling (OLC signaling) carrying the channel key to the H.323 terminal, opens the media stream channel between the SIP conference server and the H.323 terminal, and sends the channel key to the H.323 terminal at the same time.
[0091] The PBX server generates a session description protocol SDP, which includes a=h235key corresponding to each media stream channel, that is, the channel key of each media stream channel in base64 format. Then it generates a delayed acknowledgment message Delayed ACK carrying the session description protocol SDP, and sends the delayed acknowledgment message to the SIP conference server, thereby sending the channel key to the SIP conference server. The channel key can be a symmetric key, and the algorithm used is the AES-128-CBC group symmetric encryption algorithm.
[0092] At this point, a media stream channel is established between the H.323 terminal and the SIP conference server, and the channel key of the media stream channel is determined. During communication, data is encrypted according to the channel key, thereby realizing point-to-point two-way secure media stream communication between the H.323 terminal and the SIP main server, ensuring communication security.
[0093] 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 computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0094] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0095] Further references Figure 4 , as a response to the above Figure 2 The present application provides an embodiment of a secure communication device, and the device embodiment is Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0096] like Figure 4As shown, the secure communication device 300 described in this embodiment includes: a master key determination module 301, a random number generation module 302, a channel key generation module 303 and a channel key sending module 304, wherein:
[0097] The master key determination module 301 is used to determine the master key between the H.323 terminal based on a preset key agreement algorithm.
[0098] The random number generation module 302 is used to generate a key random number for each media stream channel to be established with the H.323 terminal.
[0099] The channel key generation module 303 is used to encrypt the key random number according to the master key to obtain the channel key of the media stream channel.
[0100] The channel key sending module 304 is used to generate a channel opening signaling including a channel key, and send the channel opening signaling to the H.323 terminal to open a media stream channel with the H.323 terminal, and send the channel key to the H.323 terminal.
[0101] In this embodiment, the SIP main server and the H.323 terminal can determine the master key based on the key agreement algorithm under the premise of ensuring information security; the SIP main server and the H.323 terminal can establish multiple media stream channels, and for each media stream channel, a corresponding key random number can be generated; the master key is a high-level key, which is used to encrypt the key random number to generate a channel key; the SIP main server generates a channel opening signaling carrying the channel key and sends it to the H.323 terminal, so that the H.323 terminal also holds the channel key and opens the media stream channel between the SIP main server and the H.323 terminal; when the media stream information is transmitted through the media stream channel, it needs to be encrypted according to the channel key, thereby realizing point-to-point two-way secure media stream communication between the H.323 terminal and the SIP main server, ensuring communication security.
[0102] In some optional implementations of this embodiment, the SIP main server includes a PBX server and a SIP conference server, and the master key determination module 301 may include: a request receiving submodule, an information extraction submodule, a key calculation submodule, a key determination submodule, and a key sending submodule, wherein:
[0103] The request receiving submodule is used to receive a channel establishment request sent by an H.323 terminal; the channel establishment request is generated based on the H225 protocol and is used to request to establish a media stream channel between the H.323 terminal and the SIP conference server.
[0104] The information extraction submodule is used for the PBX server to extract H235 protocol information from the channel establishment request to obtain the public parameters and the first public key in the H235 protocol information; the first public key is calculated by the H.323 terminal based on the public parameters.
[0105] The key calculation submodule is used to calculate and generate a second public key according to the public parameters, and to calculate and generate a second private key according to the public parameters and the first public key.
[0106] The key determination submodule is used to determine the second private key as the main key.
[0107] The key sending submodule is used for the PBX server to send the second public key to the H.323 terminal to instruct the H.323 terminal to calculate the first private key according to the public parameters and the second public key; the first private key is the same as the second private key and is the master key on the H.323 terminal side.
[0108] In this embodiment, the H.323 terminal and the PBX server determine the master key based on the H225 protocol and the Diffie-Hellman key exchange algorithm.
[0109] In some optional implementations of this embodiment, the information extraction submodule may include: a sending unit and an extraction unit, wherein:
[0110] The sending unit is used to send the channel establishment request to the SIP conference server through the PBX server.
[0111] The extracting unit is used to extract H235 protocol information from the channel establishment request through the PBX server when the PBX server receives the request confirmation information returned by the SIP conference server, so as to obtain the public parameters and the first public key in the H235 protocol information.
[0112] In this embodiment, a channel establishment request is sent to the SIP conference server and request confirmation information from the SIP conference server is received, so that the SIP conference server will join the subsequent IP telephone conference.
[0113] In some optional implementations of this embodiment, the random number generation module 302 may include: a control terminal determination submodule and a random number generation submodule, wherein:
[0114] The control end determination submodule is used to determine the control end with the H.323 terminal based on the H245 protocol.
[0115] The random number generation submodule is used to generate a key random number for each media stream channel to be established between the SIP main server and the H.323 terminal when the SIP main server is the control terminal.
[0116] In this embodiment, when the SIP main server is determined as the control end based on the H245 protocol, the SIP main server may generate a key random number for each media stream channel, so as to subsequently generate a channel key for each media stream channel.
[0117] In some optional implementations of this embodiment, the safety communication device 300 may further include: a description generation module, a confirmation generation module, and a confirmation sending module, wherein:
[0118] The description generation module is used to generate session description information including a channel key.
[0119] The confirmation generating module is used to generate confirmation information based on the session description information.
[0120] The confirmation sending module is used to send the confirmation information to the SIP conference server through the PBX server.
[0121] In this embodiment, the channel key is included in the confirmation information and sent to the SIP conference server, so that the SIP conference server can implement secure communication later.
[0122] In some optional implementations of this embodiment, the secure communication device 300 may further include: an information encryption module and an encryption sending module, wherein:
[0123] The information encryption module is used to obtain the information to be sent through the SIP conference server, and encrypt the information to be sent according to the channel key to obtain the encrypted information.
[0124] The encryption sending module is used to send the encrypted information to the H.323 terminal based on the media stream channel.
[0125] In this embodiment, the information to be sent is encrypted according to the channel key to obtain the encrypted information, thereby ensuring the security of sending the encrypted information to the H.323 terminal.
[0126] In some optional implementations of this embodiment, the security communication device 300 may further include: an information receiving module, a terminal confirmation module, and an information sending module, wherein:
[0127] The information receiving module is used to receive the media stream information sent by the H.323 terminal through the SIP conference server. The media stream information is obtained by the H.323 terminal encrypting the initial media stream information according to the channel key.
[0128] The terminal confirmation module is used to confirm the H.323 receiving terminal corresponding to the media stream information.
[0129] The information sending module is used to send the media stream information to the H.323 receiving terminal through the SIP conference server.
[0130] In this embodiment, after receiving the media stream information encrypted by the channel key, the SIP conference server determines the H.323 receiving terminal and then sends the media stream information to the H.323 receiving terminal, thereby achieving secure media stream communication with the H.323 terminal and a secure IP telephone conference.
[0131] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0132] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0133] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0134] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of a secure communication method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0135] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the secure communication method.
[0136] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0137] The computer device provided in this embodiment can execute the above-mentioned secure communication method. The secure communication method here can be the secure communication method of each of the above-mentioned embodiments.
[0138] In this embodiment, the SIP main server and the H.323 terminal can determine the master key based on the key agreement algorithm under the premise of ensuring information security; the SIP main server and the H.323 terminal can establish multiple media stream channels, and for each media stream channel, a corresponding key random number can be generated; the master key is a high-level key, which is used to encrypt the key random number to generate a channel key; the SIP main server generates a channel opening signaling carrying the channel key and sends it to the H.323 terminal, so that the H.323 terminal also holds the channel key and opens the media stream channel between the SIP main server and the H.323 terminal; when the media stream information is transmitted through the media stream channel, it needs to be encrypted according to the channel key, thereby realizing point-to-point two-way secure media stream communication between the H.323 terminal and the SIP main server, ensuring communication security.
[0139] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the secure communication method as described above.
[0140] In this embodiment, the SIP main server and the H.323 terminal can determine the master key based on the key agreement algorithm under the premise of ensuring information security; the SIP main server and the H.323 terminal can establish multiple media stream channels, and for each media stream channel, a corresponding key random number can be generated; the master key is a high-level key, which is used to encrypt the key random number to generate a channel key; the SIP main server generates a channel opening signaling carrying the channel key and sends it to the H.323 terminal, so that the H.323 terminal also holds the channel key and opens the media stream channel between the SIP main server and the H.323 terminal; when the media stream information is transmitted through the media stream channel, it needs to be encrypted according to the channel key, thereby realizing point-to-point two-way secure media stream communication between the H.323 terminal and the SIP main server, ensuring communication security.
[0141] 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, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0142] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A secure communication method, applied to a SIP main server, characterized in that: The steps include: Determine the master key between the H.323 terminal and the H.323 terminal based on the preset key agreement algorithm; For each media stream channel to be established with the H.323 terminal, generating a key random number for the media stream channel; Encrypting the key random number according to the master key to obtain a channel key of the media stream channel; Generate a channel opening signaling including the channel key, and send the channel opening signaling to the H.323 terminal to open a media stream channel with the H.323 terminal, and send the channel key to the H.323 terminal; The SIP main server includes a PBX server and a SIP conference server. The step of determining the master key between the H.323 terminal and the H.323 terminal based on the preset key agreement algorithm includes: Receiving a channel establishment request sent by an H.323 terminal; the channel establishment request is generated based on the H225 protocol and is used to request to establish a media stream channel between the H.323 terminal and the SIP conference server; The PBX server extracts H235 protocol information from the channel establishment request to obtain public parameters and a first public key in the H235 protocol information; the first public key is calculated by the H.323 terminal based on the public parameters; Calculate and generate a second public key according to the public parameter, and calculate and generate a second private key according to the public parameter and the first public key; Determine the second private key as a master key; The PBX server sends the second public key to the H.323 terminal to instruct the H.323 terminal to calculate a first private key according to the public parameters and the second public key; the first private key is the same as the second private key and is a master key on the H.323 terminal side.
2. The secure communication method according to claim 1, characterized in that: The step of extracting the H235 protocol information from the channel establishment request to obtain the public parameters and the first public key in the H235 protocol information by the PBX server comprises: The PBX server sends the channel establishment request to the SIP conference server; When the PBX server receives the request confirmation information returned by the SIP conference server, the PBX server extracts the H235 protocol information from the channel establishment request to obtain the public parameters and the first public key in the H235 protocol information.
3. The secure communication method according to claim 1, characterized in that: The step of generating a random key number for each media stream channel to be established with the H.323 terminal comprises: Determine the control end with the H.323 terminal based on the H245 protocol; When the SIP main server is a control terminal, for each media stream channel to be established with the H.323 terminal, a key random number of the media stream channel is generated.
4. The secure communication method according to claim 1, characterized in that: After the step of generating a channel opening signaling including the channel key, and sending the channel opening signaling to the H.323 terminal to open a media stream channel with the H.323 terminal, and sending the channel key to the H.323 terminal, the method further includes: Generate session description information including the channel key; generating confirmation information based on the session description information; The confirmation information is sent to the SIP conference server through the PBX server.
5. The secure communication method according to claim 4, characterized in that: After the step of sending the confirmation information to the SIP conference server through the PBX server, the method further includes: Acquire the information to be sent through the SIP conference server, and encrypt the information to be sent according to the channel key to obtain encrypted information; Based on the media stream channel, the encrypted information is sent to the H.323 terminal.
6. The secure communication method according to claim 1, characterized in that: After the step of generating a channel opening signaling including the channel key, and sending the channel opening signaling to the H.323 terminal to open a media stream channel with the H.323 terminal, and sending the channel key to the H.323 terminal, the method further includes: The SIP conference server receives the media stream information sent by the H.323 terminal; the media stream information is obtained by the H.323 terminal encrypting the initial media stream information according to the channel key; Confirming the H.323 receiving terminal corresponding to the media stream information; The media stream information is sent to the H.323 receiving terminal through the SIP conference server.
7. A secure communication device, characterized in that: include: A master key determination module, used to determine the master key between the H.323 terminal based on a preset key agreement algorithm; A random number generation module, used for generating a key random number of each media stream channel to be established with the H.323 terminal; A channel key generation module, used to encrypt the key random number according to the master key to obtain the channel key of the media stream channel; A channel key sending module, used for generating a channel opening signaling including the channel key, and sending the channel opening signaling to the H.323 terminal to open a media stream channel with the H.323 terminal, and sending the channel key to the H.323 terminal; The SIP main server includes a PBX server and a SIP conference server. The determination of the master key between the SIP main server and the H.323 terminal based on the preset key agreement algorithm includes: Receiving a channel establishment request sent by an H.323 terminal; the channel establishment request is generated based on the H225 protocol and is used to request to establish a media stream channel between the H.323 terminal and the SIP conference server; The PBX server extracts H235 protocol information from the channel establishment request to obtain public parameters and a first public key in the H235 protocol information; the first public key is calculated by the H.323 terminal based on the public parameters; Calculate and generate a second public key according to the public parameter, and calculate and generate a second private key according to the public parameter and the first public key; Determine the second private key as a master key; The PBX server sends the second public key to the H.323 terminal to instruct the H.323 terminal to calculate a first private key according to the public parameters and the second public key; the first private key is the same as the second private key and is a master key on the H.323 terminal side.
8. A computer device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the secure communication method according to any one of claims 1 to 6 when executing the computer-readable instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the secure communication method according to any one of claims 1 to 6 are implemented.
