Certificate signature method, signature verification method, device, medium and program product

Through multi-hardware code binding and multi-KMS signatures, authorization certificates compatible with multiple devices are generated, which solves the security and compatibility issues of traditional authorization certificate distribution solutions, meets users' multi-device usage needs, and improves certificate security.

CN118568703APending Publication Date: 2024-08-30HANGZHOU NUOWEI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310208803.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The traditional authorization certificate distribution scheme is not bound to hardware information, resulting in poor security, and is not conducive to software developers managing the number of authorizations, and cannot meet the needs of users for multiple devices.

Method used

By binding multiple hardware codes and combining multiple KMSs to generate authorization certificates, using hash operations and multiple key management services for signing, an authorization certificate compatible with multiple clients is generated to ensure the security and compatibility of the certificate.

Benefits of technology

It achieves multi-device compatibility and security of authorization certificates, avoids signature verification interruptions caused by KMS service termination, and improves user experience and management efficiency of software developers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568703A
    Figure CN118568703A
Patent Text Reader

Abstract

Provided in an embodiment of the present application are a certificate signature method, signature verification method, device, medium and program product, the certificate signature method comprising: analyzing a signature request of a user to obtain target information corresponding to the user, the target information comprising a plurality of hardware codes, the hardware codes being used to identify a client of the user; performing Hash operation on each hardware code in the target information to obtain a corresponding Hash value; signing the hash values based on a plurality of key management services to obtain a plurality of signature files; combining the plurality of signature files to obtain an authorization certificate corresponding to the user; and sending the authorization certificate to at least one client corresponding to the user. The signature method compatible with multiple clients and multiple KMSs is realized, the flexibility and safety of signature and verification are improved, and the use requirements of multiple devices of a user are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of software authorization technology, and in particular to a certificate signing method, a signature verification method, a device, a medium, and a program product. Background Art

[0002] Digital signature technology is widely used in the field of information security. It is the application of asymmetric key encryption technology and digital summary technology, which can enable the recipient to effectively verify the authenticity of the data.

[0003] In order to ensure the security and legality of the use of software products, it is necessary to distribute authorization certificates (License Certificates) signed based on digital signature technology to authorized users.

[0004] Traditional authorization certificate distribution solutions are usually not bound to hardware information, have poor security, and are not conducive to software developers managing the number of authorizations. Summary of the invention

[0005] The embodiments of the present application provide a certificate signing method, a signature verification method, a device, a medium, and a program product. By binding multiple hardware codes and combining multiple KMS to generate an authorization certificate, the user's needs for multi-device use are met, and key management through multiple KMSs is used to improve the security of the certificate.

[0006] In a first aspect, an embodiment of the present application provides a method for signing an authorization certificate, the method comprising:

[0007] Parse the user's signature request to obtain the target information corresponding to the user, wherein the target information includes multiple hardware codes, and the hardware code is used to identify the user's client; perform hash operation on each hardware code in the target information to obtain a corresponding hash value; sign the hash value based on multiple key management services to obtain multiple signature files; combine the multiple signature files to obtain the authorization certificate corresponding to the user; send the authorization certificate to at least one client corresponding to the user. Optionally, the authorization certificate also includes the user information of the user.

[0008] Optionally, the target information further includes user information of the user, and the target information is signed based on multiple key management services respectively to obtain multiple signature files, further including:

[0009] A hash operation is performed on the user information to obtain a corresponding hash value; and for each key management service in the multiple key management services, a signature is performed on the hash value corresponding to the user information based on the key management service to obtain a corresponding signature file.

[0010] Optionally, the method further includes:

[0011] For each key management service among the multiple key management services, a key identifier of the key management service is generated according to the server corresponding to the key management service, and the key identifier is added to the signature file of the key management service, so as to verify the signature using the corresponding public key through the key identifier.

[0012] Optionally, the method further includes:

[0013] Acquire the hardware code of the newly added device; send the hardware code of the newly added device to the authorized device, wherein the signature file of the hardware code of the authorized device is stored in the authorization certificate; in response to the confirmation message of the authorized device, sign the hardware code of the newly added device based on each of the multiple key management services to obtain a newly added signature file; add the newly added signature file to the authorization certificate to obtain an updated authorization certificate; distribute the updated authorization certificate.

[0014] Optionally, the hash value is signed based on each of the multiple key management services to obtain multiple signature files, including:

[0015] The hash value is signed based on the respective primary keys or secondary keys in the plurality of key management services to obtain a plurality of signature files, wherein the secondary key is a key encrypted based on the corresponding primary key.

[0016] In a second aspect, the present application also provides a signature verification method, the method comprising:

