Identity authentication method, device, system, electronic device and storage medium

CN122601231APending Publication Date: 2026-08-18CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610461329.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-09
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0004]本发明旨在提供一种身份认证方法、装置、系统、电子设备及存储介质,以至少解决现有技术存在的无法有效抵御身份伪造与路径篡改攻击、转发时延较高、管理复杂、动态性差、网络扩展性与设备兼容性不足等问题

Benefits of technology

在本发明提供的身份认证方法中,控制器为各节点生成唯一设备标识并进行绑定,确保了节点身份的唯一性与可追溯性,能够有效杜绝非法节点接入;头节点基于自身唯一设备标识和目标转发路径,生成身份摘要与路径摘要,对联合摘要进行先签名后加密处理,并将相关信息封装至SRH头部扩展的国密认证TLV字段,实现了对节点身份的有效认证及对转发路径的安全保护,可避免攻击者通过伪造节点身份、篡改转发路径实施恶意攻击;中间节点仅提取路径摘要执行完整性校验,无需参与复杂的加密解密操作,有效减少了算力消耗,降低了报文转发时延;尾节点集中执行完整的摘要完整性及身份合法性校验,既保证了身份认证的完整性,又避免了中间节点因复杂运算导致的转发效率下降,实现了安全防护与高效转发的兼顾;此外,上述国密认证TLV字段依托SRv6标准报文结构,不破坏原有协议逻辑,确保了报文传输的规范性,提升了网络扩展性与设备兼容性,适配大规模组网需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122601231A_ABST
    Figure CN122601231A_ABST
Patent Text Reader

Abstract

The application provides an identity authentication method, device and system, electronic equipment and storage medium, and relates to the technical field of communication, which comprises the following steps: a controller generates a unique device identifier for each node and binds the unique device identifier with the corresponding node; a head node generates an identity digest and a path digest based on the unique device identifier of the head node and a target forwarding path of a service load, performs signature and encryption processing on a joint digest composed of the identity digest and the path digest, encapsulates a signature encryption result and the path digest into a national secret authentication TLV field extended in an SRH header of an SRv6 message; an intermediate node extracts the path digest from the national secret authentication TLV field, performs path integrity verification based on the path digest, and forwards the message to a next node after passing the verification; and a tail node extracts the signature encryption result from the national secret authentication TLV field, verifies the digest integrity and the identity legality, extracts the service load and forwards the service load to a target application layer after passing the verification. The application improves the security of SRv6 message transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and specifically to an identity authentication method, apparatus, system, electronic device, and storage medium. Background Technology

[0002] With the rapid development of Internet Protocol version 6 (IPv6) and cloud-network convergence technology, segment routing over IPv6 (SRv6) has become the mainstream networking protocol for scenarios such as 5G bearer networks, government cloud, and financial private lines. It achieves end-to-end service forwarding through the segment identifier list (SID) in the segment routing header (SRH), and has advantages such as strong scalability and high forwarding efficiency. However, the protocol itself lacks native security mechanisms and has security risks such as identity forgery, path tampering, and packet replay.

[0003] In related technologies, security solutions that address the above issues often employ internationally recognized cryptographic algorithms for message encryption and verification. Some solutions only encrypt and protect business data without establishing a strong binding relationship between device identity and forwarding path, thus failing to effectively resist identity forgery and path tampering attacks. Furthermore, intermediate nodes need to perform complex signature verification operations, resulting in high forwarding latency. Moreover, existing solutions often use static key configuration, leading to complex management, poor dynamism, insufficient network scalability and device compatibility, making it difficult to simultaneously meet the requirements of security protection, low-latency forwarding, and large-scale deployment. Summary of the Invention

[0004] The present invention aims to provide an identity authentication method, device, system, electronic device and storage medium to at least solve the problems of existing technologies, such as ineffective resistance to identity forgery and path tampering attacks, high forwarding latency, complex management, poor dynamism, and insufficient network scalability and device compatibility.

[0005] The technical solution of the present invention to solve the above-mentioned technical problems is as follows: This invention provides an identity authentication method applied to an identity authentication system, the system comprising a controller, a head node, intermediate nodes, and a tail node, the method comprising: The controller generates a unique device identifier for each node and associates and binds it with the corresponding node. The head node generates an identity digest and a path digest based on its own unique device identifier and the target forwarding path of the service payload. It performs a signature and then encryption process on the joint digest composed of the identity digest and the path digest. It encapsulates the signature and encryption result and the path digest into the national cryptographic authentication TLV field of the SRH header extension of the SRv6 message and forwards the SRv6 message to the next node. After receiving the SRv6 message, the intermediate node extracts the path digest from the national cryptographic authentication TLV field, performs path integrity verification based on the path digest, and forwards the SRv6 message to the next node after the verification is successful. After receiving the SRv6 message, the tail node extracts the signature encryption result from the national cryptographic authentication TLV field, decrypts and verifies the signature, and verifies the digest integrity and identity legitimacy. After the verification is passed, the service payload is extracted and forwarded to the target application layer.

[0006] The technical solution provided by this invention brings at least the following beneficial effects: In the identity authentication method provided by this invention, the controller generates and binds a unique device identifier for each node, ensuring the uniqueness and traceability of the node's identity and effectively preventing unauthorized nodes from accessing the network. The head node generates an identity digest and a path digest based on its unique device identifier and the target forwarding path. The combined digest is first signed and then encrypted, and the relevant information is encapsulated into the national cryptographically certified TLV field extended in the SRH header. This achieves effective authentication of the node's identity and secure protection of the forwarding path, preventing attackers from launching malicious attacks by forging node identities and tampering with forwarding paths. Intermediate nodes only extract the path digest for integrity verification, without participating in complex encryption and decryption operations, effectively reducing computational power consumption and message forwarding latency. The tail node centrally performs complete digest integrity and identity legitimacy verification, ensuring the integrity of identity authentication while avoiding the decrease in forwarding efficiency caused by complex calculations in intermediate nodes, achieving a balance between security protection and efficient forwarding. Furthermore, the aforementioned national cryptographically certified TLV field relies on the SRv6 standard message structure, without disrupting the original protocol logic, ensuring the standardization of message transmission, improving network scalability and device compatibility, and adapting to large-scale networking requirements.

[0007] Based on the above technical solution, the present invention can be further improved as follows.

[0008] Furthermore, the controller generates a unique device identifier for each node and binds it to the corresponding node, including: the controller collects the unique hardware identifier of each node, performs a pre-configured national cryptographic hash algorithm on the unique hardware identifier to generate the corresponding unique device identifier, and sends it to the corresponding node; the unique hardware identifier includes the central processing unit serial number and the network card physical address; the unique device identifier is associated and bound with the node identifier and SRv6 device identifier of the corresponding node, and stored in the controller's authorized node identity database.

[0009] The beneficial effects of this scheme are as follows: By collecting immutable hardware unique identifiers such as node CPU serial numbers and network card physical addresses, and combining them with national cryptographic hash algorithms to generate unique device identifiers, the controller can ensure the uniqueness, security, and compliance of device identifiers with national cryptographic standards, effectively preventing device identities from being forged or tampered with. At the same time, associating and binding the unique device identifier with the node identifier and the SRv6 device identifier and storing them in the controller's authorized node identity database enables unified control and traceable management of node identities, providing a reliable identity foundation for subsequent identity authentication, path verification, and signature verification processes, thereby improving the security and management efficiency of the identity authentication system.

[0010] Furthermore, the method further includes: the controller configuring a suite of national cryptographic algorithms and their algorithm parameters, and distributing them to each node; the suite of national cryptographic algorithms includes the national cryptographic hash algorithm, the national cryptographic asymmetric cryptographic algorithm, and the national cryptographic symmetric cryptographic algorithm; the controller generating an asymmetric key pair for the national cryptographic asymmetric cryptographic algorithm, distributing the private key to the head node, distributing the public key to the tail node and storing it in the controller's authorized node identity database, and binding it with the unique device identifier of the head node; the controller configuring SRv6 path parameters and distributing them to each node, configuring a dynamic key seed for each SRv6 path, associating and binding the dynamic key seed with the path identifier of its corresponding SRv6 forwarding path, and distributing it to the corresponding head node and tail node; the controller generating a key algorithm combination identifier for the dynamic key seed and the algorithm parameters matched for the SRv6 forwarding path, associating and binding the dynamic key seed, the algorithm parameters, and the key algorithm combination identifier, and distributing it to the corresponding head node and tail node.

