[go: up one dir, main page]

CN120358091B - Video signal dynamic encryption authentication method and system - Google Patents

Video signal dynamic encryption authentication method and system

Info

Publication number
CN120358091B
CN120358091B CN202510841398.XA CN202510841398A CN120358091B CN 120358091 B CN120358091 B CN 120358091B CN 202510841398 A CN202510841398 A CN 202510841398A CN 120358091 B CN120358091 B CN 120358091B
Authority
CN
China
Prior art keywords
video signal
information
key
receiving device
encrypted
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202510841398.XA
Other languages
Chinese (zh)
Other versions
CN120358091A (en
Inventor
李文俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yuming Information Technology Co ltd
Original Assignee
Shenzhen Yuming Information Technology Co ltd
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 Shenzhen Yuming Information Technology Co ltd filed Critical Shenzhen Yuming Information Technology Co ltd
Priority to CN202510841398.XA priority Critical patent/CN120358091B/en
Publication of CN120358091A publication Critical patent/CN120358091A/en
Application granted granted Critical
Publication of CN120358091B publication Critical patent/CN120358091B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

本发明涉及视频信号处理技术领域,公开了一种视频信号动态加密认证方法及系统。所述方法包括:对视频信号发送设备和视频信号接收设备执行双向挑战‑响应认证,得到双向身份认证结果;进行会话密钥计算,得到会话密钥;对视频信号接收设备进行EDID验证,得到加密的EDID验证通过信息;对HDCP密钥进行加密传输和视频信号加密处理,得到加密的视频信号;进行设备心跳响应检测,得到连接状态确认结果;对视频信号发送设备的视频信号传输状态和视频信号接收设备的HDMI接收通道进行控制,得到视频信号传输链路的重建指令。本发明实现了对设备连接状态的实时监控,在检测到安全威胁时能够快速切断视频传输,并自动重建安全链路。

The present invention relates to the field of video signal processing technology, and discloses a method and system for dynamic encryption authentication of video signals. The method comprises: performing two-way challenge-response authentication on a video signal transmitting device and a video signal receiving device to obtain a two-way identity authentication result; performing session key calculation to obtain a session key; performing EDID verification on the video signal receiving device to obtain encrypted EDID verification pass information; performing encrypted transmission of an HDCP key and encryption processing of a video signal to obtain an encrypted video signal; performing device heartbeat response detection to obtain a connection status confirmation result; and controlling the video signal transmission status of the video signal transmitting device and the HDMI receiving channel of the video signal receiving device to obtain a video signal transmission link reconstruction instruction. The present invention implements real-time monitoring of the device connection status, and can quickly cut off video transmission and automatically reestablish a secure link when a security threat is detected.

Description

视频信号动态加密认证方法及系统Video signal dynamic encryption authentication method and system

技术领域Technical Field

本发明涉及视频信号处理技术领域,尤其涉及一种视频信号动态加密认证方法及系统。The present invention relates to the technical field of video signal processing, and in particular to a video signal dynamic encryption authentication method and system.

背景技术Background Art

随着视频信号传输技术的快速发展,视频内容的安全保护成为了一个日益突出的问题。传统的HDMI视频传输系统缺乏完善的认证机制,导致非法设备可以轻易截获和复制高清视频内容。虽然HDCP加密技术在一定程度上提供了保护,但单一的加密方案无法应对日益复杂的安全威胁。With the rapid development of video signal transmission technology, the security of video content has become an increasingly prominent issue. Traditional HDMI video transmission systems lack comprehensive authentication mechanisms, making it easy for unauthorized devices to intercept and copy high-definition video content. While HDCP encryption technology provides some protection, a single encryption scheme cannot address increasingly complex security threats.

目前,大多数HDMI设备之间的连接缺乏动态验证机制,一旦建立连接后就不再进行身份认证,这使得攻击者有机会通过中间人攻击或重放攻击来破坏视频传输的安全性。同时,现有的EDID验证方案过于简单,难以有效防止伪造设备的接入,存在严重的安全隐患。Currently, most connections between HDMI devices lack dynamic authentication mechanisms. Once a connection is established, identity verification is no longer performed. This allows attackers to compromise the security of video transmission through man-in-the-middle or replay attacks. Furthermore, existing EDID authentication schemes are overly simplistic, failing to effectively prevent counterfeit devices from connecting, posing serious security risks.

发明内容Summary of the Invention

本发明提供了一种视频信号动态加密认证方法及系统,本发明实现了对设备连接状态的实时监控,在检测到安全威胁时能够快速切断视频传输,并自动重建安全链路。The present invention provides a method and system for dynamic encryption authentication of video signals, which realizes real-time monitoring of the device connection status, can quickly cut off video transmission when a security threat is detected, and automatically rebuild a secure link.

第一方面,本发明提供了一种视频信号动态加密认证方法,所述视频信号动态加密认证方法包括:In a first aspect, the present invention provides a method for dynamic encryption authentication of a video signal, the method comprising:

对视频信号发送设备和视频信号接收设备执行双向挑战-响应认证,得到双向身份认证结果;Performing bidirectional challenge-response authentication on the video signal sending device and the video signal receiving device to obtain a bidirectional identity authentication result;

基于所述双向身份认证结果,对所述视频信号发送设备和所述视频信号接收设备进行会话密钥计算,得到会话密钥;Based on the two-way identity authentication result, calculating a session key for the video signal sending device and the video signal receiving device to obtain a session key;

对所述视频信号接收设备进行EDID验证,得到加密的EDID验证通过信息;Performing EDID verification on the video signal receiving device to obtain encrypted EDID verification pass information;

根据所述加密的EDID验证通过信息,对HDCP密钥进行加密传输和视频信号加密处理,得到加密的视频信号;According to the encrypted EDID verification pass information, encrypting and transmitting the HDCP key and encrypting the video signal to obtain an encrypted video signal;

根据所述加密的视频信号进行设备心跳响应检测,得到连接状态确认结果;Performing device heartbeat response detection based on the encrypted video signal to obtain a connection status confirmation result;

根据所述连接状态确认结果,对所述视频信号发送设备的视频信号传输状态和所述视频信号接收设备的HDMI接收通道进行控制,得到视频信号传输链路的重建指令。According to the connection status confirmation result, the video signal transmission status of the video signal sending device and the HDMI receiving channel of the video signal receiving device are controlled to obtain a reconstruction instruction of the video signal transmission link.

第二方面,本发明提供了一种视频信号动态加密认证系统,所述视频信号动态加密认证系统包括:In a second aspect, the present invention provides a video signal dynamic encryption authentication system, the video signal dynamic encryption authentication system comprising:

认证模块,用于对视频信号发送设备和视频信号接收设备执行双向挑战-响应认证,得到双向身份认证结果;An authentication module is used to perform a two-way challenge-response authentication on the video signal sending device and the video signal receiving device to obtain a two-way identity authentication result;

密钥计算模块,用于基于所述双向身份认证结果,对所述视频信号发送设备和所述视频信号接收设备进行会话密钥计算,得到会话密钥;a key calculation module, configured to calculate a session key for the video signal sending device and the video signal receiving device based on the two-way identity authentication result to obtain a session key;

验证模块,用于对所述视频信号接收设备进行EDID验证,得到加密的EDID验证通过信息;A verification module, configured to perform EDID verification on the video signal receiving device and obtain encrypted EDID verification pass information;

加密传输模块,用于根据所述加密的EDID验证通过信息,对HDCP密钥进行加密传输和视频信号加密处理,得到加密的视频信号;An encryption transmission module is used to encrypt and transmit the HDCP key and encrypt the video signal according to the encrypted EDID verification pass information to obtain an encrypted video signal;

响应检测模块,用于根据所述加密的视频信号进行设备心跳响应检测,得到连接状态确认结果;a response detection module, configured to perform device heartbeat response detection based on the encrypted video signal to obtain a connection status confirmation result;

重建模块,用于根据所述连接状态确认结果,对所述视频信号发送设备的视频信号传输状态和所述视频信号接收设备的HDMI接收通道进行控制,得到视频信号传输链路的重建指令。A reconstruction module is used to control the video signal transmission state of the video signal sending device and the HDMI receiving channel of the video signal receiving device according to the connection status confirmation result, and obtain a reconstruction instruction for the video signal transmission link.

本发明提供的技术方案中,通过建立双向挑战-响应认证机制,实现了视频信号发送设备和接收设备的双向身份验证,有效防止了非法设备的接入和中间人攻击。采用Diffie-Hellman密钥交换算法动态生成会话密钥,提高了密钥的安全性,保证了后续通信过程的加密强度。结合EDID验证和HDCP加密,构建了多层次的安全防护体系,有效防止了视频信号被非法截获和复制。通过心跳检测机制,实现了对设备连接状态的实时监控,能够及时发现并处理异常情况。设计了完整的异常处理和链路重建机制,在检测到安全威胁时能够快速切断视频传输,并自动重建安全链路。采用分段式的数据处理和验证方案,提高了系统的容错能力和可靠性,确保了视频信号传输的连续性和稳定性。In the technical solution provided by the present invention, by establishing a two-way challenge-response authentication mechanism, two-way identity authentication of the video signal sending device and the receiving device is achieved, effectively preventing the access of illegal devices and man-in-the-middle attacks. The Diffie-Hellman key exchange algorithm is used to dynamically generate session keys, which improves the security of the keys and ensures the encryption strength of subsequent communication processes. Combined with EDID verification and HDCP encryption, a multi-level security protection system is constructed, which effectively prevents the video signal from being illegally intercepted and copied. Through the heartbeat detection mechanism, real-time monitoring of the device connection status is achieved, and abnormal situations can be discovered and handled in time. A complete exception handling and link reconstruction mechanism is designed, which can quickly cut off video transmission when a security threat is detected and automatically rebuild a secure link. The use of a segmented data processing and verification scheme improves the fault tolerance and reliability of the system and ensures the continuity and stability of video signal transmission.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以基于这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

图1为本申请实施例提供的视频信号动态加密认证方法的流程示意图;FIG1 is a flow chart of a method for dynamic encryption authentication of a video signal provided in an embodiment of the present application;

图2为本申请实施例提供的视频信号动态加密认证系统的结构示意性框图。FIG2 is a schematic block diagram of the structure of a video signal dynamic encryption authentication system provided in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能基于实际情况改变。The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations/steps, nor must they be executed in the order described. For example, some operations/steps may be decomposed, combined, or partially merged, so the actual execution order may change based on actual circumstances.

还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should also be understood that the terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should be further understood that the term "and/or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述实施例及实施例中的特征可以相互结合。The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments may be combined with each other.

请参阅图1,图1为本申请实施例提供的视频信号动态加密认证方法的流程示意图,如图1所示,本申请实施例提供的视频信号动态加密认证方法包括步骤S100至步骤S600。Please refer to Figure 1, which is a flow chart of the video signal dynamic encryption authentication method provided in an embodiment of the present application. As shown in Figure 1, the video signal dynamic encryption authentication method provided in an embodiment of the present application includes steps S100 to S600.

步骤S100、对视频信号发送设备和视频信号接收设备执行双向挑战-响应认证,得到双向身份认证结果;Step S100: Perform bidirectional challenge-response authentication on the video signal sending device and the video signal receiving device to obtain a bidirectional identity authentication result;

可以理解的是,本发明的执行主体可以为视频信号动态加密认证系统,还可以是终端或者服务器,具体此处不做限定。本发明实施例以服务器为执行主体为例进行说明。It is understandable that the execution subject of the present invention can be a video signal dynamic encryption authentication system, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking the server as the execution subject as an example.

具体的,对预置在视频信号发送设备中的公钥私钥对和预置在视频信号接收设备中的公钥私钥对进行初始化,得到互相独立的两对非对称密钥。视频信号发送设备生成一个第一随机数,该随机数作为认证挑战信息的核心内容,用于测试接收设备的身份真实性。为了增强安全性,发送设备对第一随机数进行封装,通过加密或特定格式处理,将其转化为第一认证挑战信息。将第一认证挑战信息发送到视频信号接收设备。接收到第一认证挑战信息后,视频信号接收设备利用其预置的私钥对该信息进行数字签名。数字签名过程通过接收设备的私钥对第一认证挑战信息中的内容进行加密,生成第一签名信息。视频信号接收设备将第一签名信息传回给视频信号发送设备,后者通过预置在发送设备中的接收设备公钥对第一签名信息进行验证。验证的核心是利用接收设备的公钥解密签名信息,从中提取出原始的第一认证挑战信息,并将其与发送的随机数进行比对。如果解密结果与原始信息一致,则说明接收设备确实持有对应的私钥,从而完成第一阶段的验证,得到第一验证结果。同时,为实现双向认证,视频信号接收设备生成一个独立的第二随机数。该第二随机数同样作为认证挑战信息的核心内容,由接收设备封装生成第二认证挑战信息,并将其发送给视频信号发送设备。视频信号发送设备在接收到该信息后,利用自身预置的私钥对第二认证挑战信息进行数字签名,生成第二签名信息。发送设备将生成的第二签名信息传输回接收设备,接收设备则使用发送设备的公钥对该签名信息进行验证。接收设备利用发送设备的公钥解密第二签名信息,并将解密得到的内容与之前生成的第二随机数进行对比。如果解密结果与原始内容一致,则说明发送设备确实持有对应的私钥,验证通过,得到第二验证结果。视频信号发送设备和接收设备分别基于第一验证结果和第二验证结果进行逻辑与运算,通过这种方式,双方共同确认对方的身份,确保双方设备均为合法且受信任的设备,得到双向身份认证结果。Specifically, the public key and private key pair pre-installed in the video signal transmitting device and the public key and private key pair pre-installed in the video signal receiving device are initialized to obtain two independent asymmetric key pairs. The video signal transmitting device generates a first random number, which serves as the core content of the authentication challenge message and is used to test the authenticity of the receiving device. To enhance security, the transmitting device encapsulates the first random number and converts it into a first authentication challenge message through encryption or specific formatting. The first authentication challenge message is then sent to the video signal receiving device. After receiving the first authentication challenge message, the video signal receiving device digitally signs the message using its pre-installed private key. The digital signature process encrypts the content of the first authentication challenge message using the receiving device's private key to generate a first signature message. The video signal receiving device transmits the first signature message back to the video signal transmitting device, which verifies the first signature message using the receiving device's public key pre-installed in the transmitting device. The core of the verification process is to decrypt the signature message using the receiving device's public key, extract the original first authentication challenge message, and compare it with the sent random number. If the decryption result matches the original information, the receiving device confirms that it possesses the corresponding private key, completing the first stage of verification and obtaining the first verification result. Simultaneously, to achieve bidirectional authentication, the video signal receiving device generates an independent second random number. This second random number also serves as the core content of the authentication challenge message. The receiving device encapsulates the second authentication challenge message and sends it to the video signal transmitting device. After receiving this message, the video signal transmitting device digitally signs the second authentication challenge message using its pre-set private key, generating a second signature message. The transmitting device transmits the generated second signature message back to the receiving device, which verifies the signature message using the transmitting device's public key. The receiving device decrypts the second signature message using the transmitting device's public key and compares the decrypted content with the previously generated second random number. If the decryption result matches the original content, the transmitting device confirms that it possesses the corresponding private key, and verification succeeds, resulting in the second verification result. The video signal transmitting and receiving devices perform a logical AND operation based on the first and second verification results, respectively. In this way, both devices confirm each other's identity, ensuring that both devices are legitimate and trusted, and obtaining a bidirectional identity authentication result.

步骤S200、基于双向身份认证结果,对视频信号发送设备和视频信号接收设备进行会话密钥计算,得到会话密钥;Step S200: Based on the result of the two-way identity authentication, a session key is calculated for the video signal sending device and the video signal receiving device to obtain a session key;

具体的,在完成双向身份认证后,基于认证结果进行条件判断,当双向身份认证结果为真时,触发密钥交换启动指令。如果认证结果为假,则终止后续步骤,从而防止未经认证的设备参与密钥交换过程,提升整体安全性。在密钥交换启动后,对预设的大素数和本原根进行初始化。这两个参数是整个密钥交换过程的基础,其中是一个公开的大素数,而是该大素数的本原根,满足模运算下的特定数学性质。初始化完成后,将分别发送到视频信号发送设备和接收设备,作为双方进行密钥交换的公共参数。视频信号发送设备生成一个整数,该整数作为发送设备的第一私钥。发送设备利用收到的本原根和生成的第一私钥进行模幂运算,即计算 mod,生成一个第一随机密钥参数。同时,视频信号接收设备生成另一个整数作为第二私钥,并以相同的方式对进行模幂运算,计算mod ,得到第二随机密钥参数。这两个随机密钥参数是发送设备和接收设备在密钥交换过程中共享信息的核心。视频信号发送设备将生成的第一随机密钥参数通过安全信道发送给接收设备,接收设备在收到该参数后,利用其第二私钥和接收到的第一随机密钥参数进行模幂运算,即计算 mod 。通过指数运算的数学性质,证明此计算结果实际上等价于 mod ,生成第一会话密钥。与此类似,视频信号接收设备将其生成的第二随机密钥参数通过安全信道发送给发送设备,发送设备在收到该参数后,利用其第一私钥和接收到的第二随机密钥参数进行模幂运算即计算 mod ,同样得到 mod 。这一过程确保发送设备和接收设备在不直接传输私钥的情况下,能够生成相同的会话密钥。为了确保密钥交换过程的安全性和准确性,对生成的第一会话密钥和第二会话密钥进行一致性验证。将两个会话密钥进行比对,如果两者一致,则验证通过,表明密钥交换过程成功且未受到干扰。如果一致性验证失败,则说明密钥交换过程中存在安全问题或计算错误,此时终止操作以防止潜在的安全威胁。在一致性验证通过的前提下,根据预设规则选择第一会话密钥或第二会话密钥作为最终的会话密钥,完成整个密钥计算过程。Specifically, after completing the two-way identity authentication, a conditional judgment is performed based on the authentication result. When the two-way identity authentication result is true, the key exchange start instruction is triggered. If the authentication result is false, the subsequent steps are terminated, thereby preventing unauthenticated devices from participating in the key exchange process and improving overall security. After the key exchange is started, the preset large prime number and the original root These two parameters are the basis of the entire key exchange process, is a public large prime number, and is the primitive root of the large prime number, which satisfies the specific mathematical properties under modular operation. and The video signal sending device and the receiving device are sent to the video signal sending device and the receiving device respectively as the public parameters for the key exchange between the two parties. The video signal sending device generates an integer , the integer is used as the first private key of the sending device. The sending device uses the received primitive root And the generated first private key Perform modular exponentiation, i.e. calculate mod , generates a first random key parameter. At the same time, the video signal receiving device generates another integer As the second private key, and in the same way and Perform modular exponentiation to calculate mod , obtain the second random key parameter. These two random key parameters are the core of the information shared by the sending device and the receiving device during the key exchange process. The video signal sending device sends the generated first random key parameter to the receiving device through a secure channel. After receiving the parameter, the receiving device uses its second private key to Perform modular exponentiation on the received first random key parameter, i.e. calculate mod Through the mathematical properties of exponential operation, it is proved that this calculation result is actually equivalent to mod , generating a first session key. Similarly, the video signal receiving device sends the second random key parameter it generates to the sending device through a secure channel. After receiving the parameter, the sending device uses its first private key to Perform modular exponentiation on the received second random key parameter to calculate mod , and we also get mod . This process ensures that the sending device and the receiving device can generate the same session key without directly transmitting the private key. In order to ensure the security and accuracy of the key exchange process, the generated first session key and the second session key are verified for consistency. The two session keys are compared. If the two are consistent, the verification is passed, indicating that the key exchange process is successful and undisturbed. If the consistency verification fails, it means that there is a security problem or calculation error in the key exchange process. At this time, the operation is terminated to prevent potential security threats. On the premise that the consistency verification is passed, the first session key or the second session key is selected as the final session key according to the preset rules to complete the entire key calculation process.

步骤S300、对视频信号接收设备进行EDID验证,得到加密的EDID验证通过信息;Step S300: Perform EDID verification on the video signal receiving device to obtain encrypted EDID verification pass information;

具体的,为了能够访问视频信号接收设备的EDID数据,对HDMI的DDC(DisplayData Channel)通道进行初始化。HDMI的DDC通道是一种基于I2C通信协议的标准化数据交换接口,用于传输显示设备的配置信息。通过对DDC通道的初始化,在视频信号发送设备和接收设备之间建立起稳定的I2C通信链路,生成用于读取EDID数据的DDC通道读取指令。在通信链路建立后,视频信号发送设备通过发送DDC通道读取指令,从视频信号接收设备的EDID寄存器中读取到完整的EDID原始数据。这些数据是接收设备所支持的显示参数集合,包含分辨率、刷新率、制造商标识和产品标识等关键信息。读取到的EDID原始数据经过解析处理,提取出其中的关键字段,得到标准化的EDID信息。为了更高效地对EDID信息进行验证,视频信号发送设备对解析后的EDID信息进行分段处理,将其分为分辨率信息段、制造商标识信息段和产品标识信息段。通过结构化的处理方式,识别出接收设备的主要特征数据。同时,视频信号发送设备从其存储器中读取预存的设备特征信息,这些信息是系统在初始配置时存储的用于校验的参考数据。类似于对接收设备EDID信息的处理,视频信号发送设备同样对预存的设备特征信息进行分段,提取出预期分辨率信息段、预期制造商标识信息段和预期产品标识信息段,形成预期特征数据。进入特征数据比对阶段。视频信号发送设备将从接收设备提取的分辨率信息段与预存的预期分辨率信息段进行比对。如果两个信息段完全一致,则认为接收设备支持的分辨率符合系统的预期要求,生成分辨率匹配结果为真。视频信号发送设备对制造商标识信息段和产品标识信息段分别与预期制造商标识信息段和预期产品标识信息段进行比对,验证接收设备的品牌和型号是否与系统的预期一致。若比对结果一致,则生成设备标识匹配结果为真。在完成所有比对操作后,视频信号发送设备基于分辨率匹配结果和设备标识匹配结果进行逻辑与运算。只有当两个匹配结果均为真时,才会生成EDID验证通过信息,表明接收设备满足系统要求,安全地进行后续的信号传输。为了保护验证通过信息的完整性和防篡改性,视频信号发送设备利用之前生成的会话密钥对EDID验证通过信息进行加密处理。加密过程使用对称加密算法,如AES算法,将验证通过信息转换为加密的EDID验证通过信息,确保只有持有正确会话密钥的接收设备才能解密并使用该信息。Specifically, to access the EDID data of the video signal receiving device, the HDMI DDC (Display Data Channel) is initialized. The HDMI DDC channel is a standardized data exchange interface based on the I2C communication protocol, used to transmit display device configuration information. Initializing the DDC channel establishes a stable I2C communication link between the video signal transmitting and receiving devices, generating a DDC channel read command for reading EDID data. After the communication link is established, the video signal transmitting device sends the DDC channel read command to read the complete raw EDID data from the EDID register of the video signal receiving device. This data contains the display parameters supported by the receiving device, including key information such as resolution, refresh rate, manufacturer identification, and product identification. The read raw EDID data is parsed to extract key fields, resulting in standardized EDID information. To more efficiently verify the EDID information, the video signal transmitting device segments the parsed EDID information into a resolution information segment, a manufacturer identification segment, and a product identification segment. Through structured processing, the key characteristic data of the receiving device is identified. At the same time, the video signal transmitting device reads pre-stored device characteristic information from its memory. This information serves as reference data stored during the system's initial configuration for verification. Similar to the processing of the receiving device's EDID information, the video signal transmitting device also segments the pre-stored device characteristic information, extracting the expected resolution information segment, the expected manufacturer identification information segment, and the expected product identification information segment to form the expected characteristic data. The characteristic data comparison phase then begins. The video signal transmitting device compares the resolution information segment extracted from the receiving device with the pre-stored expected resolution information segment. If the two information segments are identical, the receiving device is deemed to support a resolution that meets the system's expected requirements, and a resolution match result is generated. The video signal transmitting device compares the manufacturer identification information segment and the product identification information segment with the expected manufacturer identification information segment and expected product identification information segment, respectively, to verify that the receiving device's brand and model match the system's expectations. If the comparison results match, a device identification match result is generated. After completing all comparison operations, the video signal transmitting device performs a logical AND operation based on the resolution match and device identification match results. Only when both matching results are true is an EDID verification message generated, indicating that the receiving device meets system requirements and enabling secure subsequent signal transmission. To protect the integrity and tamper-proof nature of the verification message, the video signal transmitting device encrypts the EDID verification message using a previously generated session key. This encryption process uses a symmetric encryption algorithm, such as AES, to convert the verification message into an encrypted EDID verification message, ensuring that only the receiving device holding the correct session key can decrypt and use it.

步骤S400、根据加密的EDID验证通过信息,对HDCP密钥进行加密传输和视频信号加密处理,得到加密的视频信号;Step S400: encrypting and transmitting the HDCP key and encrypting the video signal according to the encrypted EDID verification pass information to obtain an encrypted video signal;

具体的,视频信号接收设备使用此前协商生成的会话密钥对收到的加密的EDID验证通过信息进行解密操作。解密后,接收设备提取出原始的EDID验证通过信息,并对解密结果的完整性和正确性进行验证,确保信息在传输过程中未被篡改。如果验证成功,接收设备生成HDCP启动指令,指示双方设备进入HDCP保护模式。基于HDCP启动指令,视频信号发送设备和接收设备之间建立HDMI连接。在连接建立后,发送设备对HDMI链路进行HDCP使能操作,确保数据在传输过程中受到HDCP协议的保护,生成HDCP物理链路。这条物理链路是后续信号加密和密钥协商的基础,确保数据传输的完整性和安全性。在HDCP物理链路建立后,视频信号发送设备主动通过该链路向接收设备发送HDCP能力协商请求,获取接收设备的HDCP版本信息。发送设备通过对比自己的HDCP版本和接收设备返回的版本信息,完成HDCP版本匹配过程,得到HDCP版本协商结果。如果版本匹配成功,则双方继续进行密钥协商,否则将终止连接以确保兼容性和安全性。视频信号发送设备基于HDCP版本协商结果生成用于数据加密的HDCP密钥。为了便于传输和处理,发送设备将生成的HDCP密钥进行分段处理,将密钥拆分为多个密钥数据段。为确保密钥传输的安全性,发送设备利用会话密钥对每个密钥数据段进行加密处理,得到加密的密钥数据段。在完成加密后,这些加密的密钥数据段通过HDCP物理链路传输至视频信号接收设备。接收设备接收到加密的密钥数据段后,利用会话密钥对这些数据段逐一进行解密,恢复出原始的HDCP密钥数据段。接收设备通过对这些解密后的数据段进行重组,完整恢复HDCP密钥。为了验证HDCP密钥传输和重组过程的正确性,视频信号发送设备生成一个HDCP密钥验证码。该验证码由发送设备根据生成的HDCP密钥通过特定算法计算得出,并使用会话密钥对验证码进行加密后传输至接收设备。接收设备接收加密的HDCP密钥验证码后,使用会话密钥进行解密,并通过相同的算法计算出本地的HDCP密钥验证码。接收设备将本地计算的验证码与发送设备传输的验证码进行对比,如果两者一致,则验证通过,表明HDCP密钥传输和重组均成功,生成HDCP密钥验证结果。在HDCP密钥验证结果为真时,视频信号发送设备对其视频数据输入通道进行使能操作,从而允许后续的视频数据进入加密流程。发送设备利用生成的HDCP密钥对输入的视频信号进行加密,确保视频内容在传输过程中始终处于加密状态。加密的视频信号通过HDCP保护的物理链路传输至接收设备。Specifically, the video signal receiving device decrypts the received encrypted EDID verification pass message using the previously negotiated session key. After decryption, the receiving device extracts the original EDID verification pass message and verifies the integrity and correctness of the decrypted result to ensure it has not been tampered with during transmission. If verification is successful, the receiving device generates an HDCP enable command, instructing both devices to enter HDCP protection mode. Based on the HDCP enable command, an HDMI connection is established between the video signal transmitting and receiving devices. After the connection is established, the transmitting device enables HDCP on the HDMI link to ensure HDCP protection during data transmission, thereby establishing an HDCP physical link. This physical link serves as the basis for subsequent signal encryption and key negotiation, ensuring the integrity and security of data transmission. After the HDCP physical link is established, the video signal transmitting device proactively sends an HDCP capability negotiation request to the receiving device over the link to obtain the receiving device's HDCP version information. The transmitting device compares its own HDCP version with the version information returned by the receiving device to complete the HDCP version matching process and obtain the HDCP version negotiation result. If the versions match, both parties continue key negotiation; otherwise, the connection is terminated to ensure compatibility and security. The video signal transmitter generates an HDCP key for data encryption based on the HDCP version negotiation results. To facilitate transmission and processing, the transmitter segments the generated HDCP key into multiple key data segments. To ensure secure key transmission, the transmitter encrypts each key data segment using the session key, generating encrypted key data segments. After encryption, these encrypted key data segments are transmitted over the HDCP physical link to the video signal receiver. Upon receiving the encrypted key data segments, the receiver decrypts each segment using the session key to recover the original HDCP key data segments. The receiver reassembles the decrypted data segments to fully recover the HDCP key. To verify the correctness of the HDCP key transmission and reassembly process, the video signal transmitter generates an HDCP key verification code. This verification code is calculated by the transmitter using a specific algorithm based on the generated HDCP key. The verification code is encrypted using the session key and transmitted to the receiver. Upon receiving the encrypted HDCP key verification code, the receiver decrypts it using the session key and calculates its own HDCP key verification code using the same algorithm. The receiving device compares the locally calculated verification code with the verification code transmitted by the sending device. If they match, verification succeeds, indicating that both HDCP key transmission and reassembly were successful. An HDCP key verification result is generated. If the HDCP key verification result is true, the video signal sending device enables its video data input channel, allowing subsequent video data to enter the encryption process. The sending device uses the generated HDCP key to encrypt the input video signal, ensuring that the video content remains encrypted during transmission. The encrypted video signal is transmitted to the receiving device over the HDCP-protected physical link.

步骤S500、根据加密的视频信号进行设备心跳响应检测,得到连接状态确认结果;Step S500: Perform device heartbeat response detection based on the encrypted video signal to obtain a connection status confirmation result;

具体的,对预设的心跳检测时间间隔进行读取,这是心跳检测的触发条件,用于周期性启动设备间的连接状态确认机制。基于读取到的心跳检测时间间隔,视频信号发送设备生成心跳检测触发指令,指示其开始构建心跳检测信息。在心跳检测触发指令发出后,视频信号发送设备生成一个随机序列作为心跳检测信息的核心内容。该随机序列的随机性和不可预测性是确保心跳检测安全性的重要因素,能够有效抵御重放攻击和伪造行为。生成的随机序列经过封装处理后,转化为完整的心跳检测信息,以便于后续的加密与传输。在心跳检测信息准备好后,视频信号发送设备利用先前协商生成的会话密钥对该信息进行加密处理,得到加密的心跳检测信息。加密的过程确保心跳检测信息在传输过程中不被窃听或篡改。视频信号发送设备通过安全通信通道将加密的心跳检测信息传输至视频信号接收设备。接收设备接收到加密的信息后,利用会话密钥对其进行解密操作,从而还原出解密后的心跳检测信息。解密后的信息中包含发送设备生成的随机序列,该序列用于接收设备的响应生成过程。接收设备在完成解密后,对解密后的心跳检测信息进行数字签名操作。数字签名通过接收设备预置的私钥对心跳检测信息进行加密,生成唯一的心跳响应信息。通过数字签名,接收设备确认心跳检测信息的来源,并防止响应信息被篡改。为了确保传输的安全性,接收设备对生成的心跳响应信息再次利用会话密钥进行加密,得到加密的心跳响应信息。接收设备将加密后的响应信息通过安全通信通道发送回视频信号发送设备。发送设备接收到加密的心跳响应信息后,同样使用会话密钥进行解密操作,从而还原出解密后的心跳响应信息。此时,发送设备对解密后的信息中的数字签名进行验证,验证的核心在于利用接收设备的公钥对签名进行解密,并与原始心跳检测信息进行比对。如果签名验证成功,则表明接收设备的响应是可信的,且设备之间的连接状态正常,从而生成连接状态确认结果为真。Specifically, the preset heartbeat detection interval is read. This serves as the trigger condition for heartbeat detection and is used to periodically initiate a connection status confirmation mechanism between devices. Based on the read heartbeat detection interval, the video signal transmitting device generates a heartbeat detection trigger instruction, instructing it to begin constructing heartbeat detection information. After issuing the heartbeat detection trigger instruction, the video signal transmitting device generates a random sequence as the core content of the heartbeat detection information. The randomness and unpredictability of this random sequence are important factors in ensuring the security of heartbeat detection, effectively resisting replay attacks and forgery. The generated random sequence is encapsulated and converted into complete heartbeat detection information for subsequent encryption and transmission. After the heartbeat detection information is prepared, the video signal transmitting device encrypts it using the previously negotiated session key to obtain encrypted heartbeat detection information. This encryption process ensures that the heartbeat detection information is protected from eavesdropping or tampering during transmission. The video signal transmitting device transmits the encrypted heartbeat detection information to the video signal receiving device via a secure communication channel. Upon receiving the encrypted information, the receiving device decrypts it using the session key to restore the decrypted heartbeat detection information. The decrypted message contains a random sequence generated by the sending device, which is used in the receiving device's response generation process. After decryption, the receiving device digitally signs the decrypted heartbeat detection message. This digital signature encrypts the heartbeat detection message using the receiving device's pre-set private key, generating a unique heartbeat response message. The digital signature confirms the source of the heartbeat detection message and prevents tampering with the response message. To ensure transmission security, the receiving device encrypts the generated heartbeat response message again using the session key to obtain an encrypted heartbeat response message. The receiving device then sends the encrypted response message back to the video signal sending device via a secure communication channel. After receiving the encrypted heartbeat response message, the sending device also decrypts it using the session key to restore the decrypted heartbeat response message. The sending device then verifies the digital signature in the decrypted message. The core of this verification process involves decrypting the signature using the receiving device's public key and comparing it with the original heartbeat detection message. If the signature verification is successful, it indicates that the receiving device's response is authentic and the connection between the devices is normal, thus generating a connection status confirmation result of true.

步骤S600、根据连接状态确认结果,对视频信号发送设备的视频信号传输状态和视频信号接收设备的HDMI接收通道进行控制,得到视频信号传输链路的重建指令。Step S600: According to the connection status confirmation result, the video signal transmission status of the video signal sending device and the HDMI receiving channel of the video signal receiving device are controlled to obtain a video signal transmission link reconstruction instruction.

具体的,视频信号发送设备根据连接状态确认结果,对多个核心验证信息进行异常状态检测,包括第一签名信息、第二签名信息、EDID验证通过信息、HDCP密钥验证结果以及心跳响应信息。通过对这些数据的检测,发送设备能够识别是否存在传输中断、验证失败或数据篡改等异常现象,生成发送端异常状态信息。这一信息作为发送设备当前状态的主要标识,用于指示发送通道是否需要重新配置。同时,视频信号接收设备对与之相关的核心验证信息进行检测,包括第一签名信息、第二签名信息、EDID验证通过信息、HDCP密钥验证码以及心跳检测信息。通过分析这些数据,接收设备能够判断自身是否存在异常状态,例如数据接收不完整、密钥验证失败或链路不匹配等。检测完成后,接收设备生成接收端异常状态信息,与发送端的异常状态信息一起,形成完整的异常状态反馈。基于发送端异常状态信息和接收端异常状态信息,综合分析这些数据并生成异常状态标识位。异常状态标识位的生成是通过逻辑运算来实现的,旨在确定当前视频信号传输链路的健康状态。如果标识位显示异常状态存在,则系统会进一步执行状态判断逻辑,生成异常处理触发指令。该触发指令是整个异常处理流程的核心,用于协调发送设备与接收设备的状态调整。当异常处理触发指令生成后,对视频信号发送设备的视频信号发送通道进行控制,以确保数据不会在异常状态下继续传输。具体而言,触发指令关闭发送设备的视频信号发送通道,生成视频信号发送中断指令,从而停止任何潜在的不安全信号传输。同时,触发指令对视频信号接收设备的HDMI接收通道进行控制,以防止接收设备继续处理异常信号。接收通道的关闭通过生成HDMI接收中断指令来实现,从而确保接收设备的信号链路处于安全状态。在发送设备和接收设备的通道关闭后,对通道的状态进行确认,通过检查视频信号发送中断指令和HDMI接收中断指令的执行状态,生成通道关闭状态信息。该状态信息用于确认发送通道和接收通道是否已成功关闭。如果关闭状态信息显示通道已正确关闭,则系统认为当前异常状态已得到初步隔离。基于通道关闭状态信息,生成视频信号传输链路的重建指令。该指令用于重新初始化发送设备和接收设备之间的连接,并在重建过程中重新执行身份验证、密钥协商以及链路配置等操作,确保新链路的安全性和稳定性。通过以上步骤,系统能够在检测到异常状态时快速中断现有链路,并通过重新建立传输链路来恢复视频信号的正常传输。Specifically, based on the connection status confirmation results, the video signal transmitting device performs abnormality checks on multiple core verification information, including the first signature information, the second signature information, the EDID verification pass information, the HDCP key verification result, and the heartbeat response information. By checking this data, the transmitting device can identify any abnormalities such as transmission interruption, verification failure, or data tampering, and generates transmitting-end abnormality information. This information serves as the primary indicator of the transmitting device's current status and indicates whether the transmission channel needs to be reconfigured. Simultaneously, the video signal receiving device checks the associated core verification information, including the first signature information, the second signature information, the EDID verification pass information, the HDCP key verification code, and the heartbeat detection information. By analyzing this data, the receiving device can determine whether it is experiencing abnormalities, such as incomplete data reception, key verification failure, or link mismatch. After the detection is complete, the receiving device generates receiving-end abnormality information, which, together with the transmitting-end abnormality information, forms a complete abnormality feedback loop. Based on the transmitting-end abnormality information and the receiving-end abnormality information, these data are comprehensively analyzed to generate an abnormality flag. The abnormality flag is generated through logical operations to determine the health of the current video signal transmission link. If the flag indicates an abnormal state, the system further executes the state judgment logic and generates an exception handling trigger. This trigger is the core of the entire exception handling process, coordinating the state adjustments of the transmitting and receiving devices. Once the exception handling trigger is generated, the video signal transmission channel of the video signal transmitting device is controlled to ensure that data does not continue to be transmitted during the abnormal state. Specifically, the trigger shuts down the video signal transmission channel of the transmitting device and generates a video signal transmission interrupt command, thereby halting any potentially unsafe signal transmission. Simultaneously, the trigger controls the HDMI receiving channel of the video signal receiving device to prevent the receiving device from further processing the abnormal signal. The receiving channel is shut down by generating an HDMI reception interrupt command, ensuring that the signal link of the receiving device remains safe. After the channels of the transmitting and receiving devices are closed, the channel status is verified by checking the execution status of the video signal transmission interrupt command and the HDMI reception interrupt command to generate channel closure status information. This status information confirms whether the transmitting and receiving channels have been successfully closed. If the closure status information indicates that the channels have been properly closed, the system concludes that the current abnormal state has been preliminarily isolated. Based on the channel closure status information, an instruction to re-establish the video signal transmission link is generated. This command reinitializes the connection between the transmitting and receiving devices and re-performs authentication, key negotiation, and link configuration during the reestablishment process to ensure the security and stability of the new link. This allows the system to quickly disconnect the existing link if an abnormality is detected and restore normal video signal transmission by re-establishing the transmission link.

本发明实施例中,通过建立双向挑战-响应认证机制,实现了视频信号发送设备和接收设备的双向身份验证,有效防止了非法设备的接入和中间人攻击。采用Diffie-Hellman密钥交换算法动态生成会话密钥,提高了密钥的安全性,保证了后续通信过程的加密强度。结合EDID验证和HDCP加密,构建了多层次的安全防护体系,有效防止了视频信号被非法截获和复制。通过心跳检测机制,实现了对设备连接状态的实时监控,能够及时发现并处理异常情况。设计了完整的异常处理和链路重建机制,在检测到安全威胁时能够快速切断视频传输,并自动重建安全链路。采用分段式的数据处理和验证方案,提高了系统的容错能力和可靠性,确保了视频信号传输的连续性和稳定性。In an embodiment of the present invention, by establishing a two-way challenge-response authentication mechanism, two-way identity authentication of the video signal sending device and the receiving device is achieved, effectively preventing the access of illegal devices and man-in-the-middle attacks. The Diffie-Hellman key exchange algorithm is used to dynamically generate session keys, which improves the security of the keys and ensures the encryption strength of subsequent communication processes. Combined with EDID verification and HDCP encryption, a multi-level security protection system is constructed, which effectively prevents the video signal from being illegally intercepted and copied. Through the heartbeat detection mechanism, real-time monitoring of the device connection status is achieved, and abnormal situations can be discovered and handled in a timely manner. A complete exception handling and link reconstruction mechanism is designed, which can quickly cut off video transmission and automatically rebuild a secure link when a security threat is detected. The use of a segmented data processing and verification scheme improves the fault tolerance and reliability of the system and ensures the continuity and stability of video signal transmission.

在一具体实施例中,执行步骤S100的过程可以具体包括如下步骤:In a specific embodiment, the process of executing step S100 may specifically include the following steps:

对预置在视频信号发送设备中的公钥私钥对和预置在视频信号接收设备中的公钥私钥对进行初始化,得到互相独立的两对非对称密钥;Initializing a public key and a private key pair preset in a video signal transmitting device and a public key and a private key pair preset in a video signal receiving device to obtain two independent asymmetric key pairs;

由视频信号发送设备生成第一随机数,对第一随机数进行封装,得到第一认证挑战信息;The video signal sending device generates a first random number, encapsulates the first random number, and obtains first authentication challenge information;

对第一认证挑战信息进行发送,由视频信号接收设备接收第一认证挑战信息,并利用预置在视频信号接收设备中的私钥对第一认证挑战信息进行数字签名,得到第一签名信息;The first authentication challenge information is sent, and the video signal receiving device receives the first authentication challenge information and digitally signs the first authentication challenge information using a private key preset in the video signal receiving device to obtain first signature information;

对第一签名信息进行传输,由视频信号发送设备利用预置在视频信号接收设备中的公钥对第一签名信息进行验证,得到第一验证结果;The first signature information is transmitted, and the video signal sending device verifies the first signature information using a public key preset in the video signal receiving device to obtain a first verification result;

由视频信号接收设备生成第二随机数,对第二随机数进行封装,得到第二认证挑战信息;The video signal receiving device generates a second random number, encapsulates the second random number, and obtains second authentication challenge information;

对第二认证挑战信息进行发送,由视频信号发送设备接收第二认证挑战信息,并利用预置在视频信号发送设备中的私钥对第二认证挑战信息进行数字签名,得到第二签名信息;The second authentication challenge information is sent, and the video signal sending device receives the second authentication challenge information and digitally signs the second authentication challenge information using a private key preset in the video signal sending device to obtain second signature information;

对第二签名信息进行传输,由视频信号接收设备利用预置在视频信号发送设备中的公钥对第二签名信息进行验证,得到第二验证结果;The second signature information is transmitted, and the video signal receiving device verifies the second signature information using the public key preset in the video signal sending device to obtain a second verification result;

基于第一验证结果和第二验证结果进行逻辑与运算,得到双向身份认证结果。A logical AND operation is performed based on the first verification result and the second verification result to obtain a two-way identity authentication result.

具体的,对视频信号发送设备和接收设备中的非对称密钥对进行初始化。非对称密钥对由公钥和私钥组成,公钥用于加密或验证签名,而私钥用于解密或生成签名。假设发送设备的公钥和私钥分别记为,接收设备的公钥和私钥分别记为。这两对密钥是独立生成的,满足非对称加密算法的数学性质,例如RSA或ECC中的性质,即对任意明文,有以下关系:Specifically, the asymmetric key pair in the video signal sending device and the receiving device is initialized. The asymmetric key pair consists of a public key and a private key. The public key is used to encrypt or verify the signature, while the private key is used to decrypt or generate the signature. Assume that the public key and private key of the sending device are respectively and , the public key and private key of the receiving device are respectively recorded as and The two pairs of keys are generated independently and satisfy the mathematical properties of asymmetric encryption algorithms, such as those in RSA or ECC, that is, for any plaintext , there are the following relations:

;

其中,表示使用公钥对明文进行加密,表示使用对应的私钥对加密后的密文进行解密。完成密钥初始化后,进行认证过程。视频信号发送设备生成一个随机数,作为第一认证挑战信息的核心。随机数是一个不可预测的整数,用于保证每次认证的唯一性。发送设备将进行封装,形成第一认证挑战信息。假设封装函数为,则有:in, Indicates the use of public key Plaintext Encryption, Indicates the use of the corresponding private key Decrypt the encrypted ciphertext. After completing the key initialization, the authentication process is carried out. The video signal sending device generates a random number , as the core of the first authentication challenge information. Random number Is an unpredictable integer used to ensure the uniqueness of each authentication. The sending device will Encapsulate to form the first authentication challenge information . Assume that the encapsulation function is , then:

;

视频信号发送设备将通过安全通道发送至接收设备。接收设备接收到后,利用自身的私钥进行数字签名,生成第一签名信息。数字签名的作用是证明接收设备对该认证挑战信息的响应具有唯一性且无法被伪造。签名过程表示为:The video signal sending device will Sent to the receiving device through a secure channel. Then, use your own private key right Perform digital signature and generate the first signature information The purpose of a digital signature is to prove that the receiving device's response to the authentication challenge is unique and cannot be forged. The signing process is represented as follows:

;

接收设备将传输回发送设备。发送设备接收到后,利用预置的接收设备公钥对签名进行验证,以确保其来源的合法性。验证过程为:The receiving device will Transmitted back to the sending device. The sending device receives Then, use the preset receiving device public key Signature Verification is carried out to ensure the legitimacy of its source. The verification process is:

;

如果验证结果为真,则得到第一验证结果True。在完成第一阶段认证后,接收设备生成另一个随机数,作为第二认证挑战信息的核心。与发送设备的操作类似,接收设备将进行封装,形成第二认证挑战信息If the verification result is true, the first verification result is obtained True. After completing the first phase of authentication, the receiving device generates another random number , as the core of the second authentication challenge information. Similar to the operation of the sending device, the receiving device will Encapsulate to form the second authentication challenge information :

;

接收设备将发送给发送设备。发送设备在接收到后,利用自身的私钥进行数字签名,生成第二签名信息The receiving device will Send to the sending device. Then, use your own private key right Perform digital signature and generate second signature information :

;

发送设备将返回给接收设备,接收设备利用预置的发送设备公钥对签名进行验证,验证过程为:The sending device will Returned to the receiving device, the receiving device uses the preset sending device public key Signature Verify, the verification process is:

;

如果验证结果为真,则得到第二验证结果True。视频信号发送设备和接收设备分别基于第一验证结果和第二验证结果进行逻辑与运算,以确保双方认证均成功。逻辑运算结果表示为:If the verification result is true, the second verification result is obtained True. The video signal sending device and the receiving device are respectively based on the first verification result and the second verification result Perform a logical AND operation to ensure that both parties have successfully authenticated. The logical operation result is expressed as:

;

如果True,则说明双向认证成功,发送设备和接收设备安全地建立信任连接。if If True, it means that the two-way authentication is successful and the sending device and the receiving device have securely established a trusted connection.

在一具体实施例中,执行步骤S200的过程可以具体包括如下步骤:In a specific embodiment, the process of executing step S200 may specifically include the following steps:

基于双向身份认证结果进行条件判断,当双向身份认证结果为真时执行密钥交换启动指令;Perform conditional judgment based on the result of two-way identity authentication, and execute the key exchange start instruction when the result of two-way identity authentication is true;

基于密钥交换启动指令,对预设的大素数p和本原根g进行初始化,并将大素数p和本原根g分别发送至视频信号发送设备和视频信号接收设备,得到密钥交换参数;Based on the key exchange start instruction, the preset large prime number p and primitive root g are initialized, and the large prime number p and primitive root g are sent to the video signal sending device and the video signal receiving device respectively to obtain the key exchange parameters;

由视频信号发送设备生成整数e作为第一私钥,对本原根g和第一私钥a进行模幂运算,得到第一随机密钥参数;The video signal sending device generates an integer e as a first private key, performs a modular exponentiation operation on the primitive root g and the first private key a, and obtains a first random key parameter;

由视频信号接收设备生成整数f作为第二私钥,对本原根g和第二私钥b进行模幂运算,得到第二随机密钥参数;The video signal receiving device generates an integer f as a second private key, performs a modular exponentiation operation on the primitive root g and the second private key b, and obtains a second random key parameter;

对第一随机密钥参数进行发送,由视频信号接收设备接收第一随机密钥参数,并对第一随机密钥参数和第二私钥b进行模幂运算,得到第一会话密钥;The first random key parameter is sent, and the video signal receiving device receives the first random key parameter and performs a modular exponentiation operation on the first random key parameter and the second private key b to obtain a first session key;

对第二随机密钥参数进行发送,由视频信号发送设备接收第二随机密钥参数,并对第二随机密钥参数和第一私钥进行模幂运算,得到第二会话密钥;The second random key parameter is sent, and the video signal sending device receives the second random key parameter and performs a modular exponentiation operation on the second random key parameter and the first private key to obtain a second session key;

对第一会话密钥和第二会话密钥进行一致性验证,得到一致性验证结果,并基于一致性验证结果对第一会话密钥或第二会话密钥进行选择,得到会话密钥。The first session key and the second session key are consistency verified to obtain a consistency verification result, and the first session key or the second session key is selected based on the consistency verification result to obtain a session key.

具体的,在完成双向身份认证后,对认证结果进行条件判断。如果双向身份认证结果为真,即双方身份均通过验证,则触发密钥交换启动指令。该指令的核心作用是初始化双方密钥交换所需的公共参数,即一个预设的大素数和其本原根。其中,是一个足够大的素数,用于定义有限域内的模运算范围;的一个本原根,满足在模意义下,的幂可以生成个互不相同的值。初始化完成后,将分别发送至视频信号发送设备和接收设备,为后续的密钥交换提供公共参数支持。在收到密钥交换参数后,视频信号发送设备随机生成一个整数作为第一私钥,该整数需要在区间范围内随机选取,以保证其保密性。发送设备利用本原根和私钥进行模幂运算,计算出第一随机密钥参数,其公式为:Specifically, after completing the two-way identity authentication, the authentication result is conditionally judged. If the two-way identity authentication result is true, that is, the identities of both parties are verified, the key exchange start instruction is triggered. The core function of this instruction is to initialize the public parameters required for the key exchange between the two parties, that is, a preset large prime number and its original roots .in, is a prime number large enough to define the range of modular operations in a finite field; yes A primitive root that satisfies the model In the sense, The power of can generate different values. After initialization is completed, and Sent to the video signal sending device and receiving device respectively to provide public parameter support for subsequent key exchange. After receiving the key exchange parameters, the video signal sending device randomly generates an integer As the first private key, this integer needs to be in the range The sending device uses the primitive root and private key Perform modular exponentiation to calculate the first random key parameter , the formula is:

;

其中,是发送设备基于私钥和公共参数计算出的中间值,用于后续的密钥交换。同时,视频信号接收设备也随机生成一个整数作为第二私钥,与发送设备类似,接收设备利用进行模幂运算,计算出第二随机密钥参数in, Is the sending device based on the private key The intermediate value calculated from the public parameters is used for subsequent key exchange. At the same time, the video signal receiving device also randomly generates an integer As the second private key, similar to the sending device, the receiving device uses and Perform modular exponentiation to calculate the second random key parameter :

;

此时,发送设备和接收设备各自持有自己的私钥和随机密钥参数。为了完成密钥交换,发送设备将发送给接收设备,而接收设备将发送给发送设备。接收设备在接收到后,利用其私钥进行模幂运算,计算得到第一会话密钥At this point, the sending device and the receiving device each hold their own private key and random key parameters. To complete the key exchange, the sending device will Send to the receiving device, and the receiving device will Send to the sending device. The receiving device receives Then, use its private key right Perform modular exponentiation to calculate the first session key :

;

结合 mod 可得:Combine mod We can get:

;

类似地,发送设备在接收到后,利用其私钥进行模幂运算,计算得到第二会话密钥Similarly, the sending device receives Then, use its private key right Perform modular exponentiation to calculate the second session key :

;

结合 mod 可得:Combine mod We can get:

;

由于指数运算满足交换律,即,因此是相等的,即。这表明双方成功生成了一致的会话密钥。为了确保密钥生成和传输的可靠性,对第一会话密钥和第二会话密钥进行一致性验证。验证过程通过比较是否相等来实现。如果验证通过,则一致性验证结果为真,表明密钥交换过程成功。基于一致性验证结果,选择第一会话密钥或第二会话密钥作为最终的会话密钥。Since the exponential operation satisfies the commutative law, that is, ,therefore and are equal, that is This indicates that both parties have successfully generated a consistent session key. In order to ensure the reliability of key generation and transmission, the consistency of the first session key and the second session key is verified. The verification process is carried out by comparing and If the verification passes, the consistency verification result is true, indicating that the key exchange process is successful. Based on the consistency verification result, either the first session key or the second session key is selected as the final session key.

在一具体实施例中,执行步骤S300的过程可以具体包括如下步骤:In a specific embodiment, the process of executing step S300 may specifically include the following steps:

对HDMI的DDC通道进行初始化,建立视频信号发送设备与视频信号接收设备之间的I2C通信链路,得到DDC通道读取指令;Initialize the HDMI DDC channel, establish an I2C communication link between the video signal sending device and the video signal receiving device, and obtain a DDC channel read instruction;

基于DDC通道读取指令从视频信号接收设备的EDID寄存器中读取EDID原始数据,并对EDID原始数据进行解析,得到EDID信息;Read the EDID raw data from the EDID register of the video signal receiving device based on the DDC channel read instruction, and parse the EDID raw data to obtain EDID information;

对EDID信息进行分段处理,从EDID信息中提取分辨率信息段、制造商标识信息段和产品标识信息段,得到视频信号接收设备的特征数据;Segmenting the EDID information, extracting the resolution information segment, the manufacturer identification information segment, and the product identification information segment from the EDID information, and obtaining characteristic data of the video signal receiving device;

从存储器中读取预存的设备特征信息,并对预存的设备特征信息进行分段处理,提取预期分辨率信息段、预期制造商标识信息段和预期产品标识信息段,得到预期特征数据;Reading pre-stored device characteristic information from the memory, and segmenting the pre-stored device characteristic information to extract the expected resolution information segment, the expected manufacturer identification information segment, and the expected product identification information segment to obtain expected characteristic data;

对特征数据中的分辨率信息段与预期特征数据中的预期分辨率信息段进行比对,得到分辨率匹配结果;Comparing the resolution information segment in the feature data with the expected resolution information segment in the expected feature data to obtain a resolution matching result;

对特征数据中的制造商标识信息段和产品标识信息段与预期特征数据中的预期制造商标识信息段和预期产品标识信息段进行比对,得到设备标识匹配结果;Comparing the manufacturer identification information segment and the product identification information segment in the feature data with the expected manufacturer identification information segment and the expected product identification information segment in the expected feature data to obtain a device identification matching result;

基于分辨率匹配结果和设备标识匹配结果进行逻辑与运算,生成EDID验证通过信息,并利用会话密钥对EDID验证通过信息进行加密处理,得到加密的EDID验证通过信息。A logical AND operation is performed based on the resolution matching result and the device identification matching result to generate EDID verification pass information, and the EDID verification pass information is encrypted using the session key to obtain encrypted EDID verification pass information.

具体的,通过初始化HDMI接口中的DDC (Display Data Channel)通道,建立起视频信号发送设备与接收设备之间的I2C通信链路。12C是一种双向串行通信协议,DDC通道通过SCL (时钟线)和SDA (数据线)连接发送设备与接收设备,用于传输设备信息。初始化完成后,发送设备生成一个DDC通道读取指令,其作用是从接收设备的EDID寄存器中提取设备的显示能力数据。基于读取指令,发送设备通过DDC通道读取接收设备的EDID原始数据。EDID (Extended Display Identification Data)是显示设备的配置信息,由接收设备存储在特定寄存器中,以128字节或256字节的数据格式表示。读取的EDID原始数据记为,其内容包含分辨率支持信息制造商标识、产品标识等关键字段。发送设备对进行解析操作,提取其中的结构化信息,生成EDID信息,表示为:Specifically, by initializing the DDC (Display Data Channel) in the HDMI interface, an I2C communication link is established between the video signal transmitting device and the receiving device. I2C is a bidirectional serial communication protocol. The DDC channel connects the transmitting device and the receiving device via the SCL (clock line) and SDA (data line) to transmit device information. After initialization is completed, the transmitting device generates a DDC channel read instruction. , which is used to extract the display capability data of the device from the EDID register of the receiving device. Based on the read instruction , the sending device reads the EDID raw data of the receiving device through the DDC channel. EDID (Extended Display Identification Data) is the configuration information of the display device, which is stored in a specific register by the receiving device and represented in a 128-byte or 256-byte data format. The read EDID raw data is recorded as The content includes key fields such as resolution support information, manufacturer identification, product identification, etc. Perform parsing operations, extract structured information, and generate EDID information , expressed as:

;

其中,表示解析函数,将原始字节数据转换为可识别的设备信息。为了进一步验证接收设备的真实性和能力,发送设备将进行分段处理,提取出分辨率信息段、制造商标识信息段和产品标识信息段。这一分段操作表示为:in, Represents a parsing function that converts raw byte data into recognizable device information. To further verify the authenticity and capabilities of the receiving device, the sending device will Perform segmentation processing to extract resolution information segments , Manufacturer identification information segment and product identification information segment This segmentation operation is expressed as:

;

其中,是分段函数,分别提取设备支持的分辨率信息、制造商标识和产品标识。这些分段信息构成接收设备的特征数据in, It is a piecewise function that extracts the resolution information, manufacturer identification and product identification supported by the device. These segmented information constitute the characteristic data of the receiving device. :

;

同时,发送设备从其存储器中读取预存的设备特征信息。这些信息是系统在初始配置时存储的期望值,也需要进行分段处理,提取出预期分辨率信息段、预期制造商标识信息段和预期产品标识信息段At the same time, the sending device reads the pre-stored device feature information from its memory This information is the expected value stored by the system during initial configuration and also needs to be segmented to extract the expected resolution information segment. , Expected Manufacturer Identification Information Segment and the expected product identification information segment :

;

这些分段信息构成预期特征数据These segmented information constitute the expected feature data :

;

在完成特征数据的提取后,对接收设备特征数据和预期特征数据进行逐项比对。发送设备对接收设备的分辨率信息段与预期分辨率信息段进行比对,生成分辨率匹配结果After the feature data is extracted, the feature data of the receiving device is and expected characteristic data Perform item-by-item comparison. Resolution information segment of the sending device to the receiving device Expected resolution information segment Perform comparison and generate resolution matching results :

;

其中,表示比对函数,若两者一致则,否则。发送设备对制造商标识信息段和产品标识信息段与预期的进行比对,生成设备标识匹配结果in, Represents the comparison function, if the two are consistent ,otherwise . Send the device to the manufacturer identification information segment and product identification information segment As expected and Perform comparison and generate device identification matching results :

;

系统基于分辨率匹配结果和设备标识匹配结果进行逻辑与运算,以生成EDID验证通过信息The system matches the results based on the resolution and device identification matching results Perform logical AND operation to generate EDID verification pass information :

;

如果True,则说明接收设备的EDID信息符合预期。为保证验证通过信息的安全性,利用会话密钥进行加密,生成加密的EDID验证通过信息if True, it means that the EDID information of the receiving device meets the expectations. To ensure the security of the verification information, the session key is used right Encrypt and generate encrypted EDID verification information :

;

其中,表示加密函数,以确保在传输过程中不被篡改。in, Represents an encryption function to ensure It is not tampered with during transmission.

在一具体实施例中,执行步骤S400的过程可以具体包括如下步骤:In a specific embodiment, the process of executing step S400 may specifically include the following steps:

由视频信号接收设备使用会话密钥对加密的EDID验证通过信息进行解密,得到解密后的EDID验证通过信息,并对解密后的EDID验证通过信息进行验证,得到HDCP启动指令;The video signal receiving device decrypts the encrypted EDID verification pass information using the session key to obtain the decrypted EDID verification pass information, and verifies the decrypted EDID verification pass information to obtain an HDCP startup instruction;

基于HDCP启动指令建立视频信号发送设备与视频信号接收设备之间的HDMI连接,并对HDMI连接进行HDCP使能,得到HDCP物理链路;Establishing an HDMI connection between the video signal transmitting device and the video signal receiving device based on the HDCP startup instruction, and enabling HDCP on the HDMI connection to obtain an HDCP physical link;

由视频信号发送设备通过HDCP物理链路发送HDCP能力协商请求,获取视频信号接收设备的HDCP版本信息并进行版本匹配,得到HDCP版本协商结果;The video signal sending device sends an HDCP capability negotiation request through the HDCP physical link, obtains the HDCP version information of the video signal receiving device and performs version matching to obtain the HDCP version negotiation result;

基于HDCP版本协商结果生成HDCP密钥,对HDCP密钥进行分段处理得到密钥数据段,并利用会话密钥对密钥数据段进行加密,得到加密的密钥数据段;generating an HDCP key based on the HDCP version negotiation result, segmenting the HDCP key to obtain a key data segment, and encrypting the key data segment using the session key to obtain an encrypted key data segment;

对加密的密钥数据段进行传输,由视频信号接收设备接收加密的密钥数据段并使用会话密钥进行解密,重组得到HDCP密钥;The encrypted key data segment is transmitted, and the video signal receiving device receives the encrypted key data segment and decrypts it using the session key to reconstruct the HDCP key;

由视频信号发送设备生成HDCP密钥验证码,对HDCP密钥验证码进行加密传输,由视频信号接收设备进行验证,得到HDCP密钥验证结果;The video signal sending device generates an HDCP key verification code, encrypts the HDCP key verification code for transmission, and verifies the HDCP key verification code by the video signal receiving device to obtain an HDCP key verification result;

基于HDCP密钥验证结果对视频信号发送设备的视频数据输入通道进行使能,并利用HDCP密钥对输入的视频信号进行加密,得到加密的视频信号。The video data input channel of the video signal sending device is enabled based on the HDCP key verification result, and the input video signal is encrypted using the HDCP key to obtain an encrypted video signal.

具体的,由视频信号接收设备利用先前协商的会话密钥对从发送设备接收到的加密EDID验证通过信息进行解密操作,得到解密后的EDID验证通过信息。解密过程表示为:Specifically, the video signal receiving device uses the previously negotiated session key Verify the encrypted EDID received from the sending device Perform decryption operation to obtain the decrypted EDID verification pass information The decryption process is expressed as:

;

其中,表示使用会话密钥的解密操作,确保解密后的信息与原始验证信息一致。接收设备对进行完整性验证,以确认EDID验证通过信息是否未被篡改。如果验证通过,则生成HDCP启动指令,指示接收设备进入HDCP保护模式。基于HDCP启动指令,发送设备和接收设备之间建立HDMI连接。连接建立后,发送设备对HDMI链路进行HDCP使能操作,激活内容保护机制以生成HDCP物理链路。HDCP物理链路的建立是整个视频信号加密过程的基础,用于确保视频内容的安全传输。在HDCP物理链路建立后,视频信号发送设备通过该链路发送HDCP能力协商请求,以获取接收设备的HDCP版本信息。接收设备返回其支持的HDCP版本信息。发送设备将自身的HDCP版本进行版本匹配,协商结果由以下公式确定:in, Indicates the use of session keys Decryption operation to ensure that the decrypted information is consistent with the original verification information. Perform integrity verification to confirm whether the EDID verification information has not been tampered with. If the verification is successful, an HDCP startup command is generated. , instructing the receiving device to enter HDCP protection mode. Based on HDCP startup instruction , an HDMI connection is established between the sending device and the receiving device. After the connection is established, the sending device performs HDCP enable operation on the HDMI link, activates the content protection mechanism to generate an HDCP physical link The establishment of the HDCP physical link is the basis of the entire video signal encryption process, which is used to ensure the secure transmission of video content. After the HDCP physical link is established, the video signal sending device sends an HDCP capability negotiation request through the link. To obtain the HDCP version information of the receiving device The receiving device returns the HDCP version information it supports. The sending device will set its own HDCP version and Perform version matching and negotiation results Determined by the following formula:

;

如果版本匹配成功,即True,则双方进入密钥协商阶段。发送设备基于协商结果生成HDCP密钥,并对密钥进行分段处理以便传输。设密钥分为个数据段,每个数据段的生成表示为:If the version matches successfully, True, the two parties enter the key negotiation phase. The sending device generates the HDCP key based on the negotiation results. , and the key is segmented for transmission. Divided into data segments , the generation of each data segment is expressed as:

;

其中,表示密钥分段函数。发送设备利用会话密钥对每个密钥数据段进行加密,得到加密的密钥数据段in, Represents the key segmentation function. The sending device uses the session key For each key data segment Encrypt to obtain the encrypted key data segment :

;

这些加密的密钥数据段通过HDCP物理链路依次传输至接收设备。接收设备接收后,利用会话密钥对每个进行解密,恢复出原始密钥数据段These encrypted key data segments are transmitted over the HDCP physical link The receiving device receives the data and uses the session key to For each Decrypt and restore the original key data segment :

;

接收设备对解密后的密钥数据段进行重组,以恢复完整的HDCP密钥。重组过程表示为:The receiving device reassembles the decrypted key data segment to recover the complete HDCP key The recombination process is expressed as:

;

其中,表示密钥重组函数。为了验证密钥传输的完整性,发送设备生成一个HDCP密钥验证码,计算方法为:in, Indicates the key reassembly function. To verify the integrity of the key transmission, the sending device generates an HDCP key verification code , the calculation method is:

;

其中,是一个预定义的哈希函数。发送设备将通过会话密钥加密后发送至接收设备:in, is a predefined hash function. The sending device will By session key Encrypted and sent to the receiving device:

;

接收设备接收后进行解密,得到,并基于接收到的独立计算本地的密钥验证码。如果:The receiving device decrypts it and obtains , and based on the received Independently calculate the local key verification code .if:

;

则生成HDCP密钥验证结果True。此时,发送设备使能其视频数据输入通道,并利用对输入的视频信号进行加密,得到加密的视频信号Then generate HDCP key verification result True. At this point, the sending device enables its video data input channel and uses For input video signal Encrypt to obtain encrypted video signal :

;

加密后的视频信号通过HDCP物理链路传输至接收设备,确保传输过程中的数据安全。The encrypted video signal is transmitted to the receiving device via the HDCP physical link, ensuring data security during transmission.

其中,在基于HDCP版本协商结果生成HDCP密钥之前,还包括:对历史HDCP密钥使用数据和验证结果进行采集,从中提取密钥长度、更新频率、加密算法类型等特征参数,得到加密特征训练数据;构建包含输入层、第一隐藏层、第二隐藏层和输出层的第一深度神经网络,对加密特征训练数据进行模型训练,得到加密参数优化模型;构建包含输入层、第一卷积层、第二卷积层和输出层的第二深度神经网络,对加密数据的安全等级评估结果进行模型训练,得到安全强度评估模型;将当前待处理的HDCP版本协商结果输入加密参数优化模型,对HDCP密钥的生成参数进行动态优化计算,得到优化后的密钥生成参数;基于优化后的密钥生成参数生成候选HDCP密钥,将候选HDCP密钥输入安全强度评估模型进行安全性评估,得到安全强度评估结果;对安全强度评估结果与预设安全阈值进行比对,当安全强度评估结果大于预设安全阈值时,将候选HDCP密钥作为最终的HDCP密钥;当安全强度评估结果小于或等于预设安全阈值时,重新执行加密参数优化模型的计算过程,直至得到满足安全要求的HDCP密钥;对最终确定的HDCP密钥的使用数据和验证结果进行记录,将记录结果添加至加密特征训练数据中,用于第一深度神经网络和第二深度神经网络的在线增量学习。Before generating the HDCP key based on the HDCP version negotiation result, the method further includes: collecting historical HDCP key usage data and verification results, extracting characteristic parameters such as key length, update frequency, and encryption algorithm type from them, and obtaining encryption feature training data; constructing a first deep neural network comprising an input layer, a first hidden layer, a second hidden layer, and an output layer, and performing model training on the encryption feature training data to obtain an encryption parameter optimization model; constructing a second deep neural network comprising an input layer, a first convolutional layer, a second convolutional layer, and an output layer, and performing model training on the security level assessment result of the encrypted data to obtain a security strength assessment model; inputting the current HDCP version negotiation result to be processed into the encryption parameter optimization model, and dynamically optimizing the generation parameters of the HDCP key. Obtain optimized key generation parameters; generate candidate HDCP keys based on the optimized key generation parameters, input the candidate HDCP keys into a security strength assessment model for security assessment, and obtain a security strength assessment result; compare the security strength assessment result with a preset security threshold, and when the security strength assessment result is greater than the preset security threshold, use the candidate HDCP key as the final HDCP key; when the security strength assessment result is less than or equal to the preset security threshold, re-execute the calculation process of the encryption parameter optimization model until an HDCP key that meets security requirements is obtained; record usage data and verification results of the finalized HDCP key, and add the recorded results to the encryption feature training data for online incremental learning of the first deep neural network and the second deep neural network.

在一具体实施例中,执行步骤S500的过程可以具体包括如下步骤:In a specific embodiment, the process of executing step S500 may specifically include the following steps:

对预设的心跳检测时间间隔进行读取,基于心跳检测时间间隔生成心跳检测触发指令;Reading a preset heartbeat detection time interval, and generating a heartbeat detection trigger instruction based on the heartbeat detection time interval;

基于心跳检测触发指令由视频信号发送设备生成随机序列,对随机序列进行封装,得到心跳检测信息;Based on the heartbeat detection trigger instruction, the video signal sending device generates a random sequence, encapsulates the random sequence, and obtains heartbeat detection information;

利用会话密钥对心跳检测信息进行加密,得到加密的心跳检测信息;Encrypting the heartbeat detection information using the session key to obtain encrypted heartbeat detection information;

对加密的心跳检测信息进行传输,由视频信号接收设备使用会话密钥对加密的心跳检测信息进行解密,得到解密后的心跳检测信息;The encrypted heartbeat detection information is transmitted, and the video signal receiving device decrypts the encrypted heartbeat detection information using the session key to obtain the decrypted heartbeat detection information;

由视频信号接收设备对解密后的心跳检测信息进行数字签名,得到心跳响应信息,并利用会话密钥对心跳响应信息进行加密,得到加密的心跳响应信息;The video signal receiving device digitally signs the decrypted heartbeat detection information to obtain heartbeat response information, and encrypts the heartbeat response information using the session key to obtain encrypted heartbeat response information;

对加密的心跳响应信息进行传输,由视频信号发送设备使用会话密钥对加密的心跳响应信息进行解密,得到解密后的心跳响应信息;The encrypted heartbeat response information is transmitted, and the video signal sending device decrypts the encrypted heartbeat response information using the session key to obtain the decrypted heartbeat response information;

对解密后的心跳响应信息中的数字签名进行验证,得到连接状态确认结果。The digital signature in the decrypted heartbeat response information is verified to obtain the connection status confirmation result.

具体的,从预设的心跳检测时间间隔中读取时间参数,该参数定义发送设备向接收设备发送心跳检测信息的周期性时间间隔。基于,生成心跳检测触发指令,用于通知发送设备在每个时间间隔启动心跳检测过程。触发指令的生成表示为:Specifically, from the preset heartbeat detection time interval Read the time parameter in the , which defines the periodic time interval for the sending device to send heartbeat detection information to the receiving device. , generate heartbeat detection trigger instruction , used to notify the sending device to start the heartbeat detection process at each time interval. The generation of the trigger instruction is expressed as:

;

其中,是触发指令生成函数,确保按照预设时间间隔周期性触发心跳检测。当心跳检测触发指令发出后,视频信号发送设备生成一个随机序列,该序列是一个高熵、不可预测的数值,用于唯一标识本次心跳检测。随机序列的生成表示为:in, It is a trigger instruction generation function that ensures that the heartbeat detection is triggered periodically according to the preset time interval. After the video signal is sent, the sending device generates a random sequence , the sequence is a high entropy, unpredictable value used to uniquely identify this heartbeat detection. Random sequence The generation of is represented as:

;

其中,是随机数生成函数,确保的随机性和唯一性。发送设备对进行封装处理,生成完整的心跳检测信息in, is a random number generator function, ensuring The sending device is random and unique. Perform encapsulation processing to generate complete heartbeat detection information :

;

其中,是封装函数,用于对随机序列添加必要的标识信息,如时间戳和设备ID,以防止信息被伪造。为了确保心跳检测信息在传输过程中不被篡改或窃听,发送设备利用会话密钥进行加密操作,生成加密的心跳检测信息in, It is an encapsulation function used to add necessary identification information to the random sequence, such as timestamp and device ID, to prevent the information from being forged. In order to ensure that the heartbeat detection information is not tampered with or eavesdropped during transmission, the sending device uses the session key right Perform encryption operations to generate encrypted heartbeat detection information :

;

其中,是加密函数,基于对称加密算法(如AES)实现。生成的随后通过安全通信通道传输至视频信号接收设备。接收设备接收到后,利用相同的会话密钥对其进行解密操作,恢复出原始的心跳检测信息in, Is an encryption function, based on a symmetric encryption algorithm (such as AES). Then it is transmitted to the video signal receiving device through a secure communication channel. Then, using the same session key Decrypt it and restore the original heartbeat detection information :

;

其中,是解密函数,与互为逆运算。解密完成后,接收设备从中提取随机序列,并对其进行数字签名操作,生成心跳响应信息in, is the decryption function, and After decryption is completed, the receiving device Extract random sequence , and perform digital signature operation on it to generate heartbeat response information :

;

其中,是接收设备私钥实现的签名函数,用于证明响应信息的真实性和完整性。为保证心跳响应信息在返回过程中不被篡改,接收设备同样利用会话密钥进行加密,生成加密的心跳响应信息in, Is the receiving device private key The signature function implemented is used to prove the authenticity and integrity of the response information. To ensure that the heartbeat response information is not tampered with during the return process, the receiving device also uses the session key right Encrypt and generate encrypted heartbeat response information :

;

加密的心跳响应信息通过通信通道传回视频信号发送设备。发送设备接收到后,使用会话密钥对其进行解密操作,得到解密后的心跳响应信息Encrypted heartbeat response information The video signal is transmitted back to the sending device through the communication channel. Then, use the session key Decrypt it and get the decrypted heartbeat response information :

;

发送设备利用接收设备的公钥对心跳响应信息中的数字签名进行验证,以确保的来源和完整性。验证过程表示为:The sending device uses the receiving device's public key Verify the digital signature in the heartbeat response information to ensure The source and integrity of the verification process is expressed as:

;

其中,是验证函数,如果验证通过,表明的签名合法,且心跳检测响应信息未被篡改。发送设备根据验证结果生成连接状态确认结果in, Is the verification function, if the verification passes, it means The signature is legal and the heartbeat detection response information has not been tampered with. The sending device generates a connection status confirmation result based on the verification result. :

;

如果True,表明连接状态正常;否则,认为连接存在异常。if True indicates that the connection status is normal; otherwise, it is considered that the connection is abnormal.

在一具体实施例中,执行步骤S600的过程可以具体包括如下步骤:In a specific embodiment, the process of executing step S600 may specifically include the following steps:

根据连接状态确认结果,由视频信号发送设备对第一签名信息、第二签名信息、EDID验证通过信息、HDCP密钥验证结果和心跳响应信息进行异常状态检测,得到发送端异常状态信息;According to the connection status confirmation result, the video signal sending device performs abnormal status detection on the first signature information, the second signature information, the EDID verification pass information, the HDCP key verification result and the heartbeat response information to obtain the sending end abnormal status information;

由视频信号接收设备对第一签名信息、第二签名信息、EDID验证通过信息、HDCP密钥验证码和心跳检测信息进行异常状态检测,得到接收端异常状态信息;The video signal receiving device performs abnormal state detection on the first signature information, the second signature information, the EDID verification pass information, the HDCP key verification code and the heartbeat detection information to obtain receiving end abnormal state information;

基于发送端异常状态信息和接收端异常状态信息生成异常状态标识位,对异常状态标识位进行状态判断,得到异常处理触发指令;Generate an abnormal state flag based on the abnormal state information of the sending end and the abnormal state information of the receiving end, perform state judgment on the abnormal state flag, and obtain an abnormal processing trigger instruction;

基于异常处理触发指令对视频信号发送设备的视频信号发送通道进行关闭,得到视频信号发送中断指令,并基于异常处理触发指令对视频信号接收设备的HDMI接收通道进行关闭,得到HDMI接收中断指令;Closing the video signal transmission channel of the video signal transmitting device based on the exception handling trigger instruction to obtain a video signal transmission interrupt instruction, and closing the HDMI receiving channel of the video signal receiving device based on the exception handling trigger instruction to obtain an HDMI receiving interrupt instruction;

对视频信号发送中断指令和HDMI接收中断指令进行状态确认,得到通道关闭状态信息,并基于通道关闭状态信息生成视频信号传输链路的重建指令。The status of the video signal sending interruption instruction and the HDMI receiving interruption instruction are confirmed to obtain channel closing status information, and a video signal transmission link reconstruction instruction is generated based on the channel closing status information.

具体的,根据连接状态确认结果,视频信号发送设备对多个关键验证信息进行异常状态检测。检测的输入包括第一签名信息、第二签名信息、EDID验证通过信息、HDCP密钥验证结果和心跳响应信息。发送设备通过检测这些信息是否符合预期,以生成发送端异常状态信息。检测规则表示为:Specifically, confirm the result based on the connection status The video signal sending device performs abnormal state detection on multiple key verification information. The input of the detection includes the first signature information , Second signature information , EDID verification passed information , HDCP key verification results and heartbeat response information The sending device generates the sending end abnormal status information by detecting whether the information meets the expectations. The detection rule is expressed as:

;

其中,是发送设备的异常检测函数,如果所有输入均通过验证,则Normal;否则表示具体的异常类型,例如签名失效、EDID验证失败或心跳响应不匹配。同时,视频信号接收设备对与其相关的验证信息进行异常状态检测。输入包括第一签名信息、第二签名信息、EDID验证通过信息、HDCP密钥验证码和心跳检测信息。接收设备通过检测这些信息的完整性与一致性,生成接收端异常状态信息in, is the anomaly detection function of the sending device. If all inputs pass the verification, then Normal; otherwise Indicates the specific abnormality type, such as signature failure, EDID verification failure or heartbeat response mismatch. At the same time, the video signal receiving device performs abnormal status detection on the verification information related to it. The input includes the first signature information , Second signature information , EDID verification passed information , HDCP key verification code and heartbeat detection information The receiving device generates abnormal status information of the receiving end by detecting the integrity and consistency of this information. :

;

其中,是接收设备的异常检测函数,与发送设备类似,其输出为正常状态或具体的异常类型。基于生成异常状态标识位。异常状态标识位是一组二进制位,用于表示发送端和接收端的综合异常状态。生成规则如下:in, It is the anomaly detection function of the receiving device, similar to the sending device, and its output is the normal state or the specific anomaly type. and Generate abnormal status flag The abnormal status flag is a set of binary bits used to indicate the combined abnormal status of the sender and receiver. The generation rules are as follows:

;

其中,是标识位生成函数。例如,如果发送端和接收端均正常,则如果发送端异常,则如果接收端异常,则如果双方均异常,则。基于,对异常状态进行判断并生成异常处理触发指令。状态判断规则表示为:in, is the flag bit generation function. For example, if both the sender and the receiver are normal, then If the sending end is abnormal, If the receiving end is abnormal, If both parties are abnormal, then .based on , judge the abnormal state and generate the exception handling trigger instruction The state judgment rule is expressed as:

;

如果Trigger,说明存在异常状态,系统需进一步处理。一旦触发异常处理指令,系统首先关闭视频信号发送设备的视频信号发送通道,生成视频信号发送中断指令if Trigger indicates that an abnormal state exists and the system needs further processing. Once the exception handling instruction is triggered , the system first closes the video signal sending channel of the video signal sending device and generates a video signal sending interrupt instruction :

;

同时,接收设备的HDMI接收通道也会被关闭,生成HDMI接收中断指令At the same time, the HDMI receiving channel of the receiving device will be closed, generating an HDMI receiving interrupt instruction :

;

关闭操作的目的是隔离传输链路,防止异常状态进一步扩散。在发送通道和接收通道关闭后,对中断指令的执行情况进行状态确认,生成通道关闭状态信息The purpose of the shutdown operation is to isolate the transmission link and prevent the abnormal state from spreading further. and Confirm the execution status and generate channel closing status information :

;

其中,是状态确认函数,如果两条通道均成功关闭,则Closed;否则,系统会尝试再次关闭通道。在通道关闭状态确认后,系统基于生成视频信号传输链路的重建指令in, Is the status confirmation function. If both channels are closed successfully, then Closed; otherwise, the system will try to close the channel again. Generate reconstruction instructions for video signal transmission link :

;

如果Rebuild,系统将重新初始化发送设备与接收设备之间的认证与连接操作。if Rebuild: The system will reinitialize the authentication and connection operations between the sending device and the receiving device.

请参阅图2,图2为本申请实施例提供的视频信号动态加密认证系统200的结构示意性框图,如图2所示,视频信号动态加密认证系统200,包括:Please refer to FIG2 , which is a schematic block diagram of the structure of a video signal dynamic encryption authentication system 200 provided in an embodiment of the present application. As shown in FIG2 , the video signal dynamic encryption authentication system 200 includes:

认证模块210,用于对视频信号发送设备和视频信号接收设备执行双向挑战-响应认证,得到双向身份认证结果;An authentication module 210 is configured to perform a two-way challenge-response authentication on the video signal transmitting device and the video signal receiving device to obtain a two-way identity authentication result;

密钥计算模块220,用于基于双向身份认证结果,对视频信号发送设备和视频信号接收设备进行会话密钥计算,得到会话密钥;The key calculation module 220 is used to calculate the session key for the video signal sending device and the video signal receiving device based on the two-way identity authentication result to obtain the session key;

验证模块230,用于对视频信号接收设备进行EDID验证,得到加密的EDID验证通过信息;The verification module 230 is used to perform EDID verification on the video signal receiving device and obtain encrypted EDID verification pass information;

加密传输模块240,用于根据加密的EDID验证通过信息,对HDCP密钥进行加密传输和视频信号加密处理,得到加密的视频信号;The encryption transmission module 240 is used to encrypt and transmit the HDCP key and encrypt the video signal according to the encrypted EDID verification pass information to obtain an encrypted video signal;

响应检测模块250,用于根据加密的视频信号进行设备心跳响应检测,得到连接状态确认结果;A response detection module 250 is used to perform device heartbeat response detection based on the encrypted video signal to obtain a connection status confirmation result;

重建模块260,用于根据连接状态确认结果,对视频信号发送设备的视频信号传输状态和视频信号接收设备的HDMI接收通道进行控制,得到视频信号传输链路的重建指令。The reconstruction module 260 is used to control the video signal transmission status of the video signal sending device and the HDMI receiving channel of the video signal receiving device according to the connection status confirmation result, and obtain a reconstruction instruction for the video signal transmission link.

通过上述各个组成部分的协同合作,通过建立双向挑战-响应认证机制,实现了视频信号发送设备和接收设备的双向身份验证,有效防止了非法设备的接入和中间人攻击。采用Diffie-Hellman密钥交换算法动态生成会话密钥,提高了密钥的安全性,保证了后续通信过程的加密强度。结合EDID验证和HDCP加密,构建了多层次的安全防护体系,有效防止了视频信号被非法截获和复制。通过心跳检测机制,实现了对设备连接状态的实时监控,能够及时发现并处理异常情况。设计了完整的异常处理和链路重建机制,在检测到安全威胁时能够快速切断视频传输,并自动重建安全链路。采用分段式的数据处理和验证方案,提高了系统的容错能力和可靠性,确保了视频信号传输的连续性和稳定性。Through the collaborative efforts of all the aforementioned components and the establishment of a two-way challenge-response authentication mechanism, two-way authentication is achieved between the video signal transmitter and receiver, effectively preventing unauthorized access and man-in-the-middle attacks. The Diffie-Hellman key exchange algorithm is used to dynamically generate session keys, enhancing key security and ensuring the encryption strength of subsequent communications. Combining EDID verification with HDCP encryption creates a multi-layered security system, effectively preventing the illegal interception and duplication of video signals. A heartbeat detection mechanism enables real-time monitoring of device connection status, enabling timely detection and resolution of anomalies. A comprehensive exception handling and link reestablishment mechanism is designed to rapidly disconnect video transmission and automatically reestablish a secure link upon detecting a security threat. A segmented data processing and verification scheme improves the system's fault tolerance and reliability, ensuring the continuity and stability of video signal transmission.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,系统和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program code.

以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (8)

1.一种视频信号动态加密认证方法,其特征在于,包括:1. A method for dynamic encryption authentication of a video signal, comprising: 对视频信号发送设备和视频信号接收设备执行双向挑战-响应认证,得到双向身份认证结果;Performing bidirectional challenge-response authentication on the video signal sending device and the video signal receiving device to obtain a bidirectional identity authentication result; 基于所述双向身份认证结果,对所述视频信号发送设备和所述视频信号接收设备进行会话密钥计算,得到会话密钥;Based on the two-way identity authentication result, calculating a session key for the video signal sending device and the video signal receiving device to obtain a session key; 对所述视频信号接收设备进行EDID验证,得到加密的EDID验证通过信息;Performing EDID verification on the video signal receiving device to obtain encrypted EDID verification pass information; 根据所述加密的EDID验证通过信息,对HDCP密钥进行加密传输和视频信号加密处理,得到加密的视频信号;According to the encrypted EDID verification pass information, encrypting and transmitting the HDCP key and encrypting the video signal to obtain an encrypted video signal; 根据所述加密的视频信号进行设备心跳响应检测,得到连接状态确认结果;Performing device heartbeat response detection based on the encrypted video signal to obtain a connection status confirmation result; 根据所述连接状态确认结果,对所述视频信号发送设备的视频信号传输状态和所述视频信号接收设备的HDMI接收通道进行控制,得到视频信号传输链路的重建指令。According to the connection status confirmation result, the video signal transmission status of the video signal sending device and the HDMI receiving channel of the video signal receiving device are controlled to obtain a reconstruction instruction of the video signal transmission link. 2.根据权利要求1所述的视频信号动态加密认证方法,其特征在于,所述对视频信号发送设备和视频信号接收设备执行双向挑战-响应认证,得到双向身份认证结果,包括:2. The method for dynamic encryption authentication of video signals according to claim 1, wherein performing bidirectional challenge-response authentication on the video signal sending device and the video signal receiving device to obtain a bidirectional identity authentication result comprises: 对预置在视频信号发送设备中的公钥私钥对和预置在视频信号接收设备中的公钥私钥对进行初始化,得到互相独立的两对非对称密钥;Initializing a public key and a private key pair preset in a video signal transmitting device and a public key and a private key pair preset in a video signal receiving device to obtain two independent asymmetric key pairs; 由所述视频信号发送设备生成第一随机数,对所述第一随机数进行封装,得到第一认证挑战信息;The video signal sending device generates a first random number, and encapsulates the first random number to obtain first authentication challenge information; 对所述第一认证挑战信息进行发送,由所述视频信号接收设备接收所述第一认证挑战信息,并利用预置在视频信号接收设备中的私钥对所述第一认证挑战信息进行数字签名,得到第一签名信息;The first authentication challenge information is sent, the video signal receiving device receives the first authentication challenge information, and digitally signs the first authentication challenge information using a private key preset in the video signal receiving device to obtain first signature information; 对所述第一签名信息进行传输,由所述视频信号发送设备利用预置在视频信号接收设备中的公钥对所述第一签名信息进行验证,得到第一验证结果;The first signature information is transmitted, and the video signal sending device verifies the first signature information using a public key preset in the video signal receiving device to obtain a first verification result; 由所述视频信号接收设备生成第二随机数,对所述第二随机数进行封装,得到第二认证挑战信息;The video signal receiving device generates a second random number, and encapsulates the second random number to obtain second authentication challenge information; 对所述第二认证挑战信息进行发送,由所述视频信号发送设备接收所述第二认证挑战信息,并利用预置在视频信号发送设备中的私钥对所述第二认证挑战信息进行数字签名,得到第二签名信息;The second authentication challenge information is sent, and the video signal sending device receives the second authentication challenge information and digitally signs the second authentication challenge information using a private key preset in the video signal sending device to obtain second signature information; 对所述第二签名信息进行传输,由所述视频信号接收设备利用预置在视频信号发送设备中的公钥对所述第二签名信息进行验证,得到第二验证结果;The second signature information is transmitted, and the video signal receiving device verifies the second signature information using a public key preset in the video signal sending device to obtain a second verification result; 基于所述第一验证结果和所述第二验证结果进行逻辑与运算,得到双向身份认证结果。A logical AND operation is performed based on the first verification result and the second verification result to obtain a two-way identity authentication result. 3.根据权利要求2所述的视频信号动态加密认证方法,其特征在于,所述基于所述双向身份认证结果,对所述视频信号发送设备和所述视频信号接收设备进行会话密钥计算,得到会话密钥,包括:3. The method for dynamic encryption authentication of video signals according to claim 2, wherein the step of calculating a session key for the video signal transmitting device and the video signal receiving device based on the bidirectional identity authentication result to obtain the session key comprises: 基于所述双向身份认证结果进行条件判断,当所述双向身份认证结果为真时执行密钥交换启动指令;Performing conditional judgment based on the two-way identity authentication result, and executing a key exchange start instruction when the two-way identity authentication result is true; 基于所述密钥交换启动指令,对预设的大素数p和本原根g进行初始化,并将所述大素数p和所述本原根g分别发送至所述视频信号发送设备和所述视频信号接收设备,得到密钥交换参数;Initializing a preset large prime number p and a primitive root g based on the key exchange initiation instruction, and sending the large prime number p and the primitive root g to the video signal transmitting device and the video signal receiving device, respectively, to obtain a key exchange parameter; 由所述视频信号发送设备生成整数e作为第一私钥,对所述本原根g和所述第一私钥a进行模幂运算,得到第一随机密钥参数;The video signal sending device generates an integer e as a first private key, and performs a modular exponentiation operation on the primitive root g and the first private key a to obtain a first random key parameter; 由所述视频信号接收设备生成整数f作为第二私钥,对所述本原根g和所述第二私钥b进行模幂运算,得到第二随机密钥参数;The video signal receiving device generates an integer f as a second private key, and performs a modular exponentiation operation on the primitive root g and the second private key b to obtain a second random key parameter; 对所述第一随机密钥参数进行发送,由所述视频信号接收设备接收所述第一随机密钥参数,并对所述第一随机密钥参数和所述第二私钥b进行模幂运算,得到第一会话密钥;The first random key parameter is sent, and the video signal receiving device receives the first random key parameter and performs a modular exponentiation operation on the first random key parameter and the second private key b to obtain a first session key; 对所述第二随机密钥参数进行发送,由所述视频信号发送设备接收所述第二随机密钥参数,并对所述第二随机密钥参数和所述第一私钥进行模幂运算,得到第二会话密钥;The second random key parameter is sent, and the video signal sending device receives the second random key parameter and performs a modular exponentiation operation on the second random key parameter and the first private key to obtain a second session key; 对所述第一会话密钥和所述第二会话密钥进行一致性验证,得到一致性验证结果,并基于所述一致性验证结果对所述第一会话密钥或所述第二会话密钥进行选择,得到会话密钥。The first session key and the second session key are consistency verified to obtain a consistency verification result, and the first session key or the second session key is selected based on the consistency verification result to obtain a session key. 4.根据权利要求3所述的视频信号动态加密认证方法,其特征在于,所述对所述视频信号接收设备进行EDID验证,得到加密的EDID验证通过信息,包括:4. The method for dynamic encryption authentication of video signals according to claim 3, wherein the step of performing EDID verification on the video signal receiving device to obtain encrypted EDID verification pass information comprises: 对HDMI的DDC通道进行初始化,建立所述视频信号发送设备与所述视频信号接收设备之间的I2C通信链路,得到DDC通道读取指令;Initializing the DDC channel of HDMI, establishing an I2C communication link between the video signal sending device and the video signal receiving device, and obtaining a DDC channel read instruction; 基于所述DDC通道读取指令从所述视频信号接收设备的EDID寄存器中读取EDID原始数据,并对所述EDID原始数据进行解析,得到EDID信息;Reading EDID raw data from an EDID register of the video signal receiving device based on the DDC channel read instruction, and parsing the EDID raw data to obtain EDID information; 对所述EDID信息进行分段处理,从所述EDID信息中提取分辨率信息段、制造商标识信息段和产品标识信息段,得到所述视频信号接收设备的特征数据;Segmenting the EDID information, extracting a resolution information segment, a manufacturer identification information segment, and a product identification information segment from the EDID information, and obtaining characteristic data of the video signal receiving device; 从存储器中读取预存的设备特征信息,并对所述预存的设备特征信息进行分段处理,提取预期分辨率信息段、预期制造商标识信息段和预期产品标识信息段,得到预期特征数据;Reading pre-stored device characteristic information from a memory, and segmenting the pre-stored device characteristic information to extract an expected resolution information segment, an expected manufacturer identification information segment, and an expected product identification information segment to obtain expected characteristic data; 对所述特征数据中的分辨率信息段与所述预期特征数据中的预期分辨率信息段进行比对,得到分辨率匹配结果;Comparing the resolution information segment in the feature data with the expected resolution information segment in the expected feature data to obtain a resolution matching result; 对所述特征数据中的制造商标识信息段和产品标识信息段与所述预期特征数据中的预期制造商标识信息段和预期产品标识信息段进行比对,得到设备标识匹配结果;Comparing the manufacturer identification information segment and the product identification information segment in the feature data with the expected manufacturer identification information segment and the expected product identification information segment in the expected feature data to obtain a device identification matching result; 基于所述分辨率匹配结果和所述设备标识匹配结果进行逻辑与运算,生成EDID验证通过信息,并利用所述会话密钥对所述EDID验证通过信息进行加密处理,得到加密的EDID验证通过信息。A logical AND operation is performed based on the resolution matching result and the device identification matching result to generate EDID verification pass information, and the EDID verification pass information is encrypted using the session key to obtain encrypted EDID verification pass information. 5.根据权利要求4所述的视频信号动态加密认证方法,其特征在于,所述根据所述加密的EDID验证通过信息,对HDCP密钥进行加密传输和视频信号加密处理,得到加密的视频信号,包括:5. The method for dynamic encryption authentication of video signals according to claim 4, wherein the step of encrypting and transmitting the HDCP key and encrypting the video signal based on the encrypted EDID verification pass information to obtain the encrypted video signal comprises: 由所述视频信号接收设备使用所述会话密钥对所述加密的EDID验证通过信息进行解密,得到解密后的EDID验证通过信息,并对解密后的EDID验证通过信息进行验证,得到HDCP启动指令;The video signal receiving device decrypts the encrypted EDID verification pass information using the session key to obtain the decrypted EDID verification pass information, and verifies the decrypted EDID verification pass information to obtain an HDCP startup instruction; 基于所述HDCP启动指令建立所述视频信号发送设备与所述视频信号接收设备之间的HDMI连接,并对所述HDMI连接进行HDCP使能,得到HDCP物理链路;Establishing an HDMI connection between the video signal transmitting device and the video signal receiving device based on the HDCP startup instruction, and enabling HDCP on the HDMI connection to obtain an HDCP physical link; 由所述视频信号发送设备通过所述HDCP物理链路发送HDCP能力协商请求,获取所述视频信号接收设备的HDCP版本信息并进行版本匹配,得到HDCP版本协商结果;The video signal sending device sends an HDCP capability negotiation request through the HDCP physical link, obtains HDCP version information of the video signal receiving device and performs version matching to obtain an HDCP version negotiation result; 基于所述HDCP版本协商结果生成HDCP密钥,对所述HDCP密钥进行分段处理得到密钥数据段,并利用所述会话密钥对所述密钥数据段进行加密,得到加密的密钥数据段;generating an HDCP key based on the HDCP version negotiation result, segmenting the HDCP key to obtain key data segments, and encrypting the key data segments using the session key to obtain encrypted key data segments; 对所述加密的密钥数据段进行传输,由所述视频信号接收设备接收所述加密的密钥数据段并使用所述会话密钥进行解密,重组得到所述HDCP密钥;The encrypted key data segment is transmitted, and the video signal receiving device receives the encrypted key data segment and decrypts it using the session key to reconstruct the HDCP key; 由所述视频信号发送设备生成HDCP密钥验证码,对所述HDCP密钥验证码进行加密传输,由所述视频信号接收设备进行验证,得到HDCP密钥验证结果;The video signal transmitting device generates an HDCP key verification code, encrypts the HDCP key verification code for transmission, and verifies the code by the video signal receiving device to obtain an HDCP key verification result; 基于所述HDCP密钥验证结果对所述视频信号发送设备的视频数据输入通道进行使能,并利用所述HDCP密钥对输入的视频信号进行加密,得到加密的视频信号。The video data input channel of the video signal sending device is enabled based on the HDCP key verification result, and the input video signal is encrypted using the HDCP key to obtain an encrypted video signal. 6.根据权利要求5所述的视频信号动态加密认证方法,其特征在于,所述根据所述加密的视频信号进行设备心跳响应检测,得到连接状态确认结果,包括:6. The method for dynamic encryption authentication of a video signal according to claim 5, wherein the step of performing device heartbeat response detection based on the encrypted video signal to obtain a connection status confirmation result comprises: 对预设的心跳检测时间间隔进行读取,基于所述心跳检测时间间隔生成心跳检测触发指令;Reading a preset heartbeat detection time interval, and generating a heartbeat detection trigger instruction based on the heartbeat detection time interval; 基于所述心跳检测触发指令由所述视频信号发送设备生成随机序列,对所述随机序列进行封装,得到心跳检测信息;The video signal sending device generates a random sequence based on the heartbeat detection trigger instruction, and encapsulates the random sequence to obtain heartbeat detection information; 利用所述会话密钥对所述心跳检测信息进行加密,得到加密的心跳检测信息;Encrypting the heartbeat detection information using the session key to obtain encrypted heartbeat detection information; 对所述加密的心跳检测信息进行传输,由所述视频信号接收设备使用所述会话密钥对所述加密的心跳检测信息进行解密,得到解密后的心跳检测信息;The encrypted heartbeat detection information is transmitted, and the video signal receiving device decrypts the encrypted heartbeat detection information using the session key to obtain decrypted heartbeat detection information; 由所述视频信号接收设备对所述解密后的心跳检测信息进行数字签名,得到心跳响应信息,并利用所述会话密钥对所述心跳响应信息进行加密,得到加密的心跳响应信息;The video signal receiving device digitally signs the decrypted heartbeat detection information to obtain heartbeat response information, and encrypts the heartbeat response information using the session key to obtain encrypted heartbeat response information; 对所述加密的心跳响应信息进行传输,由所述视频信号发送设备使用所述会话密钥对所述加密的心跳响应信息进行解密,得到解密后的心跳响应信息;The encrypted heartbeat response information is transmitted, and the video signal sending device decrypts the encrypted heartbeat response information using the session key to obtain decrypted heartbeat response information; 对所述解密后的心跳响应信息中的数字签名进行验证,得到连接状态确认结果。The digital signature in the decrypted heartbeat response information is verified to obtain a connection status confirmation result. 7.根据权利要求6所述的视频信号动态加密认证方法,其特征在于,所述根据所述连接状态确认结果,对所述视频信号发送设备的视频信号传输状态和所述视频信号接收设备的HDMI接收通道进行控制,得到视频信号传输链路的重建指令,包括:7. The video signal dynamic encryption authentication method according to claim 6, wherein the step of controlling the video signal transmission state of the video signal transmitting device and the HDMI receiving channel of the video signal receiving device according to the connection status confirmation result to obtain a video signal transmission link reconstruction instruction comprises: 根据所述连接状态确认结果,由所述视频信号发送设备对所述第一签名信息、所述第二签名信息、所述EDID验证通过信息、所述HDCP密钥验证结果和所述心跳响应信息进行异常状态检测,得到发送端异常状态信息;According to the connection status confirmation result, the video signal sending device performs abnormal status detection on the first signature information, the second signature information, the EDID verification pass information, the HDCP key verification result, and the heartbeat response information to obtain sending end abnormal status information; 由所述视频信号接收设备对所述第一签名信息、所述第二签名信息、所述EDID验证通过信息、所述HDCP密钥验证码和所述心跳检测信息进行异常状态检测,得到接收端异常状态信息;The video signal receiving device performs abnormal state detection on the first signature information, the second signature information, the EDID verification pass information, the HDCP key verification code, and the heartbeat detection information to obtain receiving end abnormal state information; 基于所述发送端异常状态信息和所述接收端异常状态信息生成异常状态标识位,对所述异常状态标识位进行状态判断,得到异常处理触发指令;Generate an abnormal state flag based on the abnormal state information of the sending end and the abnormal state information of the receiving end, perform state judgment on the abnormal state flag, and obtain an abnormal processing trigger instruction; 基于所述异常处理触发指令对所述视频信号发送设备的视频信号发送通道进行关闭,得到视频信号发送中断指令,并基于所述异常处理触发指令对所述视频信号接收设备的HDMI接收通道进行关闭,得到HDMI接收中断指令;Closing the video signal transmission channel of the video signal transmitting device based on the exception handling trigger instruction to obtain a video signal transmission interrupt instruction, and closing the HDMI receiving channel of the video signal receiving device based on the exception handling trigger instruction to obtain an HDMI receiving interrupt instruction; 对所述视频信号发送中断指令和所述HDMI接收中断指令进行状态确认,得到通道关闭状态信息,并基于所述通道关闭状态信息生成视频信号传输链路的重建指令。Status confirmation is performed on the video signal sending interrupt instruction and the HDMI receiving interrupt instruction to obtain channel closing status information, and a video signal transmission link reconstruction instruction is generated based on the channel closing status information. 8.一种视频信号动态加密认证系统,其特征在于,用于执行如权利要求1-7中任一项所述的视频信号动态加密认证方法,包括:8. A video signal dynamic encryption authentication system, characterized in that it is used to execute the video signal dynamic encryption authentication method according to any one of claims 1 to 7, comprising: 认证模块,用于对视频信号发送设备和视频信号接收设备执行双向挑战-响应认证,得到双向身份认证结果;An authentication module is used to perform a two-way challenge-response authentication on the video signal sending device and the video signal receiving device to obtain a two-way identity authentication result; 密钥计算模块,用于基于所述双向身份认证结果,对所述视频信号发送设备和所述视频信号接收设备进行会话密钥计算,得到会话密钥;a key calculation module, configured to calculate a session key for the video signal sending device and the video signal receiving device based on the two-way identity authentication result to obtain a session key; 验证模块,用于对所述视频信号接收设备进行EDID验证,得到加密的EDID验证通过信息;A verification module, configured to perform EDID verification on the video signal receiving device and obtain encrypted EDID verification pass information; 加密传输模块,用于根据所述加密的EDID验证通过信息,对HDCP密钥进行加密传输和视频信号加密处理,得到加密的视频信号;An encryption transmission module is used to encrypt and transmit the HDCP key and encrypt the video signal according to the encrypted EDID verification pass information to obtain an encrypted video signal; 响应检测模块,用于根据所述加密的视频信号进行设备心跳响应检测,得到连接状态确认结果;a response detection module, configured to perform device heartbeat response detection based on the encrypted video signal to obtain a connection status confirmation result; 重建模块,用于根据所述连接状态确认结果,对所述视频信号发送设备的视频信号传输状态和所述视频信号接收设备的HDMI接收通道进行控制,得到视频信号传输链路的重建指令。A reconstruction module is used to control the video signal transmission state of the video signal sending device and the HDMI receiving channel of the video signal receiving device according to the connection status confirmation result, and obtain a reconstruction instruction for the video signal transmission link.
CN202510841398.XA 2025-06-23 2025-06-23 Video signal dynamic encryption authentication method and system Active CN120358091B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510841398.XA CN120358091B (en) 2025-06-23 2025-06-23 Video signal dynamic encryption authentication method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510841398.XA CN120358091B (en) 2025-06-23 2025-06-23 Video signal dynamic encryption authentication method and system

Publications (2)

Publication Number Publication Date
CN120358091A CN120358091A (en) 2025-07-22
CN120358091B true CN120358091B (en) 2025-08-15

Family

ID=96411316

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510841398.XA Active CN120358091B (en) 2025-06-23 2025-06-23 Video signal dynamic encryption authentication method and system

Country Status (1)

Country Link
CN (1) CN120358091B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110890959A (en) * 2019-10-24 2020-03-17 广州江南科友科技股份有限公司 Account password changing method, system and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9426123B2 (en) * 2012-02-23 2016-08-23 Time Warner Cable Enterprises Llc Apparatus and methods for content distribution to packet-enabled devices via a network bridge

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110890959A (en) * 2019-10-24 2020-03-17 广州江南科友科技股份有限公司 Account password changing method, system and device

Also Published As

Publication number Publication date
CN120358091A (en) 2025-07-22

Similar Documents

Publication Publication Date Title
JP5845393B2 (en) Cryptographic communication apparatus and cryptographic communication system
CN112637161B (en) Data transmission method and storage medium
CN111147225A (en) Authentication method of trusted measurement and control network based on double secret value and chaotic encryption
CN101809964A (en) Method for securing information exchange, and corresponding device and computer software product
CN114915396B (en) A hopping key digital communication encryption system and method based on national secret algorithm
CN116633530A (en) Quantum key transmission method, device and system
CN117857060B (en) Two-dimensional code offline verification method, system and storage medium
CN114938304B (en) Method and system for safely transmitting industrial Internet of things data
CN114513345A (en) Information transmission system, user device and information security hardware module
WO2023151427A1 (en) Quantum key transmission method, device and system
CN105119894A (en) Communication system and communication method based on hardware safety module
CN117675285A (en) An identity verification method, chip and device
CN114928491A (en) Internet of things security authentication method, device and system based on identification cryptographic algorithm
CN106850232A (en) Authorization management method and system for state maintenance
CN111031535A (en) Secure communication method and system for smart card system
CN116743372A (en) Quantum security protocol implementation method and system based on SSL protocol
CN119089460B (en) Data transmission protection method and computer device
CN119766433A (en) Encryption communication method, device and system supporting post quantum algorithm
CN119766437A (en) SSL VPN remote access method, system and related device supporting post quantum algorithm
CN118590229B (en) A quantum communication encryption method for sensitive data in power distribution
CN114448607A (en) A kind of offline equipment safety authentication system and realization method based on PUF technology
CN120358091B (en) Video signal dynamic encryption authentication method and system
CN117714185A (en) Bank counter data processing method and system based on cryptographic algorithm
CN111092860A (en) Medical data safety interaction transmission module
CN115987500A (en) Data safety transmission method and system based on industrial equipment data acquisition

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant