Methods and systems for implementing quantum-resistant and national cryptographic hybrid certificates in public key infrastructure

By combining encapsulation and dual signature mechanisms, a hybrid public key structure solves the compatibility and flexibility issues of existing public key infrastructures under the threat of quantum computing, achieving dual protection against quantum computing and a smooth transition of the system, thus enhancing the security and adaptability of the cryptographic system.

CN121441498BActive Publication Date: 2026-04-03BEIJING CATHAY INTERNET INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

When facing the threat of quantum computing, the existing public key infrastructure cannot simultaneously meet the dual requirements of quantum security and national cryptographic compliance. Certificate management is complex and the system has poor compatibility. It lacks a flexible verification mechanism and is difficult to adapt to the complex and ever-changing network security environment.

Method used

A hybrid public key structure is generated by combining and encapsulating a first type of public key and a second type of public key. A dual signature mechanism is then used to perform signature operations on the data to be signed using different types of public keys, generating a dual signature structure. Finally, the structure is encapsulated in a structured manner, supporting flexible verification modes.

Benefits of technology

It achieves dual protection for quantum computing, maintains compatibility with existing PKI systems, reduces system upgrade costs, enhances the robustness and sustainability of the cryptographic system, and provides flexible verification options.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121441498B_ABST
    Figure CN121441498B_ABST
Patent Text Reader

Abstract

This invention relates to the field of public key infrastructure (PKI) technology and discloses a method and system for implementing a quantum-resistant hybrid certificate within PKI. The method generates a hybrid public key structure by combining and encapsulating a first type of public key and a second type of public key, and then performs double signing using the corresponding signature algorithm to form a hybrid cryptographic digital certificate. During verification, different types of public keys are used sequentially according to a specific pattern for verification. This method achieves the organic integration of multiple cryptographic systems, improves system compatibility and security, and can cope with the cryptographic threats posed by quantum computing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of public key infrastructure technology, and in particular to a method and system for implementing quantum-resistant and Chinese cryptographic hybrid certificates in public key infrastructure. Background Technology

[0002] With the rapid development of computer technology and cryptography, Public Key Infrastructure (PKI) has become a crucial cornerstone of modern network security and digital identity authentication. PKI establishes a trusted identity authentication mechanism through digital certificates, ensuring the security and reliability of network communication. Traditional PKI is primarily built upon public-key cryptographic algorithms such as RSA and ECC, whose security relies on specific mathematical problems. However, the emergence of quantum computing poses a potential threat to traditional cryptographic systems, particularly Shor's algorithm, which can effectively break cryptographic systems based on factorization and discrete logarithms. Meanwhile, my country's independently developed national cryptographic algorithms (SM series) have been widely applied in the domestic information security field. How to effectively combine quantum-resistant cryptography with national cryptographic algorithms to build a more secure and reliable PKI system has become an important direction for current cryptographic research.

[0003] Existing PKI systems have significant shortcomings in addressing quantum computing threats. Traditional single-cryptographic certificates cannot simultaneously meet the dual requirements of quantum security and compliance with national cryptographic standards, making it difficult to balance security and compliance. The lack of an effective hybrid public key encapsulation mechanism prevents the inclusion and management of multiple key types within a single certificate, leading to complex certificate management and poor system compatibility. Existing certificate verification mechanisms lack flexibility, failing to dynamically adjust verification strategies based on different security needs and application scenarios. This makes them ill-suited to the complex and ever-changing cybersecurity environment, particularly during the transition period as quantum computing technology matures, and they cannot meet the needs of incremental security upgrades. Summary of the Invention

[0004] The embodiments of the present invention provide a method and system for implementing quantum-resistant and national cryptographic hybrid certificates in public key infrastructure, which can at least solve some of the problems existing in the prior art.

[0005] A first aspect of this invention provides a method for implementing quantum-resistant hybrid certificates in a public key infrastructure, comprising:

[0006] Based on predefined key correspondence and structural constraint rules, the first type of public key and the second type of public key of the entity to be authenticated are combined and encapsulated to generate a hybrid public key structure;

[0007] Based on the identifier field and the associated field in the hybrid public key structure, the first signature value is obtained by performing a first signature operation on the data to be signed, which contains identity information and the hybrid public key structure, using a first signature algorithm corresponding to the first type of public key;

[0008] The second signature value is obtained by performing a second signature operation on the combination of the data to be signed and the first signature value using a second signature algorithm corresponding to the second type of public key, thereby generating a dual signature structure containing the first signature value and the second signature value;

[0009] The hybrid public key structure, the dual signature structure, the identity information of the entity to be authenticated, and the certificate validity period information are structurally encapsulated to generate a hybrid cryptographic digital certificate;

[0010] When a verification request for the hybrid cryptographic digital certificate is received, a verification mode is determined, and the first type of public key and the second type of public key are used sequentially to perform verification operations on the dual signature structure according to the verification mode to generate a verification result.

[0011] Based on predefined key correspondence and structural constraints, the first type of public key and the second type of public key of the entity to be authenticated are combined and encapsulated to generate a hybrid public key structure, including:

[0012] Based on the predefined key correspondence, cryptographic type identification is performed on the first type public key and the second type public key respectively, and a first type identifier is assigned to the first type public key and a second type identifier is assigned to the second type public key, thereby generating a key type mapping table;

[0013] Based on the structural constraint rules, the hierarchical positional relationship and byte order arrangement rules of the first type of public key and the second type of public key in the hybrid public key structure are determined, and a structural layout scheme is generated;

[0014] Based on the first type identifier and the second type identifier in the key type mapping table, and the priority field in the structure layout scheme, determine the association field used to indicate the verification order dependency relationship between the first type public key and the second type public key;

[0015] The first type of public key, the second type of public key, the first type identifier and the second type identifier in the key type mapping table, the priority field in the structure layout scheme, and the associated field are serialized and combined according to the byte order arrangement rules in the structure layout scheme to generate the hybrid public key structure.

[0016] Based on the structural constraint rules, the hierarchical position relationship and byte order arrangement rules of the first type of public key and the second type of public key in the hybrid public key structure are determined, and a structural layout scheme is generated, including:

[0017] The structural constraint rules are parsed to extract the constraints used to define the mapping relationship between cryptographic system type and hierarchical position, as well as the arrangement constraints used to define the byte order arrangement method, and a set of constraint parameters is generated.

[0018] Based on the constraints in the set of constraint parameters, the first type of public key is assigned to a first-level position in the hybrid public key structure, and the second type of public key is assigned to a second-level position in the hybrid public key structure, thereby generating a hierarchical position mapping relationship;

[0019] Based on the arrangement constraints in the constraint parameter set and the hierarchical position mapping relationship, the starting offset position and length field position of the first type public key and the second type public key in the byte stream are determined, and a byte order arrangement rule is generated.

[0020] Based on the hierarchical position mapping relationship, corresponding priority identifiers are assigned to the first level position and the second level position respectively, and combined to form the priority field. The hierarchical position mapping relationship, the byte order arrangement rule and the priority field are encapsulated into the structural layout scheme.

[0021] Based on the identifier field and association field in the hybrid public key structure, a first signature value is obtained by performing a first signature operation on the data to be signed, which contains identity information and the hybrid public key structure, using a first signature algorithm corresponding to the first type of public key, including:

[0022] Extract the identifier field from the hybrid public key structure, parse the identifier field to obtain the type identifier information of the first type of public key and the type identifier information of the second type of public key, and generate a type identifier set;

[0023] Extract the association field from the hybrid public key structure, parse the association field to obtain association indication information indicating the verification order dependency relationship between the first type of public key and the second type of public key, and generate a verification order dependency table;

[0024] Based on the type identifier information in the type identifier set and the association indication information in the verification order dependency table, the first signature algorithm corresponding to the first type public key is determined, and the algorithm parameter configuration information required by the first signature algorithm is obtained;

[0025] The identity information and the hybrid public key structure are concatenated according to predefined data organization rules, and a sequence marker representing the verification order is inserted into the concatenated data according to the association indication information in the verification order dependency table to generate the data to be signed;

[0026] The first signature algorithm and the algorithm parameter configuration information are used to perform a signature operation on the data to be signed, thereby generating the first signature value.

[0027] Using a second signature algorithm corresponding to the second type of public key, a second signature operation is performed on the combination of the data to be signed and the first signature value to obtain a second signature value, generating a dual signature structure containing the first signature value and the second signature value, including:

[0028] The data to be signed is combined with the first signature value according to a predefined data concatenation order, and a separator mark used to identify the data boundary is inserted between the data to be signed and the first signature value to generate the combined data;

[0029] Based on the identifier field in the hybrid public key structure, determine the second signature algorithm corresponding to the second type of public key, and obtain the algorithm parameter configuration information required by the second signature algorithm;

[0030] The combined data is signed using the second signature algorithm and the algorithm parameter configuration information to generate the second signature value, wherein the second signature value covers the entire contents of the data to be signed and the first signature value.

[0031] The first signature value and the second signature value are combined according to a predefined signature value arrangement order, and an association identifier is attached to indicate the verification dependency relationship between the first signature value and the second signature value to generate the dual signature structure.

[0032] The hybrid public key structure, the dual signature structure, the identity information of the entity to be authenticated, and the certificate validity period information are structurally encapsulated to generate a hybrid cryptographic digital certificate, including:

[0033] Based on the number of cryptosystem types contained in the hybrid public key structure and the number of signature values ​​contained in the dual signature structure, a certificate structure template adapted to multiple cryptosystems is determined;

[0034] Based on the identifier field in the hybrid public key structure, the association field, and the association identifier in the dual signature structure that indicates the verification dependency between the first signature value and the second signature value, the cryptographic association mapping relationship between the hybrid public key structure and the dual signature structure is determined, and an association mapping table is generated;

[0035] The hybrid public key structure, the dual signature structure, the identity information of the entity to be authenticated, and the certificate validity information are respectively filled into the corresponding field areas of the certificate structure template, and the association mapping table is inserted between the public key field area and the signature field area.

[0036] The completed certificate structure template is encapsulated for integrity. A structure association identifier is added to the certificate structure template to identify the correspondence between the hybrid public key structure and the dual signature structure, thereby generating the hybrid cryptographic digital certificate.

[0037] Based on the identifier field in the hybrid public key structure, the association field, and the association identifier in the dual signature structure indicating the verification dependency between the first signature value and the second signature value, the cryptographic association mapping relationship between the hybrid public key structure and the dual signature structure is determined, and an association mapping table is generated, including:

[0038] Extract the type identifier of the first type public key and the type identifier of the second type public key from the identifier field; extract the signature type identifier of the first signature value and the signature type identifier of the second signature value from the associated identifier.

[0039] The type identifier of the first type of public key is matched with the signature type identifier of the first signature value to establish a first mapping relationship, and the type identifier of the second type of public key is matched with the signature type identifier of the second signature value to establish a second mapping relationship;

[0040] Extract order information indicating the verification order between the first type of public key and the second type of public key from the association field, and embed the order information into the combined structure of the first mapping relationship and the second mapping relationship to obtain the cryptographic association mapping relationship containing verification order constraints;

[0041] The first and second mapping relationships in the cryptographic association mapping relationship are organized according to a predefined table structure to obtain the association mapping table.

[0042] A second aspect of the present invention provides a quantum-resistant hybrid certificate implementation system in a public key infrastructure, comprising:

[0043] The first unit is used to combine and encapsulate the first type of public key and the second type of public key of the entity to be authenticated, based on predefined key correspondence and structural constraint rules, to generate a hybrid public key structure.

[0044] The second unit is used to perform a first signature operation on the data to be signed, which contains identity information and the hybrid public key structure, based on the identifier field and the association field in the hybrid public key structure, and using a first signature algorithm corresponding to the first type of public key to obtain a first signature value.

[0045] The third unit is used to perform a second signature operation on the combination of the data to be signed and the first signature value using a second signature algorithm corresponding to the second type of public key to obtain a second signature value, thereby generating a dual signature structure containing the first signature value and the second signature value;

[0046] The fourth unit is used to structurally encapsulate the hybrid public key structure, the dual signature structure, the identity information of the entity to be authenticated, and the certificate validity period information to generate a hybrid cryptographic digital certificate;

[0047] The fifth unit is used to, when receiving a verification request for the hybrid cryptographic digital certificate, determine the verification mode and, according to the verification mode, sequentially use the first type of public key and the second type of public key to perform verification operations on the dual signature structure and generate a verification result.

[0048] A third aspect of the present invention provides an electronic device, comprising:

[0049] processor;

[0050] Memory used to store processor-executable instructions;

[0051] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0052] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0053] This invention combines and encapsulates a first type of public key with a second type of public key to form a hybrid public key structure, and employs a dual signature mechanism to achieve dual protection for cryptographic algorithms, effectively addressing the potential threat of quantum computing technology to traditional cryptographic systems.

[0054] By encapsulating different types of public keys and signature values ​​in a structured manner, the certificate structure becomes clear and unified, while maintaining compatibility with the existing PKI system. This facilitates a smooth transition and deployment on existing infrastructure and reduces system upgrade costs.

[0055] This invention supports flexible verification modes, allowing for the selection of appropriate verification paths based on actual security needs. While ensuring security, it provides more options for different application scenarios, enhances the robustness and sustainability of the cryptographic system, and provides technical protection for the long-term security of cryptographic infrastructure. Attached Figure Description

[0056] Figure 1 This is a flowchart illustrating the method for implementing a quantum-resistant hybrid certificate in a public key infrastructure according to an embodiment of the present invention.

[0057] Figure 2 This is a flowchart illustrating the process of determining the structural layout scheme according to an embodiment of the present invention. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0059] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0060] Figure 1 This is a flowchart illustrating a method for implementing a quantum-resistant hybrid certificate in a public key infrastructure according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0061] Based on predefined key correspondence and structural constraint rules, the first type of public key and the second type of public key of the entity to be authenticated are combined and encapsulated to generate a hybrid public key structure;

[0062] Based on the identifier field and the associated field in the hybrid public key structure, the first signature value is obtained by performing a first signature operation on the data to be signed, which contains identity information and the hybrid public key structure, using a first signature algorithm corresponding to the first type of public key;

[0063] The second signature value is obtained by performing a second signature operation on the combination of the data to be signed and the first signature value using a second signature algorithm corresponding to the second type of public key, thereby generating a dual signature structure containing the first signature value and the second signature value;

[0064] The hybrid public key structure, the dual signature structure, the identity information of the entity to be authenticated, and the certificate validity period information are structurally encapsulated to generate a hybrid cryptographic digital certificate;

[0065] When a verification request for the hybrid cryptographic digital certificate is received, a verification mode is determined, and the first type of public key and the second type of public key are used sequentially to perform verification operations on the dual signature structure according to the verification mode to generate a verification result.

[0066] In one optional implementation, based on predefined key correspondence and structural constraint rules, the first type of public key and the second type of public key of the entity to be authenticated are combined and encapsulated to generate a hybrid public key structure, including:

[0067] Based on the predefined key correspondence, cryptographic type identification is performed on the first type public key and the second type public key respectively, and a first type identifier is assigned to the first type public key and a second type identifier is assigned to the second type public key, thereby generating a key type mapping table;

[0068] Based on the structural constraint rules, the hierarchical positional relationship and byte order arrangement rules of the first type of public key and the second type of public key in the hybrid public key structure are determined, and a structural layout scheme is generated;

[0069] Based on the first type identifier and the second type identifier in the key type mapping table, and the priority field in the structure layout scheme, determine the association field used to indicate the verification order dependency relationship between the first type public key and the second type public key;

[0070] The first type of public key, the second type of public key, the first type identifier and the second type identifier in the key type mapping table, the priority field in the structure layout scheme, and the associated field are serialized and combined according to the byte order arrangement rules in the structure layout scheme to generate the hybrid public key structure.

[0071] Before encapsulating public keys, a key mapping database and a structural constraint rule database need to be established in advance. The key mapping database stores the characteristic information of various types of public keys, such as the modulus length of RSA public keys and the curve parameters of elliptic curve public keys. The structural constraint rule database defines the arrangement, priority relationship, and verification dependency logic of different types of public keys in the hybrid structure.

[0072] For the public keys to be combined, first obtain the original data of the first type of public key and the second type of public key. Taking a practical application scenario as an example, the first type of public key can be a 2048-bit RSA public key, whose original data includes the modulus n and the public key exponent e; the second type of public key can be an ECDSA public key based on the P-256 curve, which includes the coordinates (x, y) of the curve point.

[0073] Based on a predefined key mapping relationship, the cryptographic characteristics of the first and second type public keys are analyzed. By examining the length, format, and structural characteristics of the first type public key, it is confirmed to be of RSA type and assigned the type identifier "0x01". Similarly, by analyzing the characteristic parameters of the second type public key, it is confirmed to be of ECDSA type and assigned the identifier "0x02". These identification results are recorded in the key type mapping table, forming a mapping relationship of {RSA:0x01, ECDSA:0x02}.

[0074] After key type mapping is completed, the layout of public keys in the hybrid structure is determined according to structural constraint rules. These rules specify the hierarchical position of the public keys; for example, placing RSA public keys at the top level and ECDSA public keys at the second level. The rules also define the byte order, such as using big-endian byte order for encoding. Based on this, a structural layout scheme is generated, including the position index of each public key, the representation method of the length field, and reserved space for extension fields.

[0075] To ensure the integrity of the hybrid public key structure and the verification logic, a priority field and an association field need to be set. The priority field indicates the verification order of different public keys. For example, the priority of an RSA public key can be set to 0x01 (high priority), and the priority of an ECDSA public key can be set to 0x02 (lower priority). The association field indicates the verification dependency between public keys. For example, setting the association value to 0x03 means that both public keys need to be verified simultaneously to pass authentication.

[0076] In a practical example, the association field can be calculated using bitwise operations: Association value = Type 1 identifier | Type 2 identifier, i.e., 0x01 | 0x02 = 0x03. This value indicates that both public keys must be verified successfully for the entire hybrid public key to be considered successfully verified.

[0077] After the structural layout design is completed, the serialization and assembly process begins. First, a header field is written, containing a 4-byte magic number 0x4D504B53 (representing "MPKS", an abbreviation for Mixed Public Key Structure), followed by a 2-byte version number "0x0100" (representing version 1.0).

[0078] Next, following the arrangement rules of the structural layout scheme, write the following data in sequence:

[0079] Total number of public keys: 1 byte, value 0x02, indicating that it contains two public keys;

[0080] First type identifier: 1 byte, value 0x01 (RSA);

[0081] The first type of public key length is 4 bytes, for example, 0x00000100 represents a length of 256 bytes;

[0082] Type 1 public key data: Variable length, containing the actual binary data of the RSA public key;

[0083] Second type identifier: 1 byte, value 0x02 (ECDSA);

[0084] The second type of public key length is 4 bytes, for example, 0x00000040 represents a length of 64 bytes;

[0085] Type 2 public key data: Variable length, containing the actual binary data of the ECDSA public key;

[0086] Priority field: 2 bytes, for example, 0x0102 indicates that the RSA priority is 1 and the ECDSA priority is 2;

[0087] Association field: 1 byte, value 0x03, indicating the verification association between the two public keys.

[0088] A checksum field is also added at the end of the structure. The hash value of all the aforementioned data is calculated using the SHA-256 algorithm, and the first 4 bytes are taken as the checksum to ensure the integrity of the hybrid public key structure.

[0089] The final generated hybrid public key structure is a binary data block containing multiple fields. It can be serialized into a file or transmitted over a network. When the verification system receives this hybrid public key structure, it can correctly parse out the different types of public keys contained therein based on the type identifier, priority field, and association field, and execute the authentication process according to the specified verification logic.

[0090] This hybrid public-key structure design can adapt to scenarios where multiple cryptographic technologies coexist, and is especially suitable for systems that need to support smooth migration of cryptographic algorithms or multiple authentication, such as the use of classical cryptography and post-quantum cryptography in quantum-safe communication.

[0091] In one optional implementation, based on the structural constraint rules, the hierarchical position relationship and byte order arrangement rules of the first type of public key and the second type of public key in the hybrid public key structure are determined, and a structural layout scheme is generated, including:

[0092] The structural constraint rules are parsed to extract the constraints used to define the mapping relationship between cryptographic system type and hierarchical position, as well as the arrangement constraints used to define the byte order arrangement method, and a set of constraint parameters is generated.

[0093] Based on the constraints in the set of constraint parameters, the first type of public key is assigned to a first-level position in the hybrid public key structure, and the second type of public key is assigned to a second-level position in the hybrid public key structure, thereby generating a hierarchical position mapping relationship;