[0011] The beneficial effects of this scheme are as follows: The controller uniformly configures and distributes national cryptographic algorithm suites and parameters, realizing the coordinated and standardized operation of national cryptographic hash, asymmetric, and symmetric cryptographic algorithms, thereby improving the compliance and security of the authentication system; The controller generates and distributes exclusive private keys for head nodes and corresponding public keys for tail nodes, binding them with unique device identifiers to ensure the uniqueness and legitimacy of key use, effectively preventing key misuse and identity forgery; The controller configures dynamic key seeds according to SRv6 paths and associates them with path identifiers, while generating key algorithm combination identifiers for unified binding and distribution, enabling dynamic updates, accurate matching, and rapid indexing of keys and algorithms, providing stable, secure, and compliant pre-support for subsequent message digest generation, signature encryption, decryption verification, and path verification.

[0012] Furthermore, the header node generates an identity digest and a path digest based on its own unique device identifier and the target forwarding path of the service payload, including: the header node determines the target forwarding path based on the SRv6 path parameters; combines the header node's own unique device identifier, the path identifier of the target forwarding path, and the encapsulation timestamp corresponding to the current time, and performs the national cryptographic hash algorithm on the combined string to generate the identity digest; constructs the SRH header of the SRv6 packet based on the path information of the target forwarding path, and performs the national cryptographic hash algorithm on the combined string composed of the values ​​of each field in the SRH header to generate the path digest.

[0013] The beneficial effects of this scheme are as follows: By generating identity digests and path digests, the head node binds the node identity, forwarding path, and message timeliness, effectively improving the correlation and security of identity authentication and path verification; The use of the national cryptographic hash algorithm to generate digests can ensure the integrity and tamper resistance of the digest information.

[0014] Furthermore, the step of performing a signature-then-encryption process on the joint digest composed of the identity digest and the path digest includes: concatenating the identity digest and the path digest into bytes to obtain the joint digest; performing a signature operation on the joint digest using the national cryptographic asymmetric cryptographic algorithm based on the private key to generate a signature result; combining the device's unique identifier and the dynamic key seed, and performing the national cryptographic hash algorithm on the combined string to generate a session key; and performing an encryption operation on the signature result using the national cryptographic symmetric cryptographic algorithm based on the session key to generate the signature encryption result.

[0015] The beneficial effects of adopting the above scheme are as follows: By concatenating the identity digest and path digest into a joint digest and signing it with a national cryptographic asymmetric cryptographic algorithm, and then combining the unique device identifier and dynamic key seed to generate a session key to encrypt the signature result with national cryptographic symmetric encryption, the head node can achieve the non-forgeability, non-repudiation and transmission encryption protection of the joint digest. At the same time, it can dynamically bind the session key to the device and path, effectively preventing the signature from being tampered with, forged or stolen, and improving the security and compliance of the signature information.

[0016] Furthermore, the step of encapsulating the signature encryption result and the path digest into the national cryptographic authentication TLV field of the SRH header extension of the SRv6 message includes: generating a basic SRv6 message structure, the basic SRv6 message structure including an IPv6 header, the SRH header, and the service payload; encapsulating the key algorithm combination identifier matching the session key, the signature encryption result, the encapsulation timestamp, and the path digest into the national cryptographic authentication TLV field; inserting the national cryptographic authentication TLV field and its custom type value and field length into the TLV extension area of ​​the SRH header to generate the SRv6 message of the service payload.

[0017] The beneficial effects of adopting the above scheme are as follows: By encapsulating the key algorithm combination identifier, signature encryption result, encapsulation timestamp and path digest into the national cryptographic certification TLV field of the SRH header extension, and inserting it into the SRv6 message in standard TLV format, the head node achieves the integrated carrying of security information and service messages without destroying the original SRv6 protocol forwarding logic. This improves message parsing efficiency while ensuring device compatibility and network scalability.

[0018] Further, the step of extracting the path digest from the national cryptographic certification TLV field and performing path integrity verification based on the path digest includes: identifying the national cryptographic certification TLV field in the SRv6 message based on the custom type value and the field length of the national cryptographic certification TLV field in the TLV extended area; extracting the path digest from the national cryptographic certification TLV field; performing the national cryptographic hash algorithm on the combined string composed of the values ​​of each field in the SRH header of the SRv6 message to generate a recalculated path digest; comparing the path digest and the recalculated path digest, and if they match, determining that the path integrity verification has passed; otherwise, determining that the path integrity verification has failed.

[0019] The beneficial effects of adopting the above scheme are as follows: intermediate nodes can quickly locate and extract path digests by using the custom type of the TLV field of the national cryptographic certification, recalculate the SRH header field using the national cryptographic hash algorithm to generate a recalculated path digest, and compare it with the extracted path digest. This can efficiently complete path integrity verification without performing complex operations such as decryption and signature verification, effectively reducing the computing power consumption and forwarding latency of intermediate nodes.

[0020] Furthermore, after the path integrity verification passes and before forwarding the SRv6 message to the next node, the method further includes: identifying the national cryptographic authentication TLV field in the SRv6 message based on the custom type value and the field length of the national cryptographic authentication TLV field in the TLV extended region; extracting the encapsulation timestamp from the national cryptographic authentication TLV field; determining whether the duration between the encapsulation timestamp and the current time exceeds a preset duration; if it exceeds, discarding the SRv6 message and sending a replay attack alarm to the controller; if it does not exceed, determining that the timeliness verification has passed.

[0021] The beneficial effects of adopting the above scheme are as follows: By extracting the encapsulated timestamp from the national cryptographic certification TLV field and comparing it with the current time, the intermediate node can quickly complete the message timeliness verification, effectively preventing message replay attacks; at the same time, the lightweight judgment based only on the timestamp does not increase the computing power burden of the intermediate node and reduces forwarding latency; in addition, when an anomaly is detected, it actively reports an alarm to the controller, realizing the monitoring and traceability of security events, further enhancing the security protection capability of message transmission.

[0022] Furthermore, the step of extracting the signature encryption result from the national cryptographic certification TLV field, decrypting and verifying the signature, and verifying the digest integrity and identity legitimacy includes: identifying the national cryptographic certification TLV field in the SRv6 message based on the custom type value and the field length of the national cryptographic certification TLV field in the TLV extended area; extracting the signature encryption result from the national cryptographic certification TLV field; performing a decryption operation on the signature encryption result using the national cryptographic symmetric cryptographic algorithm based on the session key; verifying the decrypted signature result using the national cryptographic asymmetric cryptographic algorithm based on the public key; and verifying the digest integrity and identity legitimacy based on the signature verification result after successful verification.

[0023] The beneficial effects of adopting the above scheme are as follows: the tail node quickly locates and extracts the signature encryption result based on the national cryptographic certification TLV field, and then uses the session key to decrypt and the public key to verify the signature in sequence, and verifies the integrity of the digest and the legitimacy of the identity, thus realizing end-to-end strong identity authentication and data integrity verification.

[0024] Furthermore, the step of verifying the integrity of the digest and the legitimacy of the identity based on the signature verification result includes: combining the unique device identifier of the header node, the path identifier of the target forwarding path, and the encapsulation timestamp, and performing the national cryptographic hash algorithm on the combined string to obtain a recalculated identity digest; performing the national cryptographic hash algorithm on the combined string composed of the values ​​of each field in the SRH header to obtain a recalculated path digest; comparing the recalculated identity digest with the identity digest restored by signature verification, and comparing the recalculated path digest with the path digest restored by signature verification; if the comparisons are consistent, it is determined that the digest integrity verification has passed, and the identity legitimacy verification is performed; otherwise, the SRv6 message is discarded, and an information tampering alarm is sent to the controller.

[0025] The beneficial effects of adopting the above scheme are as follows: After the signature verification is successful, the tail node recalculates and compares the identity digest and the path digest. By verifying the dual verification, it can be determined whether the message has been tampered with during transmission, which can ensure the integrity and reliability of the digest information. When the verification fails, the information tampering alarm is proactively reported to the controller, which further improves the manageability and controllability of network security.

[0026] Furthermore, the identity verification process includes: querying the unique device identifier of the head node in the tail node authorized node identity database based on the identity digest; if the unique device identifier is found in the tail node authorized node identity database, and the bound path identifier and public key are consistent with those in the SRv6 message, then the identity verification is deemed successful; if the unique device identifier is not found in the tail node authorized node identity database, a query request is sent to the controller; if the path identifier and public key bound to the unique device identifier returned by the controller are consistent with those in the SRv6 message, then the identity verification is deemed successful; otherwise, the SRv6 message is discarded, and an illegal node access alarm is sent to the controller.