[0017] Parse the user's signature verification request to obtain the hardware code to be verified and the certificate to be verified; based on the public keys or secondary keys of multiple key management services, perform signature verification on the hash value corresponding to the hardware code in the certificate to be verified, and perform a hash reverse operation on the hash value that passes the signature verification to obtain the hardware code in the certificate to be verified; determine whether the hardware code to be verified matches any of the hardware codes in the certificate to be verified; if so, generate and return a verification pass result.

[0018] Optionally, based on the public keys or secondary keys of multiple key management services, signature verification is performed on the hash value corresponding to the hardware code in the certificate to be verified, including:

[0019] The secondary key is verified based on the public keys of multiple key management services; if the verification is successful, a signature verification is performed on the hash value corresponding to the hardware code in the certificate to be verified based on the secondary key.

[0020] Optionally, the method further includes:

[0021] If the multiple key management services all fail to verify the signature, or the hardware code to be verified does not match the hardware code in the certificate to be verified, a verification failure result is generated and returned.

[0022] In a third aspect, the present application also provides an electronic device comprising: a memory and at least one processor; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the method provided in the first aspect or the second aspect of the present application.

[0023] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, it is used to implement the method provided in the first aspect or the second aspect of the present application.

[0024] In a fifth aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the method provided in the first aspect or the second aspect of the present application.

[0025] The certificate signing method, signature verification method, device, medium and program product provided in the embodiment of the present application realize the signing of multiple hardware codes or hardware information corresponding to the user based on multiple key management services, and the combination of multiple signature files to obtain the user's authorization certificate. The authorization certificate is bound with the hardware information of multiple devices corresponding to the user and the multiple key management services corresponding to the software developer, which improves the compatibility of the authorization certificate and meets the user's needs for using software on multiple devices. At the same time, multiple key management services are introduced to improve the security of the authorization certificate and its signature. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0027] Figure 1 A schematic diagram of an authorization certificate signing process provided for an embodiment of the present application;

[0028] Figure 2 A flowchart of a certificate signing method provided for one embodiment of the present application;

[0029] Figure 3 For this application Figure 2 A schematic diagram of an authorization certificate provided by the illustrated embodiment;

[0030] Figure 4 A flowchart of a certificate signing method provided for another embodiment of the present application;

[0031] Figure 5 For this application Figure 4 A schematic diagram of an authorization certificate provided in the illustrated embodiment;

[0032] Figure 6 A flowchart of a certificate signing method provided for another embodiment of the present application;

[0033] Figure 7 A flowchart of a signature verification method provided for one embodiment of the present application;

[0034] Figure 8 A schematic diagram of the structure of an electronic device provided for one embodiment of the present application.

[0035] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0036] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0037] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0038] In order to improve the security and legality of software products, software developers authenticate users or devices by distributing and verifying the signature of authorization certificates. In order to prevent the same account from logging in on multiple devices, the hardware information of the device needs to be introduced in the authorization certificate. Figure 1 A schematic diagram of the authorization certificate signing process provided for an embodiment of the present application, such as Figure 1 As shown in the figure, the authorization certificate signing process specifically includes:

[0039] Collect user key information and hardware information of user device; generate an authorization certificate based on user key information and hardware information, sign (or digitally sign) the authorization certificate with a private key, store the signed file, and send the file to the user.

[0040] The user device is bound during the signing process of the authorization certificate to authorize the device to use the software product. If the user needs to use multiple devices in different time periods, the user's other devices will not be able to use the software product service, which cannot meet the user's needs.

[0041] Some software developers choose to use cloud server-based key management services (KMS) to manage keys for signing and signature verification. When the cloud server service period expires, the KMS service will also be terminated, resulting in the termination of the software developer's signature service, inability to perform normal signature verification services, and users being unable to use the software normally.

[0042] In order to improve the compatibility of authorization certificate signatures with the needs of multiple devices, and to avoid the termination of KMS services causing the signing service to fail to operate normally, this application provides a signing method for authorization certificates that is compatible with multiple clients and multiple signature servers, and implements the signing of the hardware codes of multiple devices (multiple clients) corresponding to the user based on multiple key management services, and generates the user's authorization certificate based on multiple signature files. By binding multiple hardware codes, the user's needs for using software products on multiple devices are met. By binding multiple KMS services, when one of the KMS services expires, it can still be signed and verified based on other KMS services, ensuring the smooth progress of signing and verification.

[0043] Figure 2 The following is a flow chart of a certificate signing method provided by an embodiment of the present application. The method can be executed by an electronic device with corresponding data processing functions, such as a signature server, which can be a server, a virtual machine or other device. Figure 2 As shown, the certificate signing method provided in this embodiment includes the following steps:

[0044] Step S201, parsing the user's signature request to obtain the target information corresponding to the user.