[0094] Based on the arrangement constraints in the constraint parameter set and the hierarchical position mapping relationship, the starting offset position and length field position of the first type public key and the second type public key in the byte stream are determined, and a byte order arrangement rule is generated.

[0095] Based on the hierarchical position mapping relationship, corresponding priority identifiers are assigned to the first level position and the second level position respectively, and combined to form the priority field. The hierarchical position mapping relationship, the byte order arrangement rule and the priority field are encapsulated into the structural layout scheme.

[0096] Figure 2 This is a flowchart illustrating the process of determining a structural layout scheme according to an embodiment of the present invention. Figure 2 As shown, to generate a hybrid public key structure, the structural constraint rules are first parsed. These rules are typically stored in JSON or XML format and contain constraint information such as the mapping relationship between cryptographic types and hierarchical positions, and byte order. Specifically, the structural constraint rule file is read, and the defined constraints are extracted. For example, constraints may specify: "ECC type public keys should be located in the first level position," "RSA type public keys should be located in the second level position," and "big-endian byte order should be used." The parsing engine then converts these text rules into a set of machine-processable constraint parameters. Each constraint parameter contains three parts: constraint type, constraint object, and constraint value. For example, for the rule "ECC type public keys should be located in the first level position," its constraint parameters can be represented as {constraint type: hierarchical position, constraint object: ECC public key, constraint value: first level}.

[0097] After parsing, hierarchical positions are assigned based on the constraints in the constraint parameter set. Assuming the first type of public key is an ECC public key and the second type of public key is an RSA public key, according to the hierarchical constraints in the constraint parameter set, the ECC public key is assigned to the first level position in the hybrid public key structure, and the RSA public key is assigned to the second level position. The resulting hierarchical position mapping can then be represented as: {Public key type: ECC, Hierarchical position: 1} and {Public key type: RSA, Hierarchical position: 2}. This hierarchical position mapping ensures a clear organizational relationship between different types of public keys in the hybrid structure, facilitating subsequent processing and verification.

[0098] After the hierarchical location mapping is determined, the specific arrangement of each type of public key in the byte stream is determined according to the arrangement constraints in the constraint parameter set. The byte order arrangement rule determines how the public key data is arranged in memory or during transmission, including information such as the starting offset position and the position of the length field. For example, for the big-endian byte order rule, the following byte order arrangement rule is generated: the ECC public key starts at byte offset 0, its length field is located in the 4 bytes from offset 0 to 3, and the public key data follows immediately after; the RSA public key starts in the byte after the end of the ECC public key, and its length field is located in the 4 bytes before its starting position. Taking specific data as an example, if the ECC public key length is 64 bytes and the RSA public key length is 256 bytes, then the ECC public key data occupies offsets 4-67 bytes, the RSA public key length information occupies offsets 68-71 bytes, and the RSA public key data occupies offsets 72-327 bytes.

[0099] To enable flexible selection of different cryptographic schemes based on security requirements in applications, priority identifiers need to be assigned to different levels of access. These priority identifiers reflect the order in which different types of public keys are used during the verification process. In this embodiment, based on the hierarchical mapping relationship, a priority identifier "1" is assigned to the first-level access (ECC public key), and a priority identifier "2" is assigned to the second-level access (RSA public key). These priority identifiers are then combined to form a priority field "1:2". This means that during the verification process, the ECC public key should be attempted first; if verification fails, the RSA public key should be attempted instead.

[0100] Finally, the hierarchical mapping relationships, byte order rules, and priority fields are encapsulated into a complete structural layout scheme. This scheme can be represented as a data structure containing multiple fields, such as {layerMapping:[{type:ECC, layer:1}, {type:RSA, layer:2}], byteOrder:{endian:big, offsets:[{type:ECC, start:0, lengthField:0}, {type:RSA, start:68, lengthField:68}]},priority:1:2}. This structural layout scheme will guide the subsequent construction and use of the hybrid public key.

[0101] In practical applications, when generating a hybrid public key, different types of public key data are organized according to the above structural layout scheme. For example, for a hybrid structure containing both ECC and RSA public keys, the ECC public key length (e.g., 0x00000040, decimal 64) is written first, followed by the ECC public key data (64 bytes), then the RSA public key length (e.g., 0x00000100, decimal 256), and finally the RSA public key data (256 bytes). Simultaneously, the priority field "1:2" is written to the metadata portion of the hybrid public key structure to guide the verification process. When the receiver receives this hybrid public key, it can correctly parse the public keys according to the byte order rules and determine the verification order based on the priority field.

[0102] This approach enables flexible combinations of public keys from different cryptographic schemes, improving the compatibility and security of the cryptographic system while ensuring efficient data processing and transmission.

[0103] In one optional implementation, based on the identifier field and association field in the hybrid public key structure, a first signature value is obtained by performing a first signature operation on the data to be signed, which contains identity information and the hybrid public key structure, using a first signature algorithm corresponding to the first type of public key. This includes:

[0104] Extract the identifier field from the hybrid public key structure, parse the identifier field to obtain the type identifier information of the first type of public key and the type identifier information of the second type of public key, and generate a type identifier set;

[0105] Extract the association field from the hybrid public key structure, parse the association field to obtain association indication information indicating the verification order dependency relationship between the first type of public key and the second type of public key, and generate a verification order dependency table;

[0106] Based on the type identifier information in the type identifier set and the association indication information in the verification order dependency table, the first signature algorithm corresponding to the first type public key is determined, and the algorithm parameter configuration information required by the first signature algorithm is obtained;

[0107] The identity information and the hybrid public key structure are concatenated according to predefined data organization rules, and a sequence marker representing the verification order is inserted into the concatenated data according to the association indication information in the verification order dependency table to generate the data to be signed;

[0108] The first signature algorithm and the algorithm parameter configuration information are used to perform a signature operation on the data to be signed, thereby generating the first signature value.

[0109] In this embodiment, based on the identifier field and the associated field in the hybrid public key structure, the first signature algorithm corresponding to the first type of public key is used to perform a first signature operation on the data to be signed, which contains identity information and the hybrid public key structure, to generate a first signature value, as follows:

[0110] Extract the identifier field from the hybrid public key structure. This identifier field contains identification information for multiple public key types. For example, the identifier field in the hybrid public key structure can be a data structure containing multiple key-value pairs, where the key represents the public key index and the value represents the corresponding public key type. Assuming the identifier field contains {1:RSA, 2:ECDSA}, it means that index 1 corresponds to an RSA type public key and index 2 corresponds to an ECDSA type public key. By parsing this field, obtain the type identifier information for the first type public key "RSA" and the second type public key "ECDSA", and organize this information into a type identifier set {RSA, ECDSA}.