[0027] The beneficial effects of adopting the above scheme are as follows: By verifying the binding consistency of the unique device identifier, path identifier, and public key of the head node through two-level queries at the tail node local and controller levels, strong authentication and authorized access control of node identity are achieved; when the verification fails, an alarm for illegal node access is proactively reported, further improving the security, traceability, and control capabilities of SRv6 network identity authentication.

[0028] Correspondingly, the present invention also provides an identity authentication device for use in an identity authentication system, the system comprising a controller, a head node, an intermediate node, and a tail node, the device comprising: The configuration module is used by the controller to generate a unique device identifier for each node and associate and bind it with the corresponding node; The encapsulation module is used to generate an identity digest and a path digest based on the head node’s unique device identifier and the target forwarding path of the service payload, perform a signature-encryption process on the joint digest composed of the identity digest and the path digest, encapsulate the signature-encryption result and the path digest into the national cryptographic authentication TLV field of the SRH header extension of the SRv6 message, and forward the SRv6 message to the next node. The forwarding module is used to extract the path digest from the national cryptographic authentication TLV field after the intermediate node receives the SRv6 message, perform path integrity verification based on the path digest, and forward the SRv6 message to the next node after the verification is successful. The authentication module is used to extract the signature encryption result from the national cryptographic authentication TLV field after the tail node receives the SRv6 message, decrypt and verify the signature, and verify the integrity of the digest and the legality of the identity. After the verification is passed, the service payload is extracted and forwarded to the target application layer.

[0029] The present invention also provides an identity authentication system, the system comprising a controller, a head node, an intermediate node, and a tail node; wherein: The controller is equipped with a key and identity management module, which is used to: generate and issue unique device identifiers for each node, configure national cryptographic algorithm suites and algorithm parameters, generate and distribute key pairs of national cryptographic asymmetric cryptographic algorithms, configure and issue SRv6 path parameters, dynamic key seeds and key algorithm combination identifiers, maintain the controller authorized node identity database and respond to identity query requests. The head node is deployed with a national cryptographic signature encapsulation module. The national cryptographic signature encapsulation module is used to: generate an identity digest and a path digest based on its own unique device identifier and the target forwarding path of the service payload; perform a signature-then-encryption process on the joint digest composed of the identity digest and the path digest; and encapsulate the signature encryption result, the path digest, the encapsulation timestamp, and the key algorithm combination identifier into the national cryptographic authentication TLV field of the SRH header extension of the SRv6 message. The head node is also used to: after encapsulating the SRv6 message corresponding to the service payload through the national cryptographic signature encapsulation module, forward the SRv6 message to the next node based on the target forwarding path; The intermediate node is equipped with a lightweight verification module, which is used to: when the intermediate node receives the SRv6 message, extract the path digest and the encapsulation timestamp from the national cryptographic certification TLV field, and perform path integrity verification and timeliness verification. The intermediate node is also used to: after the lightweight verification module passes the path integrity verification and timeliness verification of the SRv6 packet, forward the SRv6 packet to the next node based on the target forwarding path; The tail node is equipped with a national cryptographic signature verification and authentication module. The national cryptographic signature verification and authentication module is used to: when the tail node receives the SRv6 message, extract the signature encryption result from the national cryptographic authentication TLV field, and perform digest integrity verification and identity legality verification. The tail node is also used to: extract the service payload and forward it to the target application layer after the national cryptographic signature verification module passes the digest integrity verification and identity legality verification of the SRv6 message.

[0030] The present invention also provides an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the instructions to implement the above-described authentication method.

[0031] The present invention also provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program implements the above-mentioned authentication method when executed by a processor. Attached Figure Description

[0032] Figure 1 A flowchart illustrating an identity authentication method provided by the present invention; Figure 2 A schematic block diagram of an identity authentication device provided by the present invention; Figure 3 A schematic block diagram of an identity authentication system provided by the present invention; Figure 4 This is a schematic diagram of an electronic device provided by the present invention. Detailed Implementation

[0033] The principles and features of the present invention are described below. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.

[0034] Most related technologies use internationally recognized cryptographic algorithms to encrypt and verify messages. Some solutions only encrypt and protect business data without establishing a strong binding relationship between device identity and forwarding path, which cannot effectively resist identity forgery and path tampering attacks. At the same time, intermediate nodes need to perform complex signature verification operations, resulting in high forwarding latency. Furthermore, existing solutions mostly use static key configuration, which has problems such as complex management, poor dynamism, insufficient network scalability and device compatibility, making it difficult to meet the requirements of security protection, low-latency forwarding and large-scale deployment.

[0035] To address the aforementioned problems, this invention proposes an identity authentication method, apparatus, system, electronic device, and computer-readable storage medium. The technical solutions of the embodiments of this disclosure are described in detail below: In one embodiment of the present invention, an identity authentication method is provided, applied to an identity authentication system, the identity authentication system including a controller, a head node, intermediate nodes, and a tail node. (See reference) Figure 1 As shown, this authentication method specifically includes the following steps: S110: The controller generates a unique device identifier for each node and associates and binds it with the corresponding node; S120: The head node generates an identity digest and a path digest based on its own unique device identifier and the target forwarding path of the service payload. It performs a signature and then encryption process on the joint digest composed of the identity digest and the path digest. It encapsulates the signature and encryption result and the path digest into the national cryptographic authentication TLV field extended in the SRH header of the SRv6 message and forwards the SRv6 message to the next node. S130: After receiving the SRv6 message, the intermediate node extracts the path digest from the national cryptographic certification TLV field, performs path integrity verification based on the path digest, and forwards the SRv6 message to the next node after the verification is successful. S140: After receiving the SRv6 message, the tail node extracts the signature encryption result from the national cryptographic certification TLV field, decrypts and verifies the signature, and verifies the integrity of the digest and the legitimacy of the identity. After the verification is passed, the service payload is extracted and forwarded to the target application layer.

[0036] In the identity authentication method provided in the above embodiments, the controller generates and binds a unique device identifier for each node, ensuring the uniqueness and traceability of the node's identity and effectively preventing unauthorized nodes from accessing the network. The head node generates an identity digest and a path digest based on its unique device identifier and the target forwarding path. The combined digest is first signed and then encrypted, and the relevant information is encapsulated into the national cryptographically certified TLV field extended in the SRH header. This achieves effective authentication of the node's identity and secure protection of the forwarding path, preventing attackers from imposing attacks by forging node identities or tampering with forwarding paths. Malicious attacks are mitigated by the fact that intermediate nodes only extract path digests for integrity verification, without participating in complex encryption and decryption operations, effectively reducing computational consumption and message forwarding latency. Tail nodes centrally perform complete digest integrity and identity legitimacy verification, ensuring the integrity of identity authentication while avoiding the decrease in forwarding efficiency caused by complex calculations at intermediate nodes, thus achieving a balance between security protection and efficient forwarding. Furthermore, the aforementioned national cryptographic authentication TLV fields rely on the SRv6 standard message structure, without disrupting the original protocol logic, ensuring the standardization of message transmission, improving network scalability and device compatibility, and adapting to large-scale networking needs.

[0037] The above steps will now be described in more detail in another embodiment.

[0038] In S110, the controller generates a unique device identifier for each node and associates and binds it with the corresponding node.

[0039] The aforementioned controller is the centralized control unit in the SRv6 network, used to implement functions such as node identity management, key distribution, path configuration, policy issuance, and security authentication control.

[0040] The aforementioned nodes are network devices involved in packet forwarding and processing in the SRv6 network, including head nodes, intermediate nodes, and tail nodes.

[0041] The aforementioned unique device identifier is an identity identifier assigned by the controller to each node, uniquely bound to the node, and cannot be forged or tampered with. It is used to uniquely identify the node's identity in the SRv6 network and serves as the basis for subsequent identity authentication, path verification, and secure access control.

[0042] Preferably, the controller generates a unique device identifier for each node and associates and binds it with the corresponding node as follows: The controller collects the unique hardware identifier of each node, performs a pre-configured national cryptographic hash algorithm on the unique hardware identifier, generates a corresponding unique device identifier, and sends it to the corresponding node; the unique hardware identifier includes the central processing unit serial number and the network card physical address; the unique device identifier is associated and bound with the node identifier and SRv6 device identifier of the corresponding node and stored in the controller's authorized node identity database.

[0043] Among them, the aforementioned hardware unique identifier is an unalterable and globally unique hardware characteristic information of the network node device, used to uniquely distinguish physical devices and prevent identity forgery; the aforementioned Central Processing Unit (CPU) serial number is a unique number fixed to the CPU at the factory; the aforementioned Network Interface Card (NIC) physical address (MAC address) is a unique and unalterable physical address fixed in the hardware at the factory, used to uniquely identify network devices in the local area network and network link layer, and is an important identifier of the device hardware identity.