[0045] The target information includes multiple hardware codes, and the hardware codes are used to identify the client of the user. One hardware code corresponds to one client. One user can correspond to multiple clients. The client can be a mobile phone, a computer, a tablet computer, a wearable device, a host computer, etc.

[0046] The hardware code can be generated based on the hardware information of the client. The hardware information may include a unique identification code of the client and may also include serial numbers of core components in the client, including but not limited to CPU (Central Processing Unit), GPU (Graphics Processing Unit), hard disk, and motherboard.

[0047] In some embodiments, the hardware code may be generated based on a unique identification code of the client, such as by setting a conversion relationship to generate a unique hardware code corresponding to the client based on the unique identification code of the client.

[0048] In other embodiments, the hardware code of the client may be generated by concatenating partial serial numbers of multiple core components of the client.

[0049] Specifically, the client service program installed on the client can generate multiple hardware codes corresponding to the user based on the hardware information of multiple clients corresponding to the user. Then, the client service program generates a signature request carrying multiple hardware codes corresponding to the user, and sends the signature request to the signature service end to respond to the signature request and generate a corresponding signature file.

[0050] Step S202: performing a hash operation on each hardware code in the target information to obtain a corresponding hash value.

[0051] Specifically, the hash value corresponding to each hardware code may be calculated based on a preset hash function.

[0052] Through hash operations, the target information is encrypted and stored in the form of hash values, which makes the query faster.

[0053] Step S203: Sign the hash value based on each of the multiple key management services to obtain multiple signature files.

[0054] Step S204: Combine the multiple signature files to obtain an authorization certificate corresponding to the user, and send the authorization certificate to at least one client corresponding to the user.

[0055] The key management service is a service deployed in the cloud for managing keys of software developers. There are multiple key management services. Selecting the key management service for key management can effectively prevent the loss of keys in the event of an attack, thus improving the security of key management.

[0056] Based on the identification of the software developer or its corresponding software product, a plurality of corresponding key management services may be obtained, and the target information may be signed based on each of the plurality of corresponding key management services.

[0057] Exemplarily, the software product may be medical image recognition software, diagnosis result structured storage software, credit limit estimation software, transaction volume prediction software, etc. Correspondingly, the above-mentioned users may be doctors, technicians, bank employees, etc.

[0058] After the software or application is connected to the instance of the key management service, the CA certificate of the key management service is obtained. The CA certificate of the key management service stores the corresponding key for signing and signature verification.

[0059] For each of the multiple key management services, after verifying the legitimacy of the certificate file of the key management service, extract the key of the key management service, such as the private key, from the certificate file of the key management service. Sign each item in the target information based on the key of the key management service to obtain multiple signature files corresponding to the target information.

[0060] For example, take the case where a user corresponds to three clients. After hash operation, the hash values ​​corresponding to the hardware codes of the three clients are A, B, and C respectively. The software developer corresponds to three key management services. The three key management services sign the hash values ​​A, B, and C based on their respective private keys (i.e., private key 1, private key 2, and private key 3), and obtain nine signature files, namely A1, A2, A3, B1, B2, B3, C1, C2, and C3. A1 represents the signature file of hash value A under private key 1. The nine signature files are combined to obtain the authorization certificate corresponding to the user.

[0061] In some embodiments, the authorization certificate also includes user information or customer information. The user information may include name, mobile phone number, ID number, account number, etc., so as to facilitate user maintenance based on the user information.

[0062] After receiving the user's signature request, the signature request is parsed to obtain the user information and multiple hardware codes corresponding to the user, so as to sign the user information through multiple key management services corresponding to the user, and combine the signature file corresponding to the user information and the signature files corresponding to each hardware code into an authorization certificate.

[0063] By binding user information in the authorization certificate, it is convenient for software developers to perform user maintenance based on user information.

[0064] In some embodiments, the authorization certificate also includes a validity period.

[0065] For example, Figure 3 For this application Figure 2 The schematic diagram of the authorization certificate provided in the embodiment shown is as follows: Figure 3As shown in the figure, the authorization certificate includes authorization information, user information, client hardware information and KMS public key information, where the authorization information includes the serial number of the software product, authorization timestamp, validity period and other information; the user information is the relevant information of the authorized user, including but not limited to name, ID number, mobile phone number and other information; the client hardware information includes the above-mentioned multiple hardware codes, such as Figure 3 In some embodiments, hardware information may be used instead of hardware code; KMS public key information includes corresponding public keys of multiple KMSs, such as Figure 3 The public key 1, public key 2, etc. in the authorization certificate are all ciphertext, such as the corresponding signature file, Figure 3 The structure shown is only used to understand the information bound in the authorization certificate.

[0066] Optionally, the hash value is signed based on each of the multiple key management services to obtain multiple signature files, including:

