Method, device, electronic device and storage medium for generating post-quantum digital certificates
By combining the post-quantum signature public key and the encryption public key to generate the post-quantum composite public key, the problem that document certificates cannot be used for signature and encryption in the post-quantum cryptography era is solved, and a multi-purpose digital certificate under the document certificate system is realized, improving the Security and compatibility.
Patent Information
- Application Number
- CN202411305432.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-09-19
AI Technical Summary
In the post-quantum cryptography era, the existing technology cannot use post-quantum digital certificates under the document certificate system for both signature and encryption scenarios, resulting in their inability to continue to be used.
By obtaining the post-quantum signature public key and the post-quantum encryption public key, combining the post-quantum composite public key, and storing it to the preset structural position of the digital certificate template, generating post-quantum numbers that can be used for both signature and encryption at the same time Certificate.
It realizes that under the document certificate system, post-quantum digital certificates can be used in both signature scenarios and encryption scenarios, simplifying the certificate generation process, improving security and compatibility, and no need to change the existing standard format.
Smart Images

Figure CN118827066B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of post-quantum technology, and in particular to a method, device, electronic device and storage medium for generating a post-quantum digital certificate. Background Art
[0002] It is known from relevant technologies that currently, digital certificates based on traditional algorithms use a single certificate system in some scenarios, that is, a digital certificate can be used for both signature scenarios and encryption scenarios.
[0003] However, in the post-quantum cryptography era, since post-quantum algorithms are single-purpose algorithms, one algorithm cannot be used for both signature and encryption scenarios at the same time, resulting in the inability to continue using post-quantum digital certificates under a single certificate system.
[0004] Therefore, finding a method to generate post-quantum digital certificates that can be used in both signature scenarios and encryption scenarios has become a current research hotspot. Summary of the invention
[0005] The present invention provides a method, device, electronic device and storage medium for generating a post-quantum digital certificate, which realizes a post-quantum digital certificate under a single certificate system and can be used in both signature scenarios and encryption scenarios.
[0006] The present invention provides a method for generating a post-quantum digital certificate, the method comprising: obtaining a post-quantum signature public key and a post-quantum encryption public key; and obtaining a post-quantum digital certificate based on the post-quantum signature public key and the post-quantum encryption public key.
[0007] According to a method for generating a post-quantum digital certificate provided by the present invention, the post-quantum digital certificate is obtained based on the post-quantum signature public key and the post-quantum encryption public key, specifically comprising: performing combined processing based on the post-quantum signature public key and the post-quantum encryption public key to obtain a post-quantum composite public key; storing the post-quantum composite public key to a preset structural position of a digital certificate template to obtain a post-quantum digital certificate.
[0008] According to a method for generating a post-quantum digital certificate provided by the present invention, the post-quantum signature public key and the post-quantum encryption public key are combined to obtain a post-quantum composite public key, which specifically includes: splicing and combining the post-quantum signature public key and the post-quantum encryption public key to obtain a post-quantum composite public key; before storing the post-quantum composite public key in a preset structural position of a digital certificate template to obtain a post-quantum digital certificate, the method also includes: determining an algorithm identifier corresponding to the post-quantum composite public key; storing the post-quantum composite public key in a preset structural position of a digital certificate template to obtain a post-quantum digital certificate, specifically includes: storing the post-quantum composite public key and the algorithm identifier in the preset structural position of the digital certificate template to obtain a post-quantum digital certificate.
[0009] According to a method for generating a post-quantum digital certificate provided by the present invention, the post-quantum digital certificate is obtained based on the post-quantum signature public key and the post-quantum encryption public key, specifically comprising: obtaining subject public key information, wherein the subject public key information is used to store the algorithm identifier and public key data of the certificate public key; assigning the post-quantum signature public key to the subject public key information to obtain subject signature public key information; assigning the post-quantum encryption public key to the subject public key information to obtain subject encryption public key information; storing the subject signature public key information and the subject encryption public key information in a preset structure position of a digital certificate template to obtain a post-quantum digital certificate.
[0010] According to a method for generating a post-quantum digital certificate provided by the present invention, the post-quantum digital certificate is obtained based on the post-quantum signature public key and the post-quantum encryption public key, specifically comprising: extending the subject public key information to obtain the extended subject public key information, wherein the extended subject public key information comprises a post-quantum signature algorithm identifier, a post-quantum signature public key data, a post-quantum encryption algorithm identifier, and a post-quantum encryption public key data; assigning the post-quantum signature algorithm identifier, the post-quantum signature public key, the post-quantum encryption algorithm identifier, and the post-quantum encryption public key to the extended subject public key information to obtain the assigned extended subject public key information; storing the assigned extended subject public key information to a preset structure position of a digital certificate template to obtain a post-quantum digital certificate.
[0011] The present invention also provides a device for generating a post-quantum digital certificate, which includes: an acquisition module for acquiring a post-quantum signature public key and a post-quantum encryption public key; and a processing module for obtaining a post-quantum digital certificate based on the post-quantum signature public key and the post-quantum encryption public key.
[0012] According to a post-quantum digital certificate generation device provided by the present invention, the processing module adopts the following method to obtain a post-quantum digital certificate based on the post-quantum signature public key and the post-quantum encryption public key: perform combined processing based on the post-quantum signature public key and the post-quantum encryption public key to obtain a post-quantum composite public key; store the post-quantum composite public key to a preset structural position of a digital certificate template to obtain a post-quantum digital certificate.
[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a method for generating a post-quantum digital certificate as described in any one of the above is implemented.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for generating a post-quantum digital certificate as described in any one of the above.
[0015] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-described methods for generating a post-quantum digital certificate.
[0016] The post-quantum digital certificate generation method, device, electronic device and storage medium provided by the present invention obtain a post-quantum signature public key and a post-quantum encryption public key; based on the post-quantum signature public key and the post-quantum encryption public key, a post-quantum digital certificate is obtained. A post-quantum digital certificate under a single certificate system is realized, which can be used in both signature scenarios and encryption scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 This is one of the flow charts of the method for generating a post-quantum digital certificate provided by the present invention.
[0019] Figure 2 This is one of the flow charts of obtaining a post-quantum digital certificate based on a post-quantum signature public key and a post-quantum encryption public key provided by the present invention.
[0020] Figure 3 It is a flow chart of storing the quantum composite public key in a preset structure position of a digital certificate template to obtain a post-quantum digital certificate provided by the present invention.
[0021] Figure 4 This is the second flow chart of obtaining a post-quantum digital certificate based on a post-quantum signature public key and a post-quantum encryption public key provided by the present invention.
[0022] Figure 5 This is the third flow chart of obtaining a post-quantum digital certificate based on a post-quantum signature public key and a post-quantum encryption public key provided by the present invention.
[0023] Figure 6 It is a structural schematic diagram of a device for generating a post-quantum digital certificate provided by the present invention.
[0024] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] The method for generating a post-quantum digital certificate provided by the present invention is to enable the continued use of a single certificate solution in the post-quantum cryptography era, that is, a post-quantum certificate that can be used for both signature and encryption. Through the present invention, a post-quantum digital certificate under a single certificate system is implemented, which can be used for both signature scenarios and encryption scenarios.
[0027] Figure 1 This is one of the flow charts of the method for generating a post-quantum digital certificate provided by the present invention.
[0028] The following will be combined Figure 1 The process of the method for generating a post-quantum digital certificate provided by the present invention is described.
[0029] In an exemplary embodiment of the present invention, Figure 1 It can be seen that the method for generating a post-quantum digital certificate may include step 110 and step 120, and each step will be introduced below.
[0030] In step 110, a post-quantum signature public key and a post-quantum encryption public key are obtained.
[0031] In step 120, a post-quantum digital certificate is obtained based on the post-quantum signature public key and the post-quantum encryption public key.
[0032] In one embodiment, the post-quantum signature public key and the post-quantum encryption public key can be obtained respectively. Further, based on the post-quantum signature public key and the post-quantum encryption public key, a post-quantum digital certificate is obtained. Since the post-quantum digital certificate includes both the post-quantum signature public key and the post-quantum encryption public key, a post-quantum digital certificate under a single certificate system can be implemented, which can be used for both signature scenarios and encryption scenarios.
[0033] The method for generating a post-quantum digital certificate provided by the present invention obtains a post-quantum signature public key and a post-quantum encryption public key; based on the post-quantum signature public key and the post-quantum encryption public key, a post-quantum digital certificate is obtained. A post-quantum digital certificate under a single certificate system is realized, which can be used in both signature scenarios and encryption scenarios.
[0034] Figure 2 This is one of the flow charts of obtaining a post-quantum digital certificate based on a post-quantum signature public key and a post-quantum encryption public key provided by the present invention.
[0035] The following will be combined Figure 2 The process of obtaining a post-quantum digital certificate based on a post-quantum signature public key and a post-quantum encryption public key provided by the present invention is described.
[0036] In an exemplary embodiment of the present invention, Figure 2 It can be seen that obtaining a post-quantum digital certificate based on a post-quantum signature public key and a post-quantum encryption public key may include steps 210 and 220, and each step will be introduced below.
[0037] In step 210, a post-quantum composite public key is obtained by combining the post-quantum signature public key and the post-quantum encryption public key.
[0038] In step 220, the post-quantum composite public key is stored in a preset structure position of the digital certificate template to obtain a post-quantum digital certificate.
[0039] In one embodiment, a post-quantum composite public key can be obtained based on the post-quantum signature public key and the post-quantum encryption public key, and further, the post-quantum composite public key can be stored in the preset structure position of the digital certificate template to obtain a post-quantum digital certificate. By combining the post-quantum signature public key and the post-quantum encryption public key to obtain the post-quantum composite public key, and then storing it in the preset structure position of the digital certificate template, a post-quantum digital certificate that can be used for both signature scenarios and encryption scenarios can be easily obtained.
[0040] Figure 3 It is a flow chart of storing a post-quantum composite public key in a preset structural position of a digital certificate template to obtain a post-quantum digital certificate, as provided by the present invention.
[0041] The following will be combined Figure 3 The process of storing the post-quantum composite public key in the preset structure position of the digital certificate template to obtain the post-quantum digital certificate is described.
[0042] In an exemplary embodiment of the present invention, Figure 3 It can be seen that the post-quantum composite public key is stored in the preset structure position of the digital certificate template, and obtaining the post-quantum digital certificate may include steps 310 to 330, and each step will be introduced below.
[0043] In step 310, the post-quantum signature public key and the post-quantum encryption public key are concatenated and combined to obtain a post-quantum composite public key.
[0044] In step 320, an algorithm identifier corresponding to the post-quantum composite public key is determined.
[0045] In step 330, the post-quantum composite public key and the algorithm identifier are stored in a preset structure position of the digital certificate template to obtain a post-quantum digital certificate.
[0046] In one embodiment, the post-quantum signature public key and the post-quantum encryption public key can be spliced and combined to obtain a post-quantum composite public key. In one example, the post-quantum signature public key and the post-quantum encryption public key can be spliced together to form a new post-quantum composite public key, which is filled in the subjectPublicKey field of the SubjectPublicKeyInfo structure of the digital certificate template.
[0047] In another example, the algorithm identifier corresponding to the post-quantum composite public key can also be determined. For example, the post-quantum signature algorithm and the post-quantum encryption algorithm can be combined to form a new post-quantum composite algorithm, and a new algorithm identifier (also called the algorithm identifier corresponding to the post-quantum composite public key) can be defined for the composite algorithm. During the application process, the algorithm field of the SubjectPublicKeyInfo structure of the digital certificate template can be filled in. Thus, a post-quantum digital certificate can be obtained.
[0048] During the application process, a post-quantum digital certificate is obtained by storing the post-quantum composite public key and the algorithm identifier in a preset structure position of a digital certificate template, so that the processing program can quickly identify that the certificate contains a post-quantum composite public key.
[0049] In order to further introduce the method for generating a post-quantum digital certificate provided by the present invention, the application process will be described in conjunction with the following embodiments.
[0050] In one embodiment, the post-quantum signature algorithm and the post-quantum encryption algorithm can be combined to form a new post-quantum composite algorithm, and a new algorithm identifier is defined for the composite algorithm, which is filled in the algorithm field of the SubjectPublicKeyInfo structure of the digital certificate. This allows the processing program to recognize that the certificate contains a composite public key, which facilitates the subsequent rapid application of the post-quantum digital certificate.
[0051] For example, SubjectPublicKeyInfo=SEQUENCE{
[0052] algorithmAlgorithmIdentifier,
[0053] subjectPublicKey BIT STRING}
[0054] In another example, the public keys of the signature and encryption algorithms can be concatenated together to form a new post-quantum composite public key, which can be filled in the subjectPublicKey field of the SubjectPublicKeyInfo structure of the digital certificate (corresponding to the digital certificate template). Furthermore, in the digital certificate template, the keyUsage field in the extensions can be filled in with the identifiers of the two purposes of signature and encryption. For end-user certificates, they are usually: digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment.
[0055] In another example, when a CA (certificate authority) issues an end-user certificate, the post-quantum signature algorithm identifier used by the CA needs to be filled in the signature field of TBSCertificate and the signatureAlgorithm field of Certificate, where:
[0056] TBSCertificate ::= SEQUENCE {
[0057] version [0] EXPLICIT Version DEFAULT v1,
[0058] serialNumber CertificateSerialNumber,
[0059] signatureAlgorithmIdentifier,
[0060] issuer Name,
[0061] validity Validity,
[0062] subject Name,
[0063] subjectPublicKeyInfo SubjectPublicKeyInfo,
[0064] issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,
[0065] subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,
[0066] extensions [3] EXPLICIT Extensions OPTIONAL
[0067] }
[0068] Certificate ::= SEQUENCE {
[0069] tbsCertificate TBSCertificate,
[0070] signatureAlgorithm AlgorithmIdentifier,
[0071] signatureValue BIT STRING}
[0072] When the CA (certificate authority) issues an end-entity certificate, the post-quantum signature value generated can be filled in the signatureValue of Certificate.
[0073] In another embodiment, the two private keys for signature and encryption corresponding to the composite public key in the obtained post-quantum digital certificate can be spliced and stored together, or they can be stored separately. When signing, the signature algorithm is called, and the signature private key component in the composite private key or the independent signature private key is used for signing; when verifying the signature, the signature verification algorithm is called, and the signature public key component in the composite public key is used for verification. When encrypting, the encryption algorithm is called, and the encryption public key component in the composite public key is used for encryption; when decrypting, the decryption algorithm is called, and the encryption private key component in the composite private key or the independent encryption private key is used for decryption.
[0074] The method for generating a post-quantum digital certificate provided by the present invention combines two public keys of the post-quantum signature and encryption algorithm (corresponding to the post-quantum signature public key and the post-quantum encryption public key) together to form a composite public key (corresponding to the post-quantum composite public key), and defines a new algorithm identifier for the public key of the composite algorithm (corresponding to the algorithm identifier corresponding to the post-quantum composite public key), and fills it into the preset structure position of the digital certificate template, such as the existing X.509 format certificate, to achieve the effect that a post-quantum digital certificate can sign and encrypt. The method is simple and easy to implement, has good security, low implementation cost, and is completely consistent with the existing standard format. The protocol layer and the upper application layer do not need to be changed, and the single certificate mode currently used in large quantities can be used. It only needs to be upgraded and transformed at the bottom layer (such as the password module, the control that calls the password module, and the CA system), and no new network transmission or interaction process needs to be added. For business system integration or end users, it can be imperceptible.
[0075] Figure 4 This is the second flow chart of obtaining a post-quantum digital certificate based on a post-quantum signature public key and a post-quantum encryption public key provided by the present invention.
[0076] The following will be combined Figure 4 Another process of obtaining a post-quantum digital certificate based on a post-quantum signature public key and a post-quantum encryption public key is described.
[0077] In an exemplary embodiment of the present invention, Figure 4 It can be seen that obtaining a post-quantum digital certificate based on a post-quantum signature public key and a post-quantum encryption public key may include steps 410 to 440, and each step will be introduced below.
[0078] In step 410, subject public key information is obtained, wherein the subject public key information is used to store the algorithm identifier and public key data of the certificate public key.
[0079] In step 420, the post-quantum signature public key is assigned to the subject public key information to obtain the subject signature public key information.
[0080] In step 430, the post-quantum encryption public key is assigned to the subject public key information to obtain the subject encryption public key information.
[0081] In step 440, the subject signature public key information and the subject encryption public key information are stored in a preset structure position of the digital certificate template to obtain a post-quantum digital certificate.
[0082] In one embodiment, the subject public key information (SubjectPublicKeyInfo) can be obtained. Further, the post-quantum signature public key can be assigned to one of the subject public key information to obtain the subject signature public key information. Then the post-quantum encryption public key is assigned to another subject public key information to obtain the subject encryption public key information. Then the subject signature public key information and the subject encryption public key information are stored in the preset structure position of the digital certificate template, so that the post-quantum digital certificate can be obtained.
[0083] Continuing to use the above-mentioned embodiment as an example, it can be implemented by adding subjectSignaturePublicKeyInfo and subjectEncryptionPublicKeyInfo in TBSCertificate at the same time, such as:
[0084] TBSCertificate ::= SEQUENCE {
[0085] version [0] EXPLICIT Version DEFAULT v1,
[0086] serialNumber CertificateSerialNumber,
[0087] signatureAlgorithmIdentifier,
[0088] issuer Name,
[0089] validity Validity,
[0090] subject Name,
[0091] subjectSignaturePublicKeyInfo SubjectPublicKeyInfo,
[0092] subjectEncryptionPublicKeyInfo SubjectPublicKeyInfo,
[0093] issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,
[0094] subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,
[0095] extensions [3] EXPLICIT Extensions OPTIONAL
[0096] }
[0097] The algorithm field of subjectSignaturePublicKeyInfo is filled with the identifier of the post-quantum signature algorithm. The subjectPublicKey field of subjectSignaturePublicKeyInfo is filled with the public key of the post-quantum signature algorithm. The algorithm field of subjectEncryptionPublicKeyInfo is filled with the identifier of the post-quantum encryption algorithm. The subjectPublicKey field of subjectEncryptionPublicKeyInfo is filled with the public key of the post-quantum encryption algorithm. The order of subjectSignaturePublicKeyInfo and subjectSignaturePublicKeyInfo is interchangeable.
[0098] Figure 5 This is the third flow chart of obtaining a post-quantum digital certificate based on a post-quantum signature public key and a post-quantum encryption public key provided by the present invention.
[0099] The following will be combined Figure 5 Another process of obtaining a post-quantum digital certificate based on a post-quantum signature public key and a post-quantum encryption public key is described.
[0100] In an exemplary embodiment of the present invention, Figure 5 It can be seen that obtaining a post-quantum digital certificate based on a post-quantum signature public key and a post-quantum encryption public key may include steps 510 to 530, and each step will be introduced below.
[0101] In step 510, the subject public key information is extended to obtain the extended subject public key information, wherein the extended subject public key information includes a post-quantum signature algorithm identifier, a post-quantum signature public key data, a post-quantum encryption algorithm identifier, and a post-quantum encryption public key data.
[0102] In step 520, the post-quantum signature algorithm identifier, the post-quantum signature public key, the post-quantum encryption algorithm identifier, and the post-quantum encryption public key are assigned to the extended subject public key information to obtain the assigned extended subject public key information.
[0103] In step 530, the assigned extended subject public key information is stored in a preset structure position of the digital certificate template to obtain a post-quantum digital certificate.
[0104] In one embodiment, the subject public key information (SubjectPublicKeyInfo) can be extended to obtain the extended subject public key information (SubjectPublicKeyInfoEx). The extended subject public key information may include a post-quantum signature algorithm identifier, post-quantum signature public key data, a post-quantum encryption algorithm identifier, and a post-quantum encryption public key data. In other words, a new structure can be defined to accommodate both signature and encryption public keys (i.e., a post-quantum signature public key and a post-quantum encryption public key), and then the post-quantum signature algorithm identifier, the post-quantum signature public key, the post-quantum encryption algorithm identifier, and the post-quantum encryption public key are assigned to the extended subject public key information to obtain the assigned extended subject public key information; and the assigned extended subject public key information is stored in the preset structure position of the digital certificate template, so that a post-quantum digital certificate can be obtained, that is, the new structure constructed above is used in TBSCertificate, for example:
[0105] SubjectPublicKeyInfoEx ::= SEQUENCE {
[0106] signatureAlgorithm AlgorithmIdentifier,
[0107] subjectSignaturePublicKey BIT STRING
[0108] encryptionAlgorithm AlgorithmIdentifier,
[0109] subjectEncryptionPublicKey BIT STRING}
[0110] TBSCertificate ::= SEQUENCE {
[0111] version [0] EXPLICIT Version DEFAULT v1,
[0112] serialNumber CertificateSerialNumber,
[0113] signatureAlgorithmIdentifier,
[0114] issuer Name,
[0115] validity Validity,
[0116] subject Name,
[0117] subjectPublicKeyInfo SubjectPublicKeyInfoEx,
[0118] issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,
[0119] subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,
[0120] extensions [3] EXPLICIT Extensions OPTIONAL
[0121] }
[0122] It should be noted that during the application process, in addition to storing the assigned extended subject public key information in the preset structure position of the digital certificate template, it is also necessary to use the private key of the issuer certificate to sign the certificate data. The certificate data, signature algorithm, and signature value must be combined to obtain a complete post-quantum digital certificate.
[0123] According to the foregoing description, the method for generating a post-quantum digital certificate provided by the present invention obtains a post-quantum signature public key and a post-quantum encryption public key; based on the post-quantum signature public key and the post-quantum encryption public key, a post-quantum digital certificate is obtained. A post-quantum digital certificate under a single certificate system is realized, which can be used in both signature scenarios and encryption scenarios.
[0124] The following is a description of a device for generating a post-quantum digital certificate provided by the present invention. The device for generating a post-quantum digital certificate described below and the method for generating a post-quantum digital certificate described above can be referenced to each other.
[0125] Figure 6 It is a structural schematic diagram of a device for generating a post-quantum digital certificate provided by the present invention.
[0126] The following will be combined Figure 6 The structure of the device for generating a post-quantum digital certificate provided by the present invention is described.
[0127] In an exemplary embodiment of the present invention, Figure 6 It can be seen that the device for generating a post-quantum digital certificate may include an acquisition module 610 and a processing module 620, and each module will be introduced below.
[0128] The acquisition module 610 may be configured to acquire a post-quantum signature public key and a post-quantum encryption public key;
[0129] The processing module 620 may be configured to obtain a post-quantum digital certificate based on the post-quantum signature public key and the post-quantum encryption public key.
[0130] In an exemplary embodiment of the present invention, the processing module 620 obtains a post-quantum digital certificate based on the post-quantum signature public key and the post-quantum encryption public key in the following manner:
[0131] Performing a combined process based on the post-quantum signature public key and the post-quantum encryption public key to obtain a post-quantum composite public key;
[0132] The post-quantum composite public key is stored in a preset structure position of a digital certificate template to obtain a post-quantum digital certificate.
[0133] In an exemplary embodiment of the present invention, the processing module 620 implements combined processing based on the post-quantum signature public key and the post-quantum encryption public key to obtain a post-quantum composite public key in the following manner:
[0134] Concatenate the post-quantum signature public key and the post-quantum encryption public key to obtain a post-quantum composite public key;
[0135] The processing module 620 may also be configured to:
[0136] determining an algorithm identifier corresponding to the post-quantum composite public key;
[0137] The processing module 620 may store the post-quantum composite public key in a preset structure position of a digital certificate template to obtain a post-quantum digital certificate in the following manner:
[0138] The post-quantum composite public key and the algorithm identifier are stored in a preset structural position of a digital certificate template to obtain a post-quantum digital certificate.
[0139] In an exemplary embodiment of the present invention, the processing module 620 may also obtain a post-quantum digital certificate based on the post-quantum signature public key and the post-quantum encryption public key in the following manner:
[0140] Acquire subject public key information, wherein the subject public key information is used to store an algorithm identifier and public key data of a certificate public key;
[0141] Assigning the post-quantum signature public key to the subject public key information to obtain the subject signature public key information;
[0142] Assigning the post-quantum encryption public key to the subject public key information to obtain the subject encryption public key information;
[0143] The subject signature public key information and the subject encryption public key information are stored in a preset structure position of a digital certificate template to obtain a post-quantum digital certificate.
[0144] In an exemplary embodiment of the present invention, the processing module 620 may also obtain a post-quantum digital certificate based on the post-quantum signature public key and the post-quantum encryption public key in the following manner:
[0145] Extending the subject public key information to obtain the extended subject public key information, wherein the extended subject public key information includes a post-quantum signature algorithm identifier, a post-quantum signature public key data, a post-quantum encryption algorithm identifier, and a post-quantum encryption public key data;
[0146] Assign the post-quantum signature algorithm identifier, the post-quantum signature public key, the post-quantum encryption algorithm identifier, and the post-quantum encryption public key to the extended subject public key information to obtain the assigned extended subject public key information;
[0147] The assigned extended subject public key information is stored in a preset structure position of the digital certificate template to obtain a post-quantum digital certificate.
[0148] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communications interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communications interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute a method for generating a post-quantum digital certificate, the method comprising: obtaining a post-quantum signature public key and a post-quantum encryption public key; and obtaining a post-quantum digital certificate based on the post-quantum signature public key and the post-quantum encryption public key.
[0149] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0150] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the post-quantum digital certificate generation method provided by the above methods, and the method includes: obtaining a post-quantum signature public key and a post-quantum encryption public key; and obtaining a post-quantum digital certificate based on the post-quantum signature public key and the post-quantum encryption public key.
[0151] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the method for generating a post-quantum digital certificate provided by the above methods, the method comprising: obtaining a post-quantum signature public key and a post-quantum encryption public key; and obtaining a post-quantum digital certificate based on the post-quantum signature public key and the post-quantum encryption public key.
[0152] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0153] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0154] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating a post-quantum digital certificate, characterized in that: The method comprises: Obtain post-quantum signature public key and post-quantum encryption public key; Based on the post-quantum signature public key and the post-quantum encryption public key, a post-quantum digital certificate is obtained, wherein the post-quantum digital certificate is obtained based on the post-quantum signature public key and the post-quantum encryption public key, specifically including: Performing a combined process based on the post-quantum signature public key and the post-quantum encryption public key to obtain a post-quantum composite public key; The post-quantum composite public key is stored in a preset structure position of a digital certificate template to obtain a post-quantum digital certificate, wherein: The combining process based on the post-quantum signature public key and the post-quantum encryption public key to obtain a post-quantum composite public key specifically includes: Concatenate the post-quantum signature public key and the post-quantum encryption public key to obtain a post-quantum composite public key; Before storing the post-quantum composite public key in a preset structural position of a digital certificate template to obtain a post-quantum digital certificate, the method further includes: determining an algorithm identifier corresponding to the post-quantum composite public key; The storing of the post-quantum composite public key to a preset structure position of a digital certificate template to obtain a post-quantum digital certificate specifically includes: The post-quantum composite public key and the algorithm identifier are stored in a preset structural position of a digital certificate template to obtain a post-quantum digital certificate.
2. The method for generating a post-quantum digital certificate according to claim 1, characterized in that: The obtaining of a post-quantum digital certificate based on the post-quantum signature public key and the post-quantum encryption public key specifically includes: Acquire subject public key information, wherein the subject public key information is used to store an algorithm identifier and public key data of a certificate public key; Assigning the post-quantum signature public key to the subject public key information to obtain the subject signature public key information; Assigning the post-quantum encryption public key to the subject public key information to obtain the subject encryption public key information; The subject signature public key information and the subject encryption public key information are stored in a preset structure position of a digital certificate template to obtain a post-quantum digital certificate.
3. The method for generating a post-quantum digital certificate according to claim 1, characterized in that: The obtaining of a post-quantum digital certificate based on the post-quantum signature public key and the post-quantum encryption public key specifically includes: Extending the subject public key information to obtain the extended subject public key information, wherein the extended subject public key information includes a post-quantum signature algorithm identifier, a post-quantum signature public key data, a post-quantum encryption algorithm identifier, and a post-quantum encryption public key data; Assign the post-quantum signature algorithm identifier, the post-quantum signature public key, the post-quantum encryption algorithm identifier, and the post-quantum encryption public key to the extended subject public key information to obtain the assigned extended subject public key information; The assigned extended subject public key information is stored in a preset structure position of the digital certificate template to obtain a post-quantum digital certificate.
4. A device for generating a post-quantum digital certificate, characterized in that: The device is used to implement the method for generating a post-quantum digital certificate according to any one of claims 1 to 3, and the device includes: An acquisition module, used to obtain a post-quantum signature public key and a post-quantum encryption public key; A processing module is used to obtain a post-quantum digital certificate based on the post-quantum signature public key and the post-quantum encryption public key.
5. The device for generating a post-quantum digital certificate according to claim 4, characterized in that: The processing module obtains a post-quantum digital certificate based on the post-quantum signature public key and the post-quantum encryption public key in the following manner: Performing a combined process based on the post-quantum signature public key and the post-quantum encryption public key to obtain a post-quantum composite public key; The post-quantum composite public key is stored in a preset structure position of a digital certificate template to obtain a post-quantum digital certificate.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for generating a post-quantum digital certificate as described in any one of claims 1 to 3 is implemented.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for generating a post-quantum digital certificate as described in any one of claims 1 to 3 is implemented.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for generating a post-quantum digital certificate as described in any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Anti-quantum hybrid certificate combination method and system, and electronic equipment
CN117650898A
Digital certificate signing and issuing method and device, digital certificate application method and device, storage medium and electronic equipment
CN118157871A