[0044] The aforementioned national cryptographic hash algorithm is a hash algorithm that conforms to the national cryptographic standard and is used to convert input data into a fixed-length, tamper-proof digest value.

[0045] The node identifier (Node ID) mentioned above is a logical number or name used to distinguish nodes and is used for management and addressing.

[0046] The aforementioned SRv6 device identifier is a dedicated identifier for nodes in the SRv6 network, used for SRv6 routing, segment forwarding, path planning, and node identification.

[0047] The aforementioned controller authorized node identity database is a database maintained by the controller to store node identity information. It can save the unique device identifier of the node, the node identifier, and the binding relationship between the SRv6 device identifier, serving as the basis for subsequent node identity authentication, legitimacy verification, and access control.

[0048] In this embodiment, in addition to generating a unique device identifier for each node, the controller also needs to configure and manage the cryptographic algorithms, path parameters, and keys involved in the identity authentication process. Preferably, the configuration management process can be implemented as follows: Configure the national cryptographic algorithm suite and its algorithm parameters, and distribute them to each node; the national cryptographic algorithm suite includes the national cryptographic hash algorithm, the national cryptographic asymmetric cryptographic algorithm, and the national cryptographic symmetric cryptographic algorithm; generate an asymmetric key pair for the national cryptographic asymmetric cryptographic algorithm, distribute the private key to the head node, distribute the public key to the tail node and store it in the controller's authorized node identity database, and bind it with the unique device identifier of the head node; configure SRv6 path parameters and distribute them to each node, configure a dynamic key seed for each SRv6 path, associate and bind the dynamic key seed with the path identifier of its corresponding SRv6 forwarding path, and distribute it to the corresponding head node and tail node; generate a key algorithm combination identifier for the dynamic key seed and algorithm parameters matched by the SRv6 forwarding path, associate and bind the dynamic key seed, algorithm parameters, and key algorithm combination identifier, and distribute it to the corresponding head node and tail node.

[0049] The aforementioned national cryptographic algorithm suite is a collection of various cryptographic algorithms that conform to the national commercial cryptography standard. It is used in this embodiment to collaboratively complete security functions such as data integrity verification, identity authentication, and data encryption and decryption. It includes national cryptographic hash algorithms, national cryptographic asymmetric cryptographic algorithms, and national cryptographic symmetric cryptographic algorithms.

[0050] The above-mentioned algorithm parameters refer to the configuration parameters required during the execution of the corresponding cryptographic algorithm. They are used to determine the specific working mode, operation rules and security strength of the algorithm, and are necessary parameters to ensure the correct and secure operation of the cryptographic algorithm.

[0051] The above SRv6 path parameters are control parameters configured by the controller for the SRv6 forwarding path, used to guide the forwarding of packets along the specified path, including parameters such as SID list, path priority, forwarding policy and verification rules.

[0052] The aforementioned dynamic key seed is random secret data dynamically allocated by the controller for the corresponding SRv6 forwarding path, used to derive the session key.

[0053] The aforementioned path ID is used to identify the globally unique identifier of the corresponding SRv6 forwarding path, serving as the basis for path differentiation, key binding, and forwarding matching.

[0054] The aforementioned key algorithm combination identifier (Key ID) is used to uniquely identify a combination of key and algorithm parameters, and is used to quickly identify and match the key and cryptographic algorithm corresponding to a node.

[0055] In one specific implementation of this embodiment, the pre-configuration phase, which is controller-led, involves all nodes, and is based on control plane interaction, can be implemented as follows: Configuration employs a combination of one-time initialization and periodic dynamic updates. Initialization occurs when a node connects to the SRv6 network, while periodic dynamic updates are performed automatically every 5 minutes. The core objective is to achieve network-wide synchronization of national cryptographic algorithm parameters, identity credentials, path parameters, and dynamic keys, laying the foundation for subsequent end-to-end authentication. The specific steps are as follows: S1: The controller generates and distributes unique device identifiers for each node.

[0056] In this specific implementation, the process is as follows: The controller collects the unique hardware identifier of each node, which is specifically a combination of the CPU serial number and the MAC address of the corresponding node; the controller performs a hash operation on the unique hardware identifier using the SM3 cryptographic hash algorithm to generate a unique device identifier of 256 bits in length, and strongly binds the unique device identifier with the node's Node ID and SRv6 device identifier, and stores it in the local controller authorized node identity database; at the same time, the controller sends the unique device identifier to the corresponding node, so that after each node receives the unique device identifier, it encrypts and stores it locally and binds the unique device identifier with its own unique hardware identifier again to ensure that the unique device identifier cannot be tampered with.

[0057] S2: The controller generates and distributes SM2 key pairs.

[0058] In this specific implementation, the process is as follows: The controller follows the GM / T0003-2012 standard to generate an SM2 elliptic curve asymmetric encryption key pair. This key pair specifically includes a private key SK and a public key PK, and the key pairs are allocated according to the principle of one key pair per head node, that is, each head node corresponds to a unique SM2 key pair; after encrypting the SM2 private key SK, the controller only sends it to the corresponding head node, so that the head node can locally encrypt and store the SM2 private key SK after receiving it; the controller sends the SM2 public key PK to the corresponding tail node and stores it in the controller itself, so that the tail node can locally store the SM2 public key PK after receiving it; the controller then stores the SM2 public key PK in the local controller authorized node identity database, realizing a strong binding between the SM2 public key PK and the unique device identifier and Node ID, ensuring that the public key is traceable and verifiable.

[0059] S3: The controller uniformly configures and distributes national cryptographic algorithms and algorithm parameters.

[0060] In this specific implementation, the process is as follows: The controller follows the GM / T series standards and configures unified national cryptographic algorithm execution parameters for all nodes. Specifically, the national cryptographic asymmetric cryptography algorithm uses the SM2 algorithm, the national cryptographic hash algorithm uses the SM3 algorithm, and the national cryptographic symmetric cryptography algorithm uses the SM4 algorithm. The specific parameter configurations are as follows: SM2 algorithm: It adopts the secp256r1 curve parameter, and the signature process uses a combination of SM3 hash and ECDSA signature to ensure the security and standardization of the signature; SM3 algorithm: It adopts the standard hash process and outputs a 256-bit fixed-length digest after hash operation for data integrity verification; SM4 algorithm: It adopts CBC encryption mode, with a block length of 128 bits and a key length of 128 bits, ensuring the efficiency and security of data encryption.

[0061] After completing the above algorithm parameter configuration, all national cryptographic algorithm parameters will be uniformly distributed to all nodes so that each node can complete the initialization configuration according to the algorithm parameters after receiving them, ensuring that the national cryptographic algorithm execution standard is consistent across the entire network.

[0062] S4: The controller sends out SRv6 path parameters and dynamic key seed.

[0063] In this specific implementation, the process is as follows: The controller distributes SRv6 standard path parameters to all nodes. These parameters include a SID list, Path ID, Next Header identifier, and Header Extension Length (Hdr Ext Len). A 32-byte random dynamic key seed is generated and updated randomly every 5 minutes. The dynamic key seed is then associated with the Path ID of the corresponding SRv6 forwarding path. After binding, the dynamic key seed is encrypted using the SM2 algorithm and distributed only to the head and tail nodes corresponding to the SRv6 forwarding path. Upon receiving the dynamic key seed, the head and tail nodes generate a 128-bit SM4 session key K using the SM3 algorithm based on the dynamic key seed and their own unique device fingerprint. The session key K is automatically updated with the dynamic key seed, eliminating the need for separate distribution by the controller and reducing control plane bandwidth usage. A Key ID is generated for the dynamic key seed and algorithm parameters matched to the SRv6 forwarding path, and the dynamic key seed, algorithm parameters, and Key ID are then linked together. After the ID is associated and bound, it is sent to the corresponding head node and tail node; the transmission process of the dynamic key seed is only carried out in the control plane, which effectively prevents it from being stolen during transmission and ensures the security of the key seed.

[0064] S5: Synchronize the identity database of authorized nodes.

[0065] In this specific implementation, the process is as follows: The controller synchronizes the updated unique device identifier, SM2 public key, Path ID, and dynamic key seed binding information to all tail nodes. The tail nodes establish a lightweight tail node authorized identity cache library locally for quickly querying authorized node information. This tail node authorized identity cache library is synchronized with the controller's authorized node identity library in real time, eliminating the need for tail nodes to repeatedly interact with the controller for queries, greatly reducing interaction time and improving signature verification and data processing efficiency.