[0067] The hash value is signed based on respective primary keys or secondary keys in multiple key management services to obtain multiple signature files.

[0068] The secondary key is a key encrypted based on the corresponding primary key.

[0069] In some embodiments, the secondary key is also referred to as a derived key.

[0070] In some embodiments, if the number of key management services corresponding to the user is too large, such as greater than a preset number, a preset number of target key management services can be determined from the key management services corresponding to the user to perform subsequent signing operations.

[0071] Exemplarily, a preset number of key management services (i.e., a first number of target key management services) can be randomly selected from multiple key management services corresponding to the user, and a signature operation can be performed on each item in the user information based on the first-level key or second-level key of the selected key management service to obtain a signature file.

[0072] Specifically, based on the priority of the key management service and / or the remaining time of the service period, a preset number of key management services can be screened from the key management services corresponding to the user as target key management services for subsequent signing operations.

[0073] In some embodiments, the target key management service may be a key management service having a longer remaining time of service period among the multiple key management services.

[0074] In some embodiments, the target key management service may be a key management service with a higher priority among the multiple key management services mentioned above.

[0075] After selecting a target key management service from multiple key management services, a derived key is generated based on the key derivation function of the target management service, and each item in the target information is signed based on the derived key to obtain multiple signature files, and the multiple signature files are combined into an authorization certificate. The authorization certificate is stored and sent to at least one client corresponding to the user, including the client that triggers the signature request.

[0076] The priority of the key management service can be specified by the software developer, or determined based on parameters such as the server corresponding to the key management service and the frequency of use of the key management service.

[0077] Specifically, the service score of each key management service may be calculated based on the weighted average or weighted sum of the remaining time of the service period and the priority, and a preset number of key management services with higher service scores are selected as target key management services. The key management services may be screened based on the priority, such as removing key management services with a priority lower than a preset priority. If the number of the screened key management services is still greater than the preset number, a preset number of key management services with longer service periods are selected from the screened key management services as target key management services.

[0078] By determining the target key management service based on priority and service period, the accuracy of determining the target key management service is improved, thereby improving the security of the digital signature.

[0079] The authorization certificate generated by the signature server can be sent to the corresponding client through the client service program.

[0080] The certificate signing method provided in this embodiment implements signing of multiple hardware codes or hardware information corresponding to a user based on multiple key management services, and combines multiple signature files to obtain the user's authorization certificate. The authorization certificate is bound with the hardware information of multiple devices corresponding to the user and multiple key management services corresponding to the software developer, which improves the compatibility of the authorization certificate and meets the user's need to use software on multiple devices. At the same time, multiple key management services are introduced to improve the security of the authorization certificate and its signature.

[0081] Figure 4 This is a flow chart of a certificate signing method provided by another embodiment of the present application. This embodiment is aimed at the case where the target information includes user information and multiple hardware codes. The certificate signing method provided by this embodiment is Figure 2 Based on the embodiment shown, step S203 is further refined, and the steps of adding the key identifier are added before step S203, such as Figure 4 As shown, the certificate signing method provided in this embodiment may include the following steps:

[0082] Step S401, parsing the user's signature request to obtain target information corresponding to the user, wherein the target information includes multiple hardware codes and user information.

[0083] Step S402: performing a hash operation on each hardware code in the target information and the user information to obtain a corresponding hash value.

[0084] Step S403: For each key management service among the multiple key management services, signing the hash value corresponding to the target information based on the key management service to obtain a corresponding signature file.

[0085] The hash value corresponding to the target information includes the hash values ​​of each item in the target information obtained through hash operation, the hash value corresponding to each hardware code in the target information, and the hash value corresponding to the user information in the target information.

[0086] Step S404: For each key management service in the multiple key management services, a key identifier of the key management service is generated according to the server corresponding to the key management service, and the key identifier is added to the signature file of the key management service to verify the signature using the corresponding public key through the key identifier.

[0087] The key identifier is used to identify a key management service. The key identifier can be used to quickly find the key, public key or private key of the corresponding key management service.

[0088] Specifically, the key identifier of the key management service may be generated based on information such as a server identifier and an IP address of the server corresponding to the key management service.

[0089] Specifically, multiple key management service public keys and key identifiers may be stored in the KMS public key information of the authorization certificate, and multiple hardware codes may be stored in the client hardware information of the authorization certificate.

[0090] By introducing the key identifier in the authorization certificate, the corresponding key can be quickly determined based on the key identifier during subsequent decryption or signature verification, thereby improving the efficiency of signature verification.