[0111] Next, the association field is extracted from the hybrid public key structure. This field indicates the verification order dependency between different types of public keys. The association field can be represented as a directed graph or dependency matrix. For example, the association field content is {1->2}, which means that the verification of the public key at index 1 (RSA) must be performed before the verification of the public key at index 2 (ECDSA). After parsing this field, a verification order dependency table is generated, recording the sequential verification relationship between public keys. For example, "RSA->ECDSA" means that RSA verification must be performed before ECDSA verification.

[0112] Based on the type identifier information in the obtained type identifier set and the association indication information in the verification order dependency table, the first signature algorithm corresponding to the first type public key is determined. In the example above, the first type public key is determined to be "RSA", and the corresponding signature algorithm is "RSASSA-PKCS1-v1_5". At the same time, the algorithm parameter configuration information required for this signature algorithm is obtained, such as the hash algorithm type "SHA-256", the padding mode "PKCS#1", and the key length "2048 bits".

[0113] The identity information and the hybrid public key structure are concatenated according to predefined data organization rules to generate the data to be signed. Assume the identity information is a JSON structure containing the user identifier "user123456" and the timestamp "2023-05-15T14:30:00Z", and the hybrid public key structure is the same data structure containing the identifier field and the association field. These two parts of information are concatenated according to predefined rules, for example, using JSON format:

[0114] {identity:{userId:user123456,timestamp:2023-05-15T14:30:00Z},pubKeyStructure:{identifiers:{1:RSA,2:ECDSA},relations:{1->2}}}.

[0115] Based on the association information in the verification order dependency table, sequence markers representing the verification order are inserted into the concatenated data. For example, a "verificationOrder" field with a value of [1,2] is added to the data to be signed, indicating that the verification order is to verify index 1 (RSA) first, then index 2 (ECDSA). The final generated data to be signed is as follows:

[0116] {identity:{userId:user123456,timestamp:2023-05-15T14:30:00Z},pubKeyStructure:{identifiers:{1:RSA,2:ECDSA},relations:{1->2}},verificationOrder:[1,2]}.

[0117] The data to be signed is serialized and converted into a byte array. For JSON data, spaces and newlines are removed to generate a compact JSON string, which is then converted into a UTF-8 encoded byte array.