[0066] In S120, the head node generates an identity digest and a path digest based on its own unique device identifier and the target forwarding path of the service payload. It then performs a signature and encryption process on the combined digest composed of the identity digest and the path digest. Finally, it encapsulates the signature and encryption result and the path digest into the national cryptographic authentication TLV field extended in the SRH header of the SRv6 message and forwards the SRv6 message to the next node.

[0067] The aforementioned header node is the starting node for SRv6 message transmission in the SRv6 network.

[0068] The aforementioned service payload refers to service data that needs to be transmitted through the SRv6 network. For example, this service payload can be government data, industrial control instructions, financial transaction data, etc.

[0069] The aforementioned target forwarding path is the complete SRv6 path that the head node takes to forward the service payload to the tail node (the target node of the service payload). It is determined by the SRv6 path parameters issued by the controller and includes core fields such as the SID list, PathID, Next Header, and Hdr Ext Len in the SRH header.

[0070] The aforementioned identity digest (Hash_ID) is a hash digest generated by the head node using a pre-configured national cryptographic hash algorithm to identify its own legitimate identity, ensuring that the identity is non-repudiable.

[0071] The aforementioned path digest (Hash_Path) is a hash digest generated by the head node using a pre-configured national cryptographic hash algorithm. It is used to verify the integrity of the target forwarding path and to prevent the path from being tampered with.

[0072] Preferably, the above-mentioned header node generating identity digest and path digest based on its own unique device identifier and the target forwarding path of the service payload can be achieved as follows: the header node determines the target forwarding path based on SRv6 path parameters; combines the header node's own unique device identifier, the path identifier of the target forwarding path, and the encapsulation timestamp corresponding to the current time, and performs a national cryptographic hash algorithm on the combined string to generate identity digest; constructs the SRH header of the SRv6 packet based on the path information of the target forwarding path, and performs a national cryptographic hash algorithm on the combined string composed of the values ​​of each field in the SRH header to generate path digest.

[0073] Furthermore, the process of signing and then encrypting the combined digest composed of the identity digest and path digest can be implemented as follows: concatenate the identity digest and path digest into bytes to obtain the combined digest; perform a signature operation on the combined digest using a national cryptographic asymmetric cryptographic algorithm based on the private key to generate a signature result; combine the unique device identifier and dynamic key seed, and perform a national cryptographic hash algorithm on the combined string to generate a session key; perform an encryption operation on the signature result using a national cryptographic symmetric cryptographic algorithm based on the session key to generate a signed encrypted result.

[0074] In this embodiment, the above-mentioned SRv6 message follows the message structure of the SRv6 core standard (RFC9800), which consists of three parts: IPv6 header, SRH header, and service payload.

[0075] Preferably, this embodiment addresses the issue of existing solutions not being compatible with national cryptographic algorithms by adding a dedicated national cryptographic authentication TLV field to the TLV field area of ​​the SRv6 standard SRH header. This field is an independent TLV type, does not occupy the space of other TLV fields in the existing SRH header, is fully compatible with all fields in the existing SRH header, and can be parsed by existing SRv6 devices through software upgrades. It is adapted to the national cryptographic algorithm suite and the dedicated design of SRv6 end-to-end identity authentication, and is used to carry security authentication information, including four subfields: Key ID, Enc_Sign (the above signature encryption result), timestamp (the above encapsulated timestamp), and Hash_Path.

[0076] Furthermore, the above-mentioned encapsulation of the signature encryption result and path digest into the national cryptographic authentication TLV field of the SRH header extension of the SRv6 message can achieve the following: generating a basic SRv6 message structure, which includes an IPv6 header, an SRH header, and a service payload; encapsulating the key algorithm combination identifier (Key ID), signature encryption result (Enc_Sign), encapsulation timestamp, and path digest (Hash_Path) that match the session key into the national cryptographic authentication TLV field; inserting the national cryptographic authentication TLV field and its custom type value and field length into the TLV extension area of ​​the SRH header to generate the SRv6 message of the service payload.

[0077] Among them, the above-mentioned custom type value is the value of the field type identifier (Type), which is a unique identifier for the national cryptographic certification TLV field. It is customized and configured by the above-mentioned identity authentication method and must belong to the custom Type range of the SRv6 protocol TLV extension. It is used to distinguish the national cryptographic certification TLV field from other standard TLV fields in the SRH header so that the node can quickly identify the national cryptographic certification TLV field when parsing the SRH header.

[0078] The above field length (Length) is the length parameter of the national cryptographic certification TLV field, which is fixed at 1 byte and has a value range of 0-255. It is used to define the overall length of the national cryptographic certification TLV field.

[0079] The process of generating SRv6 messages by the head node is described in detail below in one specific implementation of this embodiment: In this specific implementation, the head node has completed all the pre-configuration work, including: holding the unique device identifier issued by the controller, the SM2 private key, the dynamic key seed, the SRv6 path parameters corresponding to the target forwarding path (including the SID list, PathID, Next Header, Hdr Ext Len) and the national cryptographic algorithm parameters (SM2 / SM3 / SM4 algorithm execution parameters).

[0080] The detailed design of the aforementioned national cryptographic authentication TLV field in this specific implementation method is as follows: (1) Basic field attributes: including field type identifier (Type) Field type identifier (Type): Fixed configuration of 6, which distinguishes it from all existing TLV types in the SRH header, so that nodes can quickly identify the national cryptographic authentication TLV field when parsing the SRH header; Field Length: Dynamically adjusted according to the actual encapsulated content, with a value range of 76-80 bytes, adapting to parameter configurations in different scenarios, with no redundant fields, meeting the lightweight encapsulation requirements of SRv6 messages.

[0081] (2) Internal structure of the field and functions of each subfield: The TLV field for national cryptographic authentication contains four core subfields: Key ID, Enc_Sign, timestamp, and Hash_Path. All subfields are designed with fixed lengths to adapt to the standardized parsing requirements of SRv6 messages and avoid parsing errors caused by variable field lengths. The byte length, core functions, and linkage with the SRv6 protocol and national cryptographic algorithm of each subfield are shown in Table 1 below: Table 1: The aforementioned national cryptographic TLV field strictly follows the encoding format of the SRH header TLV field specified in RFC9800, only adding a dedicated Type identifier and customized subfields, without modifying the existing field structure, encoding rules and parsing logic of the SRH header: Existing SRv6 devices that have not upgraded their software recognize this field as a reserved TLV field and forward it directly according to the original logic, without affecting message transmission, ensuring the forward compatibility of the solution; Existing SRv6 devices that have upgraded their software recognize the Type identifier (6) of this field through the newly added parsing module, quickly extract the subfields and perform the corresponding verification, decryption and signature verification operations, to achieve a smooth upgrade without compatibility risks.

[0082] Furthermore, in this specific implementation, when the head node generates a service payload transmission requirement, it triggers the process of generating an SRv6 message. The specific steps are as follows: S1: Generate the basic SRv6 message structure.

[0083] In this specific implementation, the process is as follows: Based on the SRv6 standard process, an IPv6 header, a basic SRH header (containing core fields such as the SID list, PathID, Next Header, and Hdr Ext Len corresponding to the target forwarding path), and a service payload are generated. If the service payload belongs to a high-security scenario (such as government affairs or finance), the service payload can be additionally encrypted using the SM4 algorithm. In ordinary scenarios, the plaintext payload can be used directly.

[0084] S2: Generate identity digest.

[0085] In this specific implementation, the process is as follows: collect the device's unique identifier, the Path ID of the target forwarding path, and the current millisecond-level timestamp, and concatenate the three in byte order to form a combined string; call the SM3 algorithm library to perform an SM3 hash operation on the combined string to generate a 256-bit fixed-length identity digest.

[0086] S3: Generate path summary.

[0087] In this specific implementation, the process is as follows: extract the core fields of the target forwarding path (SID list, Next Header, Hdr Ext Len) from the basic SRH header, and concatenate the three in byte order to form a combined string; call the SM3 algorithm library to perform SM3 hash operation on the combined string to generate a 256-bit fixed-length path digest.

[0088] S4: Perform a signature operation on the combined digest consisting of the identity digest and the path digest.

[0089] In this specific implementation, the process is as follows: the identity digest and path digest are concatenated in byte order to form a joint digest; the SM2 algorithm library is called, and the SM3 hash and elliptic curve digital signature (ECDSA) operation is performed on the joint digest using the SM2 private key held by the user, generating a 32-byte SM2 signature result Sign_SM2.

[0090] S5: Perform encryption operations on the signature result.