[0091] Figure 5 For this application Figure 4 A schematic diagram of the authorization certificate provided in the embodiment shown is as follows: Figure 5 As shown, the authorization certificate includes authorization letter information, client hardware information and KMS public key information; the KMS public key information includes multiple key management service public keys and key identifiers, such as Figure 5 The public key 51, public key 52, key identifier 51 and key identifier 52, etc.

[0092] Step S404: Combine the multiple signature files to obtain an authorization certificate corresponding to the user.

[0093] Step S405: sending the authorization certificate to at least one client corresponding to the user.

[0094] In this embodiment, the efficiency of key search in the authorization certificate is improved by introducing the key identifier; the target key management service is determined in combination with the priority and service period, so that the key management service with better service and longer remaining service period is given priority for signing, thereby improving the security and effectiveness of the signature.

[0095] When there is a new device (or client) that needs authorization, in order to ensure that the software product can be used normally in the new device, you can Figure 6 The method provided in the corresponding embodiment updates the authorization certificate to add the hardware code corresponding to the new device in the authorization certificate.

[0096] Figure 6 This is a flow chart of a certificate signing method provided by another embodiment of the present application. The certificate signing method provided by this embodiment is based on the above embodiment, and adds a step of updating the authorization file based on the hardware code of the newly added device after step S204, such as Figure 6 As shown, the certificate signing method provided in this embodiment may further include the following steps after step S204:

[0097] Step S601, obtaining the hardware code of the newly added device.

[0098] Among them, the newly added device is a new device or client that needs to be authorized to use the corresponding software.

[0099] The newly added device can obtain the authorization certificate from the authorized device and send the hardware information of the newly added device to the signature server. The signature server generates the corresponding hardware code based on the hardware information of the newly added device, such as generating the hardware code through the client program.

[0100] Step S602: Send the hardware code of the newly added device to the authorized device.

[0101] The signature file of the hardware code of the authorized device is stored in the authorization certificate. The authorized device is the device bound with the hardware code when the authorization certificate is distributed previously.

[0102] The signature server sends the hardware code of the newly added device to one of the authorized devices, so that the authorized device confirms the newly added device based on the hardware code.

[0103] In some embodiments, the authorized device may include a main device, and the signature service end may send the hardware code of the newly added device to the main device.

[0104] Step S603: In response to the confirmation message of the authorized device, the hardware code of the newly added device is signed based on each of the plurality of key management services to obtain a newly added signature file.

[0105] Step S604: Add the newly added signature file to the authorization certificate to obtain an updated authorization certificate, and distribute the updated authorization certificate.

[0106] The authorized device determines whether the newly added device is an authorized device based on the hardware code of the newly added device. If so, a confirmation message of the newly added device is generated and sent to the signature server. After receiving the confirmation message, the signature server signs the hardware code of the newly added device to obtain a newly added signature file, and updates the authorization certificate based on the newly added signature file to bind the newly added device in the updated authorization certificate. Specifically, the newly added signature file corresponding to the hardware code of the newly added device can be added to the generated authorization certificate corresponding to the authorized device.

[0107] For example, by Figure 2 or Figure 4 The provided method adds the signature files corresponding to the hardware codes of multiple A devices corresponding to user 1 to the authorization certificate, that is, after authorizing the multiple A devices corresponding to user 1, in order to ensure that the newly added devices, such as device B (which can be the device corresponding to user 1 or the device corresponding to other users), can use the corresponding software or service, the hardware information (or hardware code) of device B can be passed to the signature server, and the signature server sends the hardware information to device A for display. After user 1 confirms the hardware information on device A, the corresponding hardware code is generated based on the hardware information of device B, and the hardware code is signed by multiple KMSs to obtain multiple newly added signature files, and the multiple newly added signature files are added to the authorization certificate to realize automatic update of the authorization certificate, so as to bind device B in the updated authorization certificate and authorize the user to use the corresponding software or service on device B.

[0108] In this embodiment, for the authorization of a newly added device, the signature file corresponding to the hardware code of the newly added device, i.e., the newly added signature file, is automatically added to the authorization file through confirmation of the newly added device by the authorized device, thereby realizing automatic updating of the authorization file, improving the flexibility and automation of authorization, and simplifying user operations.

[0109] Figure 7 A flowchart of a signature verification method provided by an embodiment of the present application is provided. The method can be executed by an electronic device having a corresponding data processing function, such as a signature server. Figure 7 As shown, the signature verification method includes the following steps:

[0110] Step S701, parsing the user's signature verification request to obtain the hardware code to be verified and the certificate to be verified.

[0111] The hardware code to be verified is the hardware code corresponding to the client that sends the signature verification request, and the certificate to be verified is the authorization certificate stored in the client that sends the signature verification request.

[0112] When a user logs in or uses the software through the client, a signature verification request is triggered. The signature verification request carries the client's hardware code to be verified (recorded as the hardware code to be verified) and the authorization certificate to be verified stored by the client (recorded as the certificate to be verified).