[0118] The signature operation is performed on the byte array of data to be signed using a first signature algorithm (such as RSASA-PKCS1-v1_5) and algorithm parameter configuration information (such as SHA-256 hash algorithm, PKCS#1 padding, and 2048-bit key length). The specific process includes: calculating the hash value of the data to be signed using the SHA-256 algorithm; processing the hash value according to the PKCS#1 padding pattern; and encrypting the padded data using the RSA private key to generate a signature value.

[0119] The final generated first signature value is a 256-byte binary data, which is usually Base64 encoded into a string for transmission and storage, such as "dGhpcyBpcyBhbiBleGFtcGxlIHNpZ25hdHVyZSB2YWx1ZSBmb3IgZGVtb25zdHJhdGlvbiBwdXJwb3Nlcywgbm90IGEgcmVhbCBzaWduYXR1cmU=".

[0120] Through the above steps, the entire process of performing a first signature operation on the data to be signed, containing identity information and the hybrid public key structure, using the first signature algorithm corresponding to the first type of public key, based on the identifier field and the association field in the hybrid public key structure, and obtaining the first signature value, is completed. This method allows support for multiple signature algorithms within a unified framework and enhances the security and flexibility of the system by verifying sequential dependencies.

[0121] In one optional implementation, a second signature value is obtained by performing a second signature operation on the combination of the data to be signed and the first signature value using a second signature algorithm corresponding to the second type of public key, thereby generating a dual signature structure containing the first signature value and the second signature value, including:

[0122] The data to be signed is combined with the first signature value according to a predefined data concatenation order, and a separator mark used to identify the data boundary is inserted between the data to be signed and the first signature value to generate the combined data;

[0123] Based on the identifier field in the hybrid public key structure, determine the second signature algorithm corresponding to the second type of public key, and obtain the algorithm parameter configuration information required by the second signature algorithm;

[0124] The combined data is signed using the second signature algorithm and the algorithm parameter configuration information to generate the second signature value, wherein the second signature value covers the entire contents of the data to be signed and the first signature value.

[0125] The first signature value and the second signature value are combined according to a predefined signature value arrangement order, and an association identifier is attached to indicate the verification dependency relationship between the first signature value and the second signature value to generate the dual signature structure.

[0126] This implementation method ensures the integrity and non-repudiation of data during transmission by using a hybrid public key structure and a dual signature mechanism.

[0127] In this implementation, a hybrid public key structure containing a first type of public key and a second type of public key is first received. This structure contains an identification field to distinguish between different types of public keys. An example of a hybrid public key structure can be represented as: {type_1: RSA, key_1: MIIBIjANBgk..., type_2: ECDSA, key_2: MFkwEwYH...}, where type_1 and type_2 represent the algorithm types of the first and second types of public keys, respectively, and key_1 and key_2 are the corresponding public key values.

[0128] Then, the data to be signed is obtained, such as a transaction message: "transfer_amount=100&to_account=account1234×tamp=1623456789". Based on the first type of public key information in the hybrid public key structure, the corresponding first signature algorithm is determined. If the value of the identifier field type_1 is RSA, then the RSA signature algorithm is used; if the value is ECDSA, then the ECDSA signature algorithm is used. In this embodiment, it is assumed that the first signature algorithm is RSA.

[0129] Obtain the parameter configuration information required for the first signature algorithm, such as the key length (2048 bits), padding mode (PKCS1), and digest algorithm (SHA256) for the RSA algorithm. Use these parameters and the data to be signed to execute the first signature algorithm and generate the first signature value. In this example, the first signature value can be represented as a hexadecimal string: "A7D8E2F4B1C9D6E3A2B1C8D7E6F5A4B3C2D1E0F9...".

[0130] Next, the data to be signed and the first signature value are combined according to a predefined data concatenation order, and a separator is inserted between them. Assuming the predefined concatenation order is data to be signed, separator, and first signature value, and the separator is "||", the combined data is: "transfer_amount=100&to_account=account1234×tamp=1623456789||A7D8E2F4B1C9D6E3A2B1C8D7E6F5A4B3C2D1E0F9...".

[0131] Based on the identifier field `type_2` in the hybrid public key structure, determine the second signature algorithm corresponding to the second type of public key. In this example, assuming `type_2` is ECDSA, then the ECDSA signature algorithm will be used. Obtain the parameter configuration information required for the ECDSA algorithm, such as the curve type (secp256k1) and the digest algorithm (SHA256).

[0132] The combined data is signed using the ECDSA algorithm and corresponding parameter configuration information to generate a second signature value, such as "3045022100F4E5D6C7B8A9...". This second signature value covers the entire content of the data to be signed and the first signature value, ensuring the integrity of the entire data packet.

[0133] The first and second signature values ​​are combined according to a predefined signature value order, assuming the predetermined order is first signature value, then second signature value, and an association identifier is attached to indicate the verification dependency between the signature values. The association identifier can be a JSON structure, such as: {verify_sequence: sequential,dependency: second_covers_first}, indicating that during verification, the second signature value should be verified first (covering all content), and then the first signature value should be verified (covering only the original data).

[0134] The final generated double signature structure is a complete data structure containing the original data, two signature values ​​and their associated information: {original_data: transfer_amount=100&to_account=account1234×tamp=1623456789, signature_1: A7D8E2F4B1C9D6E3A2B1C8D7E6F5A4B3C2D1E0F9...,signature_2: 3045022100F4E5D6C7B8A9..., relation: {verify_sequence:sequential, dependency: second_covers_first}}.

[0135] To verify this double signature, the verifier must first use a second type of public key (ECDSA public key) to verify whether the second signature value covers the combined data of the data to be signed and the first signature value. After successful verification, the verifier then uses a first type of public key (RSA public key) to verify whether the first signature value correctly signs the original data to be signed. Only when both verifications pass can the integrity and non-repudiation of the data be confirmed.

[0136] The advantage of this dual-signature structure is that even if one signature algorithm is compromised, the other algorithm can still ensure data security. For example, if the RSA algorithm is compromised due to breakthroughs in quantum computing, the ECDSA algorithm can still provide protection. Furthermore, dual signatures allow different entities (such as users and platforms) to sign using their respective private keys, enhancing the reliability of identity authentication and making it suitable for high-security scenarios such as financial transactions and smart contracts.

[0137] In one optional implementation, the hybrid public key structure, the dual signature structure, the identity information of the entity to be authenticated, and the certificate validity period information are structurally encapsulated to generate a hybrid cryptographic digital certificate, including:

[0138] Based on the number of cryptosystem types contained in the hybrid public key structure and the number of signature values ​​contained in the dual signature structure, a certificate structure template adapted to multiple cryptosystems is determined;

[0139] Based on the identifier field in the hybrid public key structure, the association field, and the association identifier in the dual signature structure that indicates the verification dependency between the first signature value and the second signature value, the cryptographic association mapping relationship between the hybrid public key structure and the dual signature structure is determined, and an association mapping table is generated;

[0140] The hybrid public key structure, the dual signature structure, the identity information of the entity to be authenticated, and the certificate validity information are respectively filled into the corresponding field areas of the certificate structure template, and the association mapping table is inserted between the public key field area and the signature field area.

[0141] The completed certificate structure template is encapsulated for integrity. A structure association identifier is added to the certificate structure template to identify the correspondence between the hybrid public key structure and the dual signature structure, thereby generating the hybrid cryptographic digital certificate.

[0142] In the specific implementation process, it is first necessary to obtain the hybrid public key structure and the dual signature structure. The hybrid public key structure contains public key information for multiple cryptosystems. Each cryptosystem's public key information includes an identifier field to indicate the cryptosystem type and an association field to establish the association relationship between public keys of different cryptosystems. For example, the hybrid public key structure contains an RSA public key and an SM2 public key, where the identifier field value of the RSA public key is 1, the identifier field value of the SM2 public key is 2, and the association field of both is A001, indicating that they belong to the same entity. The dual signature structure contains a first signature value and a second signature value, as well as an association identifier indicating the verification dependency relationship between these two signature values.

[0143] Based on the number of cryptosystem types included in the hybrid public key structure and the number of signature values ​​in the dual signature structure, a certificate structure template suitable for multiple cryptosystems is determined. If the hybrid public key structure contains two cryptosystem types (such as RSA and SM2) and the dual signature structure contains two signature values, a certificate template supporting two public keys and two signatures will be selected. This template includes fields such as version number, serial number, signature algorithm, issuer, validity period, subject, public key information, extension, and signature.

[0144] Next, based on the identifier and association fields in the hybrid public key structure, and the association identifier in the dual signature structure, the cryptographic association mapping relationship between the hybrid public key structure and the dual signature structure is determined, and an association mapping table is generated. This table records the correspondence between each public key and its corresponding signature. For example, for an RSA public key with an identifier field of 1, its corresponding signature value is the first signature value; for an SM2 public key with an identifier field of 2, its corresponding signature value is the second signature value. The association mapping table also contains verification order information, indicating which signature should be verified first during certificate verification.

[0145] Subsequently, the hybrid public key structure, dual signature structure, identity information of the entity to be authenticated, and certificate validity information are filled into the corresponding field areas of the certificate structure template. Specifically, the identity information of the entity to be authenticated, such as the organization name "Test Organization," the organization unit "R&D Department," and the general name "Test Certificate," is filled into the body area; the certificate validity information, such as "2023-01-01 00:00:00" to "2025-01-01 00:00:00," is filled into the validity area; the hybrid public key structure is filled into the public key information area, including the RSA public key (modulus n=9876543210, public index e=65537) and the SM2 public key (x-coordinate=1234567890, y-coordinate=0987654321); and the dual signature structure is filled into the signature area. Simultaneously, the generated association mapping table is inserted into the extended area between the public key field area and the signature field area to help certificate users understand the correspondence between the public key and the signature.

[0146] Finally, the completed certificate structure template undergoes integrity encapsulation. A structure association identifier is added to the template to identify the correspondence between the hybrid public key structure and the dual-signature structure. This structure association identifier is set to a unique identifier, such as "MPC-DS-001," indicating that this is a hybrid public key and dual-signature certificate. The hash value of the certificate content is also calculated as an integrity checksum and appended to the end of the certificate. After these processes, the final hybrid cryptosystem digital certificate is generated. This certificate is encoded in binary using the DER (Distinguished Encoding Rules) encoding format, and the final generated file size is approximately 2KB.

[0147] The hybrid cryptographic digital certificate generated using the above method can simultaneously support multiple cryptographic algorithms, improving the certificate's security and applicability. In practical applications, even if one cryptographic algorithm is compromised, another algorithm can still ensure the certificate's security, thereby enhancing the overall system security. This certificate can be used in various scenarios such as e-government, financial transactions, and internal enterprise authentication, meeting the needs of different security levels and compliance requirements.

[0148] In one optional implementation, based on the identifier field in the hybrid public key structure, the association field, and the association identifier in the dual signature structure indicating the verification dependency between the first signature value and the second signature value, a cryptographic association mapping relationship between the hybrid public key structure and the dual signature structure is determined, and an association mapping table is generated, including:

[0149] Extract the type identifier of the first type public key and the type identifier of the second type public key from the identifier field; extract the signature type identifier of the first signature value and the signature type identifier of the second signature value from the associated identifier.

[0150] The type identifier of the first type of public key is matched with the signature type identifier of the first signature value to establish a first mapping relationship, and the type identifier of the second type of public key is matched with the signature type identifier of the second signature value to establish a second mapping relationship;

[0151] Extract order information indicating the verification order between the first type of public key and the second type of public key from the association field, and embed the order information into the combined structure of the first mapping relationship and the second mapping relationship to obtain the cryptographic association mapping relationship containing verification order constraints;

[0152] The first and second mapping relationships in the cryptographic association mapping relationship are organized according to a predefined table structure to obtain the association mapping table.

[0153] When implementing the cryptographic association mapping between the hybrid public key structure and the dual signature structure, the first step is to extract the identifier field and the association field from the hybrid public key structure, and at the same time extract the association identifier from the dual signature structure. This information is used to determine the mapping relationship between the two structures.

[0154] In practice, the type identifiers of the first and second type public keys are separated from the identifier field of the hybrid public key structure. For example, the hybrid public key structure contains type identifiers "ECDSA-P256" and "RSA-2048", which correspond to the elliptic curve digital signature algorithm and the RSA signature algorithm, respectively. At the same time, the signature type identifiers of the first and second signature values ​​are extracted from the associated identifier of the dual signature structure, such as "SIG-ECDSA" and "SIG-RSA". These identifiers clearly indicate the algorithm type used for different signature values.

[0155] After extraction, a matching operation is performed, associating the type identifier of the first type of public key with the signature type identifier of the first signature value. Assuming the first type of public key identifier is "ECDSA-P256" and the first signature value identifier is "SIG-ECDSA", a mapping relationship will be established as: {Public key type: ECDSA-P256, Signature type: SIG-ECDSA} as the first mapping relationship. Similarly, a mapping relationship is established for the second type of public key identifier "RSA-2048" and the second signature value identifier "SIG-RSA": {Public key type: RSA-2048, Signature type: SIG-RSA} as the second mapping relationship.

[0156] Next, the verification order information is extracted from the association field. For example, if the association field contains the value "ORDER:1-2", it means that the signature corresponding to the first type of public key should be verified first, and then the signature corresponding to the second type of public key should be verified. This order information is embedded into the combined structure of the two mapping relationships established earlier to generate a cryptographic association mapping relationship with verification order constraints. Specifically, the following structure is generated: {Verification order:1-2, Mapping relationship:[{Sequence number:1, Public key type:ECDSA-P256, Signature type:SIG-ECDSA}, {Sequence number:2, Public key type:RSA-2048, Signature type:SIG-RSA}]}.

[0157] The final step is to organize these association mappings into a predefined table structure, forming an association mapping table. This table can include multiple fields, such as mapping ID, public key type, signature type, verification order, etc. For example, a typical association mapping table is as follows:

[0158] Mapping table ID: MAP-2023-001

[0159] Verification order: 1-2;

[0160] Mapping entry 1:

[0161] Serial Number: 1; Public Key Type: ECDSA-P256; Signature Type: SIG-ECDSA; Verification Priority: High;

[0162] Mapping entry 2:

[0163] Serial number: 2; Public key type: RSA-2048; Signature type: SIG-RSA; Verification priority: Medium.

[0164] The association mapping table is stored in the system's security database and is invoked when double signature verification is required. When a message containing double signatures is received, the association mapping table is first queried to determine the corresponding signature verification method and order based on the identifier in the hybrid public key structure. Then, the validity of each signature value is verified in the order specified in the table.

[0165] In practical applications, more complex scenarios need to be handled, such as the verification of multi-signatures (more than two signature values). In this case, the structure of the association mapping table will expand accordingly, containing more mapping entries, but the basic principle remains the same. Each public key type is mapped to a corresponding signature type, and verification is performed in a predetermined order.

[0166] To enhance system security, the association mapping table itself should be stored encrypted and accessible only to authorized system components. Furthermore, updates to the mapping table must adhere to strict security protocols, ensuring that only authorized administrators can modify its contents and preventing malicious tampering that could bypass authentication.

[0167] By implementing this mapping relationship and managing the verification order, different types of public key and signature algorithm combinations can be flexibly handled, while ensuring the correctness and security of signature verification. This adapts to the needs of various application scenarios, such as applications with high security requirements, such as digital certificate verification, electronic contract signing, and multi-party authorization.

[0168] The public key infrastructure implementation system for quantum-resistant and Chinese cryptographic hybrid certificates in this invention includes:

[0169] The first unit is used to combine and encapsulate the first type of public key and the second type of public key of the entity to be authenticated, based on predefined key correspondence and structural constraint rules, to generate a hybrid public key structure.

[0170] The second unit is used to perform a first signature operation on the data to be signed, which contains identity information and the hybrid public key structure, based on the identifier field and the association field in the hybrid public key structure, and using a first signature algorithm corresponding to the first type of public key to obtain a first signature value.

[0171] The third unit is used to perform a second signature operation on the combination of the data to be signed and the first signature value using a second signature algorithm corresponding to the second type of public key to obtain a second signature value, thereby generating a dual signature structure containing the first signature value and the second signature value;

[0172] The fourth unit is used to structurally encapsulate the hybrid public key structure, the dual signature structure, the identity information of the entity to be authenticated, and the certificate validity period information to generate a hybrid cryptographic digital certificate;

[0173] The fifth unit is used to, when receiving a verification request for the hybrid cryptographic digital certificate, determine the verification mode and, according to the verification mode, sequentially use the first type of public key and the second type of public key to perform verification operations on the dual signature structure and generate a verification result.

[0174] A third aspect of the present invention provides an electronic device, comprising:

[0175] processor;

[0176] Memory used to store processor-executable instructions;

[0177] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0178] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0179] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.

