WO2023241176A1 - 通信方法、装置、设备、存储介质及程序产品 - Google Patents

通信方法、装置、设备、存储介质及程序产品 Download PDF

Info

Publication number
WO2023241176A1
WO2023241176A1 PCT/CN2023/086309 CN2023086309W WO2023241176A1 WO 2023241176 A1 WO2023241176 A1 WO 2023241176A1 CN 2023086309 W CN2023086309 W CN 2023086309W WO 2023241176 A1 WO2023241176 A1 WO 2023241176A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
terminal
connection establishment
encryption result
signaling server
Prior art date
Application number
PCT/CN2023/086309
Other languages
English (en)
French (fr)
Inventor
毛峻岭
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2023241176A1 publication Critical patent/WO2023241176A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0869Network architectures or network communication protocols for network security for authentication of entities for achieving mutual authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/6437Real-time Transport Protocol [RTP]

Definitions

  • the embodiments of the present application relate to the field of communication technology, as they relate to a communication method, device, equipment, storage medium and program product.
  • the car and user terminals can transmit videos based on the Web Real-Time Communication (webRTC) point-to-point (P2P) mechanism, allowing users to View in-car video or drive remotely through the user terminal.
  • webRTC Web Real-Time Communication
  • P2P point-to-point
  • the user terminal and the car can exchange Session Description Protocol (SDP), Interactive Connectivity Establishment (ICE), etc. related to establishing the video connection through the signaling server.
  • SDP Session Description Protocol
  • ICE Interactive Connectivity Establishment
  • DTLS Datagram Transport Layer Security
  • the user terminal and the car can exchange secure real-time The Transport Protocol (Secure Real-time Transport Protocol, SRTP) uses a video encryption key for encrypted transmission of video.
  • SRTP Secure Real-time Transport Protocol
  • the user terminal can send a video connection establishment request to the car.
  • DTLS parameters can be passed, such as the signature of the user terminal's public key certificate, etc., and the parameters carried in the request directly affect the video Whether the encryption key can be transmitted securely affects whether the video can be transmitted securely.
  • the user terminal forwards the video connection establishment request to the car through the signaling server.
  • This method has the problem of low security of the request transmission, which in turn leads to the problem of low security of video transmission.
  • embodiments of the present application provide a communication method, which method is applied to a first terminal.
  • the method includes: accessing a signaling server to trigger two-way authentication between the first terminal and the signaling server; After the two-way authentication between the terminal and the signaling server is successful, a video connection establishment request is generated; the video connection establishment request is signed; The video connection establishment request and the signature of the video connection establishment request are encrypted to obtain a first encryption result; the first encryption result is transmitted to the signaling server, so that the signaling server uses the mapping relationship between the first terminal and the second terminal to The first encryption result is transmitted to the second terminal.
  • embodiments of the present application provide a communication method, which is applied to a second terminal.
  • the method includes: accessing a signaling server to trigger two-way authentication between the second terminal and the signaling server; After the two-way authentication between the terminal and the signaling server is successful, the first encryption result sent by the signaling server through the mapping relationship between the first terminal and the second terminal is received; the first encryption result is a video connection establishment request and a video connection Establish the encryption result obtained by encrypting the signature of the request; decrypt the first encryption result to obtain the video connection establishment request and the signature of the video connection establishment request; and verify the signature of the video connection establishment request.
  • inventions of the present application provide a communication device.
  • the communication device is a first terminal and includes: a processing module and a communication module.
  • the processing module is configured to: access a signaling server to trigger the first terminal to communicate with the signaling server. two-way authentication between the first terminal and the signaling server; after the two-way authentication between the first terminal and the signaling server is successful, generate a video connection establishment request; sign the video connection establishment request; encrypt the video connection establishment request and the signature of the video connection establishment request , obtain the first encryption result; the communication module is used to: transmit the first encryption result to the signaling server, so that the signaling server transmits the first encryption result to the second terminal through the mapping relationship between the first terminal and the second terminal. terminal.
  • inventions of the present application provide a communication device.
  • the communication device is a second terminal and includes: a processing module and a communication module; the processing module is used to access the signaling server to trigger the communication between the second terminal and the signaling server. Two-way authentication between; the communication module is configured to receive the first encryption result sent by the signaling server through the mapping relationship between the first terminal and the second terminal after the two-way authentication between the second terminal and the signaling server is successful;
  • An encryption result is an encryption result obtained by encrypting the video connection establishment request and the signature of the video connection establishment request; the processing module is also used to decrypt the first encryption result to obtain the video connection establishment request and the signature of the video connection establishment request; processing The module is also used to verify the signature of the video connection establishment request.
  • embodiments of the present application provide an electronic device, including: a processor and a memory, the memory is used to store a computer program, the processor is used to call and run the computer program stored in the memory, and perform the steps from the first aspect to Methods in any aspect of the second aspect or implementations thereof.
  • embodiments of the present application provide a computer-readable storage medium for storing a computer program.
  • the computer program causes the computer to execute the method in any one of the first to second aspects or implementations thereof.
  • embodiments of the present application provide a computer program product, including computer program instructions, which cause a computer to execute the method in any one of the first to second aspects or implementations thereof.
  • embodiments of the present application provide a computer program.
  • the computer program causes the computer to execute the steps of the first party. Turn to the method in any aspect of the second aspect or its respective implementations.
  • the signaling server can ensure the legitimacy of the source of the video creation request, that is, the first terminal.
  • the signaling server transmits the encryption result of the video connection establishment request and the signature of the video connection establishment request, that is, the first encryption result to the second terminal based on the mapping relationship between the first terminal and the second terminal, it can be targeted
  • the video connection request is transmitted to the second terminal instead of to other terminal devices.
  • the first terminal can perform signature encrypted transmission on the video connection establishment request, thereby preventing the illegal signaling server from tampering with the video connection establishment request. Based on this, the above three aspects can ensure the safe transmission of video connection establishment requests, thereby ensuring the security of video transmission.
  • Figure 1 is a flow chart of the video transmission method based on webRTC P2P mechanism
  • Figure 2 exemplarily shows an application scenario diagram of the technical solution of the present application
  • Figure 4 is an interactive flow chart of another communication method provided by an embodiment of the present application.
  • Figure 7 is a schematic diagram of a communication device 700 provided by an embodiment of the present application.
  • Figure 8 is a schematic diagram of a communication device 800 provided by an embodiment of the present application.
  • Figure 9 is a schematic block diagram of an electronic device 900 provided by an embodiment of the present application.
  • Symmetric key encryption Also known as private key encryption or shared key encryption, that is, both parties sending and receiving data use the same key to encrypt and decrypt plain text.
  • Digital signature Also known as a digital signature, a digital string that can only be generated by the sender of the message and cannot be forged by others. This digital string is also an effective proof of the authenticity of the message sent by the sender of the message.
  • Digital signature is the application of asymmetric key encryption technology and digital digest technology. For example, the Secure Hash Algorithm (SHA) 256+RSA algorithm can be used to implement the signature.
  • SHA Secure Hash Algorithm
  • 256+RSA algorithm can be used to implement the signature.
  • RSA It is currently the most influential public key encryption algorithm. It is resistant to all cryptographic attacks known so far and has been recommended as a public key data encryption standard by the International Organization for Standardization (ISO). RSA is an asymmetric encryption algorithm, that is, the encryption key is different from the decryption key. Content encrypted with the private key can only be decrypted by the public key, and content encrypted with the public key can only be decrypted by the private key.
  • ISO International Organization for Standardization
  • Certificate includes the subject's public key value, subject identifier information, validity period, issuer identifier information, and issuer's signature.
  • FIG. 1 is a flow chart of a video transmission method based on the webRTC P2P mechanism.
  • the video transmission method includes: a video connection initiation stage and a video transmission stage.
  • the user terminal can use the SDP protocol to send a video connection establishment request (offer) to the vehicle terminal through the signaling server, and receive the video connection establishment reply (answer) sent by the vehicle terminal through the signaling server using the SDP protocol.
  • the offer can carry at least one of the following: But not limited to:
  • the car terminal can carry confirmation and selection of various information in the offer in the answer.
  • the user terminal can send a UDP Simple Traversal of UDP over NATs (STUN) request for Network Address Translation (NAT) to the car terminal, and receive the STUN response sent by the car terminal to find the user terminal and The passage between the car ends.
  • STUN UDP Simple Traversal of UDP over NATs
  • NAT Network Address Translation
  • the user terminal and the vehicle terminal exchange video encryption keys through the interaction of DTLS signaling. Furthermore, the user terminal and the vehicle terminal can use the video encryption key to encrypt the video transmission through SRTP.
  • the offer can pass DTLS parameters, such as the signature of the public key certificate of the user terminal, etc., and the parameters carried in the offer directly affect whether the video encryption key can be safely transmitted, and thus affect whether the video can be transmitted safely.
  • the user terminal forwards the video connection establishment request to the car through the signaling server. This method has the problem of low security of the request transmission, which in turn leads to the problem of low security of video transmission.
  • a secure mapping relationship between the car terminal and the user terminal can be constructed, and the above request can be signed and encrypted for transmission.
  • FIG. 2 exemplarily shows an application scenario diagram of the technical solution of the present application.
  • both the user terminal 210 and the vehicle terminal 220 can communicate with the signaling server 230 to establish a video connection.
  • the established video connection may be a P2P mode video connection, that is, direct communication between the user terminal 210 and the car terminal 220, or the established video connection may also be a forwarding-based video connection, that is, between the user terminal 210 and the car terminal 220 Forwarding communications is accomplished through a forwarding server 240.
  • the forwarding server 240 and the signaling server 230 may be the same server or different servers.
  • the user terminal 210, the vehicle terminal 220 and the signaling server 230 can communicate through wired or wireless communication methods. lines are connected directly or indirectly, this application is not limited here.
  • the communication between the user terminal 210, the car terminal 220 and the signaling server 230 may be based on the fifth generation (the 5th Generation, 5G) communication system, the fourth generation (the 4th Generation, 4G) communication system, the third generation (the 3th Generation, 3G) communication system, wireless fidelity (Wireless Fidelity, WiFi) or other wireless communication technology implementation.
  • the user terminal 210 may be a mobile phone, a computer, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, etc., but is not limited thereto.
  • the signaling server 230 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or may provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, Cloud servers for basic cloud computing services such as network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.
  • cloud services such as network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.
  • CDN Content Delivery Network
  • the forwarding server 240 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or may provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, and networks. services, cloud communications, middleware services, domain name services, security services, CDN, and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms.
  • Embodiments of this application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc.
  • it can be applied to vehicle video application scenarios such as sentry mode and remote driving.
  • Sentry Mode refers to detecting potential threats through the vehicle's external camera, for example: detecting whether someone is approaching the vehicle or whether the vehicle has been damaged, etc.
  • the second terminal accesses the signaling server to trigger two-way authentication between the second terminal and the signaling server;
  • S304 The first terminal signs the video connection establishment request
  • S306 The first terminal transmits the first encryption result to the signaling server
  • the signaling server may establish a mapping relationship between the first terminal and the second terminal. Based on this, after the signaling server receives the first encryption result, it can send the first encryption result to the second terminal based on the mapping relationship without sending the first encryption result to other terminals.
  • the user can initiate a video connection through an application (APP) on the first terminal that is used to realize video transmission between the first terminal and the second terminal, select the second terminal to be connected, and can also enter the username of the second terminal. user password.
  • APP application
  • the first terminal will access the signaling server.
  • the second terminal will access the signaling server.
  • the audio and video parameters include: compression encoding format, resolution, etc., but are not limited to this.
  • the video encryption key distribution algorithm may be an RSA algorithm or a key exchange algorithm (Diffie-Hellman, DH) algorithm, or the like.
  • the video connection establishment request may also include: an identifier for establishing a data channel, etc.
  • the data channel is used to transmit control information, such as control information for controlling brakes, control information for controlling throttle, etc.
  • the first terminal can use the user password of the second terminal to encrypt the video connection establishment request and the signature of the request, or can use the user password and dynamic password of the second terminal to encrypt the video connection establishment request and the request's signature.
  • the signature is encrypted.
  • the second terminal may also use the same password as the first terminal to decrypt the first encryption result.
  • the second terminal when the first terminal uses the user password of the second terminal to encrypt the video connection establishment request and the signature of the request, the second terminal also uses the user password of the second terminal to decrypt the first encryption result.
  • the first terminal uses the user password and dynamic password of the second terminal to encrypt the video connection establishment request and the signature of the request, the second terminal also uses the user password and dynamic password of the second terminal to decrypt the first encryption result.
  • the first terminal can also verify the signature of the public key certificate after successfully verifying the signature of the video connection establishment request.
  • the signature verification process can refer to the signature verification process of the video connection establishment request, which will not be described in detail in this application.
  • the signaling server transmits the encryption result of the video connection establishment request and the signature of the video connection establishment request, that is, the first encryption result to the second terminal based on the mapping relationship between the first terminal and the second terminal, it can be targeted
  • the video connection request is transmitted to the second terminal instead of to other terminal devices.
  • the first terminal can perform signature encrypted transmission on the video connection establishment request, thereby preventing the illegal signaling server from tampering with the video connection establishment request. Based on this, the above three aspects can ensure the safe transmission of video connection establishment requests, thereby ensuring the security of video transmission.
  • the signaling server can authenticate the first terminal and the second terminal based on the hardware information of the first terminal and the second terminal. This method can reduce the risk of identity forgery of the first terminal and the second terminal.
  • the second terminal may send a video connection establishment reply to the first terminal.
  • video connection establishment reply may carry confirmation and selection of various information in the video connection establishment request.
  • the video connection establishment reply may include: agreement to establish the data channel and the certificate corresponding to each data channel, and subsequently in the data channel The data in can be signed using the corresponding certificate.
  • S310 The second terminal generates a video connection establishment reply
  • S311 The second terminal signs the video connection establishment reply
  • the signaling server transmits the second encryption result to the first terminal through the mapping relationship between the first terminal and the second terminal;
  • S315 The first terminal decrypts the second encryption result and obtains the video connection establishment reply and the signature of the video connection establishment reply;
  • the second terminal may use the SHA256+RSA signature algorithm to sign the video connection establishment reply.
  • the second terminal can first use the SHA256 algorithm for the video connection establishment reply to obtain the hash value, that is, the digest, and then encrypt the hash value using RSA to obtain the signature of the video connection establishment reply.
  • the second terminal may use the private key of the public key certificate of the second asymmetric key or a third-party key to sign the video connection establishment reply.
  • the second asymmetric key is generated by the second terminal.
  • the signing of the video connection establishment reply is to prevent the video connection establishment reply from being tampered with.
  • the second terminal needs to send the video connection establishment reply and the signature of the reply to the first terminal through the signaling server.
  • the video connection establishment reply and the signature of the reply need to be encrypted.
  • the second terminal can use the user password of the second terminal to encrypt the video connection establishment reply and the signature of the reply, or can use the user password and dynamic password of the second terminal to encrypt the video connection establishment reply and the signature of the reply.
  • the signature is encrypted.
  • the first terminal may also use the same password as the second terminal to decrypt the second encryption result.
  • the first terminal when the second terminal uses the user password of the second terminal to encrypt the video connection establishment reply and the signature of the reply, the first terminal also uses the user password of the second terminal to decrypt the second encryption result.
  • the second terminal uses the user password and dynamic password of the second terminal to encrypt the video connection establishment reply and the signature of the reply, the first terminal also uses the user password and dynamic password of the second terminal to decrypt the second encryption result.
  • the first terminal may first obtain the video connection establishment reply through the second asymmetric encryption
  • the public key of the public key certificate or a third-party key decrypts the signature to obtain a hash value.
  • the first terminal can reply to the video connection establishment using SHA256 to obtain a hash value and compare the two hash values. , if the two hash values are the same, it means that the signature of the video connection establishment reply is legal, otherwise, it means that the signature of the video connection establishment reply is illegal.
  • the two-way authentication between the first terminal and the signaling server is successful and the two-way authentication between the second terminal and the signaling server is successful, even if the illegal user terminal steals the identity of the first terminal, Since the illegal user terminal has not registered its identity on the signaling server and does not have the CA certificate of the signaling server, the two-way authentication between it and the signaling server fails. Based on this, other illegal user terminals can be prevented from accessing.
  • the signaling server can ensure the legitimacy of the destination end of the video connection establishment reply, that is, the first terminal.
  • the first terminal and the second terminal may Find a path between the first terminal and the second terminal, and implement video encryption key exchange based on the path, thereby realizing video transmission.
  • the video transmission between the first terminal and the second terminal is not limited to the P2P video transmission mode, and a forwarding-based video transmission mode can also be used.
  • the video connection establishment request may include: an identification of the requested video transmission mode, for example: the requested video transmission mode is P2P and/or forward-based video transmission mode
  • the video connection suggestion reply may include: second The first video transmission mode confirmed by the terminal, such as confirming that the P2P video transmission mode or the forwarding-based video transmission mode will be used subsequently.
  • S318 The first terminal signs the video forwarding interaction request
  • S319 The first terminal encrypts the video forwarding interaction request and the signature of the video forwarding interaction request, and obtains the third encryption result;
  • S324 The second terminal generates a video forwarding interactive reply
  • S329 The first terminal decrypts the fourth encryption result and obtains the video forwarding interactive reply and the signature of the video forwarding interactive reply;
  • the first terminal can use the user password of the second terminal to encrypt the video forwarding interaction request and the signature of the request, or can use the user password and dynamic password of the second terminal to encrypt the video forwarding interaction request and the request's signature.
  • the signature is encrypted.
  • the second terminal may first pass the first non-pair signature.
  • the public key of the public key certificate or a third-party key decrypts the signature to obtain a hash value.
  • the second terminal can use SHA256 on the video forwarding interaction request to obtain a hash value and compare the two hashes. Hash value. If the two hash values are the same, it means that the signature of the video forwarding interaction request is legal. Otherwise, it means that the signature of the video forwarding interaction request is illegal.
  • the second terminal may use the private key of the public key certificate of the second asymmetric key or a third-party key to sign the video forwarding interaction reply.
  • the signature of the video forwarding interaction reply is to prevent the video forwarding interaction reply from being tampered with.
  • the second terminal needs to send the video forwarding interactive reply and the signature of the reply to the first terminal through the signaling server.
  • the video forwarding interactive reply and the signature of the reply need to be Encrypt.
  • S603 The first terminal decrypts the fifth encryption result using the private key of the first asymmetric key to obtain the first video encryption key;
  • S604 The second terminal encrypts the video to be transmitted using the first video encryption key to obtain the first encrypted video;
  • S605 The second terminal sends the first encrypted video to the first terminal
  • S606 The first terminal decrypts the first encrypted video using the first video encryption key.
  • S611 The first terminal encrypts the video to be transmitted using the second video encryption key to obtain the second encrypted video;
  • S612 The first terminal sends the second encrypted video to the second terminal;
  • the communication module 720 is also configured to receive a fourth encryption result transmitted by the second terminal through the signaling server.
  • the fourth encryption result is to encrypt the video forwarding interaction reply corresponding to the video forwarding interaction request and the signature of the video forwarding interaction reply.
  • the final encryption result; the processing module 710 is also used to decrypt the fourth encryption result to obtain the video forwarding interactive reply and the signature of the video forwarding interactive reply; and verify the signature of the video forwarding interactive reply.
  • the first encryption result is sent by the mapping relationship between the terminal and the second terminal; the first encryption result is the encryption result obtained by encrypting the video connection establishment request and the signature of the video connection establishment request; the processing module 810 is also used to encrypt the first The encryption result is decrypted to obtain the video connection establishment request and the signature of the video connection establishment request; the processing module 810 is also used to verify the signature of the video connection establishment request.
  • the communication module 820 is also configured to send the public key certificate of the second asymmetric key to the first terminal; receive the sixth encryption result sent by the first terminal, the sixth encryption result is through the second asymmetric key The encryption result of encrypting the second video encryption key with the public key of the public key certificate; the processing module 810 is also configured to decrypt the sixth encryption result with the private key of the second asymmetric key to obtain the second video encryption key ; The communication module 820 is also used to receive the second encrypted video sent by the second terminal; the processing module 810 is also used to decrypt the second encrypted video using the second video encryption key.
  • the processor 920 may be configured to execute the above method embodiments according to instructions in the computer program.
  • the memory 910 includes, but is not limited to:
  • Non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory. Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. Volatile memory may be Random Access Memory (RAM), which is used as an external cache.
  • RAM Random Access Memory
  • Transceiver 930 which may be connected to the processor 920 or the memory 910.
  • the processor 920 can control the transceiver 930 to communicate with other devices. Specifically, the processor 920 can control the transceiver 930 to communicate with other devices. Devices send information or data, or receive information or data from other devices.
  • Transceiver 930 may include a transmitter and a receiver. The transceiver 930 may further include an antenna, and the number of antennas may be one or more.
  • bus system where in addition to the data bus, the bus system also includes a power bus, a control bus and a status signal bus.
  • This application also provides a computer storage medium on which a computer program is stored.
  • the computer program When the computer program is executed by a computer, the computer can perform the method of the above method embodiment.
  • embodiments of the present application also provide a computer program product containing instructions, which when executed by a computer causes the computer to perform the method of the above method embodiments.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted over a wired connection from a website, computer, server, or data center (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to another website, computer, server or data center.
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media.
  • the available media may be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as digital video discs (DVD)), or semiconductor media (such as solid state disks (SSD)), etc.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the modules is only a logical function division. In actual implementation, there may be other division methods.
  • multiple modules or components may be combined or may be Integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be indirect through some interfaces, devices or modules. Coupling or communication connection may be electrical, mechanical or other forms.
  • Modules described as separate components may or may not be physically separated, and components shown as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. For example, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically alone, or two or more modules can be integrated into one module.