[0091] In this specific implementation, the process is as follows: the SM4 algorithm library is called, and the SM4 session key K is used to perform CBC mode encryption on the SM2 signature result Sign_SM2 to generate a 32-byte signature encryption result Enc_Sign.

[0092] S6: Based on the design of the above-mentioned national cryptographic certification TLV field, the national cryptographic certification TLV field is encapsulated and inserted into the TLV extension area of ​​the SRH header in the SRv6 message to generate a complete SRv6 message.

[0093] In this specific implementation, the process is as follows: Set the Type identifier to 6; set the Length field length to 76 bytes (Key ID 4 bytes, Enc_Sign 32 bytes, timestamp 8 bytes, Hash_Path 32 bytes); encapsulate 4 sub-fields in sequence: KeyID, Enc_Sign, current millisecond-level timestamp, and Hash_Path; insert the assembled national cryptographic authentication TLV field into the first position of the TLV field area in the SRH header to ensure that the next node parses this field first; assemble a complete SRv6 message in the order of IPv6 header, SRH header containing national cryptographic authentication TLV, and service payload. The message structure fully conforms to the RFC9800 standard and can be recognized and forwarded by existing SRv6 devices.

[0094] In this embodiment, after generating the SRv6 packet corresponding to the service payload through the above process, the head node parses the SID list of the target forwarding path, determines the identifier of the next node, and sends the SRv6 packet to the next node according to the SRv6 standard forwarding logic.

[0095] In S130, after receiving the SRv6 message, the intermediate node extracts the path digest from the national cryptographic certification TLV field, performs path integrity verification based on the path digest, and forwards the SRv6 message to the next node after the verification is successful.

[0096] The aforementioned intermediate nodes are message forwarding nodes located between the head node and the tail node in the SRv6 network.

[0097] For example, the above-mentioned extraction of path digest from the national cryptographic certification TLV field and the execution of path integrity verification based on the path digest can be achieved as follows: Based on the custom type value and field length of the national cryptographic certification TLV field in the TLV extension area, identify the national cryptographic certification TLV field in the SRv6 message; extract the path digest from the national cryptographic certification TLV field; execute the national cryptographic hash algorithm on the combined string composed of the values ​​of each field in the SRH header of the SRv6 message to generate a recalculated path digest; compare the path digest and the recalculated path digest. If they match, the path integrity verification is deemed to have passed; otherwise, the path integrity verification is deemed to have failed.

[0098] In this embodiment, if the path integrity verification passes, the intermediate node parses the SID list of the target forwarding path, determines the identifier of the next node, and sends the SRv6 packet to the next node according to the SRv6 standard forwarding logic.

[0099] Preferably, since the aforementioned national cryptographic authentication TLV field also includes an encapsulation timestamp, in order to prevent packet replay attacks, this embodiment can also perform timeliness verification after the path integrity verification passes and before forwarding the SRv6 packet to the next node using the following method: Based on the custom type value and field length of the national cryptographic authentication TLV field in the TLV extension area, identify the national cryptographic authentication TLV field in the SRv6 packet; extract the encapsulation timestamp from the national cryptographic authentication TLV field; determine whether the duration between the encapsulation timestamp and the current time exceeds a preset duration; if it exceeds, discard the SRv6 packet and send a replay attack alarm to the controller; if it does not exceed, determine that the timeliness verification has passed, parse the SID list of the target forwarding path, determine the identifier of the next node, and send the SRv6 packet to the next node according to the SRv6 standard forwarding logic.

[0100] In one specific implementation of this embodiment, the specific steps for the intermediate node to forward lightweight verification messages are as follows: S1: Based on the SRv6 standard process, parse the IPv6 header and SRH header of the packet, and quickly identify and extract the national cryptographic authentication TLV field by using Type=6; S2: The intermediate node extracts only Hash_Path and encapsulated timestamp from the national cryptographic TLV field, and directly transmits the other sub-fields; S3: Call the SM3 algorithm library to re-hash the combined string consisting of the SID list, Next Header, and Hdr Ext Len in the SRH header of the message, generate a recalculated path digest Hash_Path, and compare Hash_Path with the extracted Hash_Path byte by byte; if the comparison is inconsistent, it is determined that the path has been tampered with, and continue to execute S4; if the comparison is consistent, proceed to S5 to continue to perform the timeliness verification. S4: Discard the message directly and send a path tampering alarm to the controller; S5: If the comparison matches, proceed to timeliness verification: Convert the extracted encapsulation timestamp into millisecond-level time and compare it with the current system time to determine if it is within the timeout threshold (default 5 seconds, which can be dynamically configured by the controller): If it exceeds the timeout threshold, it is determined to be a suspected replay attack and continue to S6; if it is within the timeout threshold, it is determined to be a legitimate packet and proceed to the forwarding process S7. S6: Discard the message directly and send a replay attack alarm to the controller; S7: Forward the verified message to the next node according to the existing SRv6 standard forwarding logic.

[0101] In S140, after receiving the SRv6 message, the tail node extracts the signature encryption result from the national cryptographic certification TLV field, decrypts and verifies the signature, and verifies the integrity of the digest and the legitimacy of the identity. After the verification is passed, the service payload is extracted and forwarded to the target application layer.

[0102] The aforementioned tail node is the final receiving node for a message in the SRv6 network.

[0103] The aforementioned target application layer refers to the upper-layer application, service, or terminal processing program that ultimately delivers and transmits the service payload. It is used to receive and process the service payload that has passed all security checks, and to complete the final consumption and execution of the service payload.

[0104] Preferably, the above-mentioned extraction of the signature encryption result from the national cryptographic certification TLV field, followed by decryption and signature verification, and verification of digest integrity and identity legitimacy can be achieved as follows: Based on the custom type value and field length of the national cryptographic certification TLV field in the TLV extension area, identify the national cryptographic certification TLV field in the SRv6 message; extract the signature encryption result from the national cryptographic certification TLV field; perform decryption operation on the signature encryption result using a national cryptographic symmetric cryptographic algorithm based on the session key; verify the decrypted signature result using a national cryptographic asymmetric cryptographic algorithm based on the public key; after successful signature verification, verify the digest integrity and identity legitimacy based on the signature verification result.

[0105] Furthermore, the above-mentioned verification digest integrity and identity legitimacy based on the signature verification result can be achieved as follows: combine the unique device identifier of the header node, the path identifier of the target forwarding path, and the encapsulation timestamp, and perform a national cryptographic hash algorithm on the combined string to obtain a recalculated identity digest; perform a national cryptographic hash algorithm on the combined string composed of the values ​​of each field in the SRH header to obtain a recalculated path digest; compare the recalculated identity digest with the identity digest restored by signature verification, and compare the recalculated path digest with the path digest restored by signature verification; if the comparisons are consistent, the verification digest integrity check is passed, and the identity legitimacy check is performed; otherwise, the SRv6 message is discarded, and an information tampering alarm is sent to the controller.

[0106] The above-mentioned identity verification can be performed as follows: Based on the identity digest, the unique device identifier of the head node is queried in the tail node's authorized node identity database; if a unique device identifier is found in the tail node's authorized node identity database, and the bound path identifier and public key match those in the SRv6 message, the identity verification is deemed successful; if no unique device identifier is found in the tail node's authorized node identity database, a query request is sent to the controller; if the unique device identifier returned by the controller, along with the bound path identifier and public key, matches those in the SRv6 message, the identity verification is deemed successful; otherwise, the SRv6 message is discarded, and an illegal node access alarm is sent to the controller.