[0180] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for implementing quantum-resistant and national cryptographic hybrid certificates in public key infrastructure, characterized in that, include: Based on predefined key correspondence and structural constraint rules, the first type of public key and the second type of public key of the entity to be authenticated are combined and encapsulated to generate a hybrid public key structure; Based on the identifier field and the associated field in the hybrid public key structure, the first signature value is obtained by performing a first signature operation on the data to be signed, which contains identity information and the hybrid public key structure, using a first signature algorithm corresponding to the first type of public key; The second signature value is obtained by performing a second signature operation on the combination of the data to be signed and the first signature value using a second signature algorithm corresponding to the second type of public key, thereby generating a dual signature structure containing the first signature value and the second signature value; The hybrid public key structure, the dual signature structure, the identity information of the entity to be authenticated, and the certificate validity period information are structurally encapsulated to generate a hybrid cryptographic digital certificate; When a verification request for the hybrid cryptographic digital certificate is received, a verification mode is determined, and the first type of public key and the second type of public key are used sequentially to perform verification operations on the dual signature structure according to the verification mode to generate a verification result.

2. The method according to claim 1, characterized in that, Based on predefined key correspondence and structural constraints, the first type of public key and the second type of public key of the entity to be authenticated are combined and encapsulated to generate a hybrid public key structure, including: Based on the predefined key correspondence, cryptographic type identification is performed on the first type public key and the second type public key respectively, and a first type identifier is assigned to the first type public key and a second type identifier is assigned to the second type public key, thereby generating a key type mapping table; Based on the structural constraint rules, the hierarchical positional relationship and byte order arrangement rules of the first type of public key and the second type of public key in the hybrid public key structure are determined, and a structural layout scheme is generated. Based on the first type identifier and the second type identifier in the key type mapping table, and the priority field in the structure layout scheme, determine the association field used to indicate the verification order dependency relationship between the first type public key and the second type public key; The first type of public key, the second type of public key, the first type identifier and the second type identifier in the key type mapping table, the priority field in the structure layout scheme, and the associated field are serialized and combined according to the byte order arrangement rules in the structure layout scheme to generate the hybrid public key structure.