Abstract

本申请提供了一种通信方法、装置、设备、存储介质及程序产品,本发明实施例可应用于云技术、人工智能、智慧交通、辅助驾驶等各种场景。该通信方法可以包括:第一终端接入信令服务器,以触发第一终端与信令服务器之间的双向认证;在第一终端与信令服务器之间的双向认证成功之后,第一终端生成视频连接建立请求;并对视频连接建立请求进行签名;对视频连接建立请求和视频连接建立请求的签名进行加密,得到第一加密结果;将第一加密结果传输至信令服务器,以使信令服务器通过第一终端与第二终端之间的映射关系将第一加密结果传输至第二终端。从而可以保证视频连接建立请求的安全传输,进而保证视频传输的安全性。

Description

通信方法、装置、设备、存储介质及程序产品
本申请要求于2022年06月15日提交中国专利局、申请号为2022106815867、发明名称为“通信方法、装置、设备、存储介质及程序产品”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信技术领域,由于涉及一种通信方法、装置、设备、存储介质及程序产品。
背景技术
在哨兵模式、远程驾驶等车载视频应用场景中,车端与用户终端可以基于网页即时通信(Web Real-Time Communication,webRTC)点到点(Point to Point,P2P)机制进行视频传输,使得用户可以通过用户终端查看车端视频或者远程驾驶。
具体地,在发起视频连接阶段,用户终端与车端之间可以通过信令服务器交换会话描述协议(Session Description Protocol,SDP)、交互式连接建立(Interactive Connectivity Establishment,ICE)等与建立视频连接相关的信息;在视频传输阶段,用户终端与车端可以通过数据包传输层安全性协议(Datagram Transport Layer Security,DTLS)实现视频加密密钥的交换,进一步地,用户终端与车端可以通过安全实时传输协议(Secure Real-time Transport Protocol,SRTP)采用视频加密密钥进行视频的加密传输。其中,在SDP过程中,用户终端可以向车端发送视频连接建立请求,通过该请求可以传递DTLS参数,例如包括用户终端的公钥证书的签名等,而该请求中携带的参数直接影响着视频加密密钥是否可以被安全传输,进而影响视频是否可以被安全传输。
目前,用户终端通过信令服务器将视频连接建立请求转发给车端,这种方式存在该请求传输安全性较低的问题,进而导致视频传输安全性较低的问题。
发明内容
本申请实施例提供一种通信方法、装置、设备、存储介质及程序产品,从而可以保证视频连接建立请求的安全传输,进而保证视频传输的安全性。
第一方面,本申请实施例提供一种通信方法,该方法应用于第一终端,该方法包括:接入信令服务器,以触发第一终端与信令服务器之间的双向认证;在第一终端与信令服务器之间的双向认证成功之后,生成视频连接建立请求;对视频连接建立请求进行签名;对 视频连接建立请求和视频连接建立请求的签名进行加密,得到第一加密结果;将第一加密结果传输至信令服务器,以使信令服务器通过第一终端与第二终端之间的映射关系将第一加密结果传输至第二终端。
第二方面,本申请实施例提供一种通信方法,该方法应用于第二终端,该方法包括:接入信令服务器,以触发第二终端与信令服务器之间的双向认证;在第二终端与信令服务器之间的双向认证成功之后,接收信令服务器通过第一终端与第二终端之间的映射关系发送的第一加密结果;第一加密结果是对视频连接建立请求和视频连接建立请求的签名进行加密得到的加密结果;对第一加密结果进行解密,得到视频连接建立请求和视频连接建立请求的签名;对视频连接建立请求的签名进行验签。
第三方面,本申请实施例提供一种通信装置,该通信装置为第一终端,包括:处理模块和通信模块,处理模块用于:接入信令服务器,以触发第一终端与信令服务器之间的双向认证;在第一终端与信令服务器之间的双向认证成功之后,生成视频连接建立请求;对视频连接建立请求进行签名;对视频连接建立请求和视频连接建立请求的签名进行加密,得到第一加密结果;通信模块用于:将第一加密结果传输至信令服务器,以使信令服务器通过第一终端与第二终端之间的映射关系将第一加密结果传输至第二终端。
第四方面,本申请实施例提供一种通信装置,该通信装置为第二终端,包括:处理模块和通信模块;处理模块用于接入信令服务器,以触发第二终端与信令服务器之间的双向认证;通信模块用于在第二终端与信令服务器之间的双向认证成功之后,接收信令服务器通过第一终端与第二终端之间的映射关系发送的第一加密结果;第一加密结果是对视频连接建立请求和视频连接建立请求的签名进行加密得到的加密结果;处理模块还用于对第一加密结果进行解密,得到视频连接建立请求和视频连接建立请求的签名;处理模块还用于对视频连接建立请求的签名进行验签。
第五方面,本申请实施例提供一种电子设备,包括:处理器和存储器,该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,执行如第一方面至第二方面中任一方面或其各实现方式中的方法。
第六方面,本申请实施例提供一种计算机可读存储介质,用于存储计算机程序,计算机程序使得计算机执行如第一方面至第二方面中任一方面或其各实现方式中的方法。
第七方面,本申请实施例提供一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行如第一方面至第二方面中任一方面或其各实现方式中的方法。
第八方面,本申请实施例提供一种计算机程序,计算机程序使得计算机执行如第一方 面至第二方面中任一方面或其各实现方式中的方法。
通过本申请提供的技术方案,第一,由于第一终端与信令服务器之间双向认证成功以及第二终端与信令服务器之间双向认证成功,那么即使非法用户终端盗用了第一终端的标识,由于该非法用户终端没有在信令服务器上进行身份注册,也不具有信令服务器的CA证书,导致其与信令服务器之间的双向认证失败,基于此,可以防止其他非法用户终端接入信令服务器,也就是可以保证视频建立请求的源端,即第一终端的合法性。第二,由于信令服务器基于第一终端与第二终端的映射关系将对视频连接建立请求和视频连接建立请求的签名的加密结果,即第一加密结果传输给第二终端,从而可以针对性地实现该视频连接请求传输至第二终端,而不是传输至其他终端设备。第三,第一终端可以对上述视频连接建立请求进行签名加密传输,从而防止非法信令服务器篡改视频连接建立请求。基于此,通过上述三方面可以保证视频连接建立请求的安全传输,进而保证视频传输的安全性。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为基于webRTC P2P机制的视频传输方法的流程图;
图2示例性地示出了本申请技术方案的应用场景图;
图3为本申请实施例提供的一种通信方法的交互流程图;
图4为本申请实施例提供的另一种通信方法的交互流程图;
图5为本申请实施例提供的再一种通信方法的交互流程图;
图6为本申请实施例提供的又一种通信方法的交互流程图;
图7为本申请实施例提供的一种通信装置700的示意图;
图8为本申请实施例提供的一种通信装置800的示意图;
图9是本申请实施例提供的电子设备900的示意性框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他 实施例,都属于本发明保护的范围。
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或服务器不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
在介绍本申请技术方案之前,下面将对本申请技术方案的相关知识进行说明:
双向认证:待认证双方需要对彼此身份进行认证。
对称密钥加密:又被称为专用密钥加密或共享密钥加密,即发送和接收数据的双方使用相同的密钥对明文进行加密和解密运算。
非对称密钥:是一对密钥,一个密钥用于加密,另一个密钥用于解密。
签名:也被称为数字签名,只有信息的发送者才能产生的别人无法伪造的一段数字串,这段数字串同时也是对信息的发送者发送信息真实性的一个有效证明。数字签名是非对称密钥加密技术与数字摘要技术的应用。例如,可以采用安全哈希算法(Secure Hash Algorithm,SHA)256+RSA算法实现签名。
RSA:其是目前最有影响力的公钥加密算法,它能够抵抗到目前为止已知的所有密码攻击,已被国际标准化组织(International Organization for Standardization,ISO)推荐为公钥数据加密标准。RSA是非对称加密算法,即加密的密钥与解密的密钥不同,使用私钥加密的内容,只能通过公钥来解密,使用公钥加密的内容,只能通过私钥来解密。
SHA-256:对于任意长度的消息,SHA256都会产生一个256位的哈希值,称作消息摘要。这个摘要相当于是个长度为32个字节的数组,通常由一个长度为64的十六进制字符串来表示,其中1个字节=8位,一个十六进制的字符的长度为4位。
证书:包括主体的公钥值、主体标识符信息、有效期、颁发者标识符信息、颁发者的签名。
图1为基于webRTC P2P机制的视频传输方法的流程图,如图1所示,该视频传输方法包括:发起视频连接阶段和视频传输阶段。在发起视频连接阶段,用户终端可以采用SDP协议通过信令服务器向车端发送视频连接建立请求(offer),并接收车端采用SDP协议通过信令服务器发送的视频连接建立回复(answer),通过offer中可以携带以下至少一项, 但不限于此:
a=ice-ufrag:khLS;
a=ice-pwd:cxLzteJaJBou3DspNaPsJhlQ;
a=fingerprint:sha-256
FA:14:42:3B:C7:97:1B:E8:AE:0C2:71:03:05:05:16:8F:B9:C7:98:E9:60:43:4B:5B:2C:28:EE:5C:8F3:17
a=setup:actpass
其中,a=ice-ufrag:khLS是会话标识,a=ice-pwd:cxLzteJaJBou3DspNaPsJhlQ是ICE阶段使用的密钥,a=fingerprint:sha-256是DTLS过程中要使用的用户终端的公钥证书的签名,a=setup:actpass是工作模式,包括:客户端(client)和/或服务器(server)模式。
车端在answer中可以携带对offer中各项信息的确认和选择等。
进一步地,用户终端可以向车端发送网络地址转换(Network Address Translation,NAT)的UDP简单穿越(Simple Traversal of UDP over NATs,STUN)请求,并接收车端发送的STUN响应,以查找用户终端与车端之间的通路。
在视频传输阶段,用户终端与车端通过DTLS信令的交互,实现对视频加密密钥的交换。进一步地,用户终端与车端可以通过SRTP采用视频加密密钥进行视频的加密传输。
如上所述,offer可以传递DTLS参数,例如包括用户终端的公钥证书的签名等,而该offer中携带的参数直接影响着视频加密密钥是否可以被安全传输,进而影响视频是否可以被安全传输。目前,用户终端通过信令服务器将视频连接建立请求转发给车端,这种方式存在该请求传输安全性较低的问题,进而导致视频传输安全性较低的问题。
为了解决上述技术问题,可以构建车端与用户终端之间的安全映射关系,并且可以对上述请求进行签名加密传输。
图2示例性地示出了本申请技术方案的应用场景图,如图2所示,用户终端210、车端220均可以与信令服务器230实现通信,以实现视频连接的建立。建立的视频连接可以是P2P模式的视频连接,即用户终端210与车端220之间可以直接通信,或者建立的视频连接也可以是基于转发的视频连接,即用户终端210与车端220之间通过转发服务器240实现转发通信。
可选地,转发服务器240与信令服务器230可以是同一服务器,也可以是不同的服务器。
可选地,用户终端210、车端220与信令服务器230可以通过有线或无线通信方式进 行直接或间接地连接,本申请在此不做限制。例如:用户终端210、车端220与信令服务器230之间的通信可以基于第五代(the 5th Generation,5G)通信系统、第四代(the 4th Generation,4G)通信系统、第三代(the 3th Generation,3G)通信系统、无线保真(Wireless Fidelity,WiFi)或者其他无线通信技术实现。
可选地,用户终端210可以是手机、电脑、智能语音交互设备、智能家电、车载终端、飞行器等,但并不局限于此。
可选地,信令服务器230可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(Content Delivery Network,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器。
可选地,转发服务器240可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN、以及大数据和人工智能平台等基础云计算服务的云服务器。
本申请实施例可应用于各种场景,包括但不限于云技术、人工智能、智慧交通、辅助驾驶等。例如可以应用于哨兵模式、远程驾驶等车载视频应用场景。
应理解的是,哨兵模式指的是通过车辆的外部摄像头来检测潜在的威胁,例如:检测是否有人靠近车辆或者是否发生车辆被破坏的情况等。
下面将对本申请技术方案进行详细说明:
图3为本申请实施例提供的一种通信方法的交互流程图,该方法涉及的执行主体可以包括:第一终端、第二终端和信令服务器,该第一终端可以是图2中的用户终端210、第二终端可以是图2中的车端220,但不限于此,如图3所示,该方法包括:
S301:第一终端接入信令服务器,以触发第一终端与信令服务器之间的双向认证;
S302:第二终端接入信令服务器,以触发第二终端与信令服务器之间的双向认证;
S303:在第一终端与信令服务器之间的双向认证成功之后,第一终端生成视频连接建立请求;
S304:第一终端对视频连接建立请求进行签名;
S305:第一终端对视频连接建立请求和视频连接建立请求的签名进行加密,得到第一加密结果;
S306:第一终端将第一加密结果传输至信令服务器;
S307:信令服务器通过第一终端与第二终端之间的映射关系将第一加密结果传输至第二终端;
(可选地)S308:第二终端对第一加密结果进行解密,得到视频连接建立请求和视频连接建立请求的签名;
(可选地)S309:第二终端对视频连接建立请求的签名进行验签。
可选地,信令服务器可以建立第一终端与第二终端之间的映射关系。基于此,当信令服务器接收到第一加密结果之后,其可以基于该映射关系将该第一加密结果发送给第二终端,而不会将第一加密结果发送给其他终端。
可选地,在第一终端和第二终端接入信令服务器之前,第一终端与第二终端可以在信令服务器上进行注册,第一终端可以将它的令牌(token)、认证结构(Certification Authority,CA)证书和硬件信息中的至少一项注册至信令服务器。第二终端可以将第二终端的令牌、CA证书和硬件信息中的至少一项注册至信令服务器,用户还可以为第二终端配置第二终端的用户密码。而第一终端和第二终端均可以配置有信令服务器的CA证书。基于此,来实现第一终端与信令服务器的双向认证以及第二终端与信令服务器的双向认证。
可选地,硬件信息可以包括以下至少一项,但不限于此:芯片序列号、媒体接入控制(Medium Access Control,MAC)地址。
可选地,用户可以通过第一终端上用于实现第一终端与第二终端的视频传输的应用(Application,APP)发起视频连接,选择要连接的第二终端,还可以输入第二终端的用户密码。其中,当用户通过APP发起视频连接时,该第一终端将接入信令服务器。当用户选择了第二终端之后,第二终端将接入信令服务器。
可选地,若信令服务器注册有第一终端的令牌和硬件信息中的至少一项,则第一终端与信令服务器的双向认证过程可以如下:第一终端生成随机数,通过信令服务器的CA证书中的公钥对该随机数加密,将加密结果发送给信令服务器,信令服务器通过该CA证书对应的私钥解密,并通过该私钥对解密结果进行加密,比较它从第一终端获取到的加密结果以及自身生成的加密结果是否一致,如果一致,则第一终端对信令服务器认证成功,如果不一致,则第一终端对信令服务器认证失败。第一终端可以采用散列算法对自己的令牌和硬件信息中的至少一项进行加密,并将加密结果发送给信令服务器,信令服务器也可以对第一终端的硬件信息中的至少一项采用相同的散列算法进行加密,得到加密结果,并比较两个加密结果是否一致,如果一致,则信令服务器对第一终端认证成功,如果不一致,则信令服务器对第一终端认证失败。
可选地,若信令服务器注册有第一终端的CA证书,则第一终端对信令服务器的认证过程可参考上文。信令服务器对第一终端的认证过程可以如下:信令服务器可以生成随机数,通过第一终端的CA证书中的公钥对该随机数加密,将加密结果发送给第一终端,第一终端通过该CA证书对应的私钥解密,并通过该私钥对解密结果进行加密,比较它从信令服务器获取到的加密结果以及自身生成的加密结果是否一致,如果一致,则信令服务器对第一终端认证成功,如果不一致,则信令服务器对第一终端认证失败。
可选地,若信令服务器注册有第一终端的令牌和硬件信息中的至少一项和CA证书,则第一终端对信令服务器的认证过程可参考上文。信令服务器对第一终端的认证过程可以如下:第一终端可以采用散列算法对自己的令牌和硬件信息中的至少一项进行加密,并将该加密结果发送给信令服务器,信令服务器也可以对第一终端的硬件信息中的至少一项采用相同的散列算法进行加密,得到加密结果,信令服务器可以对这两个加密结果进行比较。同时信令服务器可以生成随机数,通过第一终端的CA证书中的公钥对该随机数加密,将加密结果发送给第一终端,第一终端通过该CA证书对应的私钥解密,并通过该私钥对解密结果进行加密,比较它从信令服务器获取到的加密结果以及自身生成的加密结果是否一致。如果信令服务器确定这两组加密结果均一致,则信令服务器对第一终端认证成功,如果信令服务器确定这两组加密结果中至少一组加密结果不一致,则信令服务器对第一终端认证失败。
应理解的是,关于第二终端与信令服务器之间的双向认证过程可参考第一终端与信令服务器之间的双向认证过程,本申请实施例对此不再赘述。
应理解的是,如果第一终端与信令服务器之间的双向认证成功,并且第二终端与信令服务器之间的双向认证成功,那么即使非法用户终端盗用了第一终端的标识,由于该非法用户终端没有在信令服务器上进行身份注册,也不具有信令服务器的CA证书,导致其与信令服务器之间的双向认证失败。
可选地,视频连接建立请求可以与图1中的视频连接建立请求完全相同,也可以与图1中的视频连接建立请求不完全相同,例如,该请求可以包括以下至少一项:第一非对称密钥的公钥证书、该公钥证书的签名、音视频参数、请求的视频传输模式的标识、视频加密密钥的分发算法标识、第一终端的标识、第二终端的标识、时间戳、会话标识、ICE阶段使用的密钥、工作模式等。
可选地,该第一非对称密钥是第一终端生成的。
可选地,音视频参数包括:压缩编码格式、分辨率等,但不限于此。
可选地,视频传输模式可以是P2P视频传输模式或者基于转发的视频传输模式。
可选地,视频加密密钥的分发算法可以是RSA算法或者密钥交换算法(Diffie-Hellman,DH)算法等。
可选地,在远程驾驶场景中,视频连接建立请求还可以包括:建立数据通道的标识等,该数据通道用于传输控制信息,如控制刹车的控制信息、控制油门的控制信息等。
可选地,第一终端可以采用SHA256+RSA签名算法对视频连接建立请求进行签名。换句话讲,第一终端可以先对视频连接建立请求采用SHA256算法,得到哈希值,即摘要,再对哈希值通过RSA进行加密,得到视频连接建立请求的签名。
可选地,第一终端可以采用第一非对称密钥的公钥证书的私钥或者第三方密钥对视频连接建立请求进行签名。
可选地,第三方密钥可以是签名服务器或者上述APP对应的应用服务器生成的密钥,第一终端可以通过软件开发工具包(Software Development Kit,SDK)回调签名服务器或者应用服务器生成第三方密钥。
可选地,如果视频连接建立请求包括:第一非对称密钥的公钥证书的签名,那么第一终端可以采用第一非对称密钥的公钥证书的私钥或者第三方密钥对第一非对称密钥的公钥证书进行签名,其中,通过第一非对称密钥的公钥证书的私钥对第一非对称密钥的公钥证书进行签名可以被称为自签名。关于第三方密钥的解释说明可参考上文。
应理解的是,对视频连接建立请求的签名是为了防止视频连接建立请求被篡改。而第一终端需要将视频连接建立请求和该请求的签名通过信令服务器发送给第二终端,为了防止视频连接建立请求被非法的信令服务器篡改,需要对视频连接建立请求和该请求的签名进行加密。
可选地,第一终端可以采用第二终端的用户密码对视频连接建立请求和该请求的签名进行加密,或者,可以采用第二终端的用户密码和动态密码对视频连接建立请求和该请求的签名进行加密。
可选地,第二终端在接收到第一加密结果之后,也可以采用与第一终端相同的密码对第一加密结果进行解密。例如,当第一终端采用第二终端的用户密码对视频连接建立请求和该请求的签名进行加密,那么第二终端也采用第二终端的用户密码对第一加密结果进行解密。当第一终端采用第二终端的用户密码和动态密码对视频连接建立请求和该请求的签名进行加密,那么第二终端也采用第二终端的用户密码和动态密码对第一加密结果进行解密。
可选地,该动态密码与会话标识唯一对应,也就是说,同一会话标识对应的动态密码相同,基于此,可以保证第一终端与第二终端采用的动态密码相同。
可选地,当第二终端得到视频连接建立请求和视频连接建立请求的签名之后,若视频连接建立请求的签名是通过SHA256+RSA算法得到的,则第二终端可以先通过第一非对称密钥的公钥证书的公钥或者第三方密钥对该签名解密,得到一个哈希值,接着第二终端可以对视频连接建立请求采用SHA256,得到一个哈希值,比较这两个哈希值,如果这两个哈希值相同,则说明视频连接建立请求的签名合法,否则,说明视频连接建立请求的签名不合法。
可选地,如果视频连接建立请求包括:第一非对称密钥的公钥证书的签名,那么第一终端在对视频连接建立请求验签成功后,还可以对该公钥证书的签名进行验签,该验签过程可以参考视频连接建立请求的验签过程,本申请对此不再赘述。
在本申请实施例中,第一,由于第一终端与信令服务器之间双向认证成功以及第二终端与信令服务器之间双向认证成功,那么即使非法用户终端盗用了第一终端的标识,由于该非法用户终端没有在信令服务器上进行身份注册,也不具有信令服务器的CA证书,导致其与信令服务器之间的双向认证失败,基于此,从而可以防止其他非法用户终端接入信令服务器,也就是可以保证视频建立请求的源端,即第一终端的合法性。第二,由于信令服务器基于第一终端与第二终端的映射关系将对视频连接建立请求和视频连接建立请求的签名的加密结果,即第一加密结果传输给第二终端,从而可以针对性地实现该视频连接请求传输至第二终端,而不是传输至其他终端设备。第三,第一终端可以对上述视频连接建立请求进行签名加密传输,从而防止非法信令服务器篡改视频连接建立请求。基于此,通过上述三方面可以保证视频连接建立请求的安全传输,进而保证视频传输的安全性。
进一步地,信令服务器可以基于第一终端和第二终端的硬件信息对第一终端和第二终端进行认证,这种方式可以降低第一终端和第二终端的身份伪造风险。
应理解的是,为了实现视频连接建立协商的目的,在第一终端向第二终端发送视频连接建立请求之后,第二终端可以向第一终端发送视频连接建立回复。
应理解的是,视频连接建立回复中可以携带对视频连接建立请求中各项信息的确认和选择等。
可选地,该视频连接建立回复可以与图1中的视频连接建立回复完全相同,也可以不完全相同,例如,当视频连接建立请求包括:请求的视频传输模式的标识时,如请求P2P视频传输模式,第二终端可以确认是否适用该P2P视频传输模式。
可选地,在远程驾驶场景中,当视频连接建立请求包括:建立数据通道的标识等时,该视频连接建立回复可以包括:同意建立数据通道以及每个数据通道对应的证书,后续在数据通道中的数据可以使用对应的证书进行签名。
可选地,第二终端可以通过信令服务器将明文形式的视频连接建立回复发送给第一终端,或者可以对视频连接建立回复进行签名加密,将加密结果通过信令服务器发送给第一终端。
可选地,如图4所示,在上述S309之后,通信方法还可以包括如下步骤:
S310:第二终端生成视频连接建立回复;
S311:第二终端对视频连接建立回复进行签名;
S312:第二终端对视频连接建立回复和视频连接建立回复的签名进行加密,得到第二加密结果;
S313:第二终端将第二加密结果传输至信令服务器;
S314:信令服务器通过第一终端与第二终端之间的映射关系将第二加密结果传输至第一终端;
S315:第一终端对第二加密结果进行解密,得到视频连接建立回复和视频连接建立回复的签名;
S316:对视频连接建立回复的签名进行验签。
可选地,第二终端可以采用SHA256+RSA签名算法对视频连接建立回复进行签名。换句话讲,第二终端可以先对视频连接建立回复采用SHA256算法,得到哈希值,即摘要,再对哈希值通过RSA进行加密,得到视频连接建立回复的签名。
可选地,第二终端可以采用第二非对称密钥的公钥证书的私钥或者第三方密钥对视频连接建立回复进行签名。
可选地,该第二非对称密钥是第二终端生成的。
应理解的是,如果第二终端采用第二非对称密钥的公钥证书的私钥对视频连接建立回复进行签名,那么第二终端在发送该视频连接建立回复之前,需要向第一终端发送第二非对称密钥的公钥证书,使得第一终端可以通过该公钥证书中的公钥对视频连接建立回复的签名进行验签。
应该理解的是,关于第三方密钥的解释说明可参考上文,本申请对此不再赘述。
应理解的是,对视频连接建立回复的签名是为了防止视频连接建立回复被篡改。而第二终端需要将视频连接建立回复和该回复的签名通过信令服务器发送给第一终端,为了防 止视频连接建立回复被非法的信令服务器篡改,需要对视频连接建立回复和该回复的签名进行加密。
可选地,第二终端可以采用第二终端的用户密码对视频连接建立回复和该回复的签名进行加密,或者,可以采用第二终端的用户密码和动态密码对视频连接建立回复和该回复的签名进行加密。
可选地,第一终端在接收到第二加密结果之后,也可以采用与第二终端相同的密码对第二加密结果进行解密。例如,当第二终端采用第二终端的用户密码对视频连接建立回复和该回复的签名进行加密,那么第一终端也采用第二终端的用户密码对第二加密结果进行解密。当第二终端采用第二终端的用户密码和动态密码对视频连接建立回复和该回复的签名进行加密,那么第一终端也采用第二终端的用户密码和动态密码对第二加密结果进行解密。
应理解的是,关于动态密码的解释说明可参考上文,本申请对此不再赘述。
可选地,当第一终端得到视频连接建立回复和视频连接建立回复的签名之后,若视频连接建立回复的签名是通过SHA256+RSA算法得到的,则第一终端可以先通过第二非对称密钥的公钥证书的公钥或者第三方密钥对该签名解密,得到一个哈希值,接着第一终端可以对视频连接建立回复采用SHA256,得到一个哈希值,比较这两个哈希值,如果这两个哈希值相同,则说明视频连接建立回复的签名合法,否则,说明视频连接建立回复的签名不合法。
在本申请实施例中,第一,由于第一终端与信令服务器之间双向认证成功以及第二终端与信令服务器之间双向认证成功,那么即使非法用户终端盗用了第一终端的标识,由于该非法用户终端没有在信令服务器上进行身份注册,也不具有信令服务器的CA证书,导致其与信令服务器之间的双向认证失败,基于此,从而可以防止其他非法用户终端接入信令服务器,也就是可以保证视频连接建立回复的目的端,即第一终端的合法性。第二,由于信令服务器基于第一终端与第二终端的映射关系将对视频连接建立回复和视频连接建立回复的签名的加密结果,即第二加密结果传输给第一终端,从而可以针对性地实现该视频连接回复传输至第一终端,而不是传输至其他终端设备。第三,第二终端可以对上述视频连接建立回复进行签名加密传输,从而防止非法信令服务器篡改视频连接建立回复。基于此,通过上述三方面可以保证视频连接建立回复的安全传输,进而保证视频传输的安全性。
应理解的是,在执行完视频连接建立协商之后,第一终端与第二终端可以在ICE阶段 查找第一终端与第二终端之间的通路,并基于该通路实现视频加密密钥的交换,进而实现视频传输。而在本申请实施例中,第一终端与第二终端之间的视频传输不局限于P2P视频传输模式,还可以采用基于转发的视频传输模式。在这种情况下,视频连接建立请求可以包括:请求的视频传输模式的标识,例如:请求的视频传输模式是P2P和/或基于转发的视频传输模式,而视频连接建议回复可以包括:第二终端确认的第一视频传输模式,如确认后续采用P2P视频传输模式或者基于转发的视频传输模式。
可选地,如图5所示,通信方法还可以包括如下步骤:
S317:在确定视频连接建立协商成功之后,第一终端生成第一视频传输模式对应的视频转发交互请求;
S318:第一终端对视频转发交互请求进行签名;
S319:第一终端对视频转发交互请求和视频转发交互请求的签名进行加密,得到第三加密结果;
S320:第一终端将第三加密结果传输至信令服务器;
S321:信令服务器通过第一终端与第二终端之间的映射关系将第三加密结果传输至第二终端;
S322:第二终端对第三加密结果进行解密,得到视频转发交互请求和视频转发交互请求的签名;
S323:第二终端对视频转发交互请求的签名进行验签;
S324:第二终端生成视频转发交互回复;
S325:第二终端对视频转发交互回复进行签名;
S326:第二终端对视频转发交互回复和视频转发交互回复的签名进行加密,得到第四加密结果;
S327:第二终端将第四加密结果传输至信令服务器;
S328:信令服务器通过第一终端与第二终端之间的映射关系将第四加密结果传输至第一终端;
S329:第一终端对第四加密结果进行解密,得到视频转发交互回复和视频转发交互回复的签名;
S330:第一终端对视频转发交互回复的签名进行验签。
需要说明的是,S317至S330可以在上述S316之后执行。
可选地,若第一视频传输模式是P2P模式,则第一视频传输模式对应的视频转发交互 请求可以与STUN请求相同,其可以包括ICE参数,如在子网的传输地址、在NAT上的传输地址、在使用中继穿透NAT STUN的扩展(Relay Extensions to Session Traversal Utilities for NAT,TURN)服务器上的转发地址等。相应的,视频转发交互回复可以与STUN响应相同,其可以包括确认的对端互联网协议(Internet Protocol,IP)以及端口号等,以形成第一终端与第二终端之间的通路。
可选地,若第一视频传输模式是基于转发的视频传输模式,则第一视频传输模式对应的视频转发交互请求可以包括:请求的转发服务器的标识、请求的房间号等。相应的,视频转发交互回复可以包括:确认的转发服务器的标识、确认的房间号等。
可选地,第一终端可以采用SHA256+RSA签名算法对视频转发交互请求进行签名。换句话讲,第一终端可以先对视频转发交互请求采用SHA256算法,得到哈希值,即摘要,再对哈希值通过RSA进行加密,得到视频转发交互请求的签名。
可选地,第一终端可以采用第一非对称密钥的公钥证书的私钥或者第三方密钥对视频转发交互请求进行签名。
应理解的是,关于第三方密钥的解释说明可参考上文,本申请对此不再赘述。
应理解的是,对视频转发交互请求的签名是为了防止视频转发交互请求被篡改。而第一终端需要将视频转发交互请求和该请求的签名通过信令服务器发送给第二终端,为了防止视频转发交互请求被非法的信令服务器篡改,需要对视频转发交互请求和该请求的签名进行加密。
可选地,第一终端可以采用第二终端的用户密码对视频转发交互请求和该请求的签名进行加密,或者,可以采用第二终端的用户密码和动态密码对视频转发交互请求和该请求的签名进行加密。
可选地,第二终端在接收到第三加密结果之后,也可以采用与第一终端相同的密码对第三加密结果进行解密。例如,当第一终端采用第二终端的用户密码对视频转发交互请求和该请求的签名进行加密,那么第二终端也采用第二终端的用户密码对第三加密结果进行解密。当第一终端采用第二终端的用户密码和动态密码对视频转发交互请求和该请求的签名进行加密,那么第二终端也采用第二终端的用户密码和动态密码对第三加密结果进行解密。
可选地,关于动态密码的解释说明可参考上文,本申请对此不再赘述。
可选地,当第二终端得到视频转发交互请求和视频转发交互请求的签名之后,若视频转发交互请求的签名是通过SHA256+RSA算法得到的,则第二终端可以先通过第一非对 称密钥的公钥证书的公钥或者第三方密钥对该签名解密,得到一个哈希值,接着第二终端可以对视频转发交互请求采用SHA256,得到一个哈希值,比较这两个哈希值,如果这两个哈希值相同,则说明视频转发交互请求的签名合法,否则,说明视频转发交互请求的签名不合法。
可选地,第二终端可以采用SHA256+RSA签名算法对视频转发交互回复进行签名。换句话讲,第二终端可以先对视频转发交互回复采用SHA256算法,得到哈希值,即摘要,再对哈希值通过RSA进行加密,得到视频转发交互回复的签名。
可选地,第二终端可以采用第二非对称密钥的公钥证书的私钥或者第三方密钥对视频转发交互回复进行签名。
应该理解的是,关于第三方密钥的解释说明可参考上文,本申请对此不再赘述。
应理解的是,对视频转发交互回复的签名是为了防止视频转发交互回复被篡改。而第二终端需要将视频转发交互回复和该回复的签名通过信令服务器发送给第一终端,为了防止视频转发交互回复被非法的信令服务器篡改,需要对视频转发交互回复和该回复的签名进行加密。
可选地,第二终端可以采用第二终端的用户密码对视频转发交互回复和该回复的签名进行加密,或者,可以采用第二终端的用户密码和动态密码对视频转发交互回复和该回复的签名进行加密。
可选地,第一终端在接收到第四加密结果之后,也可以采用与第二终端相同的密码对第四加密结果进行解密。例如,当第二终端采用第二终端的用户密码对视频转发交互回复和该回复的签名进行加密,那么第一终端也采用第二终端的用户密码对第四加密结果进行解密。当第二终端采用第二终端的用户密码和动态密码对视频转发交互回复和该回复的签名进行加密,那么第一终端也采用第二终端的用户密码和动态密码对第四加密结果进行解密。
应理解的是,关于动态密码的解释说明可参考上文,本申请对此不再赘述。
可选地,当第一终端得到视频转发交互回复和视频转发交互回复的签名之后,若视频转发交互回复的签名是通过SHA256+RSA算法得到的,则第一终端可以先通过第二非对称密钥的公钥证书的公钥或者第三方密钥对该签名解密,得到一个哈希值,接着第一终端可以对视频转发交互回复采用SHA256,得到一个哈希值,比较这两个哈希值,如果这两个哈希值相同,则说明视频转发交互回复的签名合法,否则,说明视频转发交互回复的签名不合法。
在本申请实施例中,第一,由于第一终端与信令服务器之间双向认证成功以及第二终端与信令服务器之间双向认证成功,那么即使非法用户终端盗用了第一终端的标识,由于该非法用户终端没有在信令服务器上进行身份注册,也不具有信令服务器的CA证书,导致其与信令服务器之间的双向认证失败,基于此,从而可以防止其他非法用户终端接入信令服务器,也就是可以保证视频转发交互请求的源端和视频转发交互回复的目的端,即第一终端的合法性。第二,由于信令服务器基于第一终端与第二终端的映射关系传输上述第三加密结果和第四加密结果,从而可以针对性地实现视频转发交互请求和视频转发交互回复的传输。第三,第一终端可以对上述视频转发交互请求进行签名加密传输,从而防止非法信令服务器篡改视频转发交互请求。第二终端也可以对上述视频转发交互回复进行签名加密传输,从而防止非法信令服务器篡改视频转发交互回复。基于此,通过上述三方面可以保证视频转发交互请求和视频转发交互回复,进而保证视频传输的安全性。
应理解的是,图5对应实施例实现了第一终端与第二终端之间的通路建立,基于此,在后续过程中,第一终端和第二终端便可以使用该通路进行视频加密密钥和视频的传输。在一些场景中,如哨兵模式场景中,车端只要将视频传输至用户终端即可,这种视频传输过程是一种单向视频传输过程;而在另一些场景中,如远程驾驶场景中,车端和用户终端之间需要相互传输视频,这种视频传输是双向视频传输过程,下面将分别对这两种视频传输过程进行说明:
图6为本申请实施例提供的又一种通信方法的交互流程图,如图6所示,该方法包括:
S601:第二终端通过第一非对称密钥的公钥证书的公钥对第一视频加密密钥进行加密,得到第五加密结果;
S602:第二终端向第一终端发送第五加密结果;
S603:第一终端通过第一非对称密钥的私钥对第五加密结果进行解密,得到第一视频加密密钥;
S604:第二终端通过第一视频加密密钥对待传输视频进行加密,得到第一加密视频;
S605:第二终端向第一终端发送第一加密视频;
S606:第一终端通过第一视频加密密钥对第一加密视频进行解密。
可选地,当第一终端和第二终端采用的视频传输模式是P2P传输模式,那么在本实施例中,第一终端与第二终端的所有传输内容都是基于P2P传输模式传输的。当第一终端和第二终端采用的视频传输模式是基于转发的视频传输模式,那么在本实施例中,第一终端与第二终端的所有传输内容可以通过转发服务器转发传输。
应理解的是,本实施例中采用的视频加密密钥的分发算法是RSA算法,实际上,还可以采用DH算法。
应理解的是,在本实施例中,第二终端是通过第一非对称密钥的公钥证书的公钥对第一视频加密密钥进行加密的,实际上,也可以采用对称密钥对第一视频加密密钥进行加密,在这种情况下,第一终端采用该对称密钥对第五加密结果进行解密得到第一视频加密密钥。
可选地,当第一终端和第二终端采用的视频传输模式是P2P视频传输模式时,第二终端可以采用该P2P视频传输模式对应的视频传输参数传输第一视频加密密钥,如基于SRTP协议进行视频传输等。当第一终端和第二终端采用的视频传输模式是基于转发的视频传输模式时,第二终端可以采用该视频传输模式对应的视频传输参数传输第一视频加密密钥,如基于RTC协议进行视频传输。
可选地,该通信方法还可以包括如下步骤:
S607:第一终端获取第二非对称密钥的公钥证书;
S608:第一终端通过第二非对称密钥的公钥证书的公钥对第二视频加密密钥进行加密,得到第六加密结果;
S609:第一终端向第二终端发送第六加密结果;
S610:第二终端通过第二非对称密钥的私钥对第六加密结果进行解密,得到第二视频加密密钥;
S611:第一终端通过第二视频加密密钥对待传输视频进行加密,得到第二加密视频;
S612:第一终端向第二终端发送第二加密视频;
S613:第二终端通过第二视频加密密钥对第二加密视频进行解密。
应理解的是,S607至S613可以在S606之后执行,它们的结合方案是双向视频传输过程,当然,S607至S613也可以在第一终端与第二终端之间的通路建立之后直接执行,即其无需与S601至S606之间的方案耦合。
应理解的是,关于S607至S613可参考关于S601至S606的解释说明,对此不再赘述。
在本申请实施例中,第一终端与第二终端之间可以采用P2P视频传输模式或者基于转发的视频传输模式进行视频传输,从而可以提高视频传输的灵活性。此外,如果第一终端与第二终端之间采用基于转发的视频传输模式进行视频传输,那么这种模式可以支持多设备同时观看视频的情况,例如:车端可以将视频传输至多个用户终端,以使多个用户观看车载视频。
图7为本申请实施例提供的一种通信装置700的示意图,该通信装置为上述第一终端,如图7所示,该装置700可以包括:处理模块710和通信模块720,其中,处理模块710用于接入信令服务器,以触发第一终端与信令服务器之间的双向认证;在第一终端与信令服务器之间的双向认证成功之后,生成视频连接建立请求;对视频连接建立请求进行签名;对视频连接建立请求和视频连接建立请求的签名进行加密,得到第一加密结果;通信模块720用于将第一加密结果传输至信令服务器,以使信令服务器通过第一终端与第二终端之间的映射关系将第一加密结果传输至第二终端。
可选地,通信模块720还用于接收第二终端通过信令服务器传输的第二加密结果,第二加密结果是对视频连接建立请求对应的视频连接建立回复和视频连接建立回复的签名进行加密后的加密结果;处理模块710还用于对第二加密结果进行解密,得到视频连接建立回复和视频连接建立回复的签名;对视频连接建立回复的签名进行验签。
可选地,视频连接建立请求包括:请求的视频传输模式的标识;处理模块710还用于在确定视频连接建立协商成功之后,生成第一视频传输模式对应的视频转发交互请求,第一视频传输模式是根据请求的视频传输模式的标识确认的视频传输模式;对视频转发交互请求进行签名;对视频转发交互请求和视频转发交互请求的签名进行加密,得到第三加密结果;通信模块720还用于将第三加密结果传输至信令服务器,以使信令服务器通过第一终端与第二终端之间的映射关系将第三加密结果传输至第二终端。
可选地,通信模块720还用于接收第二终端通过信令服务器传输的第四加密结果,第四加密结果是对视频转发交互请求对应的视频转发交互回复和视频转发交互回复的签名进行加密后的加密结果;处理模块710还用于对第四加密结果进行解密,得到视频转发交互回复和视频转发交互回复的签名;对视频转发交互回复的签名进行验签。
可选地,第一视频传输模式是P2P视频传输模式或者基于转发的视频传输模式。
可选地,视频连接建立请求包括:第一非对称密钥的公钥证书;通信模块720还用于接收第二终端发送的第五加密结果,第五加密结果是通过第一非对称密钥的公钥证书的公钥对第一视频加密密钥进行加密的加密结果;处理模块710还用于通过第一非对称密钥的私钥对第五加密结果进行解密,得到第一视频加密密钥;通信模块720还用于接收第二终端发送的第一加密视频;处理模块710还用于通过第一视频加密密钥对第一加密视频进行解密。
可选地,通信模块720还用于获取第二非对称密钥的公钥证书;处理模块710还用于通过第二非对称密钥的公钥证书的公钥对第二视频加密密钥进行加密,得到第六加密结 果;通信模块720还用于向第二终端发送第六加密结果;处理模块710还用于通过第二视频加密密钥对待传输视频进行加密,得到第二加密视频;通信模块720还用于向第二终端发送第二加密视频。
应理解的是,装置实施例与方法实施例可以相互对应,类似的描述可以参照方法实施例。为避免重复,此处不再赘述。具体地,图7所示的装置700可以执行第一终端对应的方法实施例,并且装置700中的各个模块的前述和其它操作和/或功能分别为了实现第一终端对应的方法实施例中的相应流程,为了简洁,在此不再赘述。
上文中结合附图从功能模块的角度描述了本申请实施例的装置700。应理解,该功能模块可以通过硬件形式实现,也可以通过软件形式的指令实现,还可以通过硬件和软件模块组合实现。具体地,本申请实施例中的方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路和/或软件形式的指令完成,结合本申请实施例公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。可选地,软件模块可以位于随机存储器,闪存、只读存储器、可编程只读存储器、电可擦写可编程存储器、寄存器等本领域的成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法实施例中的步骤。
图8为本申请实施例提供的一种通信装置800的示意图,该通信装置为上述第二终端,如图8所示,该装置800可以包括:处理模块810和通信模块820,处理模块810用于接入信令服务器,以触发第二终端与信令服务器之间的双向认证;通信模块820用于在第二终端与信令服务器之间的双向认证成功之后,接收信令服务器通过第一终端与第二终端之间的映射关系发送的第一加密结果;第一加密结果是对视频连接建立请求和视频连接建立请求的签名进行加密得到的加密结果;处理模块810还用于对第一加密结果进行解密,得到视频连接建立请求和视频连接建立请求的签名;处理模块810还用于对视频连接建立请求的签名进行验签。
可选地,处理模块810还用于生成视频连接建立请求对应的视频连接建立回复;对视频连接建立回复进行签名;对视频连接建立回复和视频连接建立回复的签名进行加密,得到第二加密结果;通信模块820还用于将第二加密结果传输至信令服务器,以使信令服务器通过第一终端与第二终端之间的映射关系将第二加密结果传输至第一终端。
可选地,视频连接建立请求包括:请求的视频传输模式的标识;通信模块820还用于在确定视频连接建立协商成功之后,接收信令服务器通过第一终端与第二终端之间的映射关系发送的第三加密结果;第三加密结果是对视频转发交互请求和视频转发交互请求的签 名进行加密得到的加密结果,第一视频传输模式是根据请求的视频传输模式的标识确认的视频传输模式;处理模块810还用于对第三加密结果进行解密,得到视频转发交互请求和视频转发交互请求的签名;对视频转发交互请求的签名进行验签。
可选地,处理模块810还用于生成视频转发交互请求对应的视频转发交互回复;对视频转发交互回复进行签名;对视频转发交互回复和视频转发交互回复的签名进行加密,得到第四加密结果;通信模块820还用于将第四加密结果传输至信令服务器,以使信令服务器通过第一终端与第二终端之间的映射关系将第四加密结果传输至第一终端。
可选地,视频传输模式是P2P视频传输模式或者基于转发的视频传输模式。
可选地,视频连接建立请求包括:第一非对称密钥的公钥证书;处理模块810还用于通过第一非对称密钥的公钥证书的公钥对第一视频加密密钥进行加密,得到第五加密结果;通信模块820还用于向第一终端发送第五加密结果;处理模块810还用于通过第一视频加密密钥对待传输视频进行加密,得到第一加密视频;通信模块820还用于向第一终端发送第一加密视频。
可选地,通信模块820还用于向第一终端发送第二非对称密钥的公钥证书;接收第一终端发送的第六加密结果,第六加密结果是通过第二非对称密钥的公钥证书的公钥对第二视频加密密钥进行加密的加密结果;处理模块810还用于通过第二非对称密钥的私钥对第六加密结果进行解密,得到第二视频加密密钥;通信模块820还用于接收第二终端发送的第二加密视频;处理模块810还用于通过第二视频加密密钥对第二加密视频进行解密。
应理解的是,装置实施例与方法实施例可以相互对应,类似的描述可以参照方法实施例。为避免重复,此处不再赘述。具体地,图8所示的装置800可以执行第二终端对应的方法实施例,并且装置800中的各个模块的前述和其它操作和/或功能分别为了实现第二终端对应的方法实施例中的相应流程,为了简洁,在此不再赘述。
上文中结合附图从功能模块的角度描述了本申请实施例的装置800。应理解,该功能模块可以通过硬件形式实现,也可以通过软件形式的指令实现,还可以通过硬件和软件模块组合实现。具体地,本申请实施例中的方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路和/或软件形式的指令完成,结合本申请实施例公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。可选地,软件模块可以位于随机存储器,闪存、只读存储器、可编程只读存储器、电可擦写可编程存储器、寄存器等本领域的成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法实施例中的步骤。
图9是本申请实施例提供的电子设备900的示意性框图。
如图9所示,该电子设备900可包括:
存储器910和处理器920,该存储器910用于存储计算机程序,并将该程序代码传输给该处理器920。换言之,该处理器920可以从存储器910中调用并运行计算机程序,以实现本申请实施例中的方法。
例如,该处理器920可用于根据该计算机程序中的指令执行上述方法实施例。
在本申请的一些实施例中,该处理器920可以包括但不限于:
通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等等。
在本申请的一些实施例中,该存储器910包括但不限于:
易失性存储器和/或非易失性存储器。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。
在本申请的一些实施例中,该计算机程序可以被分割成一个或多个模块,该一个或者多个模块被存储在该存储器910中,并由该处理器920执行,以完成本申请提供的方法。该一个或多个模块可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述该计算机程序在该电子设备中的执行过程。
如图9所示,该电子设备还可包括:
收发器930,该收发器930可连接至该处理器920或存储器910。
其中,处理器920可以控制该收发器930与其他设备进行通信,具体地,可以向其他 设备发送信息或数据,或接收其他设备发送的信息或数据。收发器930可以包括发射机和接收机。收发器930还可以进一步包括天线,天线的数量可以为一个或多个。
应当理解,该电子设备中的各个组件通过总线系统相连,其中,总线系统除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。
本申请还提供了一种计算机存储介质,其上存储有计算机程序,该计算机程序被计算机执行时使得该计算机能够执行上述方法实施例的方法。或者说,本申请实施例还提供一种包含指令的计算机程序产品,该指令被计算机执行时使得计算机执行上述方法实施例的方法。
当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例该的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如数字视频光盘(digital video disc,DVD))、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接 耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。例如,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。
以上该,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以该权利要求的保护范围为准。