[0107] The following is a detailed description of the complete signature verification and authentication process of the tail node in a specific implementation of this embodiment, which includes the following steps: S1: Parse the IPv6 header and SRH header of the packet according to the SRv6 standard process, identify the national cryptographic authentication TLV field through Type=6, and completely extract subfields such as Key ID, Enc_Sign, timestamp, and Hash_Path; S2: Match the local session key K according to KeyID, call the SM4 algorithm in CBC mode to decrypt Enc_Sign, and restore the 32-byte SM2 signature result Sign_SM2; S3: Call the SM2 algorithm and use the SM2 public key PK corresponding to the private key SK of the header node to verify the Sign_SM2 signature, and reverse the process to restore the Hash_ID and Hash_Path; if the signature verification fails, it is determined that there is a risk of identity forgery or signature tampering, the message is directly discarded, and an identity forgery alarm is sent to the controller; if the signature verification is successful, continue to execute S4 to perform double digest comparison. S4: Call the SM3 algorithm to recalculate the identity digest Hash_ID' and path digest Hash_Path' according to the same rules as the head node, and compare them byte by byte with the Hash_ID and Hash_Path obtained from the signature verification; if any set is inconsistent, it is determined that there is a risk of identity information or path information tampering, the message is directly discarded, and an information tampering alarm is sent to the controller; if both sets are consistent, proceed to the next step S5 to perform identity legality verification. S5: Parse the unique device identifier from the Hash_ID and first query the local tail node authorized identity cache: If the cache hits and the correspondence between the registered unique device identifier, Path ID, and public key is exactly the same as the correspondence between the unique device identifier, Path ID, and public key information obtained from parsing the current message, then the corresponding head node is determined to be an authorized node, and the identity validity verification is passed; if the cache misses, the tail node initiates a query request to the controller via SRv6, and the controller queries its local controller authorized node identity database and returns the result; the tail node determines whether the corresponding head node is an authorized node based on the returned result. If it is determined to be an unauthorized node, the message is directly discarded, and an illegal node access alarm message is sent to the controller; if it is determined to be an authorized node, the corresponding head node is determined to be an authorized node, the identity validity verification is passed, and the process proceeds to S6 to continue parsing the message. S6: For SRv6 messages that pass all verifications, parse the SRH header and IPv6 header according to the existing SRv6 standard process, extract the service payload (if the service payload is encrypted, decrypt it through SM4), and forward the service payload to the target application layer to complete the entire end-to-end authentication and message transmission.

[0108] Correspondingly, the present invention also provides an identity authentication device, referencing Figure 2 As shown, the identity authentication device 200 may include a configuration module 210, an encapsulation module 220, a forwarding module 230, and an authentication module 240. Wherein: Configuration module 210 can be used by the controller to generate a unique device identifier for each node and associate and bind it with the corresponding node; The encapsulation module 220 can be used by the head node to generate an identity digest and a path digest based on its own unique device identifier and the target forwarding path of the service payload, perform a signature and then encryption process on the joint digest composed of the identity digest and the path digest, encapsulate the signature and encryption result and the path digest into the national cryptographic authentication TLV field extended in the SRH header of the SRv6 message, and forward the SRv6 message to the next node. The forwarding module 230 can be used to extract the path digest from the national cryptographic TLV field after the intermediate node receives the SRv6 message, perform path integrity verification based on the path digest, and forward the SRv6 message to the next node after the verification is successful. The authentication module 240 can be used to extract the signature encryption result from the national cryptographic authentication TLV field after the tail node receives the SRv6 message, decrypt and then verify the signature, and verify the integrity of the digest and the legality of the identity. After the verification is passed, the service payload is extracted and forwarded to the target application layer.

[0109] It should be noted that the specific implementation details of the aforementioned identity authentication device have been explained in detail in the corresponding section of the aforementioned identity authentication method, so they will not be repeated here.

[0110] In addition, this embodiment also provides an identity authentication system, referencing Figure 3 As shown, the identity authentication system includes a controller, a head node, intermediate nodes, and a tail node; wherein: The controller is equipped with a key and identity management module, which is used to: generate and issue unique device identifiers for each node, configure national cryptographic algorithm suites and algorithm parameters, generate and distribute key pairs of national cryptographic asymmetric cryptographic algorithms, configure and issue SRv6 path parameters, dynamic key seeds and key algorithm combination identifiers, maintain the controller's authorized node identity database and respond to identity query requests. The head node is deployed with a national cryptographic signature encapsulation module. The national cryptographic signature encapsulation module is used to: generate an identity digest and a path digest based on its own unique device identifier and the target forwarding path of the service payload; perform a signature-then-encryption process on the joint digest composed of the identity digest and the path digest; and encapsulate the signature encryption result, path digest, encapsulation timestamp and key algorithm combination identifier into the national cryptographic authentication TLV field extended in the SRH header of the SRv6 message. The head node is also used to: after encapsulating the SRv6 message corresponding to the service payload through the national cryptographic signature encapsulation module, forward the SRv6 message to the next node based on the target forwarding path; The intermediate node is equipped with a lightweight verification module, which is used to: extract the path digest and encapsulate the timestamp from the national cryptographic TLV field when the intermediate node receives the SRv6 message, and perform path integrity verification and timeliness verification. The intermediate node is also used to: after the lightweight verification module passes the path integrity verification and timeliness verification of the SRv6 packet, forward the SRv6 packet to the next node based on the target forwarding path; The tail node is equipped with a national cryptographic signature verification and authentication module. The national cryptographic signature verification and authentication module is used to: extract the signature encryption result from the national cryptographic authentication TLV field when the tail node receives an SRv6 message, and perform digest integrity verification and identity legality verification. The tail node is also used to: extract the business payload and forward it to the target application layer after the national cryptographic signature verification and authentication module has passed the digest integrity verification and identity legality verification of the SRv6 message.

[0111] It should be noted that the specific implementation details of the above-mentioned identity authentication system have been explained in detail in the corresponding sections of the above-mentioned identity authentication methods, so they will not be repeated here.

[0112] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0113] An electronic device according to the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-mentioned authentication methods. That is, an electronic device according to the present invention may include, but is not limited to: a processor and a memory; the memory is used to store the computer program; the processor is used to execute the authentication method shown in any embodiment of the present invention by calling the computer program.

[0114] In one alternative embodiment, an electronic device is provided, such as Figure 4 As shown, Figure 4The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the present invention.

[0115] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0116] Bus 4002 may include a path for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The bus 4002 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.

[0117] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.

[0118] The memory 4003 stores application code (computer program) for executing the present invention, and its execution is controlled by the processor 4001. The processor 4001 executes the application code stored in the memory 4003 to implement the content shown in the foregoing method embodiments.

[0119] Among them, electronic devices can also be terminal devices, which can be any device that can install applications, including at least one of smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, smart TVs, and smart in-vehicle devices.

[0120] It should be noted that, Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the invention.

[0121] The present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-mentioned authentication methods.

[0122] Alternatively, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc.

[0123] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the aforementioned authentication method.

[0124] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0125] It should be understood that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0126] The computer-readable storage medium provided by this invention can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EEPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0127] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.

[0128] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.

[0129] It should be noted that the terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and represent a limitation on a specific order or sequence. Where appropriate, the order of use for similar objects can be interchanged so that the embodiments of this application described herein can be implemented in an order other than that shown or described.

[0130] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this invention can be specifically implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, this invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.

[0131] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. An identity authentication method, characterized in that, Applied to an identity authentication system, the system including a controller, a head node, intermediate nodes, and a tail node, the method includes: The controller generates a unique device identifier for each node and associates and binds it with the corresponding node. The head node generates an identity digest and a path digest based on its own unique device identifier and the target forwarding path of the service payload. It performs a signature and then encryption process on the joint digest composed of the identity digest and the path digest. It encapsulates the signature and encryption result and the path digest into the national cryptographic authentication TLV field of the SRH header extension of the SRv6 message and forwards the SRv6 message to the next node. After receiving the SRv6 message, the intermediate node extracts the path digest from the national cryptographic authentication TLV field, performs path integrity verification based on the path digest, and forwards the SRv6 message to the next node after the verification is successful. After receiving the SRv6 message, the tail node extracts the signature encryption result from the national cryptographic authentication TLV field, decrypts and verifies the signature, and verifies the digest integrity and identity legitimacy. After the verification is passed, the service payload is extracted and forwarded to the target application layer.

2. The identity authentication method according to claim 1, characterized in that, The controller generates a unique device identifier for each node and binds it to the corresponding node, including: The controller collects the unique hardware identifier of each node, performs a pre-configured national cryptographic hash algorithm on the unique hardware identifier to generate the corresponding unique device identifier, and sends it to the corresponding node; the unique hardware identifier includes the central processing unit serial number and the network card physical address; The unique device identifier is associated and bound with the node identifier and SRv6 device identifier of the corresponding node, and stored in the controller authorized node identity database.

3. The identity authentication method according to claim 2, characterized in that, The method further includes: The controller configures the national cryptographic algorithm suite and its algorithm parameters, and distributes them to each node; the national cryptographic algorithm suite includes the national cryptographic hash algorithm, the national cryptographic asymmetric cryptographic algorithm, and the national cryptographic symmetric cryptographic algorithm; The controller generates an asymmetric key pair for the national cryptographic asymmetric encryption algorithm, sends the private key to the head node, sends the public key to the tail node and stores it in the controller's authorized node identity database, and binds it to the unique device identifier of the head node; The controller configures SRv6 path parameters and sends them to each node. It configures a dynamic key seed for each SRv6 path, associates and binds the dynamic key seed with the path identifier of the corresponding SRv6 forwarding path, and sends it to the corresponding head node and tail node. The controller generates a key algorithm combination identifier for the dynamic key seed and the algorithm parameters matched for the SRv6 forwarding path, associates and binds the dynamic key seed, the algorithm parameters and the key algorithm combination identifier, and sends them to the corresponding head node and tail node.