3. The method according to claim 2, characterized in that, Based on the structural constraint rules, the hierarchical position relationship and byte order arrangement rules of the first type of public key and the second type of public key in the hybrid public key structure are determined, and a structural layout scheme is generated, including: The structural constraint rules are parsed to extract the constraints used to define the mapping relationship between cryptographic system type and hierarchical position, as well as the arrangement constraints used to define the byte order arrangement method, and a set of constraint parameters is generated. Based on the constraints in the set of constraint parameters, the first type of public key is assigned to a first-level position in the hybrid public key structure, and the second type of public key is assigned to a second-level position in the hybrid public key structure, thereby generating a hierarchical position mapping relationship; Based on the arrangement constraints in the constraint parameter set and the hierarchical position mapping relationship, the starting offset position and length field position of the first type public key and the second type public key in the byte stream are determined, and a byte order arrangement rule is generated. Based on the hierarchical position mapping relationship, corresponding priority identifiers are assigned to the first level position and the second level position respectively, and combined to form the priority field. The hierarchical position mapping relationship, the byte order arrangement rule and the priority field are encapsulated into the structural layout scheme.

4. The method according to claim 1, characterized in that, Based on the identifier field and association field in the hybrid public key structure, a first signature value is obtained by performing a first signature operation on the data to be signed, which contains identity information and the hybrid public key structure, using a first signature algorithm corresponding to the first type of public key, including: Extract the identifier field from the hybrid public key structure, parse the identifier field to obtain the type identifier information of the first type of public key and the type identifier information of the second type of public key, and generate a type identifier set; Extract the association field from the hybrid public key structure, parse the association field to obtain association indication information indicating the verification order dependency relationship between the first type of public key and the second type of public key, and generate a verification order dependency table; Based on the type identifier information in the type identifier set and the association indication information in the verification order dependency table, the first signature algorithm corresponding to the first type public key is determined, and the algorithm parameter configuration information required by the first signature algorithm is obtained; The identity information and the hybrid public key structure are concatenated according to predefined data organization rules, and a sequence marker representing the verification order is inserted into the concatenated data according to the association indication information in the verification order dependency table to generate the data to be signed; The first signature algorithm and the algorithm parameter configuration information are used to perform a signature operation on the data to be signed, thereby generating the first signature value.

5. The method according to claim 1, characterized in that, Using a second signature algorithm corresponding to the second type of public key, a second signature operation is performed on the combination of the data to be signed and the first signature value to obtain a second signature value, generating a dual signature structure containing the first signature value and the second signature value, including: The data to be signed is combined with the first signature value according to a predefined data concatenation order, and a separator mark used to identify data boundaries is inserted between the data to be signed and the first signature value to generate the combined data; Based on the identifier field in the hybrid public key structure, determine the second signature algorithm corresponding to the second type of public key, and obtain the algorithm parameter configuration information required by the second signature algorithm; The combined data is signed using the second signature algorithm and the algorithm parameter configuration information to generate the second signature value, wherein the second signature value covers the entire contents of the data to be signed and the first signature value. The first signature value and the second signature value are combined according to a predefined signature value arrangement order, and an association identifier is attached to indicate the verification dependency relationship between the first signature value and the second signature value to generate the dual signature structure.

6. The method according to claim 1, characterized in that, The hybrid public key structure, the dual signature structure, the identity information of the entity to be authenticated, and the certificate validity period information are structurally encapsulated to generate a hybrid cryptographic digital certificate, including: Based on the number of cryptosystem types contained in the hybrid public key structure and the number of signature values ​​contained in the dual signature structure, a certificate structure template adapted to multiple cryptosystems is determined; Based on the identifier field in the hybrid public key structure, the association field, and the association identifier in the dual signature structure that indicates the verification dependency between the first signature value and the second signature value, the cryptographic association mapping relationship between the hybrid public key structure and the dual signature structure is determined, and an association mapping table is generated; The hybrid public key structure, the dual signature structure, the identity information of the entity to be authenticated, and the certificate validity information are respectively filled into the corresponding field areas of the certificate structure template, and the association mapping table is inserted between the public key field area and the signature field area. The completed certificate structure template is encapsulated for integrity. A structure association identifier is added to the certificate structure template to identify the correspondence between the hybrid public key structure and the dual signature structure, thereby generating the hybrid cryptographic digital certificate.

7. The method according to claim 6, characterized in that, Based on the identifier field in the hybrid public key structure, the association field, and the association identifier in the dual signature structure indicating the verification dependency between the first signature value and the second signature value, the cryptographic association mapping relationship between the hybrid public key structure and the dual signature structure is determined, and an association mapping table is generated, including: Extract the type identifier of the first type public key and the type identifier of the second type public key from the identifier field; extract the signature type identifier of the first signature value and the signature type identifier of the second signature value from the associated identifier. The type identifier of the first type of public key is matched with the signature type identifier of the first signature value to establish a first mapping relationship, and the type identifier of the second type of public key is matched with the signature type identifier of the second signature value to establish a second mapping relationship; Extract order information indicating the verification order between the first type of public key and the second type of public key from the association field, and embed the order information into the combined structure of the first mapping relationship and the second mapping relationship to obtain the cryptographic association mapping relationship containing verification order constraints; The first and second mapping relationships in the cryptographic association mapping relationship are organized according to a predefined table structure to obtain the association mapping table.

8. A quantum-resistant hybrid certificate implementation system in public key infrastructure, used to implement the method as described in any one of claims 1-7, characterized in that, include: The first unit is used to combine and encapsulate the first type of public key and the second type of public key of the entity to be authenticated, based on predefined key correspondence and structural constraint rules, to generate a hybrid public key structure. The second unit is used to perform a first signature operation on the data to be signed, which contains identity information and the hybrid public key structure, based on the identifier field and the association field in the hybrid public key structure, and using a first signature algorithm corresponding to the first type of public key to obtain a first signature value. The third unit is used to perform a second signature operation on the combination of the data to be signed and the first signature value using a second signature algorithm corresponding to the second type of public key to obtain a second signature value, thereby generating a dual signature structure containing the first signature value and the second signature value; The fourth unit is used to structurally encapsulate the hybrid public key structure, the dual signature structure, the identity information of the entity to be authenticated, and the certificate validity period information to generate a hybrid cryptographic digital certificate; The fifth unit is used to, when receiving a verification request for the hybrid cryptographic digital certificate, determine the verification mode and, according to the verification mode, sequentially use the first type of public key and the second type of public key to perform verification operations on the dual signature structure and generate a verification result.

9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Post-quantum and national secret hybrid dual-certificate IKE key negotiation method and device

    CN119135343A

  • Digital certificate generation method and device, electronic equipment and storage medium

    CN119276476A