Claims (19)

  1. 一种通信方法,其特征在于,所述方法应用于第一终端,所述方法包括:
    接入信令服务器,以触发所述第一终端与信令服务器之间的双向认证;
    在所述第一终端与所述信令服务器之间的双向认证成功之后,生成视频连接建立请求;
    对所述视频连接建立请求进行签名;
    对所述视频连接建立请求和所述视频连接建立请求的签名进行加密,得到第一加密结果;
    将所述第一加密结果传输至所述信令服务器,以使所述信令服务器通过所述第一终端与第二终端之间的映射关系将所述第一加密结果传输至所述第二终端。
  2. 根据权利要求1所述的方法,其特征在于,还包括:
    接收所述第二终端通过所述信令服务器传输的第二加密结果,所述第二加密结果是对所述视频连接建立请求对应的视频连接建立回复和所述视频连接建立回复的签名进行加密后的加密结果;
    对所述第二加密结果进行解密,得到所述视频连接建立回复和所述视频连接建立回复的签名;
    对所述视频连接建立回复的签名进行验签。
  3. 根据权利要求1或2所述的方法,其特征在于,所述视频连接建立请求包括:请求的视频传输模式的标识;所述方法还包括:
    在确定视频连接建立协商成功之后,生成第一视频传输模式对应的视频转发交互请求,所述第一视频传输模式是根据所述请求的视频传输模式的标识确认的视频传输模式;
    对所述视频转发交互请求进行签名;
    对所述视频转发交互请求和所述视频转发交互请求的签名进行加密,得到第三加密结果;
    将所述第三加密结果传输至所述信令服务器,以使所述信令服务器通过所述第一终端与所述第二终端之间的映射关系将所述第三加密结果传输至所述第二终端。
  4. 根据权利要求3所述的方法,其特征在于,还包括:
    接收所述第二终端通过所述信令服务器传输的第四加密结果,所述第四加密结果是对所述视频转发交互请求对应的视频转发交互回复和所述视频转发交互回复的签名进行加密后的加密结果;
    对所述第四加密结果进行解密,得到所述视频转发交互回复和所述视频转发交互回复的签名;
    对所述视频转发交互回复的签名进行验签。
  5. 根据权利要求3或4所述的方法,其特征在于,所述第一视频传输模式是点到点P2P视频传输模式或者基于转发的视频传输模式。
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述视频连接建立请求包括:第一非对称密钥的公钥证书;所述方法还包括:
    接收所述第二终端发送的第五加密结果,所述第五加密结果是通过所述第一非对称密钥的公钥证书的公钥对第一视频加密密钥进行加密的加密结果;
    通过所述第一非对称密钥的私钥对所述第五加密结果进行解密,得到所述第一视频加密密钥;
    接收所述第二终端发送的第一加密视频;
    通过所述第一视频加密密钥对所述第一加密视频进行解密。
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,还包括:
    获取第二非对称密钥的公钥证书;
    通过所述第二非对称密钥的公钥证书的公钥对第二视频加密密钥进行加密,得到第六加密结果;
    向所述第二终端发送所述第六加密结果;
    通过所述第二视频加密密钥对待传输视频进行加密,得到第二加密视频;
    向所述第二终端发送所述第二加密视频。
  8. 一种通信方法,其特征在于,所述方法应用于第二终端,所述方法包括:
    接入信令服务器,以触发所述第二终端与信令服务器之间的双向认证;
    在所述第二终端与所述信令服务器之间的双向认证成功之后,接收所述信令服务器通过第一终端与所述第二终端之间的映射关系发送的第一加密结果;所述第一加密结果是对视频连接建立请求和所述视频连接建立请求的签名进行加密得到的加密结果;
    对所述第一加密结果进行解密,得到所述视频连接建立请求和所述视频连接建立请求的签名;
    对所述视频连接建立请求的签名进行验签。
  9. 根据权利要求8所述的方法,其特征在于,还包括:
    生成所述视频连接建立请求对应的视频连接建立回复;
    对所述视频连接建立回复进行签名;
    对所述视频连接建立回复和所述视频连接建立回复的签名进行加密,得到第二加密结果;
    将所述第二加密结果传输至所述信令服务器,以使所述信令服务器通过所述第一终端与所述第二终端之间的映射关系将所述第二加密结果传输至所述第一终端。
  10. 根据权利要求8或9所述的方法,其特征在于,所述视频连接建立请求包括:请求的视频传输模式的标识;所述方法还包括:
    在确定视频连接建立协商成功之后,接收所述信令服务器通过所述第一终端与所述第二终端之间的映射关系发送的第三加密结果;所述第三加密结果是对第一视频传输模式对应的视频转发交互请求和所述视频转发交互请求的签名进行加密得到的加密结果,所述第一视频传输模式是根据所述请求的视频传输模式的标识确认的视频传输模式;
    对所述第三加密结果进行解密,得到所述视频转发交互请求和所述视频转发交互请求的签名;
    对所述视频转发交互请求的签名进行验签。
  11. 根据权利要求10所述的方法,其特征在于,还包括:
    生成所述视频转发交互请求对应的视频转发交互回复;
    对所述视频转发交互回复进行签名;
    对所述视频转发交互回复和所述视频转发交互回复的签名进行加密,得到第四加密结果;
    将所述第四加密结果传输至所述信令服务器,以使所述信令服务器通过所述第一终端与所述第二终端之间的映射关系将所述第四加密结果传输至所述第一终端。
  12. 根据权利要求10或11所述的方法,其特征在于,所述视频传输模式是P2P视频传输模式或者基于转发的视频传输模式。
  13. 根据权利要求8-12中任一项所述的方法,其特征在于,所述视频连接建立请求包括:第一非对称密钥的公钥证书;所述方法还包括:
    通过所述第一非对称密钥的公钥证书的公钥对第一视频加密密钥进行加密,得到第五加密结果;
    向所述第一终端发送所述第五加密结果;
    通过所述第一视频加密密钥对待传输视频进行加密,得到第一加密视频;
    向所述第一终端发送所述第一加密视频。
  14. 根据权利要求8-13中任一项所述的方法,其特征在于,还包括:
    向所述第一终端发送第二非对称密钥的公钥证书;
    接收所述第一终端发送的第六加密结果,所述第六加密结果是通过所述第二非对称密钥的公钥证书的公钥对第二视频加密密钥进行加密的加密结果;
    通过所述第二非对称密钥的私钥对所述第六加密结果进行解密,得到所述第二视频加密密钥;
    接收所述第二终端发送的第二加密视频;
    通过所述第二视频加密密钥对所述第二加密视频进行解密。
  15. 一种通信装置,所述通信装置为第一终端,其特征在于,包括:
    处理模块,用于:
    接入信令服务器,以触发所述第一终端与信令服务器之间的双向认证;
    在所述第一终端与所述信令服务器之间的双向认证成功之后,生成视频连接建立请求;
    对所述视频连接建立请求进行签名;
    对所述视频连接建立请求和所述视频连接建立请求的签名进行加密,得到第一加密结果;
    通信模块,用于:
    将所述第一加密结果传输至所述信令服务器,以使所述信令服务器通过所述第一终端与第二终端之间的映射关系将所述第一加密结果传输至所述第二终端。
  16. 一种通信装置,所述通信装置为第二终端,其特征在于,包括:处理模块和通信模块;
    所述处理模块用于接入信令服务器,以触发所述第二终端与信令服务器之间的双向认证;
    所述通信模块用于在所述第二终端与所述信令服务器之间的双向认证成功之后,接收所述信令服务器通过第一终端与所述第二终端之间的映射关系发送的第一加密结果;所述第一加密结果是对视频连接建立请求和所述视频连接建立请求的签名进行加密得到的加密结果;
    所述处理模块还用于对所述第一加密结果进行解密,得到所述视频连接建立请求和所述视频连接建立请求的签名;
    所述处理模块还用于对所述视频连接建立请求的签名进行验签。
  17. 一种电子设备,其特征在于,包括:
    处理器和存储器,所述存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,以执行权利要求1至16中任一项所述的方法。
  18. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求1至16中任一项所述的方法。
  19. 一种计算机程序产品,包括计算机程序/指令,其特征在于,该计算机程序/指令被处理器执行时实现如权利要求1至16中任一项所述的方法。