[0113] The client program can obtain the client's hardware information and generate the client's hardware code based on the hardware information. The client program carries the hardware code and the authorization certificate stored by the client to generate a signature verification request to request a remote signature verification service.

[0114] The signature server receives the signature verification request and parses the hardware code to be verified and the certificate to be verified.

[0115] Step S702: Based on the public keys or secondary keys of multiple key management services, signature verification is performed on the hash value corresponding to the hardware code in the certificate to be verified.

[0116] The signature server obtains the stored authorization certificate corresponding to the user, and reads the stored public keys (a primary key) or secondary keys of the corresponding multiple key management services, and performs signature verification on each hash value in the certificate to be verified.

[0117] Each hash value in the certificate to be verified includes hash values ​​corresponding to multiple hardware codes and also includes a hash value corresponding to user information.

[0118] For each hash value in the certificate to be verified, the signature server performs signature verification (referred to as signature verification) on the hash value in the certificate to be verified in a certain order based on the public keys of multiple key management services until the signature verification is successful or all public keys are traversed.

[0119] The signature server takes out a public key from multiple public keys in a certain order, and performs signature verification on the hash value in the certificate to be verified. If the signature verification is successful, it continues to verify the hardware code to be verified corresponding to the client; if the signature verification is unsuccessful, it takes out the next public key for signature verification, and so on.

[0120] If multiple key management services fail signature verification, a verification failure result is generated and returned.

[0121] Optionally, based on the public keys or secondary keys of multiple key management services, signature verification is performed on the hash value corresponding to the hardware code in the certificate to be verified, including:

[0122] The secondary key is verified based on the public keys of multiple key management services; if the verification is successful, a signature verification is performed on the hash value corresponding to the hardware code in the certificate to be verified based on the secondary key.

[0123] The secondary key can be verified by the primary key first. After the verification is passed, subsequent signature verification and signature operations can be performed based on the secondary key to avoid frequent calls to the primary key.

[0124] Step S703, if the signature verification passes, a hash operation is performed on the hardware code to be verified to obtain a hash value corresponding to the hardware code to be verified, and the hash value corresponding to the hardware code to be verified is signed based on the key management service that has passed the signature verification to obtain a signature file to be verified.

[0125] If one of the multiple key management services passes the signature verification of the certificate to be verified, the key management service is recorded as the passed key management service, and a hash operation is performed on the hardware code to be verified to obtain the corresponding hash value, and the hash value is signed based on the private key or secondary key of the passed key management service to obtain the signature file to be verified.

[0126] Step S704, determining whether the signature file to be verified matches any one of the signature files corresponding to the hardware code in the certificate to be verified.

[0127] If one of the public key signatures is successfully verified, that is, it passes the verification, then the hardware code to be verified corresponding to the client will continue to be verified. Specifically, it is to determine whether the signature file corresponding to the hardware code to be verified, that is, whether the signature file to be verified matches one of the signature files corresponding to the multiple hardware codes stored in the certificate to be verified. If they match, a verification pass result is generated and returned; if they do not match, a verification failure result is generated and returned.

[0128] Step S705: If yes, generate and return a verification pass result.

[0129] Optionally, the method further comprises the following steps:

[0130] Step S706: If the multiple key management services all fail to verify the signature, or the signature file to be verified does not match the signature file corresponding to the hardware code in the certificate to be verified, a verification failure result is generated and returned.

[0131] If the public keys or secondary keys of multiple KMSs cannot verify the signature file in the certificate to be verified, the signature verification of the certificate to be verified fails; if the signature file stored in the certificate to be verified does not contain a signature file that matches the signature file corresponding to the hardware code to be verified, the verification of the hardware code to be verified fails; if the signature verification of the certificate to be verified fails or the verification of the hardware code to be verified fails, the verification failure result is returned.

[0132] By verifying the signature files corresponding to multiple hardware codes in the authorization certificate and the keys of multiple KMSs, users can access or use software services through multiple clients. At the same time, it effectively avoids the phenomenon that signature verification cannot be performed due to the expiration of a KMS, thereby improving the smoothness of signature verification.

[0133] The signature verification method provided in this application includes three stages: signature preparation stage, signature stage and verification stage.

[0134] In the signature preparation stage, before signing for the user, the client program of the software developer obtains the hardware information of the user's device and generates the corresponding hardware code.

[0135] During the signing phase, the client program carries the hardware code to request the software developer's signing service. The signing service combines the CA certificates corresponding to multiple KMSs, the hardware code, and the customer information into an authorization certificate.