4. The identity authentication method according to claim 3, characterized in that, The head node generates an identity digest and a path digest based on its own unique device identifier and the target forwarding path of the service payload, including: The head node determines the target forwarding path based on the SRv6 path parameters; The identity digest is generated by combining the unique device identifier of the head node, the path identifier of the target forwarding path, and the encapsulation timestamp corresponding to the current time, and then performing the national cryptographic hash algorithm on the combined string. Based on the path information of the target forwarding path, the SRH header of the SRv6 packet is constructed, and the national cryptographic hash algorithm is executed on the combined string composed of the values ​​of each field in the SRH header to generate the path digest.

5. The identity authentication method according to claim 4, characterized in that, The step of signing and then encrypting the combined digest composed of the identity digest and the path digest includes: The identity digest and the path digest are concatenated byte by byte to obtain the joint digest; Based on the private key, the national standard asymmetric cryptographic algorithm is used to perform a signature operation on the joint digest to generate a signature result; Combine the device's unique identifier and the dynamic key seed, and execute the national cryptographic hash algorithm on the combined string to generate a session key; Based on the session key, the signature result is encrypted using the national standard symmetric cryptography algorithm to generate the encrypted signature result.

6. The identity authentication method according to claim 5, characterized in that, The process of encapsulating the signature encryption result and the path digest into the national cryptographic authentication TLV field of the SRH header extension of the SRv6 message includes: Generate a basic SRv6 packet structure, which includes an IPv6 header, an SRH header, and a service payload; The key algorithm combination identifier matching the session key, the signature encryption result, the encapsulation timestamp, and the path digest are encapsulated into the national cryptographic authentication TLV field; The national cryptographic authentication TLV field and its custom type value and field length are inserted into the TLV extension area of ​​the SRH header to generate the SRv6 message of the service payload.

7. The identity authentication method according to claim 6, characterized in that, The step of extracting the path digest from the national cryptographic certification TLV field and performing path integrity verification based on the path digest includes: Based on the custom type value and field length of the national cryptographic authentication TLV field in the TLV extended region, the national cryptographic authentication TLV field in the SRv6 message is identified; Extract the path digest from the national cryptographic authentication TLV field; The national cryptographic hash algorithm is executed on the combined string composed of the values ​​of each field in the SRH header of the SRv6 message to generate a recalculated path digest; If the path digest and the recalculated path digest match, the path integrity check is deemed to have passed; otherwise, the path integrity check is deemed to have failed.

8. The identity authentication method according to claim 6, characterized in that, After the path integrity verification passes but before forwarding the SRv6 message to the next node, the method further includes: Based on the custom type value and field length of the national cryptographic authentication TLV field in the TLV extended region, the national cryptographic authentication TLV field in the SRv6 message is identified; Extract the encapsulation timestamp from the TLV field of the national cryptographic certification; Determine whether the time interval between the encapsulation timestamp and the current time exceeds a preset time interval. If it does, discard the SRv6 message and send a replay attack alarm to the controller. If the time limit is not exceeded, the timeliness check is deemed to have passed.

9. The identity authentication method according to claim 6, characterized in that, The process of extracting the signature encryption result from the national cryptographic certification TLV field, decrypting and verifying the signature, and verifying the integrity of the digest and the legitimacy of the identity includes: Based on the custom type value and field length of the national cryptographic authentication TLV field in the TLV extended region, the national cryptographic authentication TLV field in the SRv6 message is identified; Extract the signature encryption result from the national cryptographic certification TLV field; Based on the session key, the signature encryption result is decrypted using the national standard symmetric cryptography algorithm. Based on the public key, the signature result obtained by decryption is verified using the national cryptographic asymmetric cryptographic algorithm. After the signature verification is successful, the integrity of the summary and the legitimacy of the identity are verified based on the signature verification result.

10. The identity authentication method according to claim 9, characterized in that, The verification of the digest's integrity and identity legitimacy based on the signature verification result includes: The unique device identifier of the header node, the path identifier of the target forwarding path, and the encapsulation timestamp are combined, and the national cryptographic hash algorithm is executed on the combined string to obtain a recalculated identity digest. The national cryptographic hash algorithm is executed on the combined string composed of the values ​​of each field in the SRH header to obtain the recalculated path digest; The recalculated identity digest is compared with the identity digest restored by signature verification, and the recalculated path digest is compared with the path digest restored by signature verification. If all comparisons are consistent, the verification digest integrity check is passed, and the identity legitimacy check is then performed. Otherwise, discard the SRv6 message and send an information tampering alarm to the controller.

11. The identity authentication method according to claim 10, characterized in that, The execution of identity verification includes: Based on the identity digest, query the unique device identifier of the head node in the tail node authorized node identity database; If the unique device identifier is found in the tail node authorized node identity database, and the bound path identifier and the public key are consistent with those in the SRv6 message, then the identity validity verification is deemed to have passed. If the unique device identifier cannot be found in the tail node authorized node identity database, a query request is sent to the controller; If the path identifier and public key bound to the unique device identifier returned by the controller are consistent with those in the SRv6 message, then the identity validity verification is deemed to have passed. Otherwise, discard the SRv6 message and send an illegal node access alarm to the controller.

12. An identity authentication device, characterized in that, The device is used in an identity authentication system, the system including a controller, a head node, intermediate nodes, and a tail node, and includes: The configuration module is used by the controller to generate a unique device identifier for each node and associate and bind it with the corresponding node; The encapsulation module is used to generate an identity digest and a path digest based on the head node’s unique device identifier and the target forwarding path of the service payload, perform a signature-encryption process on the joint digest composed of the identity digest and the path digest, encapsulate the signature-encryption result and the path digest into the national cryptographic authentication TLV field of the SRH header extension of the SRv6 message, and forward the SRv6 message to the next node. The forwarding module is used to extract the path digest from the national cryptographic authentication TLV field after the intermediate node receives the SRv6 message, perform path integrity verification based on the path digest, and forward the SRv6 message to the next node after the verification is successful. The authentication module is used to extract the signature encryption result from the national cryptographic authentication TLV field after the tail node receives the SRv6 message, decrypt and verify the signature, and verify the integrity of the digest and the legality of the identity. After the verification is passed, the service payload is extracted and forwarded to the target application layer.

13. An identity authentication system, characterized in that, The system includes a controller, a head node, intermediate nodes, and a tail node; wherein: The controller is equipped with a key and identity management module, which is used to: generate and issue unique device identifiers for each node, configure national cryptographic algorithm suites and algorithm parameters, generate and distribute key pairs of national cryptographic asymmetric cryptographic algorithms, configure and issue SRv6 path parameters, dynamic key seeds and key algorithm combination identifiers, maintain the controller authorized node identity database and respond to identity query requests. The head node is deployed with a national cryptographic signature encapsulation module. The national cryptographic signature encapsulation module is used to: generate an identity digest and a path digest based on its own unique device identifier and the target forwarding path of the service payload; perform a signature-then-encryption process on the joint digest composed of the identity digest and the path digest; and encapsulate the signature encryption result, the path digest, the encapsulation timestamp, and the key algorithm combination identifier into the national cryptographic authentication TLV field of the SRH header extension of the SRv6 message. The head node is also used to: after encapsulating the SRv6 message corresponding to the service payload through the national cryptographic signature encapsulation module, forward the SRv6 message to the next node based on the target forwarding path; The intermediate node is equipped with a lightweight verification module, which is used to: when the intermediate node receives the SRv6 message, extract the path digest and the encapsulation timestamp from the national cryptographic certification TLV field, and perform path integrity verification and timeliness verification. The intermediate node is also used to: after the lightweight verification module passes the path integrity verification and timeliness verification of the SRv6 packet, forward the SRv6 packet to the next node based on the target forwarding path; The tail node is equipped with a national cryptographic signature verification and authentication module. The national cryptographic signature verification and authentication module is used to: when the tail node receives the SRv6 message, extract the signature encryption result from the national cryptographic authentication TLV field, and perform digest integrity verification and identity legality verification. The tail node is also used to: extract the service payload and forward it to the target application layer after the national cryptographic signature verification module passes the digest integrity verification and identity legality verification of the SRv6 message.

14. An electronic device, characterized in that, include: processor; Memory for storing the executable instructions of the processor; The processor is configured to execute the instructions to implement the authentication method as described in any one of claims 1 to 11.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the authentication method according to any one of claims 1 to 11.