PCT/CN2023/086309 2022-06-15 2023-04-04 通信方法、装置、设备、存储介质及程序产品 WO2023241176A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210681586.7A CN115102740A (zh) 2022-06-15 2022-06-15 通信方法、装置、设备、存储介质及程序产品
CN202210681586.7 2022-06-15

Publications (1)

Publication Number Publication Date
WO2023241176A1 true WO2023241176A1 (zh) 2023-12-21

Family

ID=83291618

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/086309 WO2023241176A1 (zh) 2022-06-15 2023-04-04 通信方法、装置、设备、存储介质及程序产品

Country Status (2)

Country Link
CN (1) CN115102740A (zh)
WO (1) WO2023241176A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117499160A (zh) * 2023-12-29 2024-02-02 同略科技有限公司 一种基于电子档案的网络安全防护方法及系统

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115102740A (zh) * 2022-06-15 2022-09-23 腾讯科技(深圳)有限公司 通信方法、装置、设备、存储介质及程序产品
CN115955593A (zh) * 2022-12-15 2023-04-11 九识(苏州)智能科技有限公司 一种无人车的监控视频回放系统、方法及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104320257A (zh) * 2014-10-22 2015-01-28 李名选 电子档案验证方法及装置
JP2017163326A (ja) * 2016-03-09 2017-09-14 株式会社日立製作所 暗号化システム、暗号化方法、及び暗号化プログラム
CN109151508A (zh) * 2018-11-09 2019-01-04 北京京航计算通讯研究所 一种视频加密方法
CN109218825A (zh) * 2018-11-09 2019-01-15 北京京航计算通讯研究所 一种视频加密系统
CN115102740A (zh) * 2022-06-15 2022-09-23 腾讯科技(深圳)有限公司 通信方法、装置、设备、存储介质及程序产品

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104320257A (zh) * 2014-10-22 2015-01-28 李名选 电子档案验证方法及装置
JP2017163326A (ja) * 2016-03-09 2017-09-14 株式会社日立製作所 暗号化システム、暗号化方法、及び暗号化プログラム
CN109151508A (zh) * 2018-11-09 2019-01-04 北京京航计算通讯研究所 一种视频加密方法
CN109218825A (zh) * 2018-11-09 2019-01-15 北京京航计算通讯研究所 一种视频加密系统
CN115102740A (zh) * 2022-06-15 2022-09-23 腾讯科技(深圳)有限公司 通信方法、装置、设备、存储介质及程序产品

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117499160A (zh) * 2023-12-29 2024-02-02 同略科技有限公司 一种基于电子档案的网络安全防护方法及系统
CN117499160B (zh) * 2023-12-29 2024-04-09 同略科技有限公司 一种基于电子档案的网络安全防护方法及系统