[0136] During the verification phase, the client program obtains the hardware information of the user's device and generates a hardware code. The client program carries the hardware code and authorization certificate corresponding to the user's device and requests the remote signature verification service. The signature verification service uses the configured KMS public key to verify the signature. If the verification fails, the second, third, ... Nth KMS public keys stored in the authorization certificate stored by the signature verification service are taken out for verification in turn. N is the total number of KMS public keys in the authorization certificate. After the verification passes, continue to verify whether the hardware code of the user's machine matches the one stored in the authorization certificate. If the match is successful, a verification result is generated. If not, the second, third, ..., Mth hardware codes are taken out in order for matching until the match is successful, and a verification result is generated. The verification result is returned to the client program. M is the total number of hardware codes.

[0137] The method provided in this application can be applied to certificate signing and signature verification of software or applications related to the medical and financial fields.

[0138] This application provides another certificate signing method, including:

[0139] Based on the client program of the financial software server, multiple hardware information corresponding to the user is obtained, and a hardware code of each of the hardware information is generated; the client program generates a signature request carrying the multiple hardware codes corresponding to the user and sends it to the signature server of the financial software server;

[0140] The signature server parses the signature request to obtain multiple hardware codes corresponding to the user, wherein the hardware code is used to identify the user's client; performs a hash operation on each hardware code in the target information to obtain a corresponding hash value; signs the hash value based on each of multiple key management services to obtain multiple signature files; combines the multiple signature files to obtain an authorization certificate corresponding to the user; and sends the authorization certificate to at least one client corresponding to the user.

[0141] This application provides another certificate signing method, including:

[0142] Based on the client program of the medical software server, multiple hardware information corresponding to the medical staff is obtained, and a hardware code for each of the hardware information is generated; the client program generates a signature request carrying the multiple hardware codes corresponding to the medical staff and sends it to the signature server of the medical software server; the signature server parses the signature request to obtain multiple hardware codes corresponding to the medical staff, wherein the hardware code is used to identify the user's client; a hash operation is performed on each hardware code in the target information to obtain a corresponding hash value; based on multiple key management services, the hash value is signed respectively to obtain multiple signature files; the multiple signature files are combined to obtain an authorization certificate corresponding to the medical staff; and the authorization certificate is sent to at least one client corresponding to the medical staff.

[0143] An embodiment of the present application provides a certificate signing device, the device comprising:

[0144] A signature request parsing module is used to parse the user's signature request to obtain the target information corresponding to the user, wherein the target information includes multiple hardware codes, and the hardware code is used to identify the user's client; a signature module is used to perform a hash operation on each hardware code in the target information to obtain a corresponding hash value, and sign the hash value based on multiple key management services to obtain multiple signature files; an authorization certificate distribution module is used to combine the multiple signature files to obtain the authorization certificate corresponding to the user, and send the authorization certificate to at least one client corresponding to the user.

[0145] Optionally, the target information also includes user information of the user, and a signature module, which is specifically used to:

[0146] Perform a hash operation on each hardware code and the user information in the target information to obtain a corresponding hash value; for each key management service in the multiple key management services, sign the hash value corresponding to each hardware code and the user information based on the key management service to obtain a corresponding signature file.

[0147] Optionally, the device further comprises:

[0148] A key identification adding module is used to generate a key identification of each key management service among the multiple key management services according to the server corresponding to the key management service, and add the key identification to the signature file of the key management service so as to verify the signature using the corresponding public key through the key identification.

[0149] Optionally, the device further includes an authorization certificate updating module, configured to:

[0150] Acquire the hardware code of the newly added device; send the hardware code of the newly added device to the authorized device, wherein the signature file of the hardware code of the authorized device is stored in the authorization certificate; in response to the confirmation message of the authorized device, sign the hardware code of the newly added device based on each of the multiple key management services to obtain a newly added signature file; add the newly added signature file to the authorization certificate to obtain an updated authorization certificate; distribute the updated authorization certificate.

[0151] Optional, signature module, specifically used for:

[0152] Perform a hash operation on each item in the target information to obtain a corresponding hash value; sign the hash value based on the respective primary keys or secondary keys in multiple key management services to obtain multiple signature files, wherein the secondary key is a key encrypted based on the corresponding primary key.

[0153] The certificate signing device provided in this embodiment can execute the certificate signing method provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method.

[0154] An embodiment of the present application provides a certificate signing device, the device comprising:

[0155] A verification request parsing module is used to parse the user's signature verification request to obtain the hardware code to be verified and the certificate to be verified; a first verification module is used to perform signature verification on the hash value corresponding to the hardware code in the certificate to be verified based on the public key or secondary key of multiple key management services; a signature generation module to be verified is used to perform hash operation on the hardware code to be verified if the signature verification passes, to obtain the hash value corresponding to the hardware code to be verified, and to sign the hash value corresponding to the hardware code to be verified based on the key management service that passes the signature verification, to obtain the signature file to be verified; a second verification module is used to determine whether the signature file to be verified matches any one of the signature files corresponding to the hardware code in the certificate to be verified; a first verification result returning module is used to generate and return a verification pass result if they match.