Also Published As

Publication number Publication date
CN115102740A (zh) 2022-09-23

Similar Documents

Publication Publication Date Title
JP7119040B2 (ja) データ伝送方法、装置およびシステム
CN107659406B (zh) 一种资源操作方法及装置
US9398026B1 (en) Method for authenticated communications incorporating intermediary appliances
CN108599925B (zh) 一种基于量子通信网络的改进型aka身份认证系统和方法
WO2023241176A1 (zh) 通信方法、装置、设备、存储介质及程序产品
US9668230B2 (en) Security integration between a wireless and a wired network using a wireless gateway proxy
US11736304B2 (en) Secure authentication of remote equipment
US20140337619A1 (en) Derived Certificate based on Changing Identity
CN111050322B (zh) 基于gba的客户端注册和密钥共享方法、装置及系统
US20170201382A1 (en) Secure Endpoint Devices
CA2661922A1 (en) Method and system for providing authentication service for internet users
KR20120099649A (ko) 저-지연 피어 세션 구축
US20080137859A1 (en) Public key passing
US20170126623A1 (en) Protected Subnet Interconnect
CN102231725B (zh) 一种动态主机配置协议报文的认证方法、设备及系统
CN113612605A (zh) 使用对称密码技术增强mqtt协议身份认证方法、系统和设备
CN113225352B (zh) 一种数据传输方法、装置、电子设备及存储介质
US20120164981A1 (en) Method for communicating data between a secure element and a network access point and a corresponding secure element
WO2018202109A1 (zh) 一种证书请求消息发送方法、接收方法和装置
WO2022100356A1 (zh) 身份认证系统、方法、装置、设备及计算机可读存储介质
CN109995723B (zh) 一种域名解析系统dns信息交互的方法、装置及系统
CN116709325B (zh) 一种基于高速加密算法的移动设备安全认证方法
CA2795420C (en) Derived certificate based on changing identity
CN116782210B (zh) 一种高速加密算法的动态加密密钥生成方法
CN111641539B (zh) 一种家电设备的安全交互方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23822747

Country of ref document: EP

Kind code of ref document: A1