[0156] Optionally, the first verification module is specifically used to:

[0157] The secondary key is verified based on the public keys of multiple key management services; if the verification is successful, a signature verification is performed on the hash value corresponding to the hardware code in the certificate to be verified based on the secondary key.

[0158] Optionally, the device further comprises:

[0159] The second verification result returning module is used to generate and return a verification failure result if the multiple key management services all fail to verify the signature, or the signature file to be verified does not match the signature file corresponding to the hardware code in the certificate to be verified.

[0160] The certificate signing device provided in this embodiment can execute the signature verification method provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method.

[0161] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application is shown as follows: Figure 8 As shown, the electronic device includes: a memory 810 and at least one processor 820.

[0162] The memory 810 stores computer-executable instructions, and at least one processor 820 executes the computer-executable instructions stored in the memory 810, so that the at least one processor 820 executes a method provided in any embodiment of the present application.

[0163] The memory 810 and the processor 820 are connected via a bus 830 .

[0164] The relevant instructions can be understood by referring to the relevant descriptions and effects corresponding to the steps provided in the above-mentioned certificate signing method embodiment, and will not be elaborated here.

[0165] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, a certificate signing method provided in any embodiment of the present application is implemented.

[0166] Among them, the computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

[0167] An embodiment of the present application provides a computer program product, including a computer program, which implements the method provided in any embodiment of the present application when executed by a processor.

[0168] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0169] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0170] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A certificate signing method, characterized in that: The method comprises: Parsing the user's signature request to obtain target information corresponding to the user, wherein the target information includes multiple hardware codes, and the hardware codes are used to identify the user's client; Performing a hash operation on each hardware code in the target information to obtain a corresponding hash value; Signing the hash value based on each of the multiple key management services to obtain multiple signature files; Combining the multiple signature files to obtain an authorization certificate corresponding to the user; Send the authorization certificate to at least one client corresponding to the user.

2. The method according to claim 1, characterized in that The target information also includes the user information of the user, and the target information is signed by each of the multiple key management services to obtain multiple signature files, further comprising: Performing a hash operation on the user information to obtain a corresponding hash value; For each key management service among the multiple key management services, a hash value corresponding to the user information is signed based on the key management service to obtain a corresponding signature file.

3. The method according to claim 1, characterized in that The method further comprises: For each key management service among the multiple key management services, a key identifier of the key management service is generated according to the server corresponding to the key management service, and the key identifier is added to the signature file of the key management service, so as to verify the signature using the corresponding public key through the key identifier.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Get the hardware code of the newly added device; Sending the hardware code of the newly added device to the authorized device, wherein the signature file of the hardware code of the authorized device is stored in the authorization certificate; In response to the confirmation message of the authorized device, signing the hardware code of the newly added device based on each of the plurality of key management services to obtain a newly added signature file; Adding the newly added signature file to the authorization certificate to obtain an updated authorization certificate; The updated authorization certificate is distributed.

5. A signature verification method, characterized in that: The method comprises: Parse the user's signature verification request to obtain the hardware code and certificate to be verified; Performing signature verification on the hash value corresponding to the hardware code in the certificate to be verified based on the public keys or secondary keys of multiple key management services; If the signature verification passes, a hash operation is performed on the hardware code to be verified to obtain a hash value corresponding to the hardware code to be verified, and the hash value corresponding to the hardware code to be verified is signed based on the key management service that has passed the signature verification to obtain a signature file to be verified; Determine whether the signature file to be verified matches any one of the signature files corresponding to the hardware code in the certificate to be verified; If so, a verification result is generated and returned.

6. The method according to claim 5, characterized in that Based on the public keys or secondary keys of multiple key management services, signature verification is performed on the hash value corresponding to the hardware code in the certificate to be verified, including: Verifying the secondary key based on public keys of multiple key management services; If the verification is successful, a signature verification is performed on the hash value corresponding to the hardware code in the certificate to be verified based on the secondary key.

7. The method according to claim 5, characterized in that The method further comprises: If the multiple key management services all fail to verify the signature, or the signature file to be verified does not match the signature file corresponding to the hardware code in the certificate to be verified, a verification failure result is generated and returned.

8. An electronic device, characterized in that: include: memory and at least one processor; The memory is used to store computer-executable instructions; The at least one processor is configured to execute computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 7 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Switching method of key storage mechanism, cluster system, device, medium and product

    CN